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
// Resources for Attributes Manager
// - Enumeration of AM element IDs
// - Description of AM elements (see the docs under "Description resource")
// - Text associated with AM elements (text for buttons or checkboxes for instance)
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) :
----myobject.cdl (plugin lib)