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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    description INCLUDE with housemade descriptions

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 326 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 07/08/2012 at 01:37, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hello,

      I am creating several Object plugins that all use (partially) the same description-elements. I have created an extra description-set that I want to include in my other descriptions (just like Oprimitiveaxis is included in most primitives).

      But when I do INCLUDE Onrprimitivebase; I get an error on this line. The description works when put directly on an object, so there should be no error in it.

      CONTAINER Onrprimitivebase {  
        NAME Onrprimitivebase;  
        INCLUDE Obase;  
        GROUP ID_OBJECTPROPERTIES {  
            LONG PRIM_NR_USEGMENTS   { MIN 1; };  
            LONG PRIM_NR_VSEGMENTS   { MIN 1; };  
        }  
      }  
      STRINGTABLE Onrprimitivebase {  
        PRIM_NR_USEGMENTS   "U Segments";  
        PRIM_NR_VSEGMENTS   "V Segments";  
      }  
        
      #ifndef _Onrprimitivebase_H_  
      #define _Onrprimitivebase_H_  
        enum {  
            PRIM_NR_USEGMENTS = 3001,  
            PRIM_NR_VSEGMENTS,  
        
            __PRIM_NR_DUMMY__  
        }  
      #endif // _Onrprimitivebase_H_
      

      And this is the description where I want to include it:

      CONTAINER Onrpillow {  
        NAME Onrpillow;  
        INCLUDE Obase;  
        GROUP ID_OBJECTPROPERTIES {  
            REAL PRIM_NRPILLOW_WIDTH       { UNIT METER; MIN 0; }  
            REAL PRIM_NRPILLOW_HEIGHT      { UNIT METER; MIN 0; }  
            REAL PRIM_NRPILLOW_DEPTH       { UNIT METER; MIN 0; }  
            BOOL PRIM_NRPILLOW_INVNORMALS  { };  
        }  
        INCLUDE Onrprimitivebase;        // <-- Error  
      }  
      STRINGTABLE Onrpillow {  
        Onrpillow           "Pillow Object";  
        PRIM_NRPILLOW_WIDTH      "Width";  
        PRIM_NRPILLOW_HEIGHT     "Height";  
        PRIM_NRPILLOW_DEPTH      "Depth";  
        PRIM_NRPILLOW_USEGMENTS  "U Segments";  
        PRIM_NRPILLOW_VSEGMENTS  "V Segments";  
        PRIM_NRPILLOW_INVNORMALS "Inverse Normals";  
      }  
        
      #ifndef _Onrpillow_H_  
      #define _Onrpillow_H_  
        enum {  
            Onrpillow = 1028945,  
            PRIM_NRPILLOW_WIDTH = 1001,  
            PRIM_NRPILLOW_HEIGHT,  
            PRIM_NRPILLOW_DEPTH,  
            PRIM_NRPILLOW_INVNORMALS,  
        
            __PRIM_NRPILLOW_DUMMY__  
        };  
      #endif // _Onrpillow_H_
      

      How can I include my own descriptions? Doing INCLUDE Oprimitiveaxis; works, for instance.

      Thanks in advance,
      Niklas

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 07/08/2012 at 05:34, xxxxxxxx wrote:

        Hello,

        I just found this statement in the SDK where the INCLUDE flag is described: _The parent description must have been registered with CINEMA 4D before this description is registered for the lookup to work.

        _ Does that mean I have to register an (maybe invisible) plugin that uses this description before I can INCLUDE it? _

        _-Niklas _
        _

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 07/08/2012 at 06:27, xxxxxxxx wrote:

          Originally posted by xxxxxxxx

          Does that mean I have to register an (maybe invisible) plugin that uses this description before I can INCLUDE it? _
          _

          Yes, there's the RegisterDescription() function in the C++ SDK especially designed for that. You can call this function with your included description before registering the main plugin using it.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 07/08/2012 at 06:44, xxxxxxxx wrote:

            Thanks. I wasn't watching out for this function as I'm currently working on a Python plugin. The RegisterDescription() function is not available in Python. I have registered a dummy object-plugin, not elegant, but it works.

            -N

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