This reference page is linked to from the following overview topics: About the Structure of the Softimage APIs.
#include <xsi_projectitem.h>
The ProjectItem class represents the base content class in Softimage from which all other content objects derive. Its major feature is that it provides access to the parameters which represent the state of the object.
Many classes in Softimage support this interface, such as X3DObject, Property, Shader, Operator, and Primitive. The classes that do not support this are lightweight classes like Particle, Point, Geometry and Parameter, utility classes such as CValue, CColor, CGraphicSequencer or classes that are not content-related such as Command, Application and UIToolkit.
Public Member Functions |
|
ProjectItem () | |
~ProjectItem () | |
ProjectItem (const CRef &in_ref) | |
ProjectItem (const ProjectItem &in_obj) | |
bool | IsA (siClassID in_ClassID) const |
siClassID | GetClassID () const |
ProjectItem & | operator= (const ProjectItem &in_obj) |
ProjectItem & | operator= (const CRef &in_ref) |
CString | GetFamilies () const |
siCapabilities | GetCapabilities () const |
CStatus | PutCapabilityFlag (siCapabilities in_flag, bool in_bEnable) |
bool | GetSelected (siBranchFlag in_branchFlag=siNode) const |
CStatus | PutSelected (bool in_newState, siBranchFlag in_branchFlag=siNode) |
CRefArray | GetOwners () const |
CParameterRefArray & | GetParameters () const |
Model | GetModel () const |
bool | IsRelationship (siPSetRelationship in_PSetRelationship) const |
bool | BelongsTo (const CString &in_family) const |
bool | IsKindOf (const CString &in_objectType) const |
bool | IsAnimated (siSourceType in_sourceType=siAnySource, bool in_bLocal=false) const |
CRefArray | GetAnimatedParameters (siSourceType in_sourceType=siAnySource, bool in_bLocal=false) const |
CRef | EvaluateAt (double in_dFrame=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, bool in_val, double in_time=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, double in_val, double in_time=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, float in_val, double in_time=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, short in_val, double in_time=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, LONG in_val, double in_time=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, LLONG in_val, double in_time=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, const CValue &in_val, double in_time=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, const CRef &in_val, double in_time=DBL_MAX) |
CStatus | PutParameterValue (const CString &in_scriptname, const CString &in_val, double in_time=DBL_MAX) |
CValue | GetParameterValue (const CString &in_scriptname, double in_time=DBL_MAX) const |
Parameter | GetParameter (const CString &in_scriptname) const |
PPGLayout | GetPPGLayout () const |
siLockType | GetLockType () |
siLockLevel | GetLockLevel () |
bool | IsLocked () |
CStatus | SetLock (siLockLevel in_level=siLockLevelAll) |
CStatus | UnSetLock (siLockLevel in_level=siLockLevelAll, const CString &in_password=CString()) |
CRefArray | GetTaggedParameters (siTags in_tags=siTagAll, bool in_bLocal=false) const |
CRefArray | GetLockOwners (siLockLevel in_eLevel=siLockLevelAll, bool in_bLocal=false) const |
CRef | AddScriptedOp (const CString &in_code=L"", const CRefArray &in_inputs=CRefArray(), const CString &in_name=L"", const CString &in_language=L"", siConstructionMode in_mode=siConstructionModeDefault, CStatus *out_pst=0) |
CRef | AddScriptedOpFromFile (const CString &in_filename=L"", const CRefArray &in_inputs=CRefArray(), const CString &in_name=L"", const CString &in_language=L"", siConstructionMode in_mode=siConstructionModeDefault, CStatus *out_pst=0) |
CRef | AddCustomOp (const CString &in_type, const CRefArray &in_inputs=CRefArray(), const CString &in_name=L"", siConstructionMode in_mode=siConstructionModeDefault, CStatus *io_pst=0) |
CRefArray | GetLockOwners () const |
X3DObject | GetParent3DObject () const |
siBranchFlag | GetBranchFlag () const |
CRefArray | GetICEAttributes () const |
ICEAttribute | GetICEAttributeFromName (const CString &in_name) const |
ICEAttribute | AddICEAttribute (const CString &in_name, XSI::siICENodeDataType in_DataType, XSI::siICENodeStructureType in_StructureType, XSI::siICENodeContextType in_ContextType) |
CStatus | RemoveICEAttribute (const CString &in_name) |
ULONG | GetObjectID () const |
LONG | GetEvaluationID () |
LONG | GetHierarchicalEvaluationID () |
ProjectItem | ( | ) |
Default constructor.
~ProjectItem | ( | ) |
Default destructor.
ProjectItem | ( | const CRef & | in_ref | ) |
Constructor.
in_ref | constant reference object. |
ProjectItem | ( | const ProjectItem & | in_obj | ) |
Copy constructor.
in_obj | constant class object. |
bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
in_ClassID | class type. |
Reimplemented from SIObject.
Reimplemented in ActionSource, Annotation, Camera, CameraRig, ChainBone, ChainEffector, ChainElement, ChainRoot, Clip, ClipContainer, ClipRelation, Cluster, ClusterProperty, Constraint, CustomOperator, CustomPrimitive, CustomProperty, Delta, Directed, Envelope, EnvelopeWeight, Expression, Framebuffer, Group, HairPrimitive, ICECompoundNode, ICEDataModifierNode, ICEDataProviderNode, ICENode, ICENodeContainer, ICETree, ImageClip, ImageClip2, Joint, Kinematics, Layer, Library, Light, LightRig, Material, MaterialLibrary, Mixer, Model, Null, Operator, Override, ParticleCloud, ParticleCloudPrimitive, ParticleType, Partition, Pass, PassContainer, Primitive, Property, Rig, Scene, SceneItem, SceneRenderProperty, Shader, ShapeClip, ShapeKey, SimulationEnvironment, Source, StaticKinematicState, Texture, TextureLayer, TextureLayerPort, TimeControl, Track, Transition, UserDataBlob, UserDataMap, UVProperty, and X3DObject.
siClassID GetClassID | ( | ) | const [virtual] |
Returns the type of the API class.
Reimplemented from SIObject.
Reimplemented in ActionSource, Annotation, Camera, CameraRig, ChainBone, ChainEffector, ChainElement, ChainRoot, Clip, ClipContainer, ClipRelation, Cluster, ClusterProperty, Constraint, CustomOperator, CustomPrimitive, CustomProperty, Delta, Directed, Envelope, EnvelopeWeight, Expression, Framebuffer, Group, HairPrimitive, ICECompoundNode, ICEDataModifierNode, ICEDataProviderNode, ICENode, ICENodeContainer, ICETree, ImageClip, ImageClip2, Joint, Kinematics, Layer, Library, Light, LightRig, Material, MaterialLibrary, Mixer, Model, Null, Operator, Override, ParticleCloud, ParticleCloudPrimitive, ParticleType, Partition, Pass, PassContainer, Primitive, Property, Rig, Scene, SceneItem, SceneRenderProperty, Shader, ShapeClip, ShapeKey, SimulationEnvironment, Source, StaticKinematicState, Texture, TextureLayer, TextureLayerPort, TimeControl, Track, Transition, UserDataBlob, UserDataMap, UVProperty, and X3DObject.
ProjectItem& operator= | ( | const ProjectItem & | in_obj | ) |
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
in_obj | constant class object. |
ProjectItem& operator= | ( | const CRef & | in_ref | ) |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
in_ref | constant class object. |
Reimplemented from SIObject.
Reimplemented in ActionSource, Annotation, Camera, CameraRig, ChainBone, ChainEffector, ChainElement, ChainRoot, Clip, ClipContainer, ClipRelation, Cluster, ClusterProperty, Constraint, CustomOperator, CustomPrimitive, CustomProperty, Delta, Directed, Envelope, EnvelopeWeight, Expression, Framebuffer, Group, HairPrimitive, ICECompoundNode, ICEDataModifierNode, ICEDataProviderNode, ICENode, ICENodeContainer, ICETree, ImageClip, ImageClip2, Joint, Kinematics, Layer, Library, Light, LightRig, Material, MaterialLibrary, Mixer, Model, Null, Operator, Override, ParticleCloud, ParticleCloudPrimitive, ParticleType, Partition, Pass, PassContainer, Primitive, Property, Rig, Scene, SceneItem, SceneRenderProperty, Shader, ShapeClip, ShapeKey, SimulationEnvironment, Source, StaticKinematicState, Texture, TextureLayer, TextureLayerPort, TimeControl, Track, Transition, UserDataBlob, UserDataMap, UVProperty, and X3DObject.
CString GetFamilies | ( | ) | const |
Returns the names of all the families the object belongs to.
siCapabilities GetCapabilities | ( | ) | const |
Returns a mask of all the object's capabilities.
CStatus PutCapabilityFlag | ( | siCapabilities | in_flag, |
bool | in_bEnable | ||
) |
Disables or enables any Capability flag set on the object. For example an object can be hidden from the Scene Explorer by setting the siNotInspectable flag. Changing the capability flags only affects one particular instance of the object.
in_flag | Specify the flag to change |
in_bEnable | True to set the capability; false to remove it. |
bool GetSelected | ( | siBranchFlag | in_branchFlag =
siNode |
) | const |
CStatus PutSelected | ( | bool | in_newState, |
siBranchFlag | in_branchFlag =
siNode |
||
) |
Sets the object's selected state.
in_newState | new state |
in_branchFlag | Is the object to be selected in node or branch? the default value is siNode. This argument only applies to objects that have children such as the X3DObject and Model objects. |
CRefArray GetOwners | ( | ) | const |
CParameterRefArray& GetParameters | ( | ) | const |
Returns an array of references to all parameters within the object that support read access; that is, you can get their value using Parameter::GetValue.
Model GetModel | ( | ) | const |
bool IsRelationship | ( | siPSetRelationship | in_PSetRelationship | ) | const |
Returns true if the object has the required kind of parent/child parameter-set (Pset) relationship with its parent and false otherwise
in_PSetRelationship | Type of Pset relationship to check. |
bool BelongsTo | ( | const CString & | in_family | ) | const |
Returns true if the object belongs to specified family and false otherwise.
in_family | Family (or families) to check |
bool IsKindOf | ( | const CString & | in_objectType | ) | const |
Returns true if this object matches a given type and false otherwise.
in_objectType | an object type. |
bool IsAnimated | ( | siSourceType | in_sourceType =
siAnySource , |
bool | in_bLocal =
false |
||
) | const |
Returns true if the object is animated by a specific animation source type and false otherwise.
in_sourceType | Animation source type. The default value is any source. |
in_bLocal | Specifies whether the animation to check is local to the object
or not. If true then all animated parameters that come from
propagated properties or from intermediate nodes are ignored.
Intermediate nodes are nested under the object but are not
necessary owned by the object itself. For instance, the camera
object nested under a Texture_Projection_Def property
is not considered unless the target object is the projection
property itself. When the flag is set to false (default), all
parameters are considered. |
CRefArray GetAnimatedParameters | ( | siSourceType | in_sourceType =
siAnySource , |
bool | in_bLocal =
false |
||
) | const |
Returns an array of references to parameters that are animated by a specific animation source type. If this method is called from the Update() context of a custom operator it will return an empty CRefArray.
in_sourceType | an object type. |
in_bLocal | Specifies whether the animation to check is local to the object
or not. If true then all animated parameters that come from
propagated properties or from intermediate nodes are ignored.
Intermediate nodes are nested under the object but are not
necessary owned by the object itself. For instance, the camera
object nested under a Texture_Projection_Def property
is not considered unless the target object is the projection
property itself. When the flag is set to false (default), all
parameters are considered. |
CRef EvaluateAt | ( | double | in_dFrame =
DBL_MAX |
) |
Returns a version of the object at a particular time.
in_dFrame | Time in frames at which to evaluate object, the default value
is DBL_MAX which means the current time. |
Sets the value of a parameter nested under this ProjectItem. If you try to set a read-only parameter, an error (CStatus::Unexpected) occurs. You can check if a parameter is read-only by checking the condition:
Note that you can set a custom property parameter even if it is created with the read-only capability.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.CStatus PutParameterValue | ( | const CString & | in_scriptname, |
double | in_val, | ||
double | in_time =
DBL_MAX |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_scriptname
.in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.CStatus PutParameterValue | ( | const CString & | in_scriptname, |
const CValue & | in_val, | ||
double | in_time =
DBL_MAX |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.CStatus PutParameterValue | ( | const CString & | in_scriptname, |
const CRef & | in_val, | ||
double | in_time =
DBL_MAX |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.CStatus PutParameterValue | ( | const CString & | in_scriptname, |
const CString & | in_val, | ||
double | in_time =
DBL_MAX |
||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
in_val | The parameter value to set. |
in_time | Time in frame, defaults to the current frame(this is
represented by the value of DBL_MAX ). |
in_val
cannot get converted to the parameter
type.Returns the value of a parameter nested under the ProjectItem. If the parameter doesn't exist an empty CValue is returned. If the parameter value is a string and it has not been set then an empty string is returned.
in_scriptname | The script name of the parameter for which we want to get the value (see Parameter::GetScriptName). |
in_time | Time in frame defaults to the current frame (represented by the
value of DBL_MAX ). |
Returns a particular parameter of this object. If the parameter script name does not exist the Parameter will be invalid and all functions will return default values.
in_scriptname | The script name of the parameter (see Parameter::GetScriptName). |
PPGLayout GetPPGLayout | ( | ) | const |
Returns the layout associated with this project item. The Layout defines how the Parameters of the ProjectItem are presented visually when the object is inspected.
siLockType GetLockType | ( | ) |
Returns the lock type if the parameter is locked.
siLockLevel GetLockLevel | ( | ) |
Returns the lock level for this parameter.
bool IsLocked | ( | ) |
Indicates whether or not a parameter is locked.
CStatus SetLock | ( | siLockLevel | in_level =
siLockLevelAll |
) |
Locks a parameter.
in_level | The level to lock. Can be siLockLevelAll for all levels |
CStatus UnSetLock | ( | siLockLevel | in_level =
siLockLevelAll , |
const CString & | in_password = CString() |
||
) |
Unlocks a parameter.
in_level | The level to unlock. Can be siLockLevelAll for all levels |
in_password | The optional password to pass when the scene locks are password protected |
Returns an array of references to parameters that are tagged by a specific tag
in_tags | the tags to check |
in_bLocal | Specifies whether the tags to check is local to the parameters
or not. If true then all tagged parameters that come from
propagated properties or from intermediate nodes are ignored.
Intermediate nodes are nested under the object but are not
necessary owned by the object itself. For instance, the camera
object nested under a Texture_Projection_Def property
is not considered unless the target object is the projection
property itself. When the flag is set to false (default), all
parameters are considered. |
CRefArray GetLockOwners | ( | siLockLevel | in_eLevel =
siLockLevelAll , |
bool | in_bLocal =
false |
||
) | const |
Returns an array of references to parameters that are owner of a lock
in_eLevel | the level to check |
in_bLocal | Specifies whether the lock to check is local to the object or
not. If true then all lock owners that come from propagated
properties or from intermediate nodes are ignored. Intermediate
nodes are nested under the object but are not necessary owned by
the object itself. For instance, the camera object nested under a
Texture_Projection_Def property is not considered
unless the target object is the projection property itself. When
the flag is set to false (default), all parameters are
considered. |
CRef AddScriptedOp | ( | const CString & | in_code = L"" , |
const CRefArray & | in_inputs = CRefArray() , |
||
const CString & | in_name = L"" , |
||
const CString & | in_language = L"" , |
||
siConstructionMode | in_mode =
siConstructionModeDefault , |
||
CStatus * | out_pst = 0 |
||
) |
Creates a new runtime scripted operator and connects its output
to this object. If the scripting file is not specified then a
default implementation will be used. For parameter connections a
simple assignment of the current value be use created for example
'out
.value = 0.00'.
Specifying the scripting language is optional. If not specified then the language associated with the file extension will be used. If this cannot be determined then the current scripting language user preference will used.
in_code | The script containing the implementation of the scripted operator. |
in_inputs | Array of objects or parameters to be connected to input ports. |
in_name | Name of the new scripted operator |
in_language | The script language of the new scripted operator. If not specified the value current user preference for the scripting language will be used. |
in_mode | Specifies the construction mode in which the operator will be applied. This only applies to output connections made to Geometry objects, the mode will be ignored for all other types of connections. |
out_pst | Optional error status |
CRef AddScriptedOpFromFile | ( | const CString & | in_filename = L"" , |
const CRefArray & | in_inputs = CRefArray() , |
||
const CString & | in_name = L"" , |
||
const CString & | in_language = L"" , |
||
siConstructionMode | in_mode =
siConstructionModeDefault , |
||
CStatus * | out_pst = 0 |
||
) |
Creates a new scripted operator and connects its output to this
object. If the scripting file is not specified then a default
implementation will be used. For parameter connections a simple
assignment of the current value be use created for example
'out
.value = 0.00'.
Specifying the scripting language is optional. If not specified then the language associated with the file extension will be used. If this cannot be determined then the current scripting language user preference will used.
in_filename | The script filename containing the implementation of the scripted operator. |
in_inputs | Array of objects or parameters to be connected to input ports. |
in_name | Name of the new scripted operator |
in_language | The script language of the new scripted operator. If not specified the value current user preference for the scripting language will be used. |
in_mode | Specifies the construction mode in which the operator will be applied. This only applies to output connections made to Geometry objects, the mode will be ignored for all other types of connections. |
out_pst | Optional error status |
CRef AddCustomOp | ( | const CString & | in_type, |
const CRefArray & | in_inputs = CRefArray() , |
||
const CString & | in_name = L"" , |
||
siConstructionMode | in_mode =
siConstructionModeDefault , |
||
CStatus * | io_pst = 0 |
||
) |
Creates a new Self-Installed Custom Operator and connects its output to this object.
in_type | The type of a operator. A PluginItem must be installed by this name. |
in_inputs | Array of objects or parameters to be connected to input ports. |
in_name | Name of the new custom operator. If not specified the type is used to determine a name for the operator. |
in_mode | Specifies the construction mode in which the operator will be applied. This only applies to output connections made to Geometry objects, the mode will be ignored for all other types of connections. |
io_pst | Optional error status |
CRefArray GetLockOwners | ( | ) | const |
Returns an array of references to objects that are master of the lock of this object.
X3DObject GetParent3DObject | ( | ) | const |
siBranchFlag GetBranchFlag | ( | ) | const |
Returns the branch flag. The branch flag is used in the context of adding objects to the Selection or to a Group. You can check if an object was added to a group as a branch member or if an object has been branch selected by testing if the branchflag has been set to siBranch.
CRefArray GetICEAttributes | ( | ) | const |
Returns all attributes defined for this object.
ICEAttribute GetICEAttributeFromName | ( | const CString & | in_name | ) | const |
Returns the attribute data matching a specific name.
in_name | Name of the attribute to find. |
PointPosition
attribute by name.
CValue CreatePrim( const CString& in_presetobj, const CString& in_geometrytype, const CString& in_name, const CString& in_parent ); CValue Create2DSkeleton( const CValue& in_rx, const CValue& in_ry, const CValue& in_rz, const CValue& in_ex, const CValue& in_ey, const CValue& in_ez, const CValue& in_nx, const CValue& in_ny, const CValue& in_nz, const CValue& in_viewtype, CValue& out_bone, CValue& out_effector ); CValue AppendBone( const CValue& in_inputobjs, const CValue& in_ex, const CValue& in_ey, const CValue& in_ez, bool in_pin ); CValue ApplyFlexEnv( const CValue& in_connectionset, bool in_assignnewdeformers, XSI::siConstructionMode & io_constructionmode ); void SelectObj( const CValue& in_selectionlist, const CString& in_hierarchylevel, bool in_checkobjectselectability ) ; template < class T > class CICEAttributeData2DLogger { public: static void Log( ICEAttribute& attr ) { CICEAttributeDataArray2D< T > data2D; attr.GetDataArray2D( data2D ); Application xsi; for( ULONG i=0; i<data2D.GetCount( ); i++ ) { CICEAttributeDataArray< T > data; data2D.GetSubArray( i, data ); for( ULONG j=0; j<data.GetCount( ); j++ ) { xsi.LogMessage( CString( data[ j ] ) ); } } } }; Application xsi; X3DObject cone = CreatePrim( L"Cone", L"MeshSurface", L"", L""); Create2DSkeleton( 2.95, 3.34, -0.33, 4.73, 0.0, 0.0, -5.71, 0, 0, 4, CValue(""), CValue("")); AppendBone( L"eff", 3.70, -3.02, 0.30, L""); XSI::siConstructionMode mode = siConstructionModeModeling; ApplyFlexEnv( L"cone;bone,bone1,eff", true, mode ); SelectObj( L"cone.polymsh.cls.EnvelopWeightCls.Envelope_Weights", L"", L"" ); // Makse sure to generate the data first cone.GetActivePrimitive().GetGeometry(0); ProjectItem envProp = xsi.GetSelection()[0]; ICEAttribute attr = envProp.GetICEAttributeFromName( L"EnvelopeWeightsPerDeformer" ); xsi.LogMessage( L"*******************************************************************" ); xsi.LogMessage( L"Name: " + attr.GetName() ); xsi.LogMessage( L"DataType: " + CString(attr.GetDataType()) ); xsi.LogMessage( L"StructType: " + CString(attr.GetStructureType()) ); xsi.LogMessage( L"ContextType: " + CString(attr.GetContextType()) ); xsi.LogMessage( L"IsConstant: " + CString(attr.IsConstant()) ); xsi.LogMessage( L"Readonly: " + CString(attr.IsReadonly()) ); xsi.LogMessage( L"Category: " + CString(attr.GetCategory()) ); xsi.LogMessage( L"Element count: " + CString(attr.GetElementCount()) ); CICEAttributeData2DLogger<float>::Log( attr ); // Helpers CValue CreatePrim( const CString& in_presetobj, const CString& in_geometrytype, const CString& in_name, const CString& in_parent ) { CValueArray args(4); CValue retval; args[0]= in_presetobj; args[1]= in_geometrytype; args[2]= in_name; args[3]= in_parent; Application app; app.ExecuteCommand( L"CreatePrim", args, retval ); return retval; } CValue Create2DSkeleton( const CValue& in_rx, const CValue& in_ry, const CValue& in_rz, const CValue& in_ex, const CValue& in_ey, const CValue& in_ez, const CValue& in_nx, const CValue& in_ny, const CValue& in_nz, const CValue& in_viewtype, CValue& out_bone, CValue& out_effector ) { CValueArray args(12); CValue retval; args[0]= in_rx; args[1]= in_ry; args[2]= in_rz; args[3]= in_ex; args[4]= in_ey; args[5]= in_ez; args[6]= in_nx; args[7]= in_ny; args[8]= in_nz; args[9]= in_viewtype; Application app; app.ExecuteCommand( L"Create2DSkeleton", args, retval ); out_bone = args[10]; out_effector = args[11]; return retval; } CValue AppendBone( const CValue& in_inputobjs, const CValue& in_ex, const CValue& in_ey, const CValue& in_ez, bool in_pin ) { CValueArray args(5); CValue retval; args[0]= in_inputobjs; args[1]= in_ex; args[2]= in_ey; args[3]= in_ez; args[4]= in_pin; Application app; app.ExecuteCommand( L"AppendBone", args, retval ); return retval; } CValue ApplyFlexEnv( const CValue& in_connectionset, bool in_assignnewdeformers, XSI::siConstructionMode & io_constructionmode ) { CValueArray args(3); CValue retval; args[0]= in_connectionset; args[1]= in_assignnewdeformers; args[2]= io_constructionmode; Application app; app.ExecuteCommand( L"ApplyFlexEnv", args, retval ); io_constructionmode = (XSI::siConstructionMode)(LONG)args[2]; return retval; } void SelectObj( const CValue& in_selectionlist, const CString& in_hierarchylevel, bool in_checkobjectselectability ) { CValueArray args(3); CValue retval; args[0]= in_selectionlist; args[1]= in_hierarchylevel; args[2]= in_checkobjectselectability; Application app; CStatus st = app.ExecuteCommand( L"SelectObj", args, retval ); return; }
ICEAttribute AddICEAttribute | ( | const CString & | in_name, |
XSI::siICENodeDataType | in_DataType, | ||
XSI::siICENodeStructureType | in_StructureType, | ||
XSI::siICENodeContextType | in_ContextType | ||
) |
Adds and returns a new ICEAttribute on this object. If the attribute already exists, the current attribute is returned.
in_name | Name of the attribute to create. |
in_DataType | The attribute data type. |
in_StructureType | The attribute structure type. |
in_ContextType | The attribute context type. |
Removes the attribute identified with in_name from this object. The attribute is removed only if it is not a built-in attribute or not required by an ICETree.
in_name | Name of the attribute to remove. |
ULONG GetObjectID | ( | ) | const |
Returns the object identifier.
UINT_MAX
if the object
has no ID.LONG GetEvaluationID | ( | ) |
Returns the last evaluation ID. The evaluation ID is a counter that is incremented each time the ProjectItem is evaluated (dirtied) by XSI. You can use this to detect whether a ProjectItem became dirty since the last time GetEvaluationID was called.
The | evaluation ID (LONG) |
LONG GetHierarchicalEvaluationID | ( | ) |
Returns the sum of the evaluation ID for the hierarchy of object that are nested under this object. This is equivalent to doing the sum manually of all EvaluationID for the object.
The | evaluation ID (LONG) |