Particle SetData
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/05/2004 at 18:34, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.5
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
From coffee, I would like to turn an emitter on and off based on some logic. The following code is clean but it doesn't seem to change the emitter's start and stop times as expected. After I SetData(), is there something that needs to be done to make it stick?
var opc = op->GetContainer();
opc->SetData(PARTICLEOBJECT_START, frame);
opc->SetData(PARTICLEOBJECT_STOP, frame+1);Thanks.
3DCrew -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/05/2004 at 19:27, xxxxxxxx wrote:
Correction. I am sending the container back to the object when I'm done. This works with setting colors on light data. Using modified code, I want to set the start/stop time for an emitter. It just seems to be ignoring the command.
var opc = op->GetContainer();
opc->SetData(PARTICLEOBJECT_START, frame);
opc->SetData(PARTICLEOBJECT_STOP, frame+1);
op- >SetContainer(opc);
Still no glory. Thanks all. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/05/2004 at 17:52, xxxxxxxx wrote:
The expression "frame+1" leads me to belive that "frame" is simply an integer. But PARTICLEOBJECT_START wants a BaseTime. See the documentation for BaseTime and use something like:
var ft=new (BaseTime); ft->SetFrame(frame, doc->GetFps()); opc->SetData(PARTICLEOBJECT_START, ft);