Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    Getting a list of options for an object? [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 280 Views
    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.
    • H Offline
      Helper
      last edited by

      On 20/06/2015 at 16:37, xxxxxxxx wrote:

      Is there any way to get a list of options for an object in Python?

      For example, if I wanted to get all the settings for a light object, how would I do that? I would have thought that GetData() was the way to go, but GetData() (and/or GetDataInstance()) only seem to return a partial listing of options, regardless of if those options have been changed or not.

      Where are the rest of the settings stored? I'm assuming that the subscripted access provided by the square brackets has to be held somewhere, and I would have thought that'd be the base container returned by GetData(), but apparently that's not the case.

      -CMPX

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 20/06/2015 at 18:19, xxxxxxxx wrote:

        Since R16, you can read the parameters using GetDescription(). You can iterate over all parameter
        descriptions with it. They have the same format as user data descriptions.

        for desc, descid, groupid in op.GetDescription(0) :
            print desc.GetString(c4d.DESC_NAME)
        
        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 20/06/2015 at 20:01, xxxxxxxx wrote:

          Hey, awesome, that works great!

          PS: It's available in R15.037 and above, works fine in R15.064.

          -CMPX

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