description INCLUDE with housemade descriptions
-
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 -
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 _
_ -
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.
-
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