[I have so many questions in this thread. So first, please let me thank you for taking time! ]
I want to access user data in a more "procedural way". Here is the code after I do lots of searching on the Python (and C++) SDK document:
import c4d from c4d import gui #Welcome to the world of Python def main(): obj = doc.GetActiveObject() objBc = obj.GetData() userdataList = obj.GetUserDataContainer() userdata = userdataList userdataBc = userdata DescIDList = userdata id0 = DescIDList.id id1 = DescIDList.id print(objBc[id0][id1]) if __name__=='__main__': main()
After this, I really want to know how the data of a
BaseObject organized and stored. And I make a picture:
I don't know if this reveals some of the data structure of
And I have some doubts in or out of the picture:
[In the picture] After I search in the
BaseObject, I don't find anything data related to a
min/max value/default value, etc.
Where is the
BaseContainerof all these data stored?
[In the picture] Is
DescIDis similar to
BaseContainer? And where are they stored?
[In the picture] What is
DescLevel? I only find
0in this field.
[Out the picture] As for now, is there any easier way to get a
DescLevel.dtype? Comparing and searching in branches of
*.hfiles is not friendly for us without C++ experience.
[Off topic] The name
indexin sample code of
Python SDK Documentis confusing. Especially that all other function documents refer the same thing as
idon the same page.
[Off topic] Is there any articles that have more detail about the foundation concepts for cinema 4d coding?
Here I find some pages in
Python SDK Document:
Cookbook, Plugin Structure, Introduction into the GUI of Cinema 4D.
But they are lack of details and relation with other document.
Also, some foundation concepts only have few introduction paragraphs:
I don't mean to complain, but it's frustrating after spending hours and hours searching in the SDK and the Internet but only get some obscure results. I hope the document could be more friendly to new developers.
Thanks a lot!