Public Member Functions
SceneItem Class Reference

Detailed Description

The SceneItem object represents an object in the scene (that is, something with properties) in Softimage from which all other scene objects derive.

#include <xsi_sceneitem.h>

Inheritance diagram for SceneItem:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SceneItem ()
 ~SceneItem ()
 SceneItem (const CRef &in_ref)
 SceneItem (const SceneItem &in_obj)
bool IsA (siClassID in_ClassID) const
siClassID GetClassID () const
SceneItemoperator= (const SceneItem &in_obj)
SceneItemoperator= (const CRef &in_ref)
CRefArray GetProperties () const
Material GetMaterial () const
CRefArray GetEnvelopes () const
CStatus ApplyEnvelope (const CRefArray &in_deformers, siBranchFlag in_DeformOnBranch, siBranchFlag in_EnvOnBranch, Envelope &io_env)
CRefArray GetLocalProperties () const
CStatus AddMaterial (const CString &in_preset, bool in_branch, const CString &in_name, Material &io_mat)
Property AddProperty (const CString &in_preset, bool in_bBranch=false, const CString &in_name=CString())
CStatus AddProperty (const CString &in_preset, bool in_bBranch, const CString &in_name, Property &out_prop)
CStatus AddCustomProperty (const CString &in_name, bool in_bBranch, CustomProperty &out_customprop)
CStatus SetMaterial (Material &in_Material)
CStatus GetPropertyFromName (const CString &in_name, Property &out_prop)
CStatus GetLocalPropertyFromName (const CString &in_name, Property &out_prop)

Constructor & Destructor Documentation

SceneItem ( )

Default constructor.

~SceneItem ( )

Default destructor.

SceneItem ( const CRef in_ref)

Constructor.

Parameters:
in_refconstant reference object.
SceneItem ( const SceneItem in_obj)

Copy constructor.

Parameters:
in_objconstant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID) const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassIDclass type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from ProjectItem.

Reimplemented in Annotation, Camera, CameraRig, ChainBone, ChainEffector, ChainElement, ChainRoot, Cluster, Directed, Group, Layer, Light, LightRig, Model, Null, ParticleCloud, Partition, Pass, Rig, and X3DObject.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from ProjectItem.

Reimplemented in Annotation, Camera, CameraRig, ChainBone, ChainEffector, ChainElement, ChainRoot, Cluster, Directed, Group, Layer, Light, LightRig, Model, Null, ParticleCloud, Partition, Pass, Rig, and X3DObject.

SceneItem& operator= ( const SceneItem in_obj)

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:
in_objconstant class object.
Returns:
The new SceneItem object.
SceneItem& 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.

Parameters:
in_refconstant class object.
Returns:
The new SceneItem object.

Reimplemented from ProjectItem.

Reimplemented in Annotation, Camera, CameraRig, ChainBone, ChainEffector, ChainElement, ChainRoot, Cluster, Directed, Group, Layer, Light, LightRig, Model, Null, ParticleCloud, Partition, Pass, Rig, and X3DObject.

CRefArray GetProperties ( ) const

Returns an array of references to all applied Property objects on the object. For example, if you have a material installed on the node and the branch, and the X3DObject is also in a Group that has a material, then only the group material will appear in this array.

Returns:
Array of references to properties.
Material GetMaterial ( ) const

Returns the object's applied Material object.

Returns:
The Material applied on this object.
CRefArray GetEnvelopes ( ) const

Returns an array of references to Envelope object on this object.

Returns:
Array of references to the envelopes applied on this object.
CStatus ApplyEnvelope ( const CRefArray in_deformers,
siBranchFlag  in_DeformOnBranch,
siBranchFlag  in_EnvOnBranch,
Envelope io_env 
)

Applies a flexible envelope to the specified object.

Parameters:
in_deformersArray of references to object which will act as deformers.
in_DeformOnBranchUse all objects in deformers branch.
in_EnvOnBranchApply envelope to all objects in the SceneItem's branch.
io_envThe Envelope object.
Returns:
CStatus::OK success
CStatus::Fail other failure
CRefArray GetLocalProperties ( ) const

Returns an array of references to all applied local Property objects on the object.

Returns:
Array of references to properties.
CStatus AddMaterial ( const CString in_preset,
bool  in_branch,
const CString in_name,
Material io_mat 
)

Creates and adds material to a SceneItem object. If the SceneItem is a Model then the BranchFlag will be ignored since a material can only be added on a Model in branch.

Parameters:
in_presetName of a shader preset to apply to object. The shader preset is optional. If no shader preset is supplied then a material is created with a default phong shader connected to the surface port.
in_branchApply material on branch or the node of object.
in_nameRepresents the name of the new Material object.
io_matThe added material.
Returns:
CStatus::OK success
CStatus::Fail other failure
Property AddProperty ( const CString in_preset,
bool  in_bBranch = false,
const CString in_name = CString() 
)

Creates and adds a property to a SceneItem object.

Parameters:
in_presetThis argument contains the filename or full path to a Preset file. The type of property that is created is determined by this argument. For example CustomProperty creates an empty CustomProperty and UserDataMap creates a UserDataMap. Is is also possible to specify the name of a CustomProperty that is installed as a PluginItem.
in_bBranchApply property on branch or the node of object.
in_nameThe name of the new Property object (see SIObject::GetName). If not specified the name is derived from the in_preset argument.
Returns:
The new Property object.
See also:
SceneItem::AddCustomProperty, SceneItem::GetProperties, SceneItem::GetLocalProperties, CustomProperty, UserDataMap, UserDataBlob, PluginRegistrar::RegisterProperty
Since:
4.0
CStatus AddProperty ( const CString in_preset,
bool  in_bBranch,
const CString in_name,
Property out_prop 
)

As of v4.0, this signature is obsolete and is replaced by the other signature.

Deprecated:
4.0 (but still maintained for backward compatibility)
Parameters:
in_presetThe filename or full path to a Preset file.
in_bBranchTrue to apply property on the branch of object.
in_nameThe name of the new Property object.
Return values:
out_propThe new Property object.
CStatus AddCustomProperty ( const CString in_name,
bool  in_bBranch,
CustomProperty out_customprop 
)

Creates and adds an empty CustomProperty to a SceneItem object.

Parameters:
in_nameRepresents the name of the new CustomProperty object.
in_bBranchTrue to apply property on branch or the node of object.
Return values:
out_custompropReturns the added property.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus SetMaterial ( Material in_Material)

Assigns a material to the scene item object

Parameters:
in_MaterialThe material to assign
Returns:
CStatus::OK success
CStatus::Fail other failure
Since:
4.0
CStatus GetPropertyFromName ( const CString in_name,
Property out_prop 
)

Returns a property by its scripting name.

Parameters:
in_nameThe scripting name of the property.
Return values:
out_propThe property retrieved.
Returns:
CStatus::OK success
CStatus::Fail other failure
CStatus GetLocalPropertyFromName ( const CString in_name,
Property out_prop 
)

Returns a local property by its scripting name.

Parameters:
in_nameThe scripting name of the property.
Return values:
out_propThe property retrieved.
Returns:
CStatus::OK success
CStatus::Fail other failure

The documentation for this class was generated from the following file: