Inherited color woes.

Hey all, I’m having an issue here. I’m reparenting a model to a piece of an actor and it’s interheriting it’s color. Normally, I would work around this by simply creating a dummy node reparented to render, etc., and using position and intervals if needed to make it match how it was previously, and of course the color would then not be applied.

However this time it MUST be reparented to this piece of the actor for movement’s sake, and it is waaaaay too advanced to copy with a PosHprInterval onto this model when reparenting it to a new dummy node or render. I’m not even going to try, considering the animation, it would be foolish to even try.

Is there any way to not inherit color, or to clear the color of the child node back to it’s default state, after reparenting to a parent node, after loading the child model?

I have done clearColor() and clearColorScale() (after reparenting) on this model to no avail. Perhaps there is a deeper solution. It seems like something I should know but I have always just simply worked around it as that seemed to be the most efficient way to overcome this problem, but now that is not an option at all.

Creating a dummy node in between the two other nodes will not work, as the dummy node will simply inherit the color as well and pass it on.

Setting the color scale on the child model will not work, as it just “adds” on top of the parent’s color inheritance, and the lowest possible setting with an alpha of 0.0 would simply just make an invisible mask over the inherited color (meaning: not many any difference whatsoever) rather than affecting how the parent’s color is displayed upon the child model.

The effect is seemingly locked in regardless of any attempts to fix this.

Thanks!

Otaku

Yep, there is NodePath.setColorOff which should do what you want. If you call this on the model you are reparenting, it should no longer inherit the parent’s color.

There’s also NodePath.setColorScaleOff to disable an inherited color (and alpha) scale.