messiah_object.h


Provides object related information and manipulation.

Version:
1.1
Date:
7/08/03
Topics
Object Selection
There are three states of object selection in messiah. The first, and simplest is "not selected" which is pretty self explanitory. The next is "selected" which means that the object is part of a single or multi-selection. The third state is "current". The current object is also "selected" and will be included in any functions that return selected objects. Visually the current object appears hilighted in yellow, while the other selected objects appear hilighted in blue. There is always a current object in messiah and therefore always at least one object selected at all times.


Tool Type Macros

These macros define the types of tools available in messiah. Tools are object which may or may not have associated with them a subtool. A Skeleton tool for example has a bone subtool, whereas a Null or a Slider do not have any subtool. Often tools and their sub-tools are used by Effects to affect it's Targets.


#define FX_TOOLTYPE_SKELETON
 Skleton tool, Bone sub-tool.

#define FX_TOOLTYPE_CAMERA
 Camera tool, no sub-tool.

#define FX_TOOLTYPE_LIGHT
 LightMaster tool, Light sub-tool.

#define FX_TOOLTYPE_CURVE
 Curve tool, Point sub-tool.

#define FX_TOOLTYPE_NULL
 Null tool, no sub-tool.

#define FX_TOOLTYPE_SLIDER
 Slider tool, no sub-tool.

#define FX_TOOLTYPE_CLUSTER
 Cluster tool, no sub-tool.

#define FX_TOOLTYPE_FORCE
 ForceMaster tool, Force sub-tool.

#define FX_TOOLTYPE_PROCEDURAL
 Procedural tool, no sub-tool.

#define FX_TOOLTYPE_MEFFECTOR
 MetaEffector tool, Effector sub-tool.

#define FX_TOOLTYPE_VALUE
 Value tool, Slider sub-tool.


Manipulator Type Macros

Manipulators generally refer to the representation of effects in messiah. You can choose to represent your effect object as either a Null or a Slider depending on your needs.

#define FX_MANIPULATOR_SPHERE
 Edit Sphere type manipulator.

#define FX_MANIPULATOR_SLIDER
 Slider type manipulator.


IK Related Macros



#define FX_OBJIK_2D
 2D (plane) IK

#define FX_OBJIK_TELESCOPIC
 Telescopic (sliding) IK.

#define FX_OBJIKDIR_POSITIVE
 Joint direction is positive.

#define FX_OBJIKDIR_NEGATIVE
 Joint direction is negative.

#define FX_OBJIKCHAN_ON
 Channel will be included in IK calculations.

#define FX_OBJIKCHAN_LIMIT
 Channel uses limits in IK calculations.


Callback Signature Macros

It is recommended that you use these Callback Signature Macros to define their associated Callbacks. This will help to shield your code from changes to messiahAPI.

#define FX_HIERARCHYSCAN(f, dt, ed)
 Used to declare/define a hierarchy_func(), used to iterate over a hierarchy.


Callback Functions

The following are Callbacks that you will create and send to messiah. See Callback Types for information.


FXint hierarchy_func (FXobject objID, FXvoid *ed)
 User-implemented FIX ME, passed to fxObjectHierarchyScan(), to be called once for each object in a hierarchy.


Object Creation Functions



FXtool fxToolCreate (FXchar *tool_type, FXchar *tool_name, FXint sub_type, FXint flags)
 Creates a new instance of a master-tool or sub-tool.


Object Naming Functions



FXobject fxObjectFind (FXobject objID, FXchar *prefix, FXchar *name, FXint flags)
 Attempt to find an existing object by either its name or a prefix string.

FXint fxObjectGetName (FXobject objID, FXchar *buffer, FXint buffer_size, FXint flags)
 Gets the name of the specified object.

FXint fxObjectRename (FXobject objID, FXchar *name, FXint flags)
 Renames the specified object.


Object State Data Functions

These functions are used to store state data with your object. State data is data that is specific to each instance of your object. For example if your object was an Effect Module it might use a Weight Tool for it's calculation, each instance of the Effect Module might use a different Weight Tool; therefore each one would need to store the id of it's associated Weight Tool. Typically you will define a structure that will hold all of the state data used by your object, then when an instance of that object is created you allocate a new state data structure and use fxObjectSetTypeData() to attach it to the object. Later you can retrieve that data with fxObjectGetTypeData().
Warning:
You must own the object to use these functions on it. That is, it has to be your Effect Module or your Shader that you are attaching this data to with these functions. If it isn't then you need to use DATA instead. Also, you may only use these functions on Object Based Modules. For example, you may not use these functions on Actions.


FXvoidfxObjectGetTypeData (FXobject objID, FXint flags)
 Gets the state data from the specified (owned ) object.

FXint fxObjectSetTypeData (FXobject objID, FXvoid *data, FXint flags)
 Sets the state data for the specified (owned ) object.


Object Type Functions

These functions will return FX_TRUE or FX_FALSE to indicate the result of the query.


FXint fxObjectIsType (FXobject objID, FXchar *type, FXint flags)
 Determines if the specified object is of the given type.

FXint fxObjectIsSubtype (FXobject objID, FXint sub_type, FXint flags)
 Determine if the specified object is a sub-type of the given master-tool type.

FXint fxObjectIsGeometric (FXobject objID, FXint flags)
 Determine if the specified object contains geometry.

FXint fxObjectCheckID (FXobject objID)
 Determines if the specified FXobject is a valid object ID.

FXint fxObjectIsLoading (FXobject objID, FXint flags)
 Determines if the specified object is in the process of being loaded.

FXint fxObjectGetType (FXobject objID, FXchar *buffer, FXint buffer_size, FXint *sub_type, FXint flags)
 Get an object's type and sub-type.


Parenting Functions

These functions are used to change the hierarchy of objects. Both functions take as arguments the object to be re-positioned and then the item that will be it's new parent or sibling.


FXint fxObjectSetParent (FXobject objID, FXobject parent, FXint flags)
 Sets the parent of the specified object.

FXint fxObjectSetSibling (FXobject objID, FXobject sibling, FXint flags)
 Sets the sibling of the specified object.


Hierarchy Traversal Functions

These functions are used to traverse the object hierarchy of a messiah scene. The fxObjectFirst() function is used to retrieve the first top-level object in the scene, this will be the object that appears first (at the top) of the item list in messiah. Given a valid FXobject you can find it's parent using fxObjectParent(), it's first child using fxObjectChild(), and it's next sibling using fxObjectNext(). There is also an fxObjectPrev() function which will return the provided object's previous sibling.
For convienence it might be desierable to use the fxObjectHierarchyScan() function instead of manually traversing the hierarchy. This function allows you to provide a callback that will be called once for each object remaining in the hierarchy.


FXobject fxObjectFirst (FXint flags)
 Gets the first object in the scene.

FXobject fxObjectNext (FXobject objID, FXint flags)
 Gets the next sibling object after the specified one.

FXobject fxObjectPrev (FXobject objID, FXint flags)
 Gets the next sibling object before the specified one.

FXobject fxObjectChild (FXobject objID, FXint flags)
 Gets the first child only of the specified object.

FXobject fxObjectParent (FXobject objID, FXint flags)
 Gets the parent of the specified object.

FXint fxObjectHierarchyScan (FXobject objID, FXint(*scan_func)(FXobject, FXvoid *), FXvoid *data, FXint flags)
 Used to begin iteration over a hierarchy, you pass this function your hierarchy_scan() FIX ME.


Subtool Traversal Functions

Given a particular tool, perhaps the tool used by your effect, it is often desierable to traverse all of it's subtools. For example, if you wrote an effect that uses the Skeleton tool, you'll probably need to do some calculation based on the positions of each bone in the skeleton. Use these functions just like the Hierarchy Traversal Functions, the only difference here is that you need to qualify the specific tool, masterID, that you are interested in.


FXtool fxSubtoolFirst (FXtool masterID, FXint flags)
 Gets the first sub-tool of the specified master-tool.

FXtool fxSubtoolNext (FXtool masterID, FXobject objID, FXint flags)
 Gets the next sub-tool after the specified sub-tool.

FXtool fxSubtoolPrev (FXtool masterID, FXobject objID, FXint flags)
 Gets the next sub-tool before the specified sub-tool.


Selection Functions

These functions are used to retrieve information about the current object selection and to change it as well. In messiah there is a special type of selection called the current object. When only one object is selected it is both selected and current. When more than one object are selected then they are all selected but only one is the current object. In the interface the current object appears hilighted in yellow and the other selected objects appear hilighted in blue.


FXobject fxObjectCurrent (FXint flags)
 Returns the Current Object.

FXobject fxObjectSetCurrent (FXobject objID, FXint flags)
 Sets the specified object as the Current Object.

FXint fxObjectIsCurrent (FXobject objID, FXint flags)
 Determines if the specified object is the Current Object.

FXint fxObjectSelect (FXobject objID, FXint flags)
 Adds the specified object to the Current Selection.

FXint fxObjectDeselect (FXobject objID, FXint flags)
 Removes the specified object from the Current Selection.

FXint fxObjectDeselectAll (FXint flags)
 Deselects all but the Current Object.

FXobject fxObjectFirstSelected (FXint flags)
 Returns the first Selected Object.

FXobject fxObjectNextSelected (FXobject objID, FXint flags)
 Returns the next Selected Object after the specified object.

FXobject fxObjectPrevSelected (FXobject objID, FXint flags)
 Returns the next Selected Object before the specified object.

FXobject fxObjectLastSelected (FXint flags)
 Returns the last Selected Object.

FXint fxObjectNumSelected (FXint flags)
 Returns the number of Selected Objects (including the Current Object).


IK Functions



FXint fxObjectIKGoal (FXobject objID, FXint flags)
 Determines if specified object is set as an IK goal.

FXint fxObjectIKGoalSet (FXobject objID, FXobject goalID, FXint flags)
 Sets the goal object for an IK end effector.

FXint fxObjectIK (FXobject objID, FXint flags)
 Determines if "Calculate IK" is turned on for the specified object.

FXint fxObjectIKSet (FXobject objID, FXint on, FXint flags)
 Turns "Calculate IK" on/off for the specified object.

FXint fxObjectIKAnchor (FXobject objID, FXint flags)
 Determines if the specified object is the anchor (root) of an IK chain.

FXint fxObjectIKAnchorSet (FXobject objID, FXint anchor, FXint flags)
 Turns "Anchor" on/off for the specified object.

FXint fxObjectIKType (FXobject objID, FXint flags)
 Determines the type of IK used by an end effector.

FXint fxObjectIKTypeSet (FXobject objID, FXint type, FXint flags)
 Sets the type of IK used by an end effector.

FXint fxObjectIKDirection (FXobject objID, FXint flags)
 Determine the direction setting for an IK joint.

FXint fxObjectIKDirectionSet (FXobject objID, FXint direction, FXint flags)
 Sets the IK direction for the specified joint.

FXfloat fxObjectIKStrength (FXobject objID, FXint flags)
 Determines the strength setting for an end effector.

FXint fxObjectIKStrengthSet (FXobject objID, FXfloat strength, FXint flags)
 Sets the strength setting for an end effector.

FXint fxObjectIKChannel (FXobject objID, FXint channel, FXfloat *stiffness, FXfloat *lim_min, FXfloat *lim_max, FXint *flags)
 DESC.

FXint fxObjectIKChannelSet (FXobject objID, FXint channel, FXfloat *stiffness, FXfloat *lim_min, FXfloat *lim_max, FXint *flags)
 DESC.


Define Documentation

#define FX_HIERARCHYSCAN f,
dt,
ed   
 

Used to declare/define a hierarchy_func(), used to iterate over a hierarchy.

Expands to:
FXint f(FXobject objID, dt *ed)
Parameters:
f name of the hierarchy_func() being defined
dt data type the user data passed to fxObjectHierarchyScan()
ed name of the user data argument variable
Return values:
FX_TRUE on success
FX_FALSE on failure
Use this macro to create the signature of your hierarchy_func() FIX ME. You will pass this callback to fxObjectHierarchyScan() to iterate over all of the objects in a hierarchy.
See also:
hierarchy_func()


Function Documentation

FXint fxObjectCheckID FXobject    objID
 

Determines if the specified FXobject is a valid object ID.

Parameters:
objID [in]
Return values:
FX_TRUE if the ID is valid
FX_FALSE otherwise
If you are holding onto an FXobject between calls to your plugin then it is probably a good idea to call fxObjectCheckID() to see if the object is still valid. For example if the object had been deleted since the last time your plugin was called then the ID you were holding onto would be invalid. Passing an invalid object ID to any of the messiahAPI functions will at worst result in no-operation.

FXobject fxObjectChild FXobject    objID,
FXint    flags
 

Gets the first child only of the specified object.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns:
The FXobject of the child
Return values:
FX_NULLID on failure or the absence of a child
This function will only return the first child of an object, you will need to use fxObjectNext() to get the remaining children.

FXobject fxObjectCurrent FXint    flags
 

Returns the Current Object.

Parameters:
flags [in] Reserved for future use
Returns:
The FXobject of the Current Object
Return values:
FX_NULLID on failure

FXint fxObjectDeselect FXobject    objID,
FXint    flags
 

Removes the specified object from the Current Selection.

Parameters:
objID [in]
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXint fxObjectDeselectAll FXint    flags
 

Deselects all but the Current Object.

Parameters:
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXobject fxObjectFind FXobject    objID,
FXchar   prefix,
FXchar   name,
FXint    flags
 

Attempt to find an existing object by either its name or a prefix string.

Parameters:
objID [in] ID of object to begin searching from
prefix [in] optional prefix string to use for the search
name [in] optional name string to use for the search
flags [in] Reserved for future use
Returns:
The FXobject of the object being searched for
Return values:
FX_NULLID on failure or absence of an object matching the search criteria
You may pass either a prefix string or a name string to search for the object. The search will begin with objID and continue in a depth first order through the hierarchy.
Example:
// find based on name
search = fxObjectFind( fxObjectFirst(), NULL, "Shoulder", FX_NOFLAG );

// find based on prefix
search = fxObjectFind( fxObjectFirst(), "Leg_", NULL, FX_NOFLAG );

FXobject fxObjectFirst FXint    flags
 

Gets the first object in the scene.

Parameters:
flags [in] Reserved for future use
Returns:
The FXobject of the first object in the scene

FXobject fxObjectFirstSelected FXint    flags
 

Returns the first Selected Object.

Parameters:
flags [in] Reserved for future use

FXint fxObjectGetName FXobject    objID,
FXchar   buffer,
FXint    buffer_size,
FXint    flags
 

Gets the name of the specified object.

Parameters:
objID [in]
buffer [out] User Allocated array to hold the name
buffer_size [in] length of the buffer
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
Example:
FXchar name[64];

fxObjectGetName( objID, name, 64, FX_NOFLAG );

FXint fxObjectGetType FXobject    objID,
FXchar   buffer,
FXint    buffer_size,
FXint   sub_type,
FXint    flags
 

Get an object's type and sub-type.

Parameters:
objID [in]
buffer [out] User Allocated array to hold type name
buffer_size [in] size of buffer
sub_type [out] object sub-type indicator
flags [in] Reserved for future use
The type of an object will be stored in the User Allocated buffer and it's sub-type will be stored in sub_type. You must specify the size of the buffer with the buffer_size argument. Use strcmp() to compare buffer against the FX_TOOLTYPE_* macros to test for specific object types.

FXvoid* fxObjectGetTypeData FXobject    objID,
FXint    flags
 

Gets the state data from the specified (owned ) object.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns:
A pointer to the state data
Return values:
NULL on failure or the absence of any state data
Example:
MyStateData *msd = NULL;

msd = fxObjectGetTypeData( MyEffectObject, FX_NOFLAG );
See also:
Object State Data Functions

FXint fxObjectHierarchyScan FXobject    objID,
FXint(*    scan_func)(FXobject, FXvoid *),
FXvoid   data,
FXint    flags
 

Used to begin iteration over a hierarchy, you pass this function your hierarchy_scan() FIX ME.

Parameters:
objID [in] object to start scan from, or FX_NULLID to start from beginning
scan_func [in] user supplied hierarchy_func() to be called once for each remaining object
data [in] user supplied data to be passed to each call of hierarchy_func()
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
Pass your hierarchy_func() Callback to this function to be called once for each object in the hierarchy that is a descendant of objID. The hierarchy will be traversed in a depth-first order (i.e. the order, top-to-bottom that the items appear in messiah's item list).
If you would like to pass your own data to your hierarchy_func() then you may do so using the data parameter.

FXint fxObjectIK FXobject    objID,
FXint    flags
 

Determines if "Calculate IK" is turned on for the specified object.

Parameters:
objID [in]
flags [in] Reserved for future use
Return values:
FX_TRUE if "Calculate IK" is turned on
FX_FALSE otherwise

FXint fxObjectIKAnchor FXobject    objID,
FXint    flags
 

Determines if the specified object is the anchor (root) of an IK chain.

Parameters:
objID [in]
flags [in] Reserved for future use
Return values:
FX_TRUE if the object is an anchor
FX_FALSE otherwise

FXint fxObjectIKAnchorSet FXobject    objID,
FXint    anchor,
FXint    flags
 

Turns "Anchor" on/off for the specified object.

Parameters:
objID [in]
anchor [in] FX_YES to set the object as an anchor, FX_NO to un-set it
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXint fxObjectIKChannel FXobject    objID,
FXint    channel,
FXfloat   stiffness,
FXfloat   lim_min,
FXfloat   lim_max,
FXint   flags
 

DESC.

Parameters:
NAME [in] DESC
NAME [in] DESC
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
DETAILS

FXint fxObjectIKChannelSet FXobject    objID,
FXint    channel,
FXfloat   stiffness,
FXfloat   lim_min,
FXfloat   lim_max,
FXint   flags
 

DESC.

Parameters:
NAME [in] DESC
NAME [in] DESC
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
DETAILS

FXint fxObjectIKDirection FXobject    objID,
FXint    flags
 

Determine the direction setting for an IK joint.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns
FX_OBJIKDIR_POSITIVE() direction setting is positive
FX_OBJIKDIR_NEGATIVE() direction setting is negative

FXint fxObjectIKDirectionSet FXobject    objID,
FXint    direction,
FXint    flags
 

Sets the IK direction for the specified joint.

Parameters:
objID [in]
direction [in] See Flag Values Below
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
Flag Values: direction
FX_OBJIKDIR_POSITIVE() direction setting is positive
FX_OBJIKDIR_NEGATIVE() direction setting is negative

FXint fxObjectIKGoal FXobject    objID,
FXint    flags
 

Determines if specified object is set as an IK goal.

Parameters:
objID [in]
flags [in] Reserved for future use
Return values:
FX_TRUE if objID is an IK goal
FX_FALSE otherwise

FXint fxObjectIKGoalSet FXobject    objID,
FXobject    goalID,
FXint    flags
 

Sets the goal object for an IK end effector.

Parameters:
objID [in] end effector
goalID [in] new IK goal object
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXint fxObjectIKSet FXobject    objID,
FXint    on,
FXint    flags
 

Turns "Calculate IK" on/off for the specified object.

Parameters:
objID [in]
on [in] FX_YES to turn IK on, FX_NO to turn it off
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXfloat fxObjectIKStrength FXobject    objID,
FXint    flags
 

Determines the strength setting for an end effector.

Parameters:
objID [in] end effector
flags [in] Reserved for future use
Returns:
the strength value

FXint fxObjectIKStrengthSet FXobject    objID,
FXfloat    strength,
FXint    flags
 

Sets the strength setting for an end effector.

Parameters:
objID [in]
strength [in] new strength setting
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXint fxObjectIKType FXobject    objID,
FXint    flags
 

Determines the type of IK used by an end effector.

Parameters:
objID [in] end effector
flags [in] Reserved for future use
Returns
FX_OBJIK_2D() 2D (plane) IK
FX_OBJIK_TELESCOPIC() Telescopic (sliding) IK

FXint fxObjectIKTypeSet FXobject    objID,
FXint    type,
FXint    flags
 

Sets the type of IK used by an end effector.

Parameters:
objID [in] end effector
type [in] See Flag Values Below
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
Flag Values: type
FX_OBJIK_2D() 2D (plane) IK
FX_OBJIK_TELESCOPIC() Telescopic (sliding) IK

FXint fxObjectIsCurrent FXobject    objID,
FXint    flags
 

Determines if the specified object is the Current Object.

Parameters:
objID [in]
flags [in] Reserved for future use
Return values:
FX_TRUE if the object is current
FX_FALSE otherwise

FXint fxObjectIsGeometric FXobject    objID,
FXint    flags
 

Determine if the specified object contains geometry.

Parameters:
objID [in]
flags [in] Reserved for future use
Return values:
FX_TRUE if the object does contain geometry
FX_FALSE otherwise

FXint fxObjectIsLoading FXobject    objID,
FXint    flags
 

Determines if the specified object is in the process of being loaded.

Parameters:
objID [in]
flags [in] Reserved for future use
Return values:
FX_TRUE if the object is being loaded
FX_FALSE otherwise
DETAILS

FXint fxObjectIsSubtype FXobject    objID,
FXint    sub_type,
FXint    flags
 

Determine if the specified object is a sub-type of the given master-tool type.

Parameters:
objID [in]
sub_type [in] See Flag Values Below
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
Flag Values: sub_type
FX_TOOLTYPE_SKELETON() Bone
FX_TOOLTYPE_LIGHT()
FX_TOOLTYPE_CURVE()
FX_TOOLTYPE_CLUSTER()
FX_TOOLTYPE_FORCE()
FX_TOOLTYPE_PROCEDURAL()
FX_TOOLTYPE_MEFFECTOR()
FX_TOOLTYPE_VALUE()

FXint fxObjectIsType FXobject    objID,
FXchar   type,
FXint    flags
 

Determines if the specified object is of the given type.

Parameters:
objID [in]
type [in] See Flag Values Below
flags [in] Reserved for future use
Return values:
FX_TRUE to indicate a match
FX_FALSE to indicate no match
Flag Values: type
FX_TOOLTYPE_SKELETON() Skeleton
FX_TOOLTYPE_CAMERA()
FX_TOOLTYPE_LIGHT()
FX_TOOLTYPE_CURVE()
FX_TOOLTYPE_NULL()
FX_TOOLTYPE_SLIDER()
FX_TOOLTYPE_CLUSTER()
FX_TOOLTYPE_FORCE()
FX_TOOLTYPE_PROCEDURAL()
FX_TOOLTYPE_MEFFECTOR()
FX_TOOLTYPE_VALUE()

FXobject fxObjectLastSelected FXint    flags
 

Returns the last Selected Object.

Parameters:
flags [in] Reserved for future use
Returns:
The FXobject of the last Selected Object

FXobject fxObjectNext FXobject    objID,
FXint    flags
 

Gets the next sibling object after the specified one.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns:
The FXobject of the next object
Return values:
FX_NULLID on failure or the absence of any further siblings

FXobject fxObjectNextSelected FXobject    objID,
FXint    flags
 

Returns the next Selected Object after the specified object.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns:
The FXobject of the next Selected Object after obj
Return values:
FX_NULLID if there are no further Selected Objects after obj

FXint fxObjectNumSelected FXint    flags
 

Returns the number of Selected Objects (including the Current Object).

Parameters:
flags [in] Reserved for future use
Returns:
The number of Selected Objects

FXobject fxObjectParent FXobject    objID,
FXint    flags
 

Gets the parent of the specified object.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns:
The FXobject of the parent
Return values:
FX_NULLID on failure or in the case of the first object

FXobject fxObjectPrev FXobject    objID,
FXint    flags
 

Gets the next sibling object before the specified one.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns:
The FXobject of the previous object
Return values:
FX_NULLID on failure or the absence of any further objects

FXobject fxObjectPrevSelected FXobject    objID,
FXint    flags
 

Returns the next Selected Object before the specified object.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns:
The FXobject of the next Selected Object before obj
Return values:
FX_NULLID if there are no further Selected Objects before obj

FXint fxObjectRename FXobject    objID,
FXchar   name,
FXint    flags
 

Renames the specified object.

Parameters:
objID [in]
name [in] new name
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
Example:
fxObjectRename( objID, "NewName", FX_NOFLAG );

FXint fxObjectSelect FXobject    objID,
FXint    flags
 

Adds the specified object to the Current Selection.

Parameters:
objID [in]
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXobject fxObjectSetCurrent FXobject    objID,
FXint    flags
 

Sets the specified object as the Current Object.

Parameters:
objID [in]
flags [in] Reserved for future use
Returns:
The previous Current Object

FXint fxObjectSetParent FXobject    objID,
FXobject    parent,
FXint    flags
 

Sets the parent of the specified object.

Parameters:
objID [in]
parent [in] new parent of obj
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXint fxObjectSetSibling FXobject    objID,
FXobject    sibling,
FXint    flags
 

Sets the sibling of the specified object.

Parameters:
objID [in]
sibling [in] new sibling of obj
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure

FXint fxObjectSetTypeData FXobject    objID,
FXvoid   data,
FXint    flags
 

Sets the state data for the specified (owned ) object.

Parameters:
objID [in]
data [in] pointer to the data you wish to store in the object
flags [in] Reserved for future use
Return values:
FX_TRUE on success
FX_FALSE on failure
Example:
MyStateData *msd = NULL;

if( !( msd = calloc(1, sizeof(MyStateData))) )
        // error handling

if( !( fxObjectSetTypeData( MyEffectObject, msd, FX_NOFLAG)) )
        // more error handling
See also:
Object State Data Functions

FXtool fxSubtoolFirst FXtool    masterID,
FXint    flags
 

Gets the first sub-tool of the specified master-tool.

Parameters:
masterID [in] master-tool
flags [in] Reserved for future use
Returns:
the FXtool of the first sub-tool
Return values:
FX_NULLID on failure or the absence of any subtools

FXtool fxSubtoolNext FXtool    masterID,
FXobject    objID,
FXint    flags
 

Gets the next sub-tool after the specified sub-tool.

Parameters:
masterID [in] master-tool
objID [in] previous sub-tool
flags [in] Reserved for future use
Returns:
the FXtool of the next sub-tool
Return values:
FX_NULLID on failure or the absence of another sub-tool

FXtool fxSubtoolPrev FXtool    masterID,
FXobject    objID,
FXint    flags
 

Gets the next sub-tool before the specified sub-tool.

Parameters:
masterID [in] master-tool
objID [in] subsequent sub-tool
flags [in] Reserved for future use
Returns:
the FXtool of the previous sub-tool
Return values:
FX_NULLID on failure or the absence of another sub-tool

FXtool fxToolCreate FXchar   tool_type,
FXchar   tool_name,
FXint    sub_type,
FXint    flags
 

Creates a new instance of a master-tool or sub-tool.

Parameters:
tool_type [in] See Flag Values Below
tool_name [in] name of the tool instance
sub_type [in] FX_YES if this is to be a sub-tool, FX_NO if it is to be a master-tool
flags [in] Reserved for future use FXtool of newly created tool
Return values:
FX_NULLID on failure
Flag Values: tool_type
FX_TOOLTYPE_SKELETON() Skeleton
FX_TOOLTYPE_CAMERA()
FX_TOOLTYPE_LIGHT() or
FX_TOOLTYPE_CURVE() or
FX_TOOLTYPE_NULL()
FX_TOOLTYPE_SLIDER()
FX_TOOLTYPE_CLUSTER() or
FX_TOOLTYPE_FORCE() or
FX_TOOLTYPE_PROCEDURAL() or
FX_TOOLTYPE_MEFFECTOR() or
FX_TOOLTYPE_VALUE() or
The sub_type flag determines if the tool is to be the master-tool identified by tool_type or its associated sub-tool. For example, if you were to pass FX_TOOLTYPE_SKELETON() as tool_type and FX_NO as sub_type, then a Skeleton would be created. However if you set sub_type to FX_YES then a Bone will be created instead.
Example:
aCurve = fxToolCreate( FX_TOOLTYPE_CURVE, "Curve01", FX_NO, FX_NOFLAG );

aPoint = fxToolCreate( FX_TOOLTYPE_CURVE, "CV01", FX_YES, FX_NOFLAG );

FXint hierarchy_func FXobject    objID,
FXvoid   ed
 

User-implemented FIX ME, passed to fxObjectHierarchyScan(), to be called once for each object in a hierarchy.

Parameters:
objID [in] current object in the traversal
ed [in] data passed to fxObjectHierarchyScan() as data argument
hierarchy_func() is just a name we are giving to any callback function that you create with the FX_HIERARCHYSCAN() macro. The hierarchy_func() acts as an iterator to traverse the scene's object hierarchy. You will pass the address of this function as a callback to messiah when you call fxObjectHierarchyScan(). Your hierarchy_func() Callback will then get called once for each item in the hierarchy. Inside of your hierarchy_func() you can perform whatever operations you like on the objects.
Example:

// define our hierarchy_func()
FX_HIERARCHYSCAN( MyScanFunc, FXchar, type )
// expands to: FXintf MyScanFunc(FXobject obj, FXchar *type)
{
        if( fxObjectIsType(obj, type, FX_NOFLAG) )
        {
                // do something to only a specific type of object
        }

        return FX_TRUE;
}

void somefunc()
{
        // call our hierarchy_func(), passing it the type of object we want to do something to
        fxObjectHierarchyScan( fxObjectFirst(), &MyScanFunc, FX_TOOLTYPE_SKELETON, FX_NOFLAG );
}


© 2003 pmG WorldWide, LLC.


www.projectmessiah.com

groups.yahoo.com/pmGmessiah

Last Updated on Thu Jul 10 04:49:37 2003