Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Object Opacity Animation by Python Tag

    Cinema 4D SDK
    2023 python
    2
    5
    869
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ymoonY
      ymoon
      last edited by

      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.

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @ymoon
        last edited by ferdinand

        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,
        Ferdinand

        PS: 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.

        MAXON SDK Specialist
        developers.maxon.net

        ymoonY 1 Reply Last reply Reply Quote 0
        • ymoonY
          ymoon @ferdinand
          last edited by

          @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.

          ferdinandF 1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand @ymoon
            last edited by

            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

            MAXON SDK Specialist
            developers.maxon.net

            ymoonY 1 Reply Last reply Reply Quote 0
            • ymoonY
              ymoon @ferdinand
              last edited by

              @ferdinand
              Thank You for Reply

              1 Reply Last reply Reply Quote 0
              • First post
                Last post