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

    Inheritance in c4d [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 299 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 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??

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

        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

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

          On 14/06/2015 at 23:44, xxxxxxxx wrote:

          Thanks Donovan

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