Item¶
ILxSceneService¶
-
class
ILxSceneService
¶ The scene service provides high-level scene and item system access. These methods are provided as general services that could be useful on any item.
Public Functions
-
LxResult
ScriptQuery
(LXtObjectID self, void **ppvObj)¶ Get the script query object for the service.
-
LxResult
Root
(LXtObjectID self, void **ppvObj)¶ The root scene acts as a container for all loaded scenes. It is not visible to the user. Newly added scenes are created as sub-scenes of the root. This method returns the global root scene, and can be used to walk all of the sub-scenes.
-
unsigned
ItemTypeCount
(LXtObjectID self)¶ This returns the total number of item types.
-
LxResult
ItemTypeByIndex
(LXtObjectID self, unsigned index, LXtItemType *type)¶ This returns each item type by index into the global list.
-
LxResult
ItemTypeLookup
(LXtObjectID self, const char *name, LXtItemType *type)¶ Given a type name, this returns the type ID.
-
LxResult
ItemTypeName
(LXtObjectID self, LXtItemType type, const char **name)¶ This method returns the internal name of a type given it’s type ID.
-
LxResult
ItemTypeTest
(LXtObjectID self, LXtItemType what, LXtItemType isA)¶ Type codes can be tested for relationship. This returns LXe_TRUE if ‘what’ is the same type as, or a sub-type of, ‘isA.’
-
LxResult
ItemTypeSuper
(LXtObjectID self, LXtItemType type, LXtItemType *super)¶ It is also possible to look up the super-type code from a type code. This returns LXe_NOTFOUND if the item type has no super-type.
-
LxResult
ItemTypeCommonChannels
(LXtObjectID self, LXtObjectID item1, LXtObjectID item2, unsigned *count)¶ This method returns the number of channels shared by two items. This is the number of channels defined by their common ancestor type, if any. If they do not share any channels, this returns LXe_NOTFOUND;
-
LxResult
ItemSubTypeCount
(LXtObjectID self, LXtItemType type, unsigned int *count)¶ This returns the number of subtypes for a given item type.
-
LxResult
ItemSubTypeByIndex
(LXtObjectID self, LXtItemType type, unsigned int index, const char **subtype)¶ This return the the name of each subtype by index.
-
LxResult
ChannelVectorSize
(LXtObjectID self, unsigned int mode, unsigned int *size)¶ This function returns the number of components in the given one of the LXiCHANMODE_* defines.
-
LxResult
ChannelVectorTextHints
(LXtObjectID self, const LXtTextValueHint **hints)¶ Useful for UIs and configs, this function returns the text hints array for the vector modes.
-
LxResult
CreateScene
(LXtObjectID self, void **ppvObj)¶ Create an empty scene. This is parented to the root scene, and is truely empty not a default new scene.
-
LxResult
DestroyScene
(LXtObjectID self, LXtObjectID scene)¶ Destroy a scene. Effectively the same as closing it. All references to the contents of the scene must have been released.
-
LxResult
SubSceneAdd
(LXtObjectID self, LXtObjectID scene, LXtObjectID other, unsigned refItems)¶ This method adds a sub-scene to another scene. The refItems flag can be set to have all items in the sub-cinema referenced in the parent.
-
LxResult
SubSceneLoad
(LXtObjectID self, LXtObjectID scene, const char *path, LXtObjectID monitor, void **ppvObj)¶ This loads a scene as a sub-scene. If the parent scene is null this will be a root scene.
-
LxResult
GetMeshInstSourceItem
(LXtObjectID self, LXtObjectID inst, void **ppvObj)¶ Support for finding source items for mesh instance items and the instances of mesh items takes the following form: Given an ILxItem of type LXi_CIT_INSTANCE, this function returns the LXi_CIT_MESH type source item.
-
int
MeshInstanceCount
(LXtObjectID self, LXtObjectID mesh)¶ This method returns the number of mesh instances using the given mesh item as source.
-
LxResult
MeshInstanceByIndex
(LXtObjectID self, LXtObjectID mesh, int index, void **ppvObj)¶ This method returns the mesh instance using the given mesh item as source by index.
-
LxResult
LoadImage
(LXtObjectID self, LXtObjectID scene, const char *path, LXtObjectID monitor, void **ppvObj)¶ Images are loaded with the following method. The path is absolute and the object returned is the new clip item. The function can return LXe_FILE_REMAP if the path needed to be altered to find an image.
-
LxResult
GetReplicatorEnumerator
(LXtObjectID self, LXtObjectID replicatorItem, void **ppvObj)¶ The GetReplicatorEnumerator interface allows you to get an enumerator for a replicator item to enumerate the positions & orientations of replicants generated by its particle source.
-
LxResult
ItemTypeGetTag
(LXtObjectID self, LXtItemType type, const char *tag, unsigned super, const char **value)¶ Read the value of a tag for an item type, if any. If super is true the supertypes will also be checked.
-
LxResult
ItemGraphCollection
(LXtObjectID self, LXtObjectID collection, LXtItemType type, const char *graph, int fwd)¶ It is often useful to collect associated items in a particular graph, and populate an ILxItemCollection. This function will enumerate over all items of the provided type in the ILxItemCollection, and all items to the collection that are connected to the item in the named graph. The fwd argument specifies the direction to walk the graph.
-
LxResult
AllocEmptyCollection
(LXtObjectID self, void **ppvObj)¶ Call this service method to allocate an empty collection.
-
LxResult
CloseCollection
(LXtObjectID self, LXtObjectID collection, unsigned mode)¶ A collection can be closed given a closure mode. All items matching the mode are added to the collection. NONE can be used just to merge the recently added items so they can be tested.
-
LxResult
ItemTypeSupportsInterface
(LXtObjectID self, LXtItemType type, const LXtGUID *guid)¶ Returns LXe_TRUE or LXe_FALSE if the item type supports the provided COM interface.
-
LXtItemType
ItemType
(const char *name)¶ User Class Only: A user method provides easier syntax.
-
bool
NewScene
(CLxLoc_Scene &scene)¶ User Class Only:
-
bool
NewReplicatorEnumerator
(ILxUnknownID pItem, CLxLoc_ReplicatorEnumerator &replicatorEnum)¶ User Class Only:
-
LxResult
-
typedef int
LXtItemType
¶ Item types are given by integers and also by unique names. -1 is normally used to indicate all types, and 0 indicates no valid type, however any item type ID zero or less is invalid.
LXiTYPE_ANY
LXiTYPE_NONE
-
LXsSAV_SCENE_SUBSET
¶ Saving scenes is done through common saver servers. Servers with the LXa_SCENE output class will be passed a scene object for vertification and saving. It’s also possible to save subsets of scenes which contain only specific items. Savers that support this are marked with this server tag. The value of the tag is a string composed from space-delimited tokens:
ALL The saver supports essentially everything, overrides other settings.
SURFACES The saver will save surface-type items, like meshes, static meshes, or procedural surfaces.
MATERIALS The saver will also save materials for those surfaces.
RENDER The saver will save other items related to rendering, like lights and cameras.
ANIMATION The saver will save animated channels as well as constant values.
LXsSUBSET_ALL
LXsSUBSET_SURFACES
LXsSUBSET_MATERIALS
LXsSUBSET_RENDER
LXsSUBSET_ANIMATION
ILxSceneSubset¶
-
class
ILxSceneSubset
¶ Servers with this tag may get passed a scene for full scene saving, or they may be passed a SceneSubset object. This is a very simple object that just contains a scene and an item collection
Public Functions
-
LxResult
GetScene
(LXtObjectID self, void **ppvObj)¶
-
LxResult
GetCollection
(LXtObjectID self, void **ppvObj)¶
-
LxResult
ILxScene2Service¶
-
class
ILxScene2Service
¶ Legacy scene service for old plug-ins. Provides old locator methods which are now part of ILxLocator.
Public Functions
-
LxResult
ScriptQuery
(LXtObjectID self, void **ppvObj)¶
-
LxResult
Root
(LXtObjectID self, void **ppvObj)¶
-
LxResult
LoadImage
(LXtObjectID self, LXtObjectID scene, const char *name, unsigned *flags, LXtObjectID monitor, void **ppvObj)¶
-
unsigned
ItemTypeCount
(LXtObjectID self)¶
-
LxResult
ItemTypeByIndex
(LXtObjectID self, unsigned index, LXtItemType *type)¶
-
LxResult
ItemTypeLookup
(LXtObjectID self, const char *name, LXtItemType *type)¶
-
LxResult
ItemTypeName
(LXtObjectID self, LXtItemType type, const char **name)¶
-
LxResult
ItemTypeTest
(LXtObjectID self, LXtItemType what, LXtItemType isA)¶
-
LxResult
ItemTypeSuper
(LXtObjectID self, LXtItemType type, LXtItemType *super)¶
-
LxResult
ItemTypeCommonChannels
(LXtObjectID self, LXtObjectID item1, LXtObjectID item2, unsigned *count)¶
-
LxResult
ItemSubTypeCount
(LXtObjectID self, LXtItemType type, unsigned int *count)¶
-
LxResult
ItemSubTypeByIndex
(LXtObjectID self, LXtItemType type, unsigned int index, const char **subtype)¶
-
LxResult
ChannelVectorSize
(LXtObjectID self, unsigned int mode, unsigned int *size)¶
-
LxResult
ChannelVectorTextHints
(LXtObjectID self, const LXtTextValueHint **hints)¶
-
LxResult
SubSceneAdd
(LXtObjectID self, LXtObjectID scene, LXtObjectID other, unsigned refItems)¶
-
LxResult
SubSceneLoad
(LXtObjectID self, LXtObjectID scene, const char *path, LXtObjectID monitor, void **ppvObj)¶
-
LxResult
Import
(LXtObjectID self, LXtObjectID scene, const char *path, LXtObjectID monitor)¶
-
LxResult
WorldTransform
(LXtObjectID self, LXtObjectID locator, double time, LXtMatrix xfrm, LXtVector pos)¶
-
LxResult
GetTransformItem
(LXtObjectID self, LXtObjectID locator, unsigned type, void **ppvObj)¶
-
LxResult
AddTransformItem
(LXtObjectID self, LXtObjectID locator, unsigned type, void **ppvObj, unsigned *index)¶
-
LxResult
SetTransformVector
(LXtObjectID self, LXtObjectID locator, LXtObjectID chanWrite, unsigned type, LXtVector value)¶
-
LxResult
AddPreTransformItem
(LXtObjectID self, LXtObjectID locator, LXtObjectID chanWrite, unsigned type, LXtVector value, void **ppvObj, unsigned *index)¶
-
LxResult
AddPostTransformItem
(LXtObjectID self, LXtObjectID locator, LXtObjectID chanWrite, unsigned type, LXtVector value, void **ppvObj, unsigned *index)¶
-
LxResult
GetMeshInstSourceItem
(LXtObjectID self, LXtObjectID inst, void **ppvObj)¶
-
int
MeshInstanceCount
(LXtObjectID self, LXtObjectID mesh)¶
-
LxResult
MeshInstanceByIndex
(LXtObjectID self, LXtObjectID mesh, int index, void **ppvObj)¶
-
LxResult
SetTarget
(LXtObjectID self, LXtObjectID locator, LXtObjectID target, void **ppvObj)¶
-
LxResult
PrependTransformItem
(LXtObjectID self, LXtObjectID locator, LXtObjectID chanWrite, unsigned type, LXtVector value, void **ppvObj, unsigned *index)¶
-
LxResult
AppendTransformItem
(LXtObjectID self, LXtObjectID locator, LXtObjectID chanWrite, unsigned type, LXtVector value, void **ppvObj, unsigned *index)¶
-
LxResult
ILxScene¶
-
class
ILxScene
¶ The scene service provides high-level scene and item system access. These methods are provided as general services that could be useful on any item.
Public Functions
-
LXtItemType
ItemRootType
(LXtObjectID self)¶ Scenes can be set to represent a particular item type. This is done either on creation or during loading and cannot be subsequently changed. For example, a scene that represents a 3d object will have an item type of “mesh”, a scene storing an image file will have an item type of “clip” etc. This function returns the root item type that the scene represents or zero if there is no specific type.
-
LxResult
Filename
(LXtObjectID self, const char **filename)¶ This returns the filename of the scene. The path is system-specific. This will return LXe_FALSE if the scene is unnamed, LXe_OK otherwise.
-
LxResult
FriendlyFilename
(LXtObjectID self, unsigned flags, const char **filename)¶ This method returns a human readable version of the filename suitable for display in the UI. The SHORT flag removes the file type extension, and STAR adds an asterisk for changed cinemas.
-
LxResult
FileFormat
(LXtObjectID self, const char **format)¶ This returns the file format of the scene, which determines how the scene will be saved.
-
LxResult
Changed
(LXtObjectID self, unsigned changed)¶ Pass in 1 to indicate that the scene has been modified, and 0 to reset the state back to unchanged.
-
LxResult
HasChanged
(LXtObjectID self, unsigned int *numChanges)¶ This returns LXe_TRUE if the scene has changed, and LXe_FALSE if it has not. It can also provide the number of changes since the last reset.
-
LxResult
Parent
(LXtObjectID self, void **ppvObj)¶ This method returns the parent ILxScene, or LXe_NOTFOUND if this is the root scene, Thus this method can also be used to test if this scene is the root scene.
-
LxResult
SubSceneCount
(LXtObjectID self, LXtItemType type, unsigned int *count)¶ The the scene’s sub-scenes can be enumerated. The type argument can be used to filter the list by root type, or can be -1 to list all scenes. This method returns the number of sub-scenes.
-
LxResult
SubSceneByIndex
(LXtObjectID self, LXtItemType type, unsigned int index, void **ppvObj)¶ This method returns the sub-scene by index.
-
unsigned
LoadFlags
(LXtObjectID self)¶ Scene target flags ( LXf_SCENETARG_ ) set by the loader can be read with this method.
-
LxResult
Channels
(LXtObjectID self, const char *name, double time, void **ppvObj)¶ This function can allocate a channel I/O object presenting ILxChannelRead and ILxChannelWrite interfaces. The name indicates the name of the action to use, and a null name will evaluate final channels. The time specifies when values will be read, set or evaluated.
-
LxResult
ItemCount
(LXtObjectID self, LXtItemType type, unsigned int *count)¶ The most notable attribute of scenes is that they contain items. The item list can be enumerated with these methods. Items themselves are represented as ILxItemIDs. This method gets the number of items of a given type.
-
LxResult
ItemByIndex
(LXtObjectID self, LXtItemType type, unsigned int index, void **ppvObj)¶ This returns an item of the given type by index.
-
LxResult
ItemLookup
(LXtObjectID self, const char *id, void **ppvObj)¶ Items can be looked up by their ID string or by unique name.
-
LxResult
ItemCountByTypes
(LXtObjectID self, const LXtItemType *types, unsigned *count)¶ These methods allow enumeration of items by multiple types. The ‘types’ argument is a zero-terminated array of item types. This method get the count.
-
LxResult
ItemByIndexByTypes
(LXtObjectID self, const LXtItemType *types, unsigned index, void **ppvObj)¶ This method gets an item by types by index.
-
LxResult
AnyItemOfType
(LXtObjectID self, LXtItemType type, void **ppvObj)¶ This method returns LXe_TRUE if an item of a given type exists in the scene and returns it.
-
LxResult
ItemLocalize
(LXtObjectID self, LXtObjectID item, void **ppvObj)¶ This method returns the item in the given scene which is the same as, or a reference to, the given item. If there is no reference, the method will return LXe_NOTFOUND.
-
LxResult
ItemAdd
(LXtObjectID self, LXtItemType type, void **ppvObj)¶ This method creates a new item of the given type and adds it to the scene.
-
LxResult
ItemInstance
(LXtObjectID self, LXtObjectID item, void **ppvObj)¶ This method creates a duplicate of an existing item. Also known as an instance.
-
LxResult
ItemAddReference
(LXtObjectID self, LXtObjectID item, void **ppvObj)¶ This creates a new reference top an existing item in the scene. If the reference already exists, it is returned isntead.
-
LxResult
GraphLookup
(LXtObjectID self, const char *name, void **ppvObj)¶ This method returns a scene graph from an ILxScene by name.
-
LxResult
GraphCount
(LXtObjectID self, int *count)¶ The graph list can be walked directly to get all graphs in the scene. This method returns the number of graphs.
-
LxResult
GraphByIndex
(LXtObjectID self, unsigned index, void **ppvObj)¶ This method returns the graph from the scene by index.
-
LxResult
ItemRemove
(LXtObjectID self, LXtObjectID item)¶ Methods are added here since we want them at the end of the structure.
-
LxResult
Import
(LXtObjectID self, const char *path, LXtObjectID monitor)¶ This loads a file into an existing scene. A monitor must be provided, and can be obtained from [[DialogService (interface)]].
-
LxResult
EvalModInvalidate
(LXtObjectID self, const char *modName)¶ Invalidate an EvalModifier with the given server name. This is done automatically for item and graph events, but can also be done manually for other changes. Out of date modifier nodes will be destroyed and new ones created, allowing nodes to change their inputs and outputs.
-
LxResult
EvalModReset
(LXtObjectID self, const char *modName)¶ Reset the state of an eval modifier. Modifier nodes remain as they are but any cached state is invalidated.
-
LxResult
ItemReplace
(LXtObjectID self, LXtObjectID item, int type, void **ppvObj)¶ Create a new item with the specified type from passed item, replacing the original.
-
LxResult
SetupMode
(LXtObjectID self)¶ This returns LXe_TRUE if the scene is in “Setup Mode”, and LXe_FALSE otherwise.
-
LxResult
SetupChannels
(LXtObjectID self, void **ppvObj)¶ Alternate version of the Channels function, which evaluates channels in Setup mode.
-
LxResult
ItemLookupIdent
(LXtObjectID self, const char *id, void **ppvObj)¶ Lookup item using ident only, not full name.
-
LxResult
ItemLookupImported
(LXtObjectID self, const char *id, void **ppvObj)¶ During import old idents can be used to look up imported items which will have been given new idents.
-
LxResult
RenderCameraCount
(LXtObjectID self, int *count)¶ These functions can be used to get a list of all the possible (linked) render cameras.
-
LxResult
RenderCameraByIndex
(LXtObjectID self, int index, void **ppvObj)¶ Note that if RenderCameraCount gives zero, feeding a value of -1 into RenderCameraByIndex will actually get the render camera (which can be any camera).
-
LxResult
RenderCameraIndex
(LXtObjectID self, LXtObjectID eval, int *index)¶ And this function, which takes in an eval, gets the current render camera index.
-
LxResult
ItemCopy
(LXtObjectID self, LXtObjectID item, void **ppvObj)¶ This method creates a duplicate of an existing item.
-
LxResult
BatchCreateBegin
(LXtObjectID self)¶ Items can be created in batch mode, where they are created in an incomplete state which is only finalized when the batch is ended. If the copy fails the client must call the abort function. Start a batch for item creation.
-
LxResult
BatchCreateEnd
(LXtObjectID self)¶ End batch item creation.
-
LxResult
BatchCreateAbort
(LXtObjectID self)¶ Abort batch item creation.
-
LxResult
BatchCopyBegin
(LXtObjectID self, LXtObjectID destination)¶ Likewise copying items can be done in a batch state. This also allows the client to specify a different destination scene for the copies to be created. Start a batch copy, setting the destination scene if different.
-
LxResult
BatchCopyEnd
(LXtObjectID self)¶ End batch item copy.
-
LxResult
BatchCopyAbort
(LXtObjectID self)¶ Abort batch item copy.
-
LxResult
WorkPlaneRotation
(LXtObjectID self, LXtObjectID chanRead, LXtMatrix m3)¶ This function can be used to get the world rotation of the workplane.
-
LxResult
WorkPlanePosition
(LXtObjectID self, LXtObjectID chanRead, LXtVector pos)¶ This function can be used to get the world position of the workplane.
-
LxResult
GeneralCollection
(LXtObjectID self, const char *typeName, const char *arg, LXtObjectID rootItem, void **ppvObj)¶ These function will return a list of items matching the item list type and arguments. The returned object is an ItemCollection. Because this is normally used for UI purposes, the collection includes only items that are visible to the user and filters out items that the user shouldn’t see. There is an alternate “raw” form to get the unfiltered list. Get a collection of visible items.
-
LxResult
GeneralCollectionRaw
(LXtObjectID self, const char *typeName, const char *arg, LXtObjectID rootItem, void **ppvObj)¶ Get a collection of all items.
-
LxResult
AllocAssets
(LXtObjectID self, void **ppvObj)¶ This method allocates a new asset object for the scene.
-
LxResult
DeleteCollection
(LXtObjectID self, LXtObjectID collection, unsigned closeMode)¶ Delete all items belonging to a collection. The collection can be closed first, either deep or shallow.
-
LxResult
CustomLoad
(LXtObjectID self, LXtObjectID visitor)¶ Often it can be useful to “fake” a scene load, populating a scene with items directly, rather than using a loader. This function will call a visitor, which can be used to add items into a scene. The advantage of this mechanism, is that any event notifications will be deferred until the “load” is complete, which could have a positive effect on performance.
-
LxResult
TextureCopy
(LXtObjectID self, LXtObjectID item, void **ppvObj)¶ This method creates a duplicate of an existing texture layer, including its children and texture locators.
-
bool
from
(CLxLoc_Item &item)¶ User Class Only: Localized scene object can be intialized from an item.
-
CLxUser_Scene
(CLxLoc_Item &item)¶ User Class Only: Or initialized in the constructor for the wrapper.
-
bool
GetChannels
(CLxLoc_ChannelRead &chan, double time) const¶ User Class Only: Get evaluated channels for read at the given time.
-
bool
GetChannels
(CLxLoc_ChannelRead &chan, const char *name, double time = 0.0) const¶ User Class Only: Get channels from a named action.
-
bool
GetSetupChannels
(CLxLoc_ChannelRead &chan) const¶ User Class Only: Get evaluated channels in setup mode.
-
bool
SetChannels
(CLxLoc_ChannelWrite &chan, const char *name, double time = 0.0)¶ User Class Only: Get an interface to write channels to a named action.
-
int
NItems
(LXtItemType type)¶ User Class Only: Get the item count.
-
bool
GetItem
(LXtItemType type, unsigned index, CLxLoc_Item &item)¶ User Class Only: Get items by index.
-
bool
GetItem
(const char *name, CLxLoc_Item &item)¶ User Class Only: Get an item from the scene by name.
-
bool
GetItem
(LXtItemType *types, unsigned index, CLxLoc_Item &item)¶ User Class Only: This method gets an item by types by index.
-
bool
GetItem
(LXtItemType type, CLxLoc_Item &item)¶ User Class Only: This gets a single item of the given type, if any.
-
bool
NewItem
(LXtItemType type, CLxLoc_Item &item)¶ User Class Only: Create a new item by type code.
-
bool
NewItem
(const char *typeName, CLxLoc_SceneService &svc, CLxLoc_Item &item)¶ User Class Only: Create a new item by type name using a scene service.
-
bool
NewItem
(const char *typeName, CLxLoc_Item &item)¶ User Class Only: Create a new item by type name without using a scene service. (The service is allocated by the method.)
-
bool
GetGraph
(const char *name, CLxLocalizedObject &graph)¶ User Class Only: This method returns a scene graph from an ILxScene by name.
-
bool
RemItem
(CLxLoc_Item &item)¶ User Class Only: Remove the item from the scene.
-
bool
ReplaceItem
(CLxLoc_Item &item, LXtItemType type, CLxLoc_Item &newItem)¶ User Class Only: Create a new item with the specified type from passed item, replacing the original.
-
bool
GetItemByIdent
(const char *name, CLxLoc_Item &item)¶ User Class Only: Lookup item using ident only.
-
bool
GetImportedItem
(const char *name, CLxLoc_Item &item)¶ User Class Only: Lookup an imported item by it’s original ident.
-
int
NRenderCameras
()¶ User Class Only: Get the number of render cameras.
-
bool
GetRenderCameraByIndex
(int index, CLxLoc_Item &item)¶ User Class Only: Get the render camera by index.
-
int
GetRenderCameraIndex
(CLxLoc_Evaluation eval)¶ User Class Only: Get the render camera index.
-
LXtItemType
LXfSCENENAME_STAR
LXfSCENENAME_SHORT
ILxItem¶
-
class
ILxItem
¶ Items represent the images, meshes, cameras, lights and so on in the scene. Items also have an ILxAttributes interface which is a second method for acessing their channel list. Values read are the defaults for the channels, and setting values is disabled. Items aslo have a [[StringTag (interface)]] for getting and setting their tags.
Public Functions
-
LXtItemType
Type
(LXtObjectID self)¶ This returns the item’s type. Returns LXiTYPE_NONE if the item has been destroyed.
-
LxResult
TestType
(LXtObjectID self, LXtItemType type)¶ This returns true if an item matches or inherits from a given type.
-
LxResult
TestTypes
(LXtObjectID self, const LXtItemType *types)¶ This returns true if an item matches or inherits from a list of types.
-
LxResult
Ident
(LXtObjectID self, const char **ident)¶ This returns the unique identifier string of the item. The pointer value itself can also be used as a unique identifier (since that’s rather hard to do with COM interfaces) since it will never change once item creation or loading is complete.
-
LxResult
SetIdent
(LXtObjectID self, const char *ident)¶ The ident string can also be set. This should only be done during loading, where an item already has a well-define ident that already doesn’t conflict with any of the others in the same scene.
-
LxResult
Name
(LXtObjectID self, const char **name)¶ The item’s raw name can be read with this methods. The name read this way does not contain the disambiguating suffix, and it may be null if unset.
-
LxResult
SetName
(LXtObjectID self, const char *name)¶ The raw name can be set with this method. The item’s actual name may differ from this string if some other item already has the same name.
-
LxResult
UniqueName
(LXtObjectID self, const char **name)¶ A unique, human-readable name can also be returned. This name is suffixed with a number if necessary, in the user’s preferred format. This may also be a synthetic name, generated from the state of the item.
-
LxResult
UniqueIndex
(LXtObjectID self, unsigned *index)¶ The number which is appended to non-unique names to make them unique is persistent. Since it’s logically part of the name the user keeps in mind for the item, we would like it to be the same after saving and loading. This method returns the index assigned to the item.
-
LxResult
SetUniqueIndex
(LXtObjectID self, unsigned index)¶ This method allows the index to be reset during loading.
-
LxResult
Parent
(LXtObjectID self, void **ppvObj)¶ This returns the parent item, or LXe_NOTFOUND if there is no parent because this is a root item.
-
LxResult
SetParent
(LXtObjectID self, LXtObjectID parent)¶ This can be used to set the parent item and place the child at the end of the list of parents children.
-
LxResult
SubCount
(LXtObjectID self, unsigned *count)¶ These methods allow the item hierarchy within the scene to be walked. This returns the number of child items parented to this item.
-
LxResult
SubByIndex
(LXtObjectID self, unsigned index, void **ppvObj)¶ This returns a child item by index.
-
LxResult
Root
(LXtObjectID self, void **ppvObj)¶ This returns the item’s ancestor at the root of the scene, failing with LXe_NOTFOUND if this is a root item.
-
LxResult
Context
(LXtObjectID self, void **ppvObj)¶ This method returns the scene that the item belongs to.
-
LxResult
Reference
(LXtObjectID self, void **ppvObj)¶ This returns an item from a sub-scene if this item is a reference. If this item is native to its cinema this returns LXe_FAILED.
-
LxResult
IsReferenced
(LXtObjectID self)¶ This returns LXe_TRUE if the item is referenced by any other item, meaning that it is part of any other hypergraph besides the parenting one.
-
LxResult
Source
(LXtObjectID self, void **ppvObj)¶ The source for an item is another item of the same or similar item type which is used as a source for undefined channels of this item. This is normally set implicitly by CineItemDuplicate(). This method returns the source item.
-
LxResult
SetSource
(LXtObjectID self, LXtObjectID source)¶ This method sets the source item.
-
LxResult
ChannelCount
(LXtObjectID self, unsigned *count)¶ Items have parameter channels, values which vary by time and other circumstances. The channel is given by an index, and it is possible to iterate through all the channels in an item. This method returns the number of channels, and the indices go from 0 to N-1. Although many channels are common for items of the same type, they may also vary by item.
-
LxResult
ChannelLookup
(LXtObjectID self, const char *name, unsigned *index)¶ This can be used to lookup the channel by name, returning its index.
-
LxResult
ChannelName
(LXtObjectID self, unsigned index, const char **name)¶ This returns the internal name of the channel, suitable for lookup.
-
LxResult
ChannelType
(LXtObjectID self, unsigned index, unsigned *type)¶ This method returns the channel type given by the following predefined codes. The numeric and gradient types can be keyframed. The custom channel types can be stored in the action or they can be for evaluation only.
-
LxResult
ChannelVectorMode
(LXtObjectID self, unsigned index, unsigned *mode, unsigned *components)¶ This method returns the vector mode for the channel, one of the LXiCHANMODE_* vector settings chosen as the channel is defined. If this is part of a vector then the component index (usually 0-2) is returned along with LXe_TRUE; otherwise, this returns LXe_FALSE.
-
LxResult
ChannelStorageType
(LXtObjectID self, unsigned index, const char **type)¶ This method returns the storage type of the channel, which can be valid exo-type name for numeric and stored custom types.
-
LxResult
ChannelEvalType
(LXtObjectID self, unsigned index, const char **type)¶ This returns the evaluation type of a channel, which is the type of slot allocated in the eval state vector. This will return the “gradstack” exo-type for gradient channels.
-
LxResult
ChannelGradient
(LXtObjectID self, unsigned index, const char **input, const char **output)¶ This method returns LXe_TRUE if the channel is a gradient, and returns the input and output types indirectly as well.
-
LxResult
ChannelIntHint
(LXtObjectID self, unsigned index, const LXtTextValueHint **hints)¶ This method returns the text hints for integer channels. If there are no hints, this returns LXe_NOTAVAILABLE. This will fail if the channel is not an integer channel.
-
LxResult
ChannelPackage
(LXtObjectID self, unsigned index, const char **package)¶ The package a channel belongs to can be found with this function. The package name is returned unless this is a user channel.
-
LxResult
PackageAdd
(LXtObjectID self, const char *package)¶ Packages can be added to items directly. When a package is added, the channels for the package are added to the item, and the local data for the package is allocated and initialized for this item. If this item already has this package, then this function does nothing.
-
LxResult
PackageTest
(LXtObjectID self, const char *package)¶ A item can be tested to see if it already has the given package. This returns LXe_TRUE if the package has been added to this item.
-
LxResult
PackageStartIndex
(LXtObjectID self, const char *package, unsigned *index)¶ This returns the index of the first channel in the package. This index is item specific, as different items may have different combinations of packages applied.
-
LxResult
PackageRemove
(LXtObjectID self, const char *package)¶ Packages can be removed with this function.
-
LxResult
ChannelAdd
(LXtObjectID self, void **ppvObj)¶ New user channels can be added directly to items using the following method. This returns an ILxAddChannel interface that will are appended new channels after the channels defined for the items type and any packages. NOTE: This only works during load, adding user channels to items in the process of loading. It doesn’t currently support adding channels in any other context.
-
const char *
GetTag
(LXtObjectID self, LXtID4 type)¶ Look up an item’s tag value by type code.
-
LxResult
SetTag
(LXtObjectID self, LXtID4 type, const char *tag)¶ Set the tag string associated with the type code.
-
void
InvalidateName
(LXtObjectID self)¶ This is called by the package that implements the item, indicating that its synthetic name, if it has one, should be updated.
-
LxResult
WasLoaded
(LXtObjectID self, unsigned test)¶ Returns LXe_TRUE if this item was part of the most recent load or import. Flags can further refine the test to just import or items being loaded currently.
-
LxResult
Delete
(LXtObjectID self)¶ Delete the item from the scene.
-
LxResult
ChannelIsDriven
(LXtObjectID self, unsigned index)¶ This returns LXe_TRUE if the specified channel is driven by a modifier, otherwise LXe_FALSE is returned.
-
LxResult
SetParentAndPosition
(LXtObjectID self, LXtObjectID parent, unsigned pos)¶ This can be used to set the parent item and childs position in the list of parents children.
-
LxResult
BaseName
(LXtObjectID self, const char **name)¶ Returns a human-readable name. Unlike the unique name, this name is not suffixed with a number to ensure uniqueness, instead returning the base name.
-
LXtItemType
LXiCHANTYPE_NONE
LXiCHANTYPE_INTEGER
LXiCHANTYPE_FLOAT
LXiCHANTYPE_GRADIENT
LXiCHANTYPE_STORAGE
LXiCHANTYPE_EVAL
LXiCHANMODE_SCALAR
LXiCHANMODE_XY
LXiCHANMODE_XYZ
LXiCHANMODE_RGB
LXiCHANMODE_RGBA
LXiCHANMODE_UV
LXiCHANMODE_UVW
LXfITEMLOAD_IMPORT
LXfITEMLOAD_CURRENT
ILxSceneGraph¶
-
class
ILxSceneGraph
¶ Graphs provide a means to create relationships between items and/or channels. The scene contains any number of graphs accessed by name,
Public Functions
-
LxResult
Name
(LXtObjectID self, const char **name)¶ This method returns the name of a graph.
-
LxResult
Context
(LXtObjectID self, void **ppvObj)¶ This returns the scene that the graph belongs to.
-
LxResult
RootCount
(LXtObjectID self, int *count)¶ Graphs can maintain root items in a specific order. Root items are those that do not link to any other items, like items without parents. This method returns the number of root items. .
-
LxResult
RootByIndex
(LXtObjectID self, int index, void **ppvObj)¶ This method gets a root item by index.
-
LxResult
RootFirst
(LXtObjectID self, void **ppvObj)¶ Accessing root items by index can be slow. Instead the root items can be traversed by calling this function to get the first root item.
-
LxResult
RootNext
(LXtObjectID self, void **ppvObj)¶ Once the first root item has been read, calling this function will read subsequent root items.
-
LxResult
RootSetPos
(LXtObjectID self, LXtObjectID item, int pos)¶ This function will place the given root item at the given index in the sequence. It returns LXe_OK on success, and an error code for failures including if the item is not in fact a root item.
-
LxResult
RootRemove
(LXtObjectID self, LXtObjectID item)¶ Since clients can directly manipulate the graph links, this function should be called to remove an item from the root sequence if it’s no longer a root item.
-
bool
from
(CLxLoc_Scene &scene, const char *name)¶ User Class Only: Graphs can also be initialized from scenes and items.
-
bool
from
(CLxLoc_Item &item, const char *name)¶
-
LxResult
ILxItemGraph¶
-
class
ILxItemGraph
¶ The item graph interface provides item-to-item linking.
Public Functions
-
LxResult
AddLink
(LXtObjectID self, LXtObjectID from, LXtObjectID to)¶ Links can be established between any pair of nodes provided the rules for the graph allow it. This function adds a link from one node to another, and the new reference is added to the end of each node’s list.
-
LxResult
SetLink
(LXtObjectID self, LXtObjectID from, int fromIndex, LXtObjectID to, int toIndex)¶ This allows new links to be added or the order of existing links to be changed. The link will take on the corresponding index in the forward and reverse lists for each node. An index value of -1 leaves the index unchanged, and a positive index out of range puts the link at the end of the list.
-
LxResult
DeleteLink
(LXtObjectID self, LXtObjectID from, LXtObjectID to)¶ The function removes the link between two nodes. In theory it can fail based on the rules for the graph, but in practice it generally doesn’t.
-
LxResult
FwdCount
(LXtObjectID self, LXtObjectID item, unsigned *count)¶ For nodes which are the source or destination of links, the links can be queried by using a count/byIndex syntax. Forward links take the ‘from’ item and enumerate the ‘to’ items. Reverse links take the ‘to’ item and enumerate the ‘from’ items. This gets the count of forward links.
-
LxResult
FwdByIndex
(LXtObjectID self, LXtObjectID item, unsigned index, void **ppvObj)¶ This get the destination of the forward link by index.
-
LxResult
RevCount
(LXtObjectID self, LXtObjectID item, unsigned *count)¶ This gets the count of reverse links.
-
LxResult
RevByIndex
(LXtObjectID self, LXtObjectID item, unsigned index, void **ppvObj)¶ This get the source of the reverse link by index.
-
LxResult
ILxChannelGraph¶
-
class
ILxChannelGraph
¶ The channel graph interface provides item/channel-to-item/channel linking. The methods are the same as those in the item graph interface above, but take an item/channel index pair instead of just an item.
Public Functions
-
LxResult
AddLink
(LXtObjectID self, LXtObjectID from, int fromChan, LXtObjectID to, int toChan)¶ Create a link from an item/channel to an item/channel pair.
-
LxResult
SetLink
(LXtObjectID self, LXtObjectID from, int fromChan, int fromIndex, LXtObjectID to, int toChan, int toIndex)¶ Create or reorder a link from an item/channel to an item/channel pair.
-
LxResult
DeleteLink
(LXtObjectID self, LXtObjectID from, int fromChan, LXtObjectID to, int toChan)¶ Remove a channel link.
-
LxResult
FwdCount
(LXtObjectID self, LXtObjectID item, int channel, unsigned *count)¶ Get the count of forward links from this channel.
-
LxResult
FwdByIndex
(LXtObjectID self, LXtObjectID item, int channel, unsigned index, void **ppvObj, int *objChan)¶ Get the destination of a forward link by index.
-
LxResult
RevCount
(LXtObjectID self, LXtObjectID item, int channel, unsigned *count)¶ Get the count of reverse links to this channel.
-
LxResult
RevByIndex
(LXtObjectID self, LXtObjectID item, int channel, unsigned index, void **ppvObj, int *objChan)¶ Get the source of a reverse link by index.
-
bool
from
(CLxLoc_Scene &scene, const char *name)¶ User Class Only:
-
bool
from
(CLxLoc_Item &item, const char *name)¶
-
LxResult
ILxSceneAssets¶
-
class
ILxSceneAssets
¶ The scene assets object provides a way to traverse and update the assets in a scene.
Public Functions
-
LxResult
Count
(LXtObjectID self, unsigned *count)¶ Get the total number of asset references in the scene.
-
LxResult
Item
(LXtObjectID self, unsigned index, void **ppvObj)¶ Get the item for an asset by index.
-
LxResult
Ident
(LXtObjectID self, unsigned index, const char **ident)¶ Get the ident string for an asset by index. The ident will uniquely identify this asset with respect to the item.
-
LxResult
FileType
(LXtObjectID self, unsigned index, const char **type)¶ Get the type This is essentially a file type and can be used when opening dialogs.
-
LxResult
Category
(LXtObjectID self, unsigned index, const char **category)¶ Get the category string for an asset by index. This is an identifier for grouping like assets together, and may just be the item type.
-
LxResult
IsSequence
(LXtObjectID self, unsigned index)¶ Test an asset by index to determine if it’s a normal path or sequence pattern.
-
LxResult
GetPath
(LXtObjectID self, LXtObjectID item, const char *ident, char *buf, unsigned len)¶ Given the item and asset ident, this returns the current path. Returns NOTFOUND if unset.
-
LxResult
SetPath
(LXtObjectID self, LXtObjectID item, const char *ident, const char *newPath)¶ Given the item and asset ident, this resets the current path. This alters the scene and redirects the item to use the new file.
-
LxResult
ILxInstanceAssets¶
-
class
ILxInstanceAssets
¶ The instance assets interface is implemented by the package instance, and allows the item to present APIs for accessing its assets.
Public Functions
-
LxResult
Count
(LXtObjectID self, unsigned *count)¶ Get the number of asset references for this item.
-
LxResult
IdentByIndex
(LXtObjectID self, unsigned index, unsigned *isSeq, const char **fileType, char *buf, unsigned len)¶ Get the required information about an asset reference by index. The string returned through the buffer is the ident.
-
LxResult
Category
(LXtObjectID self, unsigned index, char *buf, unsigned len)¶ Get optional category.
-
LxResult
GetPath
(LXtObjectID self, const char *ident, char *buf, unsigned len)¶ Get the path given the ident.
-
LxResult
SetPath
(LXtObjectID self, const char *ident, const char *newPath)¶ Set the path given the ident, altering the scene.
-
LxResult