c4d.BaseObject
¶
The base class of objects.
Here is an example how to create and edit objects:
import c4d obj = c4d.BaseObject(c4d.Ocube) # Create new cube obj.SetRelPos(c4d.Vector(20)) # Set position of cube doc.InsertObject(obj) # Insert object in document c4d.EventAdd() # Send global event message
c4d.
BaseObject
¶
BaseObject.GetFirstTag()
BaseObject.GetLastTag()
NEW
BaseObject.GetTag()
BaseObject.GetTags()
BaseObject.GetTagDataCount()
BaseObject.MakeTag()
BaseObject.MakeVariableTag()
BaseObject.KillTag()
BaseObject.CopyTagsTo()
BaseObject.InsertTag()
BaseObject.SetDirty()
BaseObject.IsDirty()
BaseObject.GetDeformCache()
BaseObject.GetCache()
BaseObject.GetCacheParent()
BaseObject.CheckCache()
BaseObject.NewDependenceList()
BaseObject.CompareDependenceList()
BaseObject.AddDependence()
BaseObject.TouchDependenceList()
BaseObject.SetQuaternionRotationMode()
BaseObject.IsQuaternionRotationMode()
BaseObject.SynchronizeVectorTrackKeys()
BaseObject.FindBestEulerAngle()
BaseObject.EvaluateSynchronizedRotation()
BaseObject.
__init__
(
type
)
¶
Initialize a new
BaseObject
in memory.
Parameters: | type ( int ) – The object type : Object Types . |
---|---|
Return type: | c4d.BaseObject |
Returns: | The new base object. |
BaseObject.
GetAbsPos
(
)
¶
Returns the absolute position of the object. These will be absolute local coordinates within its parent object. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The absolute object position. |
BaseObject.
SetAbsPos
(
v
)
¶
Sets the absolute local position of the object within its parent. If the object has no parent then these will be world coordinates. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The absolute object position. |
---|
BaseObject.
GetAbsScale
(
)
¶
Returns the absolute scale of the object. These will be relative to the objects parent if it has one. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The absolute object scale. |
BaseObject.
SetAbsScale
(
v
)
¶
Sets the absolute scale of the object relative to its parent object if it has one. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The absolute object scale. |
---|
BaseObject.
GetAbsRot
(
)
¶
Returns the absolute HPB rotation of the object relative to any parent object. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The absolute object rotation. |
BaseObject.
SetAbsRot
(
v
)
¶
Sets the absolute HPB rotation of the object relative to any parent object. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The absolute object rotation. |
---|
BaseObject.
GetFrozenPos
(
)
¶
Returns the frozen position of the object. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The frozen object position. |
BaseObject.
SetFrozenPos
(
v
)
¶
Sets the frozen position of the object. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The frozen object position. |
---|
BaseObject.
GetFrozenScale
(
)
¶
Returns the frozen scale of the object. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The frozen object scale. |
BaseObject.
SetFrozenScale
(
v
)
¶
Sets the frozen scale of the object. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The frozen object scale. |
---|
BaseObject.
GetFrozenRot
(
)
¶
Returns the frozen HPB rotation of the object. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The frozen object rotation. |
BaseObject.
SetFrozenRot
(
v
)
¶
Sets the frozen HPB rotation of the object. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The frozen object rotation. |
---|
BaseObject.
GetRelPos
(
)
¶
Returns the relative position of the object. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The relative object position. |
BaseObject.
SetRelPos
(
v
)
¶
Set the relative position of the object. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The relative object position. |
---|
BaseObject.
GetRelScale
(
)
¶
Returns the relative scale of the object. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The relative object scale. |
BaseObject.
SetRelScale
(
v
)
¶
Sets the relative scale of the object. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The relative object scale. |
---|
BaseObject.
GetRelRot
(
)
¶
Returns the relative HPB rotation of the object. See also Freeze Transformations .
Return type: | c4d.Vector |
---|---|
Returns: | The relative object rotation. |
BaseObject.
SetRelRot
(
v
)
¶
Sets the relative HPB rotation of the object. See also Freeze Transformations .
Parameters: | v ( c4d.Vector ) – The relative object rotation. |
---|
BaseObject.
GetMl
(
)
¶
Get the local matrix that represents the objects position, scale and rotation.
Return type: | c4d.Matrix |
---|---|
Returns: | The object’s local matrix. |
BaseObject.
SetMl
(
m
)
¶
Set the local matrix that represents the objects position, scale and rotation.
Parameters: | m ( c4d.Matrix ) – The object’s new local matrix. |
---|
BaseObject.
GetFrozenMln
(
)
¶
Returns the frozen and normalized matrix of the object. See also Freeze Transformations .
Parameters: | m ( c4d.Matrix ) – The object’s frozen and normalized matrix. |
---|
BaseObject.
GetRelMln
(
)
¶
Returns the relative and normalized matrix of the object. See also Freeze Transformations .
Return type: | c4d.Matrix |
---|---|
Returns: | The object’s relative and normalized matrix. |
BaseObject.
GetRelMl
(
)
¶
Returns the relative matrix of the object. See also Freeze Transformations .
Return type: | c4d.Matrix |
---|---|
Returns: | The object’s relative matrix. |
BaseObject.
SetRelMl
(
m
)
¶
Sets the relative matrix of the object. See also Freeze Transformations .
Parameters: | m ( c4d.Matrix ) – The object’s new relative matrix. |
---|
BaseObject.
GetMg
(
)
¶
Get the world (global) matrix that represents the objects position, scale and rotation.
Note
This will only work if the object is attached to a document. Virtual objects in caches and deform caches are not attached to a document, so this function cannot be used for those objects.
Return type: | c4d.Matrix |
---|---|
Returns: | The object’s world matrix. |
BaseObject.
SetMg
(
m
)
¶
Set the world (global) matrix that represents the objects position, scale and rotation.
Parameters: | m ( c4d.Matrix ) – The object’s new world matrix. |
---|
BaseObject.
GetMln
(
)
¶
Get the local normalized matrix that represents the objects position, scale and rotation.
Return type: | c4d.Matrix |
---|---|
Returns: | The object’s normalized local matrix. |
BaseObject.
GetMgn
(
)
¶
Get the global normalized matrix that represents the objects position, scale and rotation.
Return type: | c4d.Matrix |
---|---|
Returns: | The object’s normalized world matrix. |
BaseObject.
GetUpMg
(
)
¶
Get the global matrix of the parent object that represents the objects position, scale and rotation. If the object has no parent object then this matrix will be a unit matrix.
Return type: | c4d.Matrix |
---|---|
Returns: | The parent object’s world matrix. |
BaseObject.
CopyMatrixTo
(
dst
)
¶
Copy the matrix to another object.
Parameters: | dst ( c4d.BaseObject ) – The destintation object. |
---|
BaseObject.
GetMp
(
)
¶
Bounding box center (vector), in local space.
Return type: | c4d.Vector |
---|---|
Returns: | The bounding box center. |
BaseObject.
GetRad
(
)
¶
This is the bounding box radius (x/y/z) of the object, this works for all objects and is faster than manually finding the bounds of even polygon objects, the radius is internally cached.
Return type: | c4d.Vector |
---|---|
Returns: | The bounding box width, height and depth. |
BaseObject.
GetEditorMode
(
)
¶
Returns the state of the editor dot for this object.
Return type: | int | ||||||
---|---|---|---|---|---|---|---|
Returns: |
The editor mode:
|
BaseObject.
SetEditorMode
(
mode
)
¶
Set the state of the editor dot for this object.
Parameters: |
mode
(
int
) –
The editor mode:
|
---|
BaseObject.
GetRenderMode
(
)
¶
Returns the state of the render dot for this object.
Return type: | int | ||||||
---|---|---|---|---|---|---|---|
Returns: |
The render mode:
|
BaseObject.
SetRenderMode
(
mode
)
¶
Set the render state for this object.
Parameters: |
mode
(
int
) –
The render mode:
|
---|
BaseObject.
GetTag
(
type
[
,
nr=0
]
)
¶
Get a tag of a certain type associated with this object.
Parameters: |
|
---|---|
Return type: | |
Returns: |
The requested tag, or None if no tags of the requested type are available. Note If you request a specific number that is not available then None will be returned even if there is a tag of that type with a different index. |
BaseObject.
KillTag
(
type
[
,
nr=0
]
)
¶
Removes a tag from the object and free its resources.
Parameters: |
|
---|
BaseObject.
GetRealSpline
(
)
¶
Get a real spline representation of a primitive spline object. This can for example be used to calculate the length of the spline. If the object is a real spline it returns this. Otherwise None .
Note
The matrix of the returned object must not be used. Use the matrix of the original primitive spline object instead.
Return type: | c4d.SplineObject |
---|---|
Returns: |
The created spline object.
Warning The returned object is owned by the host object and therefore should be cloned when inserted somewhere else. Ignoring this would lead to a crash if the original object is deleted. Here is how to safely insert the real spline representation of a primitive spline object: import c4d from c4d import gui def main(): realSpline = op.GetRealSpline() # Active object is a primitive spline object if realSpline is not None: doc.InsertObject(realSpline.GetClone()) # Insert the clone of the created spline object in the document c4d.EventAdd() if __name__==’__main__’: main() |
BaseObject.
GetVisibility
(
parent
)
¶
The object’s visibility depends upon its parent, if it has no visibility track this will return the parent’s visibility which is passed. The range of values are 0.0<=visibility<=1.0 .
Note
In the editor only a visibility of 0.0 can be noticed but all other intermediate values are visualized in the renderer only.
Parameters: | float – The parent objects visibility. |
---|---|
Return type: | float |
Returns: | The visibility. |
BaseObject.
SetDeformMode
(
mode
)
¶
Set the state of the deformation/generator tick.
Parameters: | mode ( bool ) – True to enable the generator/deformer object. |
---|
BaseObject.
GetDeformMode
(
)
¶
Returns the state of the deformation/generator tick.
Return type: | bool |
---|---|
Returns: | True if the generator/deformer object is enabled. |
BaseObject.
GetUniqueIP
(
)
¶
Get the ip of the object.
Return type: | int |
---|---|
Returns: | The object IP number. |
BaseObject.
SetUniqueIP
(
ip
)
¶
Set the ip of the object.
Parameters: | ip ( int ) – The object IP number. |
---|
BaseObject.
CopyTagsTo
(
dest
,
visible
,
variable
,
hierarchical
)
¶
Copy the tags of the object to another object.
Parameters: |
|
---|---|
Returns: |
True if the object’s tags were copied successfully, otherwise False . |
BaseObject.
GetFirstTag
(
)
¶
Returns the first tag of the object.
Return type: | c4d.BaseTag |
---|---|
Returns: | The first tag of the object, or None if the object has no tags. |
BaseObject.
GetLastTag
(
)
¶
New in version R19.024.
Returns the last tag of the object.
Return type: | c4d.BaseTag |
---|---|
Returns: | The last tag of the object, or None if the object has no tags. |
BaseObject.
GetTags
(
)
¶
Returns all tags in a list.
Return type: |
list of type
BaseTag
|
---|---|
Returns: | The list of all tags. |
BaseObject.
MakeTag
(
x
[
,
pred
]
)
¶
Create and insert a tag for this object.
Parameters: |
|
---|---|
Return type: | |
Returns: |
The new tag. |
BaseObject.
MakeVariableTag
(
x
,
count
[
,
pred
]
)
¶
Create a variable tag for this object.
Parameters: |
|
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | |||||||||||||||
Returns: |
The new tag. |
BaseObject.
InsertTag
(
tp
[
,
pred=None
]
)
¶
Attach a
BaseTag
to
BaseObject
.
Warning
If the tag type was not registered with TAG_MULTIPLE , any existing old tag of same type will be implicitly removed. Any previous reference to the old tag will be invalid afterwards.
Parameters: |
|
---|---|
Return type: | |
Returns: |
The new tag. |
BaseObject.
GetTagDataCount
(
type
)
¶
Get the variable tag data count.
Parameters: |
type
(
int
) –
The type of tag:
|
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | int | ||||||||||||||
Returns: | The number of elements in the variable tag. |
BaseObject.
IsDirty
(
flags
)
¶
Check if the object has been changed since the last time the object was touched.
Parameters: |
flags
(
int
) –
The object part to check
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: | bool | ||||||||||||||||||
Returns: | True if the object is dirty. |
BaseObject.
SetDirty
(
flags
)
¶
Check if the object has been changed since the last time the object was touched.
Parameters: |
flags
(
int
) – See parameters at
IsDirty()
.
|
---|
BaseObject.
Touch
(
)
¶
Mark object to be used by a generator; automatically resets ‘dirty’.
BaseObject.
SetPhong
(
on
,
anglelimit
,
angle
)
¶
Set the phong smoothing for the object.
Note
This function will delete any existing Phong tag. If on is set to True it will create a new Phong tag.
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
Success of changing the smoothing. |
BaseObject.
GetDeformCache
(
)
¶
A simple example will help to see how this works:
GetCache()
.
This hierarchy is:
From each of the Cube objects a further cache is generated, this time polygonal:
From these the deformer object generates a deformed polygon cache:
So the final hierarchy is:
When a deformer becomes active every object/cache object gets a deform cache (if it was a polygonal object). The deformer cache is always polygonal and is only ever a single object.
Note
The caches are always built after all plugins and expressions have been called. If the virtual objects have to be accessed to obtain a polygonal based object it is generally advised to callSendModelingCommand()
with MCOMMAND_CURRENTSTATETOOBJECT . This will rebuild the cache for the passed object if needed, and then clone the polygonal objects.
Return type: | c4d.BaseObject |
---|---|
Returns: | The objects previously built deformed cache. May return None if the cache is not available or is not yet built. |
BaseObject.
GetCache
(
[
hh=None
]
)
¶
Get the object from the previously built cache.
Note
Situations can be quite complex in Cinema 4D. For instanceGetCache()
could return a list of objects. For example the default Sweep Generator internally has some built-in caches for the sweep surface and for the caps. The following helper routine can be used to make things easier. It browses through this rather complex hierarchy of objects and caches recursivelydef DoRecursion(op): tp = op.GetDeformCache() if tp is not None: DoRecursion(tp) else: tp = op.GetCache() if tp is not None: DoRecursion(tp) else: if not op.GetBit(c4d.BIT_CONTROLOBJECT): if op.IsInstanceOf(c4d.Opolygon): ... tp = op.GetDown() while tp is not None: DoRecursion(tp) tp = tp.GetNext()Warning
Use the above routine only if the caches are already built. It is for instance not safe to use it in a command plugin since the user can have stopped the scene redraw and the building of caches.
Parameters: |
hh
(
HierarchyHelp
- Not implemented) –
An optional hierarchy helper for the operation. Only for some special cases a hierarchy help must be passed.
Usually passed through from a calling function, for example from
ObjectData.GetVirtualObjects()
or a Python generator
main()
.
|
---|---|
Return type: | c4d.BaseObject |
Returns: | The object’s previously built cache. May return None if the cache is not available or is not yet built. |
BaseObject.
GetCacheParent
(
)
¶
A cache/deform object has no
GetUp
link. Instead this method can be called to detect the cache building parent.
Return type: | c4d.BaseObject |
---|---|
Returns: | The cache parent or None . |
BaseObject.
CheckCache
(
hh
)
¶
Check if cache is built, if it matches the requirements (polygonized/isoparm, level of detail etc.). It returns the dirty status of the cache.
Note
This function must only be called from within
ObjectData.GetVirtualObjects()
/ main() of a generator object.
Parameters: |
hh
(
HierarchyHelp
- Not implemented) –
A hierarchy helper for the operation.
Usually passed through from a calling function, for example from
ObjectData.GetVirtualObjects()
or a Python generator
main()
.
|
---|---|
Return type: | bool |
Returns: | True if the cache is valid. |
BaseObject.
GetHighlightHandle
(
bd
)
¶
Checks if a highlight handle has been hit, by returning the ID previously returned by
ObjectData.DetectHandle()
. The handle can then be drawn in the highlight mode.
Parameters: | bd ( c4d.BaseDraw ) – A base draw. |
---|---|
Return type: | int |
Returns: | The handle ID. |
BaseObject.
NewDependenceList
(
)
¶
Start a new dependence list. These enable you to keep track of changes made to any children.
Note
The object must be children of your object.
BaseObject.
CompareDependenceList
(
)
¶
Compares if anything in the dependence list has changed.
Return type: | bool |
---|---|
Returns: | True if the list has not changed (are the same). |
BaseObject.
AddDependence
(
hh
,
op
[
,
dirtyflags=c4d.DIRTYFLAGS_DATA|c4d.DIRTYFLAGS_MATRIX
]
)
¶
Add a child object to the dependence list. Usually this will be child objects that are used by a generator object.
Parameters: |
|
---|
BaseObject.
TouchDependenceList
(
)
¶
Mark all the objects in the dependence list that they will be replaced by the generator.
BaseObject.
SearchHierarchy
(
op
)
¶
Check if the object is a child of op .
Parameters: | op ( c4d.BaseObject ) – Check within this object’s hierarchy. |
---|---|
Return type: | bool |
Returns: | True if the object is a child of op, otherwise False . |
BaseObject.
GetAndCheckHierarchyClone
(
hh, op, flags, allchildren[, dirty=None][, trans=None]
)
¶
Check and generate a clone of the child objects of a parent generator. This is similar to
GetHierarchyClone()
except that it will check if the hierarchy is dirty and if not it will not need to generate a new clone.
Parameters: |
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
dict{
clone
:
|
||||||||||
Returns: |
The cloned object and a dirty flag: True if some part of the child objects in the chain has changed, or False if nothing has changed. |
BaseObject.
GetHierarchyClone
(
hh, op, flags[, dirty=None][, trans=None][, dirtyflags=c4d.DIRTYFLAGS_DATA|c4d.DIRTYFLAGS_MATRIX]
)
¶
Generate a clone of the child objects of a parent generator.
The result returned by
GetAndCheckHierarchyClone()
will be a chain of objects with various types. Passing
HIERARCHYCLONEFLAGS_ASLINE
e.g. will force all splines to be converted, but not every object in the chain will be of type
Oline
.
Some objects like
PolygonObject
cannot be converted, also there are
Onull
.
Parameters: |
|
||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
dict{
clone
:
|
||||||||||||||||||||||||||||
Returns: |
The cloned object and a dirty flag: True if some part of the child objects in the chain has changed, or False if nothing has changed. |
BaseObject.
SetRotationOrder
(
order
)
¶
New in version R14.014.
Sets the rotation order of the object.
Parameters: |
order
(
int
) –
The new rotation order:
|
---|
BaseObject.
GetRotationOrder
(
)
¶
New in version R14.014.
Gets the rotation order of the object.
Return type: | int | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: |
The rotation order:
|
BaseObject.
GetGUID
(
)
¶
New in version R14.014.
Returns a unique ID for any object in a document. This works for generated objects in a cache (e.g. clones generated by a MoGraph cloner) and also for ‘real’ objects in the document (this is special, because
GetUniqueIP()
does not do this).
Note
The ID generation for cache objects is based on
GetUniqueIP()
, so if two cache objects have the same IP, they will probably also get the same GUID (unless they are point objects or polygon objects with different point or poly count).
Note
The ID generation for ‘real’ objects is based on the object’s marker, so if an object has no marker it will not return a GUID.
Return type: | long |
---|---|
Returns: | A checksum for the object. |
BaseObject.
SetQuaternionRotationMode
(
active
,
undo
)
¶
New in version R18.020.
Sets the quaternion rotation mode of the object.
Parameters: |
|
---|
BaseObject.
IsQuaternionRotationMode
(
)
¶
New in version R18.020.
Checks if object rotation is interpolated in quaternion mode.
Return type: | bool |
---|---|
Returns: | True if rotation interpolation is quaternion, otherwise False . |
BaseObject.
SynchronizeVectorTrackKeys
(
vectorTrackID
,
bUndo
[
,
startRange=c4d.BaseTime(-108000
,
1)
,
endRange=c4d.BaseTime(108000
,
1)
]
)
¶
New in version R18.020.
Makes sure that the track Curves components are synchronized (keys on each component). If a component track is found, the other track components will be synchronized.
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if track synchronization was successfull, otherwise False . |
BaseObject.
FindBestEulerAngle
(
rotationTrackID
,
adjustTangent
,
undo
[
,
startRange=c4d.BaseTime(-108000
,
1)
,
endRange=c4d.BaseTime(108000
,
1)
]
)
¶
New in version R18.020.
Tries to find the best Euler angle according to the previous key. The object must have keys on each component.
Parameters: |
|
---|---|
Return type: |
bool |
Returns: |
True if rotation synchronization was successfull, otherwise False . |
BaseObject.
EvaluateSynchronizedRotation
(
time
,
flags
[
,
applyRotation=True
]
)
¶
New in version R18.020.
Forces an evaluation of all rotation tracks and considers quaternion interpolation.
Parameters: |
|
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Return type: |
bool or tuple(bool,
|
||||||||||||||||
Returns: |
If
applyRotation
is
True
, a bool giving the evaluation result.
If
applyRotation
is
False
, a tuple with the following information:
bool:
True
if evaluation was a success, otherwise
False
.
|
BaseObject.
GetVectorTracks
(
id
)
¶
New in version R18.020.
Returns each component track for the given id .
Parameters: | id ( c4d.DescID ) – ID of desired vector. |
---|---|
Return type: |
tuple(bool,
c4d.CTrack
,
c4d.CTrack
,
c4d.CTrack
)
|
Returns: |
A tuple with the following information:
bool:
True
if successfull, otherwise
False
.
c4d.CTrack
: The X track of vector, or
None
if not found.
c4d.CTrack
: The Y track of vector, or
None
if not found.
c4d.CTrack
: The Z track of vector, or
None
if not found.
|
BaseObject.
GetVectorCurves
(
curveToSearch
)
¶
New in version R18.020.
Returns each component curve for the given curve.
Parameters: | curveToSearch ( c4d.CCurve ) – The curve component of desired vector. |
---|---|
Return type: |
tuple(bool,
c4d.CCurve
,
c4d.CCurve
,
c4d.CCurve
)
|
Returns: |
A tuple with the following information:
bool:
True
if successfull, otherwise
False
.
c4d.CCurve
: The X curve of vector, or
None
if not found.
c4d.CCurve
: The Y curve of vector, or
None
if not found.
c4d.CCurve
: The Z curve of vector, or
None
if not found.
|
BaseObject.
GetModelingAxis
(
doc
)
¶
New in version R19.
Gets the internal matrix for the modeling axis.
Note
To access the axis type, and other axis options, use the IDs defined in toolmodelingaxis.h .
See also
Parameters: | doc ( c4d.BaseDocument ) – The document for the operation. |
---|---|
Return type: | c4d.Matrix |
Returns: | The modeling axis. |
BaseObject.
SetModelingAxis
(
m
)
¶
New in version R19.
Sets the internal matrix for the modeling axis.
Note
To access the axis type, and other axis options, use the IDs in toolmodelingaxis.h . Here is a code sample:
import c4d from c4d import plugins def SetToolData(doc, toolID, paramID, data): plug = plugins.FindPlugin(toolID, c4d.PLUGINTYPE_TOOL) if plug is None: return plug[paramID] = data SetToolData(doc, c4d.ID_MODELING_LIVESELECTION, c4d.MDATA_AXIS_MODE, c4d.MDATA_AXIS_MODE_FREE)
Parameters: | m ( c4d.Matrix ) – The new modeling axis to set. |
---|