Page 2 of 2

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 19:02
by Skinnytorus
It's from example.wz4, page name: v.152imposters. Layer2D op.
Hmmm.. I don't have any trouble commenting it out by # or //. At least in my file with lightning it seems to work OK...
Can you submit an example file?

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 19:43
by ikam
Sorry, it's OK.
I used a bad wz version with your file (with colora...)

Effectively, variables for sprites are binded in 'fxparticle_ops.cpp' wich is generated at compil. We can see at line 3677 => ctx->BindLocal(ctx->AddSymbol(L"color_"),val);

This name with "_" at end is surely generated because of the conflict with the color type name.

Good to know ;)

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 19:59
by Skinnytorus
thanks. I see now.
But what about [0..3] in "Color_ = myspline(sin(time*200))[0..3]"?
Is that the number of attributes to be animated (rgba) or anything else?

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 20:26
by ikam
don't know exactly, saw that in example.wz4 (v0.168).
[X..Y] seems represent an interval with the number of element in the variable... trans = 3 (xyz), color = 4(rgba)... If the count interval doesn't correspond, there is an error, but I do not really know how to use it.
For spline here, it looks like it take only points between this interval to send them into color variable for rgba.

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 20:33
by Skinnytorus
...and the count starts from 0. I see the logic here. Thank you.

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Monday, 18.June 2012, 11:31
by reEto
again, some of you crying bug, bug,bug... the simplest way to animate these ops is to use a spline