Creating Primitives



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

    On 12/10/2006 at 01:13, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R9.5 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi @ll
    i just want to create a plugin, that creates me a primitve like a tube or someting like that. I found nothing concerning this in the forum and no tutorials in the whole Internet. Can somebody tell me how to create this or tell me where i can find turials or examples.
    Thx a lot



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

    On 12/10/2006 at 03:32, xxxxxxxx wrote:

    Have you looked at the source in plugins/cinema4dsdk?



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

    On 12/10/2006 at 03:44, xxxxxxxx wrote:

    Yes i did.
    I got the SDK documentation and the SDK source for C++ c4d development. But i don't know where to start. The documentation is very unclear if you are a beginner to plugin development :(
    I will describe you what i am ought to do: The Plugin should create a Module for a Spacestation,  containing a tube und 2 cones.  First step is that the plugin is able to create a tube (standarttube is sufficient) but i don't know where to start .....



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

    On 12/10/2006 at 03:50, xxxxxxxx wrote:

    status is now:
    i created a Visual Studio Project including the API of c4d and the recommended structure for a project described in the SDK documention. The plugin is now able to create a menu item that pop ups teh standart dialog GEMB_OK



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

    On 12/10/2006 at 04:29, xxxxxxxx wrote:

    Okay, you have Visual Studio. Create the api lib (or you can compile the cinema4dsdk project to get it). This lib is created into the resource/api_lib folder in Cinema 4D's install. Now, you can use the cinema4dsdk project as a starting point for you own project - and you won't need to recompile the api lib each time, just include it for linking.

    Since you want to create objects 'procedurally' - what you want is either an Object plugin or a Command plugin to create regular objects. The latter may be a better choice here - it depends on how you want this to work.

    A Command plugin executes something - usually through a dialog for options and so forth. The 'command' need not be restricted to something simple like a one-step operation. And it can do different things through its dialog controls.

    An Object plugin creates an object in the Object Manager. You can control what it does and displays through the plugin and resources placed into the Attributes Manager (like other objects or tags in the AM).

    One warning about Object plugins: they are more complex than Command plugins - at least for a beginner. You'll need to draw into the View editor to see the object and control facets of it through the AM interface and the class methods for reacting to those changes. For the AM interface, you need to specify a res/description for the object. It usually goes like this:

    // Source for your class extending ObjectData
    MyObject.cpp
    MyObject.h

    // Resources for Attributes Manager
    // - Enumeration of AM element IDs
    res/description/Omyobject.h
    // - Description of AM elements (see the docs under "Description resource")
    res/description/Omyobject.res
    // - Text associated with AM elements (text for buttons or checkboxes for instance)
    res/strings_us/description/Omyobject.str

    The enumeration header needs to be included in the compile - the others need to be available for plugin access. For instance, you'll put your plugin in the Cinema 4D plugins folder (simple example) :

    plugins\
    --MyObject\
    ----myobject.cdl (plugin lib)
    ----res\
    ------myobject.tif (icon)
    ------c4d_symbols.h
    ------description\
    --------Omyobject.h
    --------Omyobject.res
    ------strings_us\
    --------c4d_strings.str
    --------description\
    ----------Omyobject.str


Log in to reply