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
    1. Maxon Developers Forum
    2. PixelsInProgress
    3. Topics
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 1
    • Controversial 0
    • Groups 0

    Topics created by PixelsInProgress

    • PixelsInProgressP

      Python - Gradient userdata - Set colour and alpha

      Bugs
      • python s26 • • PixelsInProgress
      2
      0
      Votes
      2
      Posts
      599
      Views

      ferdinandF

      Hello @pixelsinprogress,

      Thank you for reaching out to us. I must unfortunately tell you that it currently is technically not possible to set the alpha values of a c4d.Gradient instance in Python.

      In C++ this works because there Gradient::GetAlphaGradient returns a pointer to the underlying alpha gradient. The Python layer unfortunately makes a copy of that layer, severing the connection between the alpha gradient and its associated color gradient (which is also why the Python docs warn about that). I also tried some other venues of poking around in the alpha data by using C4DAtom.SetParameter, but these unfortunately also do not work in Python.

      I have created a ticket for this to be fixed at some point, as I would agree this is something the Python layer should be able to handle. But this is not a bug, as this was done somewhat intentionally. So, it might take a long time before we (most likely @m_adam) will find the time to do it.

      Cheers,
      Ferdinand

    • PixelsInProgressP

      R20 Startup script location - python_init.py

      Cinema 4D SDK
      • python r20 • • PixelsInProgress
      9
      1
      Votes
      9
      Posts
      3.5k
      Views

      T

      @m_adam said in R20 Startup script location - python_init.py:

      This will be fixed within a future release.

      Well, that's a relief then. Good to know.

      Thank you Maxime for the clarification.

      Kind regards,
      Tom