Inheritance in c4d [SOLVED]
-
On 13/06/2015 at 04:10, xxxxxxxx wrote:
Hi!
I was having some doubt on inheritance map in module c4d in c4d python sdk.It would be of gr8 help if you help me out. Here it is:
As I understand c4d is a module name. from https://developers.maxon.net/docs/py/2023_2//help/misc/diagram.html
link it seems that all other boxes on that page are just classes. right? Now, if i look closely, say c4d.plugins.BaseData, it is parent of lots of , say , c4d.plugins.xyz. Now the thing I am confusing is that : we use c4d[dot] becoz we are using "import c4d" in the header. Why do we have plugin[dot] when there is no plugin module. as in is "plugin.xyz" literally a name of a class or is plugin a module or plugin a function?? -
On 14/06/2015 at 12:41, xxxxxxxx wrote:
Hi @CreamyGiraffe,
"import c4d" imports the "c4d" package. Some of the subpackages only include c4d classes, however, some of the submodules (forgive me, my understanding of package vs module, etc is a little fuzzy) just contain functions, not actual classes. Some, like "plugins" contain both classes and functions directly accessible under the "c4d.plugins" namespace.
"c4d.plugins" gives you access to all of the Classes and functions inside of c4d.plugins. "c4d.plugins.BasePlugin()" lets you create an object of type BasePlugin, whereas "c4d.plugins.GeLoadString()" calls the function GeLoadString.
You'll have to consult the documentation to see what is a subclass and what is just a function.
Cheers,Donovan
-
On 14/06/2015 at 23:44, xxxxxxxx wrote:
Thanks Donovan