SceneItem Class Reference
 
 
 
SceneItem Class Reference

This reference page is linked to from the following overview topics: About the Structure of the Softimage APIs.


#include <xsi_sceneitem.h>


Class Description

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

Inheritance diagram for SceneItem:
ProjectItem SIObject CBase Cluster Group Pass X3DObject Layer Partition Annotation ChainElement Directed Model Null ParticleCloud

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
SceneItem operator= (const SceneItem &in_obj)
SceneItem operator= (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_ref constant reference object.
SceneItem ( const SceneItem in_obj )

Copy constructor.

Parameters:
in_obj constant 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_ClassID class 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_obj constant 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_ref constant 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_deformers Array of references to object which will act as deformers.
in_DeformOnBranch Use all objects in deformers branch.
in_EnvOnBranch Apply envelope to all objects in the SceneItem's branch.
io_env The 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_preset Name 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_branch Apply material on branch or the node of object.
in_name Represents the name of the new Material object.
io_mat The 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_preset This 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_bBranch Apply property on branch or the node of object.
in_name The 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_preset The filename or full path to a Preset file.
in_bBranch True to apply property on the branch of object.
in_name The name of the new Property object.
Return values:
out_prop The 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_name Represents the name of the new CustomProperty object.
in_bBranch True to apply property on branch or the node of object.
Return values:
out_customprop Returns 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_Material The 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_name The scripting name of the property.
Return values:
out_prop The 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_name The scripting name of the property.
Return values:
out_prop The property retrieved.
Returns:
CStatus::OK success
CStatus::Fail other failure

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