BaseObject is the base class of all scene objects of Cinema 4D. These objects can be polygon objects, splines, generators, deformers, effectors, cameras, lights or objects like the "Sky" or "Background" object.
BaseObject objects are an instance of Obase
.
A BaseObject may be also a:
See also Flags.
BaseObject objects are typically stored in and accessed from a BaseDocument:
See BaseDocument Objects and Selections.
BaseObject objects are created with the usual tools:
The object IDs of many build-in object types are defined in Object Types.
Primitive objects can also be created with these dedicated functions:
New objects are typically added to a BaseDocument that takes ownership:
A BaseObject can be removed from the host BaseDocument:
BaseObject elements are organized in a tree. The usual functions can be used to navigate in that tree:
See also Navigation in Lists and Trees.
The bounding box defines the dimensions of a BaseObject.
Generator objects store virtual child objects in a cache. If a deformer is applied, the deformed child objects are found in the deform cache.
See also Generating.
Further functions are:
The basic parameters IDs of a BaseObject are defined in obase.h
. They can be changed using C4DAtom::SetParameter() and C4DAtom::GetParameter(). For several properties dedicated functions exist.
The placement of an object is defined by its position, scale and rotation (PSR). Freeze Transformations allow to define a default or reset value. In short, the absolute value is the frozen value plus the relative value.
These functions give access to the "absolute" values:
These functions give access to the "frozen" values:
These functions give access to the "relative" values:
These functions are used to access the local and global Matrix of an object:
See also Vector Manual (Classic) and Matrix Manual (Classic).
A BaseObject may or may not be visible in the editor and rendered output.
The modes are:
If an object is a generator or deformer it can be enabled or disabled:
A BaseObject can host a variable number of tags. These tags add additional functionality and data to the object.
See also BaseTag and VariableTag Manual.
Existing tags can be accessed with:
New tags can be created:
and
Further tag related functionality:
A BaseObject can have an assigned color and can be displayed in xray mode:
The settings are:
obase.h
for values.In certain modeling modes a modeling axis is presented as the result of the current selection.
A generator object creates virtual and cached BaseObject elements in its ObjectData::GetVirtualObjects() function. The following BaseObject member functions are only used in this context.
While creating the cache one should typically check if the cache is already build:
See also Cache.
Generators can use child objects as input objects (see flag OBJECT_INPUT). A generator can check if these child objects are dirty and it can hide them in the viewport. The most simple way is to handle the child objects manually:
To handle multiple child objects a dependence list can be used:
But the most simple way is to use one of these two functions: They will return polygon versions of the child objects and hide them:
If a generator creates multiple child objects each object must be uniquely identifiable. If the flag OBJECT_UNIQUEENUMERATION is set each object can receive an unique IP number.
Isoparm lines can be used to display and accentuate certain lines in the viewport.
In Cinema 4D the rotation of an object is stored as a Vector. Each component of this vector corresponds to a rotation axis. The rotation result depends on the order in which the rotation is executed. For values see ROTATIONORDER.
The rotation values of an animation can be optimized:
The (animated) rotation values of an object can be interpolated using quaternions.
The use of quaternion interpolation can be forced with:
These utility functions allow fast access to the animation tracks and curves of an animated Vector parameter. See Animation Overview.
This function is used to handle keys on a Vector parameter:
An object can be animated using the host BaseDocument:
See also BaseDocument Animate.
Generators create and own virtual child objects. To access these child object one can read the cache of the generator (see Cache). Another way is to apply the "Current State to Object" command to the given generator object.
A BaseObject can be hidden in the Object Manager or viewport using these bits:
The flags of a BaseObject can be accessed with GeListNode::GetInfo(). These flags inform about the type of object and its behavior.
Object type:
Generator related flags:
Other flags:
These utility functions can return the name of the object type or return the object type based on that name.
These functions can be used to check if the given BaseObject is visible in the Editor: