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

    C4DAtom.SetParameter/GetParameter help

    Cinema 4D SDK
    2024 python
    2
    3
    503
    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.
    • O
      ops
      last edited by

      Hello,

      I would like to get and set the 'Strength' parameter of an inheritance effector inside a python node of Xpresso, but I'm not sure how to do this properly. According to the doc (https://developers.maxon.net/docs/py/2024_4_0a/classic_resource/object/oeinheritance.html), I need to pass in the flag, c4d.MGINHERITANCEEFFECTOR_STRENGTH, but it looks like I also need to pass in a descriptor flag and not sure what that is all about. Could someone provide an example of how to do this properly?

      Thanks in advance for any help!

      1 Reply Last reply Reply Quote 0
      • O
        ops
        last edited by

        Ah, I found out that using the brackets to set/get the parameter values is much simpler!
        For example: inheritanceEffector[c4d.MGINHERITANCEEFFECTOR_STRENGTH] = 1.0

        i_mazlovI 1 Reply Last reply Reply Quote 1
        • i_mazlovI
          i_mazlov @ops
          last edited by

          Hi @ops,

          Thanks for reaching out to us and thanks for sharing your solution with the community, this is highly appreciated!

          You're right, the most common way of accessing object's attributes is by using subscript operator.

          Cheers,
          Ilia

          MAXON SDK Specialist
          developers.maxon.net

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