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

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.


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)

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.