Object Opacity Animation by Python Tag
-
Hello Dear Dev.
Is it possible to animate the transparency of an object in Python without using "Display Tag - Visibility"?
I searched in the SDK but couldn't see anything similar.
I'm looking for a way not to use Display Tag. Thank You. -
Hello @ymoon,
thank you for reaching out to us. Your question is a little bit ambiguous, as you mix up the words opacity and transparency and do not tell us in which context you want them to apply. But from the context, I assume that you are seeking an effect which is visible in the viewport that does not rely on a material system or the Display Tag "Visibility" value.
Doing this is not possible, Cinema 4D has no manually definable concept of opacity for an object outside of the material system except for the "Visibility" parameter of the Display tag.
So, you must either use this parameter or a standard renderer material with the alpha channel enabled.
Cheers,
FerdinandPS: With
BaseDraw.SetTransparency
you can set the transparency of your own drawing operations, but that does not strike me as the thing you are after here. -
@ferdinand
I am sorry for the confusion.
Display Tag - Visibility creates Opacity when rendering.
(without depending on the material-alpha channel)
I wanted to know if there is a function in Python that has the same effect as Display Tag - Visibility %. (not viewport)
Thank You. -
Hello @ymoon,
Despite the minor communication problems, I understood that goal. The answer is unfortunately that you either need a Display Tag or a material to control the visibility of an object in the viewport or renderings.
I am not sure why using the tag or material are not an option for you. But when you want to "harden" a scene against its alpha values being changed, you think about either hiding the material tag and material itself or the display tag from the users eyes. You could do that with
NBIT_OHIDE
. I.e.,myTag.ChangeNBit(c4d.NBIT_OHIDE, c4d. NBITCONTROL_SET)
would permanently hide
myTag
in the Object Manager, even over scene reloading boundaries. User would not be able to interact with the tag anymore.Cheers,
Ferdinand -
@ferdinand
Thank You for Reply