THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/07/2005 at 18:18, xxxxxxxx wrote:
Cinema 4D Version: 8.503
Language(s) : C++ ;
I've been trying to figure out how to initialize a gradient's alpha without much luck.
I have a gradient in my description with COLOR; and ALPHA; specified.
In my plugin's Init I allocate a gradient with AutoAlloc, insert a few knots, and initialize the control with it.
Works absolutely fine. Pretty standard stuff I think, but if you'd like me to post the code anyway, I would be glad to.
The SDK docs (both 8.5 and 9.1) are pretty vague.
The description for GetAlphaGradient reads: "Alpha gradient. The gradient owns the pointed knot.".
Anyway, I can't seem insert any knots in the gradient's alpha, let alone get a pointer to the alpha gradient.
Anyone have any success with this?
On 24/07/2005 at 20:34, xxxxxxxx wrote:
I'll keep trying and let you know if I figure it out.
On 27/07/2005 at 06:40, xxxxxxxx wrote:
Hmm, it seems the documentation is missing the step in red:
k1.pos = 0;
k1.index = 0;
k1.brightness = 1.0;
k1.bias = 0.5;
k1.col = Vector(1,0,0);
k2.pos = 1;
k2.index = 1;
k2.brightness = 0.5;
k2.bias = 0.8;
k2.col = Vector(0.5,0.5,0);
Gradient* ag = g->GetAlphaGradient();
GeData d(CUSTOMDATATYPE_GRADIENT, g);
On 27/07/2005 at 06:53, xxxxxxxx wrote:
Thanks Mikael. I will try that out soon.