Object¶
ActionClip¶
-
class
lxu.object.
ActionClip
¶ Empty actionclip Python user class.
-
Action
()¶ This function gets the Action associated with an ActionClip or ActionPose item.
ChannelRead object = Action(float time)
-
Active
()¶ This function tests whether an ActionClip is active or not.
integer = Active()
-
Create
()¶ This function creates an ActionClip.
Create()
-
Enabled
()¶ This function tests whether an ActionClip is enabled or not.
integer = Enabled()
-
Extents
()¶ This function can be used to get the range of animation in the ActionClip. If the layers argument is set any Action Layers on the Action Clip will be included.
(float timeS,float timeE) = Extents(integer layers)
-
SetActive
()¶ This function can be used to change the active state of an ActionClip item. Zero and one can be passed in the ‘state’ argument to set the state directly or -1 to toggle the current state.
SetActive(integer state)
-
SetEnabled
()¶ The enabled state of an ActionClip item is used when the item belongs to a Render Pass group, i.e. a Pass. Only enabled ActionClips will be rendered. Zero and one can be passed in the ‘state’ argument to set the enable state directly or -1 to toggle the current state.
SetEnabled(integer state)
-
SetParenting
()¶ This function must be called after an ActionClip has been created and added to the Actor group.
SetParenting(object group)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ActionListener¶
-
class
lxu.object.
ActionListener
¶ Empty actionlistener Python user class.
-
ActionChannelConstantChange
(channel)¶ ActionChannelConstantChange(object item,integer channel)
-
ActionChannelConstantPreChange
(channel)¶ ActionChannelConstantPreChange(object item,integer channel)
-
ActionChannelSignal
(channel)¶ An action listener can be registered to watch for changes to action values.
ActionChannelSignal(object item,integer channel)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AddChannel¶
-
class
lxu.object.
AddChannel
¶ Empty AddChannel Python user class.
-
NewChannel
(type)¶ Channels are added to packages using an IlxAddChannel interface. The
NewChannel(string name,string type)
-
SetDefault
(defInt)¶ Numeric defaults can be set easily with these two methods.
SetDefault(float defFlt,integer defInt)
-
SetDefaultObj
()¶ Default values for non-numeric storage channels can also be set by getting the value object for the default.
Unknown object = SetDefaultObj()
-
SetDefaultVec
()¶ SetDefaultVec(double[] defVec)
-
SetGradient
()¶ If the base type for the channel is floating point, then the channel can be made a gradient by calling this function. The gradient will have the base type as output and this type as input.
SetGradient(string inType)
-
SetHint
()¶ Text hints are described in detail in their documentation. There is one important difference in handling min/max for angle channels (and only angle channels): they are specified as degrees*10000 instead of radians*10000. This allows for accurate representation of 45 degrees and similar angles. Other places that use text hints (like commands) have access to another mechanism to set min/max that is not yet available to channels, so they don’t require this special case.
SetHint(hints hint)
-
SetInternal
()¶ This marks the channel as internal, hiding it from the user.
SetInternal()
-
SetStorage
()¶ If the base type for the channel is numeric then actions will be able to store animated values for it. Likewise string channels can also have values stored in the action, albeit constant. All other types are assumed to evaluation channels only
SetStorage(string stType)
-
SetUserHint
()¶ SetUserHint(hints hint)
-
SetVector
()¶ Setting the vector type to one of the LXsCHANVEC defines will cause this one channel definition to create multiple channels comprising the vector.
SetVector(string vecType)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AddDropAction¶
-
class
lxu.object.
AddDropAction
¶ -
AddAction
(message)¶ This method is called during by
AddAction(integer action,string message)
-
Peek
()¶ This method can be used to obtain a “peek” at the destination object to more accurately determine which actions to add to the list. This only works when inside the
Unknown object = Peek()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AdjustTool¶
-
class
lxu.object.
AdjustTool
¶ Empty AdjustTool Python user class.
-
Invalidate
()¶ Invalidate()
-
Lock
()¶ Additional methods allow the tool to signal other changes during interaction.
Lock()
-
SetFlt
(val)¶ SetFlt(integer index,float val)
-
SetInt
(val)¶ SetInt(integer index,integer val)
-
SetString
(val)¶ SetString(integer index,string val)
-
Update
()¶ Update()
-
Value
(val)¶ During event processing, the tool should not modify its own attributes directly. Instead it should adjust its own values through the adjust tool interface which allows the atribute changes to be scripted and undoable. The functions are similar to those found in the
Value(integer index,object val)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AppActiveListener¶
-
class
lxu.object.
AppActiveListener
¶ Empty AppActiveListener Python user class.
-
IsNowActive
()¶ This is called with true when the app becomes active, and false when it becomes inactive. User idle actions can be armed from this method to execute commands as needed.
IsNowActive(integer isActive)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AsyncMonitorInfo¶
-
class
lxu.object.
AsyncMonitorInfo
¶ Empty AsyncMonitorInfo Python user class.
-
Abort
()¶ Tell the monitor to abort. This simply sets the abort flag, which is returned by
Abort()
-
CanAbort
()¶ Returns LXe_TRUE if the monitor can be aborted. This is purely a UI construct, and determiens if a root-level monitor should draw the abort widget. It is always false on sub-monitors, and
CanAbort()
-
Child
()¶ Unknown object = Child()
-
Identifier
()¶ This returns a unique identifier string for the monitor, mostly to make it easier to address from things like the Activity View commands.
string ident = Identifier()
-
IsAborted
()¶ This returns LXe_TRUE if aborted, and LXe_FALSE if it is still running.
IsAborted()
-
OverallProgress
()¶ This is similar, but takes into account sub-monitors to provide an overall progress value.
float progress = OverallProgress()
-
Parent
()¶ Get the parent and child of the monitor. This fails with NOTAVAILABLE if there is no parent or child. These objects must be released when no longer needed.
Unknown object = Parent()
-
Progress
()¶ Get the current progress of this single monitor, ignoring child monitors.
float progress = Progress()
-
System
()¶ Get the system and title of the monitor.
string system = System()
-
Title
()¶ string title = Title()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AsyncMonitorSystem¶
-
class
lxu.object.
AsyncMonitorSystem
¶ Empty AsyncMonitorSystem Python user class.
-
ByIndex
()¶ Unknown object = ByIndex(integer index)
-
Count
()¶ Walk the list of monitors in the system.
integer count = Count()
-
Name
()¶ Get the name of the system.
string name = Name()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AttrSequence¶
-
class
lxu.object.
AttrSequence
¶ Empty AttrSequence Python user class.
-
Float
(value)¶ Float(string name,float value)
-
Integer
(value)¶ The
Integer(string name,integer value)
-
String
(value)¶ String(string name,string value)
-
Value
(value)¶ Value(string name,object value)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Attributes¶
-
class
lxu.object.
Attributes
¶ In Python we can get all the attribute names in a list.
-
Count
()¶ Return the number of attributes.
integer = Count()
-
Get
(index)¶
-
GetFlt
()¶ float val = GetFlt(integer index)
-
GetInt
()¶ integer val = GetInt(integer index)
-
GetString
()¶ string = GetString(integer index)
-
Hints
()¶ Return a read-only array of text value hints for the given attribute. This may return null if there are none or if there is any other failure. Note that this array may be volatile and should not be stored.
hints = Hints(integer index)
-
Lookup
()¶ Return the index given the name, or LXe_NOTFOUND.
integer index = Lookup(string name)
-
Name
()¶ Return the name of the attribute at given index, or LXe_OUTOFBOUNDS for bad index choices.
string name = Name(integer index)
-
NameList
()¶
-
Set
(index, value)¶
-
SetFlt
(val)¶ SetFlt(integer index,float val)
-
SetInt
(val)¶ SetInt(integer index,integer val)
-
SetString
(val)¶ SetString(integer index,string val)
-
Type
()¶ Return the basic attribute type which indicates what intrinsic data type is used to store it. That is given by one of the types below.
integer type = Type(integer index)
-
TypeName
()¶ Return the attribute type name. This is the name of any of the available value types.
string tname = TypeName(integer index)
-
Value
(writeOK)¶ Once the list of attributes and their types has been determined, the following methods can be used to read and write their values given their index (from 0 to Count-1).
Unknown object = Value(integer index,integer writeOK)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AttributesUI¶
-
class
lxu.object.
AttributesUI
¶ Empty AttributesUI Python user class.
-
DisableMsg
(message)¶ This returns an attribute-specific disabled message if the argument is disabled by filling in an ILxMessageID. If the attribute is enabled, the code is set to LXe_OK; disabled attributes use the code LXe_DISABLED and may set a disabled string as well. The value returned from the method itself should match the code set in the ILxMessageID. For example, a boolean attribute may control an overall setting, while its sub-attributes are only valid if the boolean is true. If the boolean is false, then this function could return a message saying that the boolean needs to be set true for all the sub-attributes.
DisableMsg(integer index,object message)
-
UIHints
(hints)¶ UIHints(integer index,object hints)
-
UIValueHints
()¶ This will allocate a value hints object for the given attribute, provided it has any hints that need to be queried. If index is LXiATTRUI_ANY, then the object should represent hints for the entire command, tool, etc. This is most commonly used to obtain notifiers for a command when used as a button in a form.
UIValueHints object = UIValueHints(integer index)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Audio¶
-
class
lxu.object.
Audio
¶ Empty Audio Python user class.
-
Channels
()¶ This returns the number of audio channels. 1 is mono, 2 is stereo.
integer = Channels()
-
Data
()¶ This returns the pointer of buffer. If trim start is set, it returns the offset position.
data[] = Data()
-
Duration
()¶ The time duration of buffer. This time is trimed.
float = Duration()
-
Filename
()¶ Audio file and format.
string = Filename()
-
Frequency
()¶ Frequency of buffer in Hz.
integer = Frequency()
-
Read
()¶ Read audio data to the buffer for the frames. The bytes of frames is frames * channels * bytes of type. This returns the write frames and it sets true to ‘eof’ if it reachs to the end of file.
(integer frames,integer eof) = Read(data[] buff)
-
Sample
(type, value)¶ This returns the sampling value at the time.
Sample(float time,integer type,data[] value)
-
Seek
()¶ Seek the buffer position to the given frame.
Seek(integer frame)
-
Size
()¶ This returns the size of buffer in byte. This is trimed.
integer = Size()
-
Tell
()¶ Return the current frame to read.
integer = Tell()
-
TrimStart
()¶ The triming time from start in second.
float = TrimStart()
-
Type
()¶ This returns the sampling rate. 8 is unsigned byte (0-255), 16 is signed short (-32768 to 32767). 32 is 32 bits floating point value.
integer = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AudioDevice¶
-
class
lxu.object.
AudioDevice
¶ Empty AudioDevice Python user class.
-
Handle
()¶ The audio device is virtual audio device device. This provides the abstruct audio interaces. The real audio device in OS level is implemented in OPAL. This creates the audio handle with the audio object.
AudioHandle object = Handle(object audio)
-
PlayFile
()¶ Play the given audio file by non blocking mode.
PlayFile(string filePath)
-
PlayRange
(start, end, volume, pitch)¶ Play the audio object in the limited range.
PlayRange(object audio,float start,float end,float volume,float pitch)
-
Playing
()¶ Return true if the device is in playing.
integer = Playing()
-
StopAll
()¶ Stop all audio handles on the device.
StopAll()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AudioHandle¶
-
class
lxu.object.
AudioHandle
¶ Empty AudioHandle Python user class.
-
Audio
()¶ This function returns the current audio object.
object = Audio()
-
Loop
()¶ Turn looping on (LXx_TRUE) or off (LXe_FALSE)
Loop()
-
Offset
()¶ The playback position in seconds.
float = Offset()
-
Pause
()¶ Pause the audio source.
Pause()
-
Pitch
()¶ Pitch multiplier.
float = Pitch()
-
Play
()¶ Play the audio source. If “forward” is false, it plays to backward.
Play(integer forward)
-
Resume
()¶ Resume the audio source.
Resume()
-
SetLoop
()¶ SetLoop(integer loop)
-
SetOffset
()¶ Set the playback position in seconds. If the offset position is out of range, this function modulos the position in loop mode, otherwise it sets to the end of data.
SetOffset(float offset)
-
SetPitch
()¶ SetPitch(float pitch)
-
SetVolume
()¶ SetVolume(float volume)
-
State
()¶ Returns the state of the audio device.
integer state = State()
-
Stop
()¶ Stop the audio source.
Stop()
-
Volume
()¶ Source gain.
float = Volume()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AudioLoaderTarget¶
-
class
lxu.object.
AudioLoaderTarget
¶ Empty AudioLoaderTarget Python user class.
-
SetChannels
()¶ SetChannels(integer channels)
-
SetFrequency
()¶ SetFrequency(integer frequency)
-
SetSamples
()¶ SetSamples(integer samples)
-
SetType
()¶ SetType(integer type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
AudioWrite¶
-
class
lxu.object.
AudioWrite
¶ Empty AudioWrite Python user class.
-
SetDuration
()¶ Set the duration to play by second.
SetDuration(float duration)
-
SetSample
(type, value)¶ Set the sampling value at the time to the object.
SetSample(float time,integer type,data[] value)
-
SetStart
()¶ Set the trim time from start.
SetStart(float start)
-
Write
()¶ Write the frame data to the object. This increments the data position. This updates “frames” with the written frames.
integer frames = Write(data[] data)
-
WriteEnd
()¶ This must be called after writing frames.
WriteEnd()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
BlockRead¶
-
class
lxu.object.
BlockRead
¶ Empty BlockRead Python user class.
-
Depth
()¶ integer = Depth()
-
End
()¶ End()
-
FindBlock
(flags)¶ Function descriptions are not provided since these objects are not commonly encountered in nexus file I/O. TODO: fill these in.
integer blkId = FindBlock(blocks head,integer flags)
-
ReadFP
()¶ (float data,integer ocount) = ReadFP(integer count)
-
ReadFP8
()¶ (float data,integer ocount) = ReadFP8(integer count)
-
ReadI1
(count)¶ integer ocount = ReadI1(byte[] data,integer count)
-
ReadI4
(count)¶ integer ocount = ReadI4(int[] data,integer count)
-
ReadIDCode
()¶ integer idCode = ReadIDCode(blocks list)
-
ReadString
(max, flags)¶ Reading a string takes a buffer for the result and its size. If FORCE is true this will return an error if no string is found. If PARTIAL is true then as much string as can be found will be read into the buffer and LXe_IO_PARTIALSTRING will be returned if there is more left to read. Otherwise the entire string will always be read and LXe_IO_TRUNCATED will be returned if some of the string had to be discarded. The returned count is the number of characters read including the terminating null.
integer ocount = ReadString(byte[] buf,integer max,integer flags)
-
ReadU2
()¶ (integer data,integer ocount) = ReadU2(integer count)
-
ReadU4
()¶ (integer data,integer ocount) = ReadU4(integer count)
-
ReadVX
()¶ (integer data,integer ocount) = ReadVX(integer count)
-
SetMiniBlockHeight
()¶ SetMiniBlockHeight(integer mini)
-
SetSourceEncoding
()¶ ReadString converts a text encoding of string to another text encoding given by the following methods using
SetSourceEncoding(integer encoding)
-
SetTargetEncoding
()¶ SetTargetEncoding(integer encoding)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
BlockStore¶
-
class
lxu.object.
BlockStore
¶ -
AllocBookmark
()¶ id loc = AllocBookmark()
-
ByIndex
(index, parent)¶ ByIndex(integer type,integer index,id parent)
-
Count
(parent)¶ You can also enumerate blocks by type. The
integer count = Count(integer type,id parent)
-
Delete
()¶ The current block can also be deleted. This also deletes any sub-blocks.
Delete()
-
Ident
()¶ string id = Ident()
-
Lookup
(id, parent)¶ The main function of the interface is to set the current block. This can be done by finding a block by type and id code. This returns LXe_TRUE for an existing block, and FALSE for a block that doesn’t exist. If the parent is null this will look for root blocks, otherwise it will search for sub-blocks of the parent block. The user class version of the method makes it optional.
Lookup(integer type,string id,id parent)
-
ReadBlock
(offset, size)¶ Likewise for a readable block this function will read raw bytes into the buffer from the given position and size in the block.
ReadBlock(pointer buf,integer offset,integer size)
-
RestoreBookmark
()¶ Or, of course, the current location can be set using a bookmark.
RestoreBookmark(id loc)
-
SaveBookmark
()¶ Once the current block is set a location can be remembered to bookmark this spot.
SaveBookmark(id loc)
-
Stack
()¶ It can be useful when traversing a block store to set the current location as the new root, so that subsequent lookup occur in that context. That can be done by pushing it onto the location stack. The stack can be popped when done or cleared to reset searches back to the root.
Stack(integer operation)
-
Type
()¶ Properties of the current block can be read.
integer type = Type()
-
WriteBlock
(offset, size)¶ If the current block is writable, this function will write a given number of raw bytes from the buffer into the file at a position offset from the start of the block.
WriteBlock(data[] buf,integer offset,integer size)
-
WriteSize
()¶ The BlockRead and BlockWrite interfaces on the store object are convenient for writing structured data, but they do use intermediate memory and so may not be as fast or efficient as possible. As an alternative writing and reading can be done directly to and from the block store file. To write a new block or to resize and exisitng block this function can be used. The space will be allocated for the data in the file, but its contents are undefined. To set the contents of the block the next function should be used.
WriteSize(integer size)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
BlockWrite¶
-
class
lxu.object.
BlockWrite
¶ Empty BlockWrite Python user class.
-
Depth
()¶ integer = Depth()
-
End
()¶ End()
-
SetSourceEncoding
()¶ WriteString converts a text encoding of string to another text encoding given by the following methods using
SetSourceEncoding(integer encoding)
-
SetTargetEncoding
()¶ SetTargetEncoding(integer encoding)
-
WriteBlock
(flags)¶ WriteBlock(blocks head,integer flags)
-
WriteFP
(count)¶ WriteFP(float[] data,integer count)
-
WriteFP8
(count)¶ WriteFP8(double[] data,integer count)
-
WriteI1
(count)¶ WriteI1(string data,integer count)
-
WriteI4
(count)¶ WriteI4(int[] data,integer count)
-
WriteIDCode
()¶ WriteIDCode(blocks ident)
-
WriteString
()¶ WriteString(string str)
-
WriteU4
(count)¶ WriteU4(unsigned[] data,integer count)
-
WriteVX
(count)¶ WriteVX(unsigned[] data,integer count)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Buffer¶
-
class
lxu.object.
Buffer
¶ Empty Buffer Python user class.
-
Clear
(y)¶ This method clears the pixel at the given coordinates.
Clear(integer x,integer y)
-
CreateImageTileTree
()¶ CreateImageTileTree()
-
DataType
()¶ integer = DataType()
-
DecrementTileTreeSize
()¶ DecrementTileTreeSize()
-
DestroyImageTileTree
()¶ DestroyImageTileTree()
-
Flags
()¶ integer = Flags()
-
GetImageTileTree
()¶ id = GetImageTileTree()
-
GetSize
()¶ This returns the width and height of the buffer.
(integer width,integer height) = GetSize()
-
IncrementTileTreeSize
()¶ IncrementTileTreeSize()
-
Line
()¶ This method returns a pointer to the array of pixels at line y.
pointer = Line(integer y)
-
Name
()¶ This method returns the buffer name’s internal name, and can be used for lookup or other similar purposes.
string name = Name()
-
Pixel
(y)¶ This method returns a pointer to the pixel of coordinates (x, y).
pointer = Pixel(integer x,integer y)
-
ResetImageTileTree
()¶ ResetImageTileTree()
-
SetEyeSide
()¶ Set the current eye side to left or right. This function only works with buffers contained within stereo frame buffers.
SetEyeSide(integer eyeSide)
-
SetFlags
()¶ SetFlags(integer flags)
-
SetSize
(height, writeBucketsToDisk, isStereo)¶ This method allocates the buffer itself given its width and height. While you can theoretically have buffers with different sizes in the same frame buffer, in practice they are all the same size.
SetSize(integer width,integer height,integer writeBucketsToDisk,integer isStereo)
-
SetUserName
()¶ These methods set and retrieve the username for the buffer. This should be a string obtained from a message table so that it can be translated.
SetUserName(string name)
-
UserName
()¶ string name = UserName()
-
VectorType
()¶ Render buffers have a vector type which tells the renderer which packets it expects from the sample vector.
object = VectorType()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
CacheData¶
-
class
lxu.object.
CacheData
¶ Empty CacheData Python user class.
-
Size
()¶ Items stored in the cache are simple COM objects with a single method - the Size method. Size is provided by the client so that the cache system may effectively manage memory since it has no knowledge of the data itself.
integer = Size()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ChannelGraph¶
-
class
lxu.object.
ChannelGraph
¶ Empty ChannelGraph Python user class.
-
AddLink
(fromChan, to_obj, toChan)¶ Create a link from an item/channel to an item/channel pair.
AddLink(object from_obj,integer fromChan,object to_obj,integer toChan)
-
DeleteLink
(fromChan, to_obj, toChan)¶ Remove a channel link.
DeleteLink(object from_obj,integer fromChan,object to_obj,integer toChan)
-
FwdByIndex
(channel, index)¶ Get the destination of a forward link by index.
(Item object,integer objChan) = FwdByIndex(object item,integer channel,integer index)
-
FwdCount
(channel)¶ Get the count of forward links from this channel.
integer count = FwdCount(object item,integer channel)
-
RevByIndex
(channel, index)¶ Get the source of a reverse link by index.
(Item object,integer objChan) = RevByIndex(object item,integer channel,integer index)
-
RevCount
(channel)¶ Get the count of reverse links to this channel.
integer count = RevCount(object item,integer channel)
-
SetLink
(fromChan, fromIndex, to_obj, toChan, toIndex)¶ Create or reorder a link from an item/channel to an item/channel pair.
SetLink(object from_obj,integer fromChan,integer fromIndex,object to_obj,integer toChan,integer toIndex)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ChannelRead¶
-
class
lxu.object.
ChannelRead
¶ The Python method is very much easier, just returning the right value type for any channel, given by index or name.
-
BakedSamples
(channel)¶ (float firstSample,float spsRate,ValueArray object) = BakedSamples(object item,integer channel)
-
Double
(channel)¶ float value = Double(object item,integer channel)
-
EncodedInt
(channel)¶ string = EncodedInt(object item,integer channel)
-
Envelope
(channel)¶ Envelope object = Envelope(object item,integer channel)
-
Integer
(channel)¶ integer value = Integer(object item,integer channel)
-
IsAnimated
(index)¶ Test to see if a channel is animated. If this is an evaluated channel-read (specified by any time),
integer = IsAnimated(object item,integer index)
-
IsBaked
(channel)¶ Some channels may be baked
boolean = IsBaked(object item,integer channel)
-
SetTime
()¶ The time at which values are read can be changed.
SetTime(float time)
-
String
(channel)¶ string value = String(object item,integer channel)
-
Time
()¶ float = Time()
-
Type
(channel)¶ 801 methods for type, and getting encoded int values directly.
integer type = Type(object item,integer channel)
-
TypeName
(channel)¶ string typeName = TypeName(object item,integer channel)
-
Value
(item, index)¶ value = Value(item, channel) Channel can be given by index or name.
-
ValueObj
(channel)¶ The channel-read interface can be presented by anything that contains values for item channels. This includes actions and scene evaluation, both channel-read objects allocated through the scene interface. The envelope method returns an envelope only if one exists for the channel.
Unknown object = ValueObj(object item,integer channel)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ChannelUI¶
-
class
lxu.object.
ChannelUI
¶ Empty ChannelUI Python user class.
-
Cookie
(requestedFor)¶ Each item/channel pair can have a cookie associated with it. This is primarily used to associate global data with the channel, which is often stored in the config. A common case is to provide a value preset popup for numeric channels. The cookie is optional. This method can return any failure code, such as LXe_NOTIMPL or LXe_NOTFOUND, if the channel does not have a cookie. A single channel may have multiple cookies for different purposes, and in fact may use the same cookie for multiple states. This allows the channel to support one global but not another. Which cookie the client wants is determined by the requestedFor argument.
string cookie = Cookie(string channelName,string requestedFor)
-
DependencyByIndex
(index)¶ (integer depItemType,string depChannelName) = DependencyByIndex(string channelName,integer index)
-
DependencyByIndexName
(index)¶ This variation is more robust, taking an item type as a string instead of an integer code. This works well for packages, which do not support type codes. Clients only need to implement one of those, although
(string depItemTypeName,string depChannelName) = DependencyByIndexName(string channelName,integer index)
-
DependencyCount
()¶ item.channel needs a way to know what other channels this channel might depend on for its enable state. The following methods are used to see if a recently changed channel is a dependency of this channel and thus control if this channel is enabled (i.e., available for user interaction) or not (i.e., “ghosted”). If the changed channel is a dependency, then this channel’s UI representation is told to update it’s “enabled” state with that returned by the
integer count = DependencyCount(string channelName)
-
Enabled
(msg, item, chanRead)¶ The enable method works very much like a command enable function, and returns the same kinds of codes: LXe_CMD_DISABLED if disabled, LXe_OK for enabled and anything else for a failure code. The item type and channel name are provided as arguments, allowing the same object to handle multiple different channels. A disable message can be returned as part of the ILxMessageID. Note that, as with commands, the code stored in the ILxMessageID should also be returned by the enable function. The item argument may be NULL, or may be provided by the caller. The object can use this for for more specific enable tests. Note that it is valid for the item to be NULL, in which case a general test should be applied to item type itself.
Enabled(string channelName,object msg,object item,object chanRead)
-
ItemEnabled
(item)¶ Entire items can also be disabled or enabled. When disabled, all controls related to item (such as channel controls in property forms) will be considered disabled, and the item will be marked as disabled in the Item List. The item argument is the specific item being tested.
ItemEnabled(object msg,object item)
-
ItemIcon
()¶ An item can return a specific icon resource name based on some state, like an item tag. This isn’t updated too frequently, and thus should be a relatively static icon. If this returns a failure code or is not implemented, the icon found referenced in the Item Help configs is used. The resource name should not include any size suffix (ie: return “MyItemIcon”, not “MyItemIcon_20”).
string icon = ItemIcon(object item)
-
UIHints
(hints)¶ A channel’s UI hints are automatically populated for it before being used for the UI. However, items further tweak these by implementing this method and setting the UI hints properties themselves.
UIHints(string channelName,object hints)
-
UIValueHints
()¶ Channels can similar return a specific UIValueHints object for their UI, and to provide a per-channel notifier list.
UIValueHints object = UIValueHints(string channelName)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ChannelWrite¶
-
class
lxu.object.
ChannelWrite
¶ Python user method does all conversions this direction as well.
-
BakeSamples
(channel, firstSample, spsRate)¶ To cache baked values on a channel this method is called to set the start time and samples per second. The returned ValueArray should be filled with the samples.
ValueArray object = BakeSamples(object item,integer channel,float firstSample,float spsRate)
-
Double
(channel, value)¶ Double(object item,integer channel,float value)
-
DoubleKey
(channel, value, create)¶ DoubleKey(object item,integer channel,float value,integer create)
-
EncodedInt
(channel, value)¶ EncodedInt(object item,integer channel,string value)
-
EncodedIntKey
(channel, value)¶ EncodedIntKey(object item,integer channel,string value)
-
Envelope
(channel)¶ Envelope object = Envelope(object item,integer channel)
-
Integer
(channel, value)¶ Integer(object item,integer channel,integer value)
-
IntegerKey
(channel, value, create)¶ IntegerKey(object item,integer channel,integer value,integer create)
-
Set
(item, channel, value, <key>)¶ Channel can be given by index or name. Set key to True to make a keyframe.
-
SetState
(channel, state)¶ SetState(object item,integer channel,integer state)
-
String
(channel, value)¶ String(object item,integer channel,string value)
-
Type
(channel)¶ 801 methods for type and encoded ints. For writing we have a choice of setting the int as a constant or a keyframe.
integer type = Type(object item,integer channel)
-
TypeName
(channel)¶ string typeName = TypeName(object item,integer channel)
-
ValueObj
(channel)¶ In some cases we can write values to channels. Values written to actions are written as constants when using the Double and Integer methods, note that any animation on the channel will be overwritten. The DoubleKey and IntegerKey methods will create keys on channels that are already animated, otherwise the constant value for the channel will be set. Passing a value of one to the ‘create’ argument can be used to always create a key. The envelope method creates an envelope for the channel if it does not exist. If an envelope is created it will have a key created at the time chosen when the interface was obtained. The key will be created with the value of the constant channel.
Unknown object = ValueObj(object item,integer channel)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
CmdSysListener¶
-
class
lxu.object.
CmdSysListener
¶ Empty CmdSysListener Python user class.
-
AliasAdded
(isOverride)¶ These are called when an alias is added or removed. If isOverride is set, the alias replaces an existing alias. Note that isOverride is not set if it a command with that name already exists (unless it is already aliased); in that case, the command is replaced with the alias.
AliasAdded(string name,integer isOverride)
-
AliasRemoved
(isOverride)¶ Similarly, the isOverride flag is set if the alias is being removed because a new alias is replacing it.
AliasRemoved(string name,integer isOverride)
-
BlockBegin
(isSandboxed)¶ This indicates that a command block was opened. The event data is an ILxCommandBlockID representing the block.
BlockBegin(object block,integer isSandboxed)
-
BlockEnd
(isSandboxed, wasDiscarded)¶ This is called when a command block is closed. If wasDiscarded is true, the block didn’t contain any commands and is a no-op,, and does not appear in the history.
BlockEnd(object block,integer isSandboxed,integer wasDiscarded)
-
BlockEndedPostMode
(isSandboxed)¶ This is sent if the last closed block ended post mode.
BlockEndedPostMode(string name,integer isSandboxed)
-
CommandAdded
()¶ This is called when a new command has been added to the system.
CommandAdded(string name)
-
ExecutePost
(isSandboxed, isPostCmd)¶ ExecutePost(object cmd,integer isSandboxed,integer isPostCmd)
-
ExecutePre
(type, isSandboxed, isPostCmd)¶ ExecutePre(object cmd,integer type,integer isSandboxed,integer isPostCmd)
-
ExecuteResult
(type, isSandboxed, isPostCmd, wasSuccessful)¶ ExecuteResult(object cmd,integer type,integer isSandboxed,integer isPostCmd,integer wasSuccessful)
-
PostModeBegin
()¶ These indicate when the post mode state has changed.
PostModeBegin()
-
PostModeEnd
()¶ PostModeEnd()
-
PostModeRestart
()¶ PostModeRestart()
-
PostModeUndoNext
()¶ PostModeUndoNext()
-
RefireBegin
()¶ These let the client know when refiring has started or stopped. RefireNext() indicates that the next command executed matches the refiring criteria and will trigger refiring, undoing the previously-executed command.
RefireBegin()
-
RefireEnd
()¶ RefireEnd()
-
RefiringNext
()¶ RefiringNext()
-
SystemReady
()¶ This is called once the system has entered master enable, meaning that everything has been started and commands can be executed when safe.
SystemReady()
-
UndoLockout
()¶ This indicates that the undo lockout state has changed. When locked out, no MODEL or MODEL|UNDO commands can be executed, and an error will be reported if attempted.
UndoLockout(integer isLockedOut)
-
UserRedo
()¶ UserRedo()
-
UserUndo
()¶ These indicate that the user performed an undo or redo.
UserUndo()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Color¶
-
class
lxu.object.
Color
¶ Empty Color Python user class.
-
Alpha
()¶ Alpha is optional. If not implemented, it is assumed to be 1.0.
float alpha = Alpha()
-
Color
()¶ These return the RGB and alpha components. The color argument must be a three element float array, which will be filled in with the color.
float color = Color()
-
ColorInModelSpace
()¶ A color model can contain up to four components, and thus a four element float array must be provided, which will be filled in with the vector.
float vec = ColorInModelSpace()
-
ColorModel
()¶ This returns the optional color model name, and a the color in the model’s model’s space. These may not be implemented, in which case the raw RGB values should be used.
string model = ColorModel()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ColorDialog¶
-
class
lxu.object.
ColorDialog
¶ Empty ColorDialog Python user class.
-
DoDialog
(stops, gamma)¶ DoDialog is responsible for opening a color dialog. All dialog handling is up to the server. This includes whatever methods it chooses to create and display the dialog, handling windowing and event loops, etc. The rgb[] argument is initialized to the original color, and is also used to return any color the user may have chosen. This color may be HDR (i.e., outside the range of 0-1). The title string is a pre-translated string to be displayed in the dialog’s title bar. The method should return an
float rgb = DoDialog(string title,float stops,float gamma)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ColorMapping¶
-
class
lxu.object.
ColorMapping
¶ Empty ColorMapping Python user class.
-
FromLinear
(length)¶ vector targetValues = FromLinear(vector linearValues,integer length)
-
FromLinearFast
()¶ float buf = FromLinearFast(integer length)
-
GetCMServerName
()¶ string = GetCMServerName()
-
GetName
()¶ string = GetName()
-
Setup
()¶ Setup(integer toLinear)
-
ToLinear
(length)¶ vector linearValues = ToLinear(vector sourceValues,integer length)
-
ToLinearFast
()¶ float buf = ToLinearFast(integer length)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ColorModel¶
-
class
lxu.object.
ColorModel
¶ Empty ColorModel Python user class.
-
CanSliceBeReused
(yAxis, oldVec, newVec)¶ This method is called to ask the color model if it needs to redraw the slice when the current color has changed. If it does not need to, we will simply ask for a new marker to be drawn. If this returns LXe_FALSE, we redraw the slice; if it returns LXe_TRUE or any other success code, we reuse the existing slice and ask for a new marker to be drawn over it (the marker is always drawn fresh). If not implemented, we will only redraw if a component of the vector other than the xAxis or yAxis have changed; otherwise, we reuse the slice. This is only called if you drew the slice yourself in the first palce, and only if it is possible for the slice to be reused (because the image size or colorspace didn’t change, for example).
boolean = CanSliceBeReused(integer xAxis,integer yAxis,float[] oldVec,float[] newVec)
-
ComponentRange
()¶ Each component can also have its own min/max range. For example, Hue ranges from 0 to 360. If not implemented, we default to 0.0 to 1.0.
(float min,float max) = ComponentRange(integer component)
-
ComponentType
()¶ Each component can have its own datatype. For example, the Hue component of HSV is in degrees. More generic units, like the components of RGB, can use the “color1” datatype to have their units determined by the current color system. This must be a floating point datatype. If not implemented, color1 is assumed.
string type = ComponentType(integer component)
-
DrawSlice
(xAxis, yAxis, vec)¶ By default, the color picker draws a rectangular image depecting a 2D slices through the color space (or a 1D slice in the case of single-component modes). It also will draw one or two horizontal strips representing the remaining axes for three and four component modes. The server can define it’s own version of the 2D slice by implementing this method. An ILxImageID is provided to the caller, who is then responsible for filling the image with a representation of the space given two numbered axes. Note that this image may not initially be empty, and should be completely drawn by the server. The image will be RGBA32, and you should clear the alpha for areas of the image that do not have contents. vec[xAxis] and vec[yAxis] will be undefined, but the remaining vec elements will be set from the current color. If this method is not implemented, a default slice image is computed directly by the color picker.
DrawSlice(object image,integer xAxis,integer yAxis,float[] vec)
-
DrawSliceMarker
(xAxis, yAxis, downVec, vec)¶ This second function is called to mark the current color in the image, or as close as it can get. The image will already be filled with a slice returned by a previous call to DrawSlace(), and the server should simply draw a marker at the position identified by vec. If this method is not implemented, a default marker will be drawn by the color picker itself. The current fstops are also provided so that the image can be drawn with the correct exposure. The “down vector” is also provided to the slice. This is the color that was current at the time the mouse button went down, and may be different than the current color provided by vec. If no mouse buttons are down, this is the same as vec. Most clients will simply use vec to draw their marker. Clients that do advanced drawing (such as the swatches in the HSV color model) will use downVec as well, updating the original downVec themselves during their
DrawSliceMarker(object image,integer xAxis,integer yAxis,float[] downVec,float[] vec)
-
FromRGB
(vector)¶ FromRGB(float[] rgb,float[] vector)
-
FromSlicePos
(yAxis, imgW, imgH, imgX, imgY, downVec, vec)¶ This reciprocal method gets a color vector given an XY coordinate in the slice image itself. Again the XY coordinates range from zero to imgW and imgH, and the xAxis and yAxis of the vector provided should be set to the values represented by those coordinates. The remaining components do not need to be set. This function is usually called when the users is clicking and dragging over the color picker. The downVec represents the color at the time the mouse button went down. This value is initialized when the mouse button goes down, and is not changed by the color picker until the next time the button goes down. This allows you to use it as a kind of scratch area, letting you change the color between calls to
FromSlicePos(integer xAxis,integer yAxis,integer imgW,integer imgH,integer imgX,integer imgY,float[] downVec,float[] vec)
-
NumComponents
()¶ It should be noted that color models should be “stateless”. This means that everything you need to compute the values for a given method should be derived from the arguments provided. This ensures that a single color model instance can be safely used across color picker views, and avoids unforeseen complications from storing state in your object. For speed, floats are used instead of doubles in all methods. It is important to keep this conversion in mind, as many other parts of the nexus architecture use doubles for colors. Be sure to double-check the datatype when passing float/double pointers to avoid crashes. Color models can have 1, 3 or 4 components. Examples, include color temperature (1), RGB/HSV/LAB (3) and CMYK (4). Models with 2 or more than 4 components are not currently supported. This method must be implemented.
integer = NumComponents()
-
StripBaseVector
(dynamic, vec)¶ This method is used in 3D color models to get a “clean” color vector in the model’s space that the color picker will use as the basis for draw drawing the horizontal strip. The given component index in the vetor will be incremented through the component’s range and passed to the
StripBaseVector(integer axis,integer dynamic,float[] vec)
-
ToRGB
(rgb)¶ The main job of a color model is to convert between RGB and a vector in the model’s space. These functions facilitate this. The vector is assumed to have
ToRGB(float[] vector,float[] rgb)
-
ToSlicePos
(yAxis, imgW, imgH, vec)¶ The server doesn’t need to draw the marker itself, in which case it needs to be able to convert the color vector into an XY coordinate within the slice image for us. This only needs to be implemented if the server is drawing the image but not the marker position itself. imgX and imgY are expected to be coordinates with the image defined by imgW and imgH.
(integer imgX,integer imgY) = ToSlicePos(integer xAxis,integer yAxis,integer imgW,integer imgH,float[] vec)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ColorPreDest¶
-
class
lxu.object.
ColorPreDest
¶ Empty ColorPreDest Python user class.
-
Apply
()¶ Apply()
-
SetColor
()¶ This method is called by the preset server to set the HDR RGB color on the destination. If this method fails,
SetColor(vector rgb)
-
SetColorModel
(vec)¶ This optional method sets the name of the color model server that the color was originally saved in, as well as the color in the model’s space. Only color pickers generally care about this.
SetColorModel(string name,double[] vec)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Command¶
-
class
lxu.object.
Command
¶ Empty Command Python user class.
-
ArgClear
()¶ The INIT_ONLY flags are only set during initialization, and include the following:
ArgClear(integer index)
-
ArgDesc
()¶ string desc = ArgDesc(integer index)
-
ArgEnable
()¶ Dialogs will often call this method to see if a control within should be enabled or disabled. An example is that the Max Smoothing Angle control in the poly.subdivide command should be disabled when in Faceted mode. Return LXe_OK if enabled or LXe_CMD_DISABLED if disabled.
ArgEnable(integer arg)
-
ArgExample
()¶ string example = ArgExample(integer index)
-
ArgFlags
()¶ Although most of the argument data is read from the command’s
integer flags = ArgFlags(integer index)
-
ArgOptionDesc
(optIndex)¶ string desc = ArgOptionDesc(integer index,integer optIndex)
-
ArgOptionUserName
(optIndex)¶ The individual options in the argument type (such as popup entries) can also be listed. The username method will always return a valid string, falling back to the internal name if no username can be found. index is the index of the argument, while optIndex is the index of the option in the LXtTextValueHint array.
string userName = ArgOptionUserName(integer index,integer optIndex)
-
ArgParseString
(argString)¶ Normally, the command system automatically parses arguments for each command. However, commands are also given an opportunity to manually parse the arguments themselves. This method is called for each argument just before its value is parsed out of the command line. If the method handles all argument parsing, it should return LXe_OK and set its own value. If it wants the command system to parse the argument, this should return LXe_NOTIMPL. It is important to note that this function is called only when the arguments are parsed as a string; directly setting the argument values via the
ArgParseString(integer argIndex,string argString)
-
ArgResetAll
()¶ This clears the values of all arguments in the command.
ArgResetAll()
-
ArgSetDatatypes
()¶ Commands that have arguments with dynamic datatypes can use this function to set those datatypes. This will be called by the command system itself when all required for variable arguments have been set, and then whenever a required for variable argument’s value changes. When changing an argument’s datatype, it is assumed that the argument’s value has also been cleared. If the arguments new datatype is the same as the old datatype (so, the datatype didn’t actually change), the argument’s value should not be cleared.
ArgSetDatatypes()
-
ArgType
()¶ Some arguments use text hints to display a list of choices. Text hints are represented as internal strings that are not very human-readable. UI- friendly strings can be obtained via an “ArgumentType” atom on the argument’s cmdhelp. This in turn references an “ArgumentType” hash at the root of the “CommandHelp” block, and contains usernames and descriptions for each text hint, and for the ArgumentType itself. Because the ArgumentType is stored at the root of the CommandHelp block, the same ArgumentType can be used to provide user strings for multiple commands that use the same text hints. Information about the ArgumentType can be accessed with these functions.
string type = ArgType(integer index)
-
ArgTypeDesc
()¶ string desc = ArgTypeDesc(integer index)
-
ArgTypeUserName
()¶ string userName = ArgTypeUserName(integer index)
-
ArgUserName
()¶ Arguments also have user-readable names provided through these methods. Note that the wrapper will always return a valid string if the argument index is valid, and return LXe_CMD_NOT_AVAILABLE otherwise.
string userName = ArgUserName(integer index)
-
ButtonName
()¶ string buttonName = ButtonName()
-
ContainedEnable
()¶ Commands in containers should provide a contained enable function. This is called by the container to see if the command can be executed. The ID_NULL-terminated types array should tested be with SelTopmostType() to ensure that they are the topmost type in the container.
integer types = ContainedEnable()
-
Copy
()¶ This function copies the dynamic contents of one command into another. This should include everything possible, such as the argument values and error states. Note that this will only work on commands that have the same tag; dissimilar commands can not be copied to each other. For this reason, it can be assumed that the two instances have the same internal data and thus can be manipulated directly without the need to go through the interface when creating an implementation. To create a new duplicate of a command, use the command system global’s SpawnFromCommand() method.
Copy(object sourceCommand)
-
Desc
()¶ string desc = Desc()
-
DialogArgChange
()¶ This method is called by command dialogs and similar entities to let the command know that one of its arguments has been changed by the user. It allows the command to change the value of any of its arguments to provide more useful default values based on system state or the set values of other arguments. For example, the poly.subdivide command has a different default “Max Smoothing Angles “depending on what the mode argument is set to. Note that the flag LXfCMDARG_CHANGED should be set on arguments whos values have been modified by the change function, and the LXfCMDARG_VALUE_SET flag should be unset (since the changed value is presumably a default of some sort). The CHANGED flag lets the command system know that it should use the current argument value, while unsetting VALUE_SET tells the command system to not include that value in the output string in the command history.
DialogArgChange(integer arg)
-
DialogFormatting
()¶ Any argument not included in the string will be omitted from the dialog. This can be used as an alternative to the HIDDEN argument flag. The command dialog will not open if all arguments are hidden, and the command will simply fail.
string formatting = DialogFormatting()
-
DialogInit
()¶ If all required arguments of a command aren’t set by the user when it is executed, a dialog is opened to ask for those values. This method is called to allow the dialog to set the values of any of its arguments after the last used dialog values and any queried values have been plugged in. Note that some or none of arguments may have values when this method is called.
DialogInit()
-
Enable
()¶ A command may be disabled based on the current environment. This function can be called to see if a command is enabled. LXe_CMD_DISABLED will be returned if the command is disabled and the message string will be set to a user-readable string describing the condition. This simply checks to see if the command itself could be fired; it does not check to see if the arguments are set and valid. There is an alternate disabled state, LXe_CMD_NOT_AVAILABLE. This should be set if there is no context at all for the command’s arguments, not even enough to display a control of the correct type in an attribute sheet (as the dynamic datatypes arguments cannot be resolved). An example is the item.channel command, which requires an item selection so it can infer the type of channel; without that selection, it cannot guess what kind of control to display. LXe_CMD_DISABLED should be used when the argument parsing and dynamic datatypes can still be set, but there is no context for the command to execute in. In general, the return code should match the code set in the
Enable(object msg)
-
Example
()¶ Commands can also return an example string.
string example = Example()
-
Execute
()¶ The user should only be presented with dialogs or questions if
Execute(integer flags)
-
Flags
()¶ It is possible to for the command to use the value of its arguments during the flags method. However, it is important to handle cases where the arguments have no value, even if they are required arguments. This can happen when the prototype command is created, in which case no arguments have yet been set. In these cases, the client should just return default flags without relying on the command’s arguments.
integer flags = Flags()
-
Help
()¶ The help method returns a key, which in turn is resolved into a URL from the HelpURL part of the config.
string help = Help()
-
Icon
()¶ The icon name can also be obtained, which may be read directly from cmdhelp.cfg or dynamically specified by the command’s current arguments. Note that this is the raw icon name without any size information attached. Multiple icons can be specified in the icon name string, but this is not required. A simple icon string can just be “icon”. For multiple icons, the form is “besticon;fallbackicon;defaulticon”. There can be any number of icons; the first in the list will be tried, followed by the nexxt, and so on until one matches at the size requested. If the icon name contains a semicolon, two semicolons can be used instead.
string iconNames = Icon()
-
IconImage
(h)¶ This alternative to the
Image object = IconImage(integer w,integer h)
-
Interact
()¶ Just before the command executes, the
Interact()
-
Message
()¶ Each command contains an
Message object = Message()
-
Name
()¶ These functions return the name, username, button name, description, tooltip and example associated with an entry in the config. Name always returns the internal name of the command. The other functions will return either a string from the message table, or possibly a dynamic string provided by the command based on its current arguments and environment, falling back to the message table and possibly other reasonable defaults if the method fails or is NULL.
string name = Name()
-
NotifyAddClient
(object)¶ Commands need to communicate with clients, such as the attribute system, when their data needs to be refreshed in the user interface. The client calls this method to let the command know that it wants to be notified when it needs to be updated. Normally, a client asks specifically for the notifier associated with a single argument of a command (say, because it’s displaying a UI for the queried value of that argument), so the client needs to specify which argument they would like additional notifiers from. If the argument index is -1, then only the notifers defined by the entire command will be added. Clients rarely have to implement this method themselves, but can if they want to. If not implemented, adding and removing clients is handled automatically by calling the command’s ILxUIValueHInts::NotifierCount() and NOtifierByIndex() methods.
NotifyAddClient(integer argument,object object)
-
NotifyRemoveClient
()¶ When a client no longer needs to listen for notifications, it calls this method. Clients should be automatically removed from the queue when the command object is released as well.
NotifyRemoveClient(object object)
-
PostExecBehaviorFlags
()¶ The exuection flags are also available. These are the flags that were passed to the
integer flags = PostExecBehaviorFlags()
-
PostExecFlags
()¶ Also available are “post-execution” flags. The original flags assigned to a command may change after a pending command has fired. For example, an undoable command firing non-undoable commands would itself become non-undoable. Post-fire flags are only available after a command has been fired; if this hasn’t yet occured, LXe_CMD_NOT_AVAILABLE is returned. This function is provided by the command system and does not need to be specified by commands themselves.
integer flags = PostExecFlags()
-
PostExecHints
()¶ integer hints = PostExecHints()
-
PreExecute
()¶ We have one final test before
PreExecute()
-
Query
(vaQuery)¶ Querying is done through this function. An
Query(integer index,object vaQuery)
-
SandboxGUID
()¶ Certain commands can only be executed within specific sandboxes. If this method returns LXe_CMD_SANDBOX_GLOBAL, then the command operates in the global sandbox. LXeCMD_OK means that only a sandbox containing an object with the specific GUID returned is supported. Sandboxed commands can NOT be undoable.
string guid = SandboxGUID()
-
Tag
()¶ integer tag = Tag()
-
ToggleArg
()¶ Toggle commands have a single argument that can have one of many possible but mutually exclusive states (for example, only one tool can be activate at a time). When inserted into an attribute sheet, a toggle button is created that switches between an “off” state and the “on” state assigned to that arg in the sheet definition. When one of these buttons is activated, other buttons using the same command but different “on” states are automatically turned off. tool.set is an example of a command that does this, creating toggle buttons in attribute sheets that determined the currently active tool. Note that when attrs sets up the UI for a toggle arg command, if the toggle arg is optional and has no value, the command will be created as a simple button, not a toggle command. The command stores the “off” state in its definition, as well as the index of the toggle argument and its ExoType as either (or both) an ID and name. This method can retrieve any or all of these states. The index, value, typeID or typeName can be NULL if desired, in which case only the non-NULL arguments will be set. Note that the ppvObj value argument should be considered read-only, as it is owned by the command. However, the ILxValueID returned must be released through XObjectRelease() by the client. If no arguments are set for toggling in this manner, LXe_CMD_NOT_AVAILABLE is returned.
(integer index,Value object,integer typeID,string typeName) = ToggleArg()
-
Tooltip
()¶ string tooltip = Tooltip()
-
UserName
()¶ string userName = UserName()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
CompShader¶
-
class
lxu.object.
CompShader
¶ Empty CompShader Python user class.
-
Cleanup
()¶ Cleanup(pointer data)
-
CustomPacket
()¶ string packet = CustomPacket()
-
Flags
()¶ integer = Flags()
-
LinkChannels
(item)¶ LinkChannels(object eval,object item)
-
SetOpaque
()¶ integer opaque = SetOpaque()
-
SetupChannels
()¶ The new and current version of the interface support the ‘Flags’ method.
SetupChannels(object addChan)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Curve¶
-
class
lxu.object.
Curve
¶ Empty Curve Python user class.
-
BendCount
()¶ Curves can also be parameteric. In that case they aren’t made of splines, but we want to know aproximately how many bends they have in case we need to sample it and capture the shape. A bend is a flex in the curve, and we’re counting how many of them there are relative to the parameterization. For piecewise cubic curves this is twice the number of splines.
integer = BendCount()
-
Closest
()¶ This finds the closest point on the curve at the probe position. Results are returned as the parameter value, the position on the curve, and the normal to the curve in the direction of the probe.
(float param,vector pos,vector norm) = Closest(vector probe)
-
Curvature
()¶ float curv = Curvature()
-
GetBBox
()¶ The curve accessor allows the client to read the attributes and shape of the curve. It also has StringTag interface for bin tags. The bounding box and length are gross features.
bounds bbox = GetBBox()
-
GuideCurveNormal
()¶ vector normal = GuideCurveNormal(object other)
-
IsClosed
()¶ This returns LXe_TRUE or LXe_FALSE, depending on whether the curve is closed or not.
boolean = IsClosed()
-
LenFraction
()¶ float = LenFraction()
-
Length
()¶ float = Length()
-
MeshNormal
()¶ Normals can also be computed using the closest polygon normal from a given mesh, or the direction to the closest point on another curve.
(matrix xfrm,vector normal) = MeshNormal(object meshObj)
-
Normal
()¶ The normal of the curve can also be computed. This should always be a vector at 90 degrees to the tangent.
vector normal = Normal()
-
Param
()¶ Points along the curve are read by setting the parameter for the curve to a value between 0 and 1. The parameter can also be set by the fraction of the curve’s total length.
float = Param()
-
Position
()¶ The position, tangent, and curvature can then be read. The position is in world coordinates, the tangent is the rate of change relative to the parameter, and the curvature is the tangent’s rate of change relative to the parameter.
vector pos = Position()
-
SetLenFraction
()¶ SetLenFraction(float frac)
-
SetParam
()¶ SetParam(float param)
-
SplineByIndex
()¶ (vector b0,vector b1,vector b2,vector b3) = SplineByIndex(integer index)
-
SplineCount
()¶ If the curve is piecewise cubic, the spline segments can be read as Bezier control points. If the curve is not a spline then Count() returns NOTFOUND.
integer count = SplineCount()
-
SplineLengthByIndex
()¶ float length = SplineLengthByIndex(integer index)
-
Tangent
()¶ vector tan = Tangent()
-
WalkByAngle
(end, angle, visitor)¶ Sometimes, it can be useful to walk a curve from a start point to an end point, based on an angle. Samples will be placed along the curve where the angle deviation from the last sample is greater than the threshold angle.
WalkByAngle(float start,float end,float angle,object visitor)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
CurveGroup¶
-
class
lxu.object.
CurveGroup
¶ Empty CurveGroup Python user class.
-
ByIndex
()¶ Curve object = ByIndex(integer index)
-
Count
()¶ integer count = Count()
-
GetBBox
()¶ Any item can present itself as a group of curves. The bounding box and count of curves can be read from the root object, and curve accessors can be allocated for each one by index.
bounds bbox = GetBBox()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
CustomMaterial¶
-
class
lxu.object.
CustomMaterial
¶ Empty CustomMaterial Python user class.
-
Cleanup
()¶ Cleanup(pointer data)
-
CustomPacket
()¶ string packet = CustomPacket()
-
Flags
()¶ integer = Flags()
-
IsSampleDriven
()¶ (integer,integer idx) = IsSampleDriven()
-
LinkChannels
(item)¶ LinkChannels(object eval,object item)
-
LinkSampleChannels
(item)¶ integer idx = LinkSampleChannels(object nodalEtor,object item)
-
MaterialEvaluate
(vector, data)¶ integer idx = MaterialEvaluate(object etor,object vector,pointer data)
-
SetBump
()¶ (float bumpAmplitude,integer clearBump) = SetBump()
-
SetDisplacement
()¶ float dispDist = SetDisplacement()
-
SetOpaque
()¶ integer opaque = SetOpaque()
-
SetSmoothing
()¶ (float smooth,float angle,integer weighting,integer normalMethod,integer creasing) = SetSmoothing()
-
SetupChannels
()¶ The new and current version of the interface support the updated ‘SetSmoothing’ method.
SetupChannels(object addChan)
-
UpdatePreview
()¶ integer flags = UpdatePreview(integer chanIdx)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
CustomPane¶
-
class
lxu.object.
CustomPane
¶ Empty CustomPane Python user class.
-
GetIdentifier
()¶ Returns the unique identifier for the instance of the CustomPane. This is useful for storing state for the particular instance of the pane in the config, for example.
string ident = GetIdentifier()
-
GetParent
()¶ Returns the parent window handle for the custom pane, which can be used to parent any user generated UI. In Python this will be returned as an int representing a pointer, and will need to be converted into a proper PyObject.
id handle = GetParent()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
CustomView¶
-
class
lxu.object.
CustomView
¶ Empty CustomView Python user class.
-
Cleanup
()¶ This is called to clean up the widget just before the view is torn down.
Cleanup(object pane)
-
Init
()¶ Init(object pane)
-
RestoreState
()¶ RestoreState(object pane)
-
StoreState
()¶ These methods are called to load or save any per-instance state for the pane provided.
StoreState(object pane)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
DTBBadgeOverride¶
-
class
lxu.object.
DTBBadgeOverride
¶ Empty Command Python user class.
-
BadgeAction
(badge)¶ When the user clicks on a badge, this method is called so that the client can perform an action. If the server doesn’t handle actions on this entry, it should return NOTIMPL.
BadgeAction(object entry,integer badge)
-
BadgeIsAlwaysVisible
(badge)¶ This indicates if an action badge should always be visible, or visible only when the mouse is over th thumbnail. This is useful for the download badge when the asset isn’t yet downloaded. Setting this to false will make it vsiible only when the mouse is over the thumbnail, and is useful to for the downlooad badge when the asset is already downloaded, allowing the user to re-download it.
boolean = BadgeIsAlwaysVisible(object entry,integer badge)
-
BadgeOverride
(badge)¶ string = BadgeOverride(object entry,integer badge)
-
BadgeStarRatingAction
(rating)¶ Similarly, this is called when the user changes the star rating. Again, this should return NOTIMPL if the entry isn’t handled.
BadgeStarRatingAction(object entry,integer rating)
-
BadgeStarRatingOverride
()¶ The star rating badge returns two things: a star rating as an number from 0-5, and an alternate image for the star rating. This allows cloud ratings to be visually distinct from local ratings, although the name field can be empty if the default star icon should be used. As above, this should return NOTIMPL if the client can’t support the file.
(integer rating,string) = BadgeStarRatingOverride(object entry)
-
BadgeTooltip
(badge)¶ Get a tooltip string (as a message table lookup in the form of @table@messsage@) to display for the badge. This is most useful for the download badge, as the icon tends to be different depending on if the local copy is newer or older than the cloud copy.
string = BadgeTooltip(object entry,integer badge)
-
BadgesSupported
()¶ integer badges = BadgesSupported(object entry)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
DTBGroupSortOverride¶
-
class
lxu.object.
DTBGroupSortOverride
¶ Empty Command Python user class.
-
SetArguments
()¶ After being instanced, an optional argument string is passed to this method, or it may not be called at all if no arguments have been set.
SetArguments(string args)
-
Sort
(string2)¶ This method is called to filter two strings relative to each other. Returning a number less than zero indicates that the first string sorts earlier than the second, while a number greater than zero sorts the second one first. Zero means the two strings are equal. This is standard strcmp()-style return codes.
integer = Sort(string string1,string string2)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Deformation¶
-
class
lxu.object.
Deformation
¶ Empty Deformation Python user class.
-
Flags
()¶ A deformation is basically a warping of space. Given an input point location and a weight value typically from 0 to 1, the deformation computes the offset of the point. The offset must approach zero as the weight approaches zero. Flag bits indicate if a deformation is non-linear and/or rigid. Non-linear means that offsets don’t lie on a simple line for different weight values but instead trace curves. Rigid means that the transform at weight 1 can be described by a 4x4 matrix.
integer = Flags()
-
OBSOLETE
()¶ OBSOLETE()
-
OffsetF
(weight)¶ These three methods compute the offset from a starting position at a given weight value.
vector offset = OffsetF(vector position,float weight)
-
Transform
()¶ For rigid deformations, this method returns the matrix for unity weight.
matrix xfrm = Transform()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Deformer¶
-
class
lxu.object.
Deformer
¶ Empty Deformer Python user class.
-
Element
()¶ The element pointer can be read out during enumeration. For a mesh partition the element must be a LXtPointID, and for and item partition the element must be an ILxUnknownID for the item. For deformers that support items, the items are all assumed to be in partition zero. Elements in a partition can be further segmented by numeric ID which is also returned from this method. All the elements in a run will come from the same segment.
(id,integer segment) = Element()
-
EnumeratePartition
(part)¶ EnumeratePartition(object visitor,integer part)
-
Flags
()¶ Flags are the same flags assigned to the deformer item type, plus a runtime flag to indicate if linear interpolation should be used.
integer = Flags()
-
Offset
(weight, pos)¶ vector offset = Offset(id elt,float weight,vector pos)
-
PartitionCount
()¶ All the elements affected by this deformer exist in partitions. This method enumerates the elements in a specific partition.
integer = PartitionCount()
-
SetPartition
()¶ As an alternative to enumerating elements, the client can set a specific element ID and partition before quering for attributes.
SetPartition(integer part)
-
Weight
(pos)¶ The query methods get data about specific elements given their element ID.
float = Weight(id elt,vector pos)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
DirBrowserBasePathEntryDest¶
-
class
lxu.object.
DirBrowserBasePathEntryDest
¶ Empty DirBrowserBasePathEntryDest Python user class.
-
OrdinalAfter
()¶ string ordinal = OrdinalAfter()
-
OrdinalBefore
()¶ Ordinals may be NULL if this is the beginning/end of the list.
string ordinal = OrdinalBefore()
-
SetPath
()¶ Get the path of the set being dragged into, in the form of “#basePathIdent(setName):”.
string path = SetPath()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
DirCacheEntry¶
-
class
lxu.object.
DirCacheEntry
¶ -
CachedThumbnail
()¶ This method will block until it can return an image or fail. Note that images for resrouces can only be read from the main thread, meaning that if the thumbnail isn’t already cached this call will simply fail for those cases.
(integer idealW,integer idealH,Image object) = CachedThumbnail(integer size)
-
CachedThumbnailAsync
(asyncHandler)¶ This version of the method returns as quickly as possible. If an image is avaialble in the in-memory cache, it returns that image directly; if not, it will be queued and loaded asynchronously and the method will return LXe_NOTREADY. The ILxDirEntryThumbAsyncID object provided will be called from the main thread when the thumbnail is ready. The async handler provided will be owned by this system and released when no longer needed. If this filename is already queued with this ident, the existing one will be removed and the new one will be added to the head of the list. These operations can be canceled by calling
(integer idealW,integer idealH,Image object) = CachedThumbnailAsync(integer size,object asyncHandler)
-
CachedThumbnailCustom
(h)¶ This related method returns a cached thumbnail scaled to the desired size. If necessary, it will load the closest cached thumbnail from disk and resize it as needed. The maximum size is 512x512. As above, this will block until it can return an image or has failed.
(integer idealW,integer idealH,Image object) = CachedThumbnailCustom(integer w,integer h)
-
CachedThumbnailCustomAsync
(h, asyncHandler)¶ (integer idealW,integer idealH,Image object) = CachedThumbnailCustomAsync(integer w,integer h,object asyncHandler)
-
ChildGridPositionLookup
()¶ A directory maintains the grid positions of each of the files within when (directories are not supported for grid mode). Grid mode is commonly used in things like color pickers, where a palette of user-defined colors can be re-arranged at will. Entries in the grid need not be contiguous, allowing for gaps between entries. Grid positions are arbitrary, but must be positive numbers. Directories cannot be placed in the grid; this is only available for files. This looks up the grid position for a given child path. Only the filename portion of the path need be provided, but you can pass the whole path if you like. If no grid positions are assigned when this is called, the files in the dir are implicitly assigned new positions, starting with 0,0, with each row being 10 enries wide. If new files are added to the directory after the grid has been initialized, they are added to a new row below the last entry This ensures that new files are still in the grid, but aren’t inadvertently filling in gaps that were intentionally left by the user. Note that when doing a lookup on a file’s path, none of the children should be locked in the same thread, as it may be necessary to walk the children from this function. If any children are locked in the same thread, this will result in a deadlock.
(integer x,integer y) = ChildGridPositionLookup(string childPath)
-
ChildGridPositionSet
(x, y)¶ This sets the grid position of an entry. If another entry is already at that position, the two will be swapped. If the new entry didn’t have a previous position, it will be moved to after the last entry in the grid.
ChildGridPositionSet(string childPath,integer x,integer y)
-
ChildManualOrderLookup
()¶ A directory maintains a manual sort list of all of the files/dirs contained within. Initially, all entries are alpha-sorted with directories sorted first. The manual sort position of an entry within a directory can be read with this method. The function takes either the name part of the entry or the full path (the last part of the path is always used), and returns the index of that entry relative to the other entries in the directory. Note that manual sort order is intended for sorting files relative to each other. It is possible for the order to return empty gaps between two otherwise adjacent entries. The most common cause of this is when a file is both copied to a directory and its order is set. Since the directory hasn’t been rescanned for the new file(s) yet, the manual sort list contains paths that don’t currently exist in the child file/dir list. The childPath argument can be a full path or simply the name of the file/dir itself.
integer pos = ChildManualOrderLookup(string childPath)
-
ChildManualOrderSet
(pos)¶ ChildManualOrderSet(string childPath,integer pos)
CommitSharedMarkup(object sharedMarkup)
-
CommitUserMarkup
()¶ The writable object is a copy of the original markup to which you can make any changes you like. Once you are finished, you must call one of the following functions to commit the changes. The contents of the object will be copied into the entry, after which your object can be freed. Note that you can also create a new object yourself (meaning, there is no need to use a writable object obtained by calling the above functions), which is most useful when you need to add or remove attributes instead of simply changing their values. Since this obtains a write lock, care must be taken to ensure that you do not currently have a lcok on the entry (say, by having a non-copied array returned from
CommitUserMarkup(object userMarkup)
-
Desc
()¶ string = Desc()
-
DirCount
()¶ There are times when you just need a quick count of the entries or a way to tell if there are any at all. This returns that count.
integer = DirCount(integer listMode)
-
DirList
(asCopy)¶ Array object = DirList(integer listMode,integer asCopy)
-
Extension
()¶ string = Extension()
-
GridExtents
()¶ This returns the rightmost and bottommost coordinates of a region all of the entries within the grid. While the box they define (starting from 0,0) will never be smaller than the region defined by the thumbnails coordinates, it may be larger. This larger space allows for “padding” into which users can D&D files outside of the bounds of the existing entries.
(integer bottom,integer right) = GridExtents()
-
GridInsert
(x, y, count)¶ GridInsert(integer doRows,integer x,integer y,integer count)
-
GridIsEmpty
(x, y)¶ This returns LXe_TRUE if a grid row or column is empty, and LXe_FALSE if not. Setting both x and y to non-LXiDCEGRID_NONE values will test the row or column from that point on.
boolean = GridIsEmpty(integer doRows,integer x,integer y)
-
GridIsEmptyCell
(y)¶ This returns LXe_TRUE if a grid cell or column is empty, and LXe_FALSE if not If it returns false, the ILxDirCachenEntry representing the thumb at that cell can be returned; if you don’t need this, ppvObj can be set to NULL. If it is set, the object must be released when no longer needed.
(boolean,DirCacheEntry object) = GridIsEmptyCell(integer x,integer y)
-
GridRemove
(x, y, count, force)¶ This similarly removes rows or columns from the grid. If force is false, then rows/columns will be removed only if no entries exist in that row/columm. If true, then entries will be shifted over to fill the empty slots, but nothing will happent to entries occupying those slots. Passing in a very larger number for “count” will effectively remove any empty space between entries. As with inserting rows, setting both x and y to valid coordinates will affect only cells on that row/column, while setting one of them to LXiDCEGRID_NONE will affect all entries with positions equal to or greater than the x or y coordinates provided. Removing may decrease the extents of the grid, including when removing empty rows/columns from the far bottom/right.
GridRemove(integer doRows,integer x,integer y,integer count,integer force)
-
GridSetExtents
(right)¶ This allows the extents to be changed at any time. Attempting to make the extents smaller than the coordinates of the entries (meaning, attempting to make it so that some entries are not within the extents) will result in the extents being resized to fit the thumbnails. Thus, passing in 0,0 will result in the bottom right enclosing all entries.
GridSetExtents(integer bottom,integer right)
-
Label
()¶ These utilities return label, tooltip and description strings. If they aren’t available from the metadata, they are generated from the filename.
string = Label()
-
Metadata
()¶ These methods return
Attributes object = Metadata()
-
ModTime
()¶ The time the file or directory was created or modified on disk (whichever time is more recent) can be read as a string. The format is “YYYY:MM:DD HH:MM:SS”, which makes it easy to compare dates with strcmp().
string = ModTime()
-
Name
()¶ string = Name()
-
Parent
()¶ This returns the parent of an entry, or fails with NOTFOUND if this is a base entry.
DirCacheEntry object = Parent()
-
Path
()¶ These can be used to get the local format path, name part (the last part of the path, including any extension) and extension, if available.
string = Path()
-
ReferenceSource
()¶ If the entry is a reference, this returns the entry it is referencing.
DirCacheEntry object = ReferenceSource()
-
ReferencedCount
()¶ This quickly returns a count of referencess to this entry, without the overhead of allocating an array object.
integer = ReferencedCount()
-
ReferencedList
()¶ These can be used to get an ILxArrayID containing the list of entries referencing this entry as their source. As with the dir/file lists, the array maintains a read lock on the entry until it is released, and thus should be released as soon as possible. Note that as of modo 12.2, the asCopy argument is always considered to be true. This change in behavior avoids deadlocks that could happen in cerrtain circumstances. Always returning a copy avoids these problem with no real penalties
Array object = ReferencedList(integer asCopy)
Unknown object = SharedMarkup(integer asWritable)
-
Size
()¶ The size of the file in bytes can also be read as a float. This is only supported for files, and will not currently return the size of the contents of a directory hierarchy (it doesn’t fail; it just returns 0 instead).
float size = Size()
-
Thumbnail
(h)¶ There is one other special case: If the client returns an idealW/idealH of 0,0, the image is unbounded and any size is valid. Note that this method does not use the cache, and will always hit the disk, but it is capacble of getting an image up to the ideal size (the cache is limited to 512x512). Also note that if the image is from a resource, this will fail unless it is called from the main thread, as image resources cannot be processed from any other thread.
(integer idealW,integer idealH,Image object) = Thumbnail(integer w,integer h)
-
ToolTip
()¶ string = ToolTip()
-
Type
()¶ integer type = Type()
-
UserMarkup
()¶ Markup contains user-defined features like tags and star ratings. These objects are normally read only, but you can request a writable object by setting the isWrite flag to true.
Unknown object = UserMarkup(integer asWritable)
-
Username
()¶ This returns the username of the entry. It’s primarily intended for synthetic directories, which may have usernames that are different from the internal name. For everything else, this just returns the internal name, which is that component of the path. Files can provide alternate names through the “label” property of their metadata.
string = Username()
-
WasRecognized
()¶ This returns LXe_TRUE if the file was recognized by a server, and LXe_FALSE if it was not. Unrecognized files are usually hidden from the browser.
WasRecognized()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
DirCacheManualOrderDest¶
-
class
lxu.object.
DirCacheManualOrderDest
¶ Empty DirCacheManualOrderDest Python user class.
-
BetweenPaths
()¶ This method returns the names of the two files/dirs that the drop point is between. It will return NULL for a name if the drop point is at the beginning/end of the list. Clients can call ILxDirCacheEntry::ManualChildOrderSet() on the parent object (returned as ppvObj) to set the position of a path relative to another path. If the asPaths is true, then the strings returned represent the full path instead of just the name.
(DirCacheEntry object,string nameBefore,string nameAfter) = BetweenPaths(integer asPaths)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
DrawingOverride¶
-
class
lxu.object.
DrawingOverride
¶ Empty DrawingOverride user classes.
-
AffectedItems
(collection)¶ Get a collection of the affected items
AffectedItems(object scene,object collection)
-
CleanupContext
()¶ Cleanup any state in the GL context.
CleanupContext()
-
DrawVisitor
(view)¶ Allocate a draw visitor. This is an object specific to a scene and a view, and it draws itself when the Visitor::Evaluate() method is called.
Unknown object = DrawVisitor(object scene,object view)
-
Flags
()¶ The flags on the interface determine the overrides that it supports.
integer = Flags()
-
InitContext
()¶ Initialize pass drawing with the GL context pointer.
InitContext()
-
SetItem
()¶ Set a specific item and read the style bits for override.
integer styles = SetItem(object item)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Drop¶
-
class
lxu.object.
Drop
¶ -
ActionList
(dest, addDropAction)¶ ActionList(object source,object dest,object addDropAction)
-
Drop
(dest, action)¶ The
Drop(object source,object dest,integer action)
-
Preview
(dest, action, draw)¶ 901 introduces the
Preview(object source,object dest,integer action,object draw)
-
Recognize
()¶ The
Recognize(object source)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Edge¶
-
class
lxu.object.
Edge
¶ Empty Edge Python user class.
-
ClearMapValue
()¶ This removes any value for the edge pair in the given map.
ClearMapValue(id map)
-
Endpoints
()¶ This method returns the points that make up the edge. Either argument can be NULL if you only want one or the other.
(id point0,id point1) = Endpoints()
-
Enumerate
(visitor, monitor)¶ Enumerate(integer mode,object visitor,object monitor)
-
ID
()¶ These methods returns the current edge ID.
id = ID()
-
Index
()¶ This methods returns the index of the curent edge.
integer index = Index()
-
IsBorder
()¶ This returns LXe_TRUE if the edge is on border and it is belong to one polygon.
boolean = IsBorder()
-
MapEvaluate
(value)¶ boolean = MapEvaluate(id map,float[] value)
-
MapValue
(value)¶ This method returns the value of the edge in the map provided, returning LXe_FALSE if the edge is unmapped.
boolean = MapValue(id map,float[] value)
-
Mesh
()¶ This function returns the
Unknown object = Mesh()
-
OnSymmetryCenter
()¶ This returns LXe_TRUE if the symmetry state is enabled and the current edge is on the symmetry center plane, otherwise it returns LXe_FALSE.
OnSymmetryCenter()
-
PolygonByIndex
()¶ This returns the polygon given by its index.
id polygonID = PolygonByIndex(integer index)
-
PolygonCount
()¶ These methods return the number of polygons sharing this edge.
integer count = PolygonCount()
-
RepresentativePolygon
()¶ This returns a polygon that is visible and surface. It also return the index of the polygon in the polygon list of the edge.
(id polygonID,integer index) = RepresentativePolygon()
-
Select
()¶ This method sets the accessor to the given edge. Edge IDs are somewhat dynamic based on the points and polygons in the mesh, so an old edge ID should not be assumed valid if the mesh has been edited.
Select(id edge)
-
SelectByIndex
()¶ An edge can be selected by it’s index. As edges don’t have a deterministic index, this is calculated by iterating through the mesh polygon’s edges and returning the index of the first occurance.
SelectByIndex(integer index)
-
SelectEndpoints
(v1)¶ This selects the edge by its endpoints.
SelectEndpoints(id v0,id v1)
-
SetMapValue
(value)¶ This sets the edge’s value in the given point map.
SetMapValue(id map,float[] value)
-
SetMarks
()¶ SetMarks(integer set)
This returns a shared polygon between two edges.
id polygonID = SharedPolygon(id edgeID)
-
Spawn
()¶ As mentioned previously, all accessors share common interface methods for walking their respective lists.
Edge object = Spawn()
-
Symmetry
()¶ This sets the symmetric point corresponding to the current edge when the symmetry mode is enabled. This returns LXe_OK when the symmetric edge is found, otherwise it returns LXe_FAILED. When the current edge is on the symmetry center plane, it returns LXe_FAILED.
id edgeID = Symmetry()
-
TestMarks
()¶ boolean = TestMarks(integer mode)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
EdgePacketTranslation¶
-
class
lxu.object.
EdgePacketTranslation
¶ Empty EdgePacketTranslation Python user class.
-
Item
()¶ Item object = Item(pointer packet)
-
Mesh
()¶ Mesh object = Mesh(pointer packet)
-
Packet
(vertexB, polygon, mesh)¶ pointer = Packet(id vertexA,id vertexB,id polygon,object mesh)
-
Polygon
()¶ id polygon = Polygon(pointer packet)
-
Vertices
()¶ (id vertexA,id vertexB) = Vertices(pointer packet)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Envelope¶
-
class
lxu.object.
Envelope
¶ Empty Envelope Python user class.
-
Clear
()¶ For envelopes which can be edited this removes all the keys.
Clear()
-
EndBehavior
()¶ The envelopes end behavior is read and set with these methods. The side can be IN or OUT to select the behavior for times prior to the first key frame or the behavior after the last keyframe, respectively. The behavior for both can be set by specifying BOTH.
integer = EndBehavior(integer side)
-
Enumerator
()¶ This method allocates a new keyframe enumerator, allowing multiple clients to query the same envelope.
Keyframe object = Enumerator()
-
EvaluateF
()¶ These two methods allow the envelope to be evaluated. The input value is given as “time” although it is any independent parameter. the correct method must be called based on the envelopes numeric type.
float value = EvaluateF(float time)
-
EvaluateI
()¶ integer value = EvaluateI(float time)
-
Interpolation
()¶ integer = Interpolation()
-
IsInt
()¶ The
integer = IsInt()
-
SetEndBehavior
(side)¶ SetEndBehavior(integer behavior,integer side)
-
SetInterpolation
()¶ SetInterpolation(integer type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
EvalModifier¶
-
class
lxu.object.
EvalModifier
¶ Empty EvalModifier Python user class.
-
Alloc
(index, eval)¶ Unknown object = Alloc(object item,integer index,object eval)
-
Next
()¶ (object,integer index) = Next()
-
Reset
()¶ Modifiers have two forms. The modifier class is a plug-in server of type
Reset(object scene)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Evaluation¶
-
class
lxu.object.
Evaluation
¶ Empty Evaluation Python user class.
-
AddChannel
(index, type)¶ The
integer attr = AddChannel(object item,integer index,integer type)
-
AddChannelName
(name, type)¶ integer attr = AddChannelName(object item,string name,integer type)
-
ClearAlternate
()¶ ClearAlternate()
-
GetBakedSample
(bracket)¶ For baked channels, this method allows the client to read the baked sample before and after the current evaluation time. For ‘bracket’ of zero the sample is returned at or just after the current time. The returned ‘fraction’ is a value from 0 to 1 indicating how close this sample is to the next one. If the fraction is non-zero then calling this again with ‘bracket’ of 1 returns the sample just after the current time. This allows values from baked samples to be exactly interpolated.
(float fraction,Unknown object) = GetBakedSample(integer index,integer bracket)
-
GetCache
()¶ pointer = GetCache()
-
GetDT
()¶ Get an approximate timestep for evaluating nearby values. During a simulation this is the stepsize of the sim which may be less than a frame. In normal circumstances this is just the frame interval.
float = GetDT()
-
ReadTime
()¶ integer attr = ReadTime()
-
SetAlternate
()¶ ChannelWrite object = SetAlternate()
-
SetAlternateSetup
()¶ One more useful alternate is the setup action.
SetAlternateSetup()
-
SetAlternateTime
()¶ Modifiers can also perform alternate evaluation. The “set” methods are called during modifier evaluation to set all inputs to the modifier to come from an alternate evaluation
SetAlternateTime(float time)
-
SetCache
()¶ Modifiers can set and get cache data objects to remember their last evaluation state. These are freed by
SetCache(pointer cache)
-
SimulationRange
()¶ (float start,float end) = SimulationRange()
-
SimulationState
()¶ Get information about simulation. The LXfSIM_ state flags indicate if the simulation is just a fake preview and if so, if it’s advancing over time. The range is only valid for simulations that are being cached.
integer flags = SimulationState()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
EventGuide¶
-
class
lxu.object.
EventGuide
¶ Empty EventGuide Python user class.
-
Flags
()¶ integer = Flags()
-
Limits
(outer)¶ integer = Limits(float inner,float outer)
-
Proximity
(element)¶ (integer,vector pos,float dist,integer priority) = Proximity(object toolVector,pointer element)
-
SetDrawState
()¶ integer = SetDrawState(integer flags)
-
SetFlags
()¶ SetFlags(integer flags)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
EventTranslatePacket¶
-
class
lxu.object.
EventTranslatePacket
¶ Empty EventTranslatePacket Python user class.
-
AddGuide
(client)¶ Handling snapping and constraining within event translation allows tools to offer layered, context-aware ‘guides’ to the user. Event translation coordinates multiple snapping/constraining options added by multiple tools in the tool pipe.
AddGuide(object guide,pointer client)
-
GetConstraint
()¶ (integer,vector center,vector vector) = GetConstraint(object toolVector)
-
GetNewPosition
()¶ vector pos = GetNewPosition(object toolVector)
-
HitHandle
(handle)¶ Many input events are organized by the client to maintain the handle state and position through the down-move-up mouse input cycle. These methods will also take this approach, hopefully sparing tool makers some duplicated effort.
HitHandle(object toolVector,vector handle)
-
ModelDelta
(handle)¶ Converting mouse moves to 3D delta vectors requires some information beyond that used for simple position conversion. Specifically, the deltas will be based on an existing handle position which may be independent of the constraining line or plane.
vector delta = ModelDelta(object toolVector,vector handle)
-
ModelLineDelta
(center, dir, handle)¶ vector delta = ModelLineDelta(object toolVector,vector center,vector dir,vector handle)
-
ModelPlaneDelta
(center, normal, handle)¶ vector delta = ModelPlaneDelta(object toolVector,vector center,vector normal,vector handle)
-
RemoveGuide
(client)¶ integer = RemoveGuide(object guide,pointer client)
-
ScreenToRay
(x, y)¶ (vector pos,vector dir) = ScreenToRay(object toolVector,float x,float y)
-
SetLinearConstraint
(center, dir)¶ SetLinearConstraint(object toolVector,vector center,vector dir)
-
SetLinearSnapConstraint
(center, dir)¶ SetLinearSnapConstraint(object toolVector,vector center,vector dir)
-
SetPlanarConstraint
(center, normal)¶ SetPlanarConstraint(object toolVector,vector center,vector normal)
-
SetPlanarSnapConstraint
(center, dir)¶ SetPlanarSnapConstraint(object toolVector,vector center,vector dir)
-
SetSnapRange
(outer)¶ SetSnapRange(float inner,float outer)
-
SnapPosition
(pos)¶ (integer,vector snapPos) = SnapPosition(object toolVector,vector pos)
-
ToModel
()¶ The event translation interface performs the translation of ‘raw’ 2D input events to ‘cooked’ 3D events. Because this translation will vary depending on the type of tool, and its current attributes, it must be handled by an object packet whose methods are called by tools as needed. Constraint modifier tools can participate in tool input by replacing this object with one of their own (possibly calling the original object methods and modifying their results).
(integer,vector pos,vector axis) = ToModel(object toolVector)
-
ToModelLine
(center, dir)¶ vector pos = ToModelLine(object toolVector,vector center,vector dir)
-
ToModelPlane
(center, normal)¶ vector pos = ToModelPlane(object toolVector,vector center,vector normal)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ExternalRender¶
-
class
lxu.object.
ExternalRender
¶ Empty External Render Python user class.
-
Pause
()¶ Alternatively, we can pause the External Render. This stops rendering, but a future start will not clear the image and will resume where it left off, unless the scene has been updated.
Pause()
-
Reset
()¶ This function will both set External Render such that the next time it starts, it will do a full update, completely rebuilding all the render data and tableau from scratch.
Reset()
-
SetBufferQueue
()¶ SetBufferQueue(object bufferQueue)
-
SetNotifier
()¶ This function takes a
SetNotifier(object notifier)
-
Start
()¶ The first method will start an External Render rendering. The External Render could either be stopped or paused. If it’s neither, this will have no effect.
Start()
-
Stop
()¶ And this method will stop it.
Stop()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Factory¶
-
class
lxu.object.
Factory
¶ Empty Factory Python user class.
-
InfoTag
()¶ This allow reading the tags for a factory. These do not need to be implemented by extension factories since the tags are read from the server instance.
string value = InfoTag(string type)
-
Module
()¶ Get the module the server is in, or NULL if this is a built-in server.
string module = Module()
-
Name
()¶ Accessors for the server’s name, username and class.
string name = Name()
-
Spawn
()¶ Aditionally, servers can be spawned using these functions. The COM interface returned needs to be released by the caller using Release(), as usual.
Unknown object = Spawn()
-
TagByIndex
()¶ (string type,string value) = TagByIndex(integer index)
-
TagCount
()¶ integer count = TagCount()
-
UserName
()¶ string userName = UserName()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Falloff¶
-
class
lxu.object.
Falloff
¶ Empty Falloff Python user class.
-
Bounds
()¶ For any falloff with a specific bounds, the falloff can return a bounding box.
bounds box = Bounds()
-
SetMesh
()¶ If the falloff is being evaluated using a vertex or polygon, the SetMesh should be called to provide a context for any subsequent weight evaluations.
matrix xfrm = SetMesh(object mesh)
-
WeightF
(point, polygon)¶ Clients can either query by position, by vertex, by polygon or a combination of all three.
float = WeightF(vector position,id point,id polygon)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
FileRedirect¶
-
class
lxu.object.
FileRedirect
¶ -
AddSearchPath
()¶ The search path for a redirection object is intended to be set once. Paths will be searched in the order they’re added.
AddSearchPath(string path)
-
Locate
(type)¶ This method takes a reference path and tries to find an absolute path to an existing asset matching the reference. The input reference may be absolute or relative, and must be in neutral format if this object is also. The file type is used to open a redirection dialog by the user, and can be left null to suppress that.
string = Locate(string path,string type)
-
LocateSequence
(type)¶ A sequence filename (one that contains sequence pattern) can be found using the same search criteria.
(integer first,integer last,string) = LocateSequence(string pattern,string type)
-
NeutralFormat
()¶ Configure the redirection to support neutral format names. This means that references are in a format that is the same on all platforms, so that a file saved on a PC can be loaded on a Mac. If this format is enabled aliases are also supported.
NeutralFormat(integer allow)
-
Reference
()¶ This method takes an absolute asset path and returns a reference. The reference may be relative if the asset can be found on the search path. For neutral format redirction the reference is platform-generic and may contain user aliases.
string = Reference(string path)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
FileReference¶
-
class
lxu.object.
FileReference
¶ -
Mode
()¶ integer mode = Mode()
-
NiceName
()¶ string = NiceName()
-
Path
()¶ string path = Path()
-
SubByIndex
()¶ FileReference object = SubByIndex(integer index)
-
SubCount
()¶ integer count = SubCount()
-
Type
()¶ integer type = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
FileSysDest¶
-
class
lxu.object.
FileSysDest
¶ Empty FileSysDest Python user class.
-
AsDir
()¶ This is similar to
string dir = AsDir()
-
IsDir
()¶ This utility returns LXe_TRUE if the path is a file, and LXe_FALSE if it is a directory.
boolean = IsDir()
-
Path
()¶ This returns the destination’s path. The server can use this to create new files, move existing files to the path, or overwrite an existing file with a new one.
string path = Path()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Force¶
-
class
lxu.object.
Force
¶ Empty Force Python user class.
-
Flags
()¶ Get flag bits describing the force. A force can require velocity or mass as an input, and can optionally generate angular forces.
integer = Flags()
-
Force
()¶ These single point methods are optimized for computing a force for a single element. Any given force only needs to implement one of these based on the flags above. The client is required to call the right API.
vector force = Force(vector pos)
-
ForceM
(mass)¶ vector force = ForceM(vector pos,float mass)
-
ForceV
(velocity)¶ vector force = ForceV(vector pos,vector velocity)
-
ForceVM
(velocity, mass)¶ vector force = ForceVM(vector pos,vector velocity,float mass)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
GLImage¶
-
class
lxu.object.
GLImage
¶ Empty GLImage Python user class.
-
SetImage
()¶ Once a GL Image object has been created, the image can be updated by providing it with a new
SetImage(object image)
-
Size
()¶ The dimensions of a GL Image can be queried.
(float w,float h) = Size()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
GLMaterial¶
-
class
lxu.object.
GLMaterial
¶ Empty GLMaterial Python user class.
-
Alpha
()¶ float alpha = Alpha()
-
Color
()¶ vector color = Color()
-
DiffuseAmount
()¶ float amount = DiffuseAmount()
-
DiffuseColor
()¶ vector color = DiffuseColor()
-
Glossiness
()¶ float amount = Glossiness()
-
LuminosityColor
()¶ vector color = LuminosityColor()
-
ReflectionColor
()¶ vector color = ReflectionColor()
-
SpecularAmount
()¶ float amount = SpecularAmount()
-
SpecularColor
()¶ vector color = SpecularColor()
-
TwoSide
()¶ integer value = TwoSide()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
GradientFilter¶
-
class
lxu.object.
GradientFilter
¶ Empty GradientFilter Python user class.
-
Evaluate
(value)¶ If the Gradient Filter is a EVALUATE type filter, the Evaluate method will be called to modify an existing value for a specific “time” sample.
float = Evaluate(float time,float value)
-
Generate
()¶ If the Gradient Filter is a GENERATE type filter, the Generate method will be called to create a value for a specific “time” sample.
float = Generate(float time)
-
MultiSample
(other)¶ If the Gradient Filter is a MULTISAMPLE type filter, the MultiSample method will be called to modify an existing value at an arbitary time sample.
float = MultiSample(float time,object other)
-
Type
()¶ integer = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
GroupDeformer¶
-
class
lxu.object.
GroupDeformer
¶ Empty GroupDeformer Python user class.
-
DeformerByIndex
()¶ Item object = DeformerByIndex(integer index)
-
DeformerCount
()¶ The
integer = DeformerCount()
-
PointEffect
(point, deformer, weight, max)¶ integer count = PointEffect(integer meshIndex,id point,unsigned[] deformer,float[] weight,integer max)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
GroupDest¶
-
class
lxu.object.
GroupDest
¶ Empty GroupDest Python user class.
-
Group
()¶ This method is used to obtain the Group item at the drop location.
Item object = Group()
-
Location
()¶ The location of the drop is obtained with this method.
integer = Location()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
GroupItem¶
-
class
lxu.object.
GroupItem
¶ Empty GroupItem Python user class.
-
Enumerator
()¶ Since the enumeration has state we have to allocate one from the item interface.
GroupEnumerator object = Enumerator()
-
SetType
()¶ Set the Group Item’s type.
SetType(integer type)
-
Type
()¶ Get the Group Item’s type.
integer type = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
GroupMemberChanDest¶
-
class
lxu.object.
GroupMemberChanDest
¶ Empty GroupMemberChanDest Python user class.
-
Channel
()¶ This method is used to obtain the channel in the Group that the source channels are being dropped onto or next to. This will be NULL if the channels are being dropped onto a Group item.
Unknown object = Channel()
-
Group
()¶ This method is used to obtain the Group item that the source channels are being dropped into.
Unknown object = Group()
-
Location
()¶ The location of the drop is obtained with this method.
integer = Location()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
GroupMemberItemDest¶
-
class
lxu.object.
GroupMemberItemDest
¶ Empty GroupMemberItemDest Python user class.
-
Group
()¶ This method is used to obtain the Group item that the source items are being dropped into.
Unknown object = Group()
-
Item
()¶ This method is used to obtain the item in the Group that the source items are being dropped onto or next to. This will be NULL if the items are being dropped onto a Group item.
Unknown object = Item()
-
Location
()¶ The location of the drop is obtained with this method.
integer = Location()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
HandleDraw¶
-
class
lxu.object.
HandleDraw
¶ Empty HandleDraw Python user class.
-
AxisHandle
(mat, axis, part, len, flags)¶ AxisHandle(vector pos,matrix mat,integer axis,integer part,float len,integer flags)
-
CrossHandle
(mat, part, flags)¶ CrossHandle(vector pos,matrix mat,integer part,integer flags)
-
Handle
(mat, part, flags)¶ All the 3D handles take a ‘mat’ argument, if a local space transformation is known for an item or selection then the matrix can be passed to these functions. The directions to draw the handle will then be taken directly from the matrix. If this argument is NULL then the handles will be drawn in world/model space.
Handle(vector pos,matrix mat,integer part,integer flags)
-
LineHandleHilight
(dir, part, flags)¶ LineHandleHilight(vector pos,vector dir,integer part,integer flags)
-
MoveHandle
(mat, axis, part, flags)¶ MoveHandle(vector pos,matrix mat,integer axis,integer part,integer flags)
-
PlaneHandle
(mat, axis, part, flags)¶ PlaneHandle(vector pos,matrix mat,integer axis,integer part,integer flags)
-
PlaneHandleHilight
(norm, part, flags)¶ PlaneHandleHilight(vector pos,vector norm,integer part,integer flags)
-
PointHandle
(part, flags)¶ PointHandle(vector pos,integer part,integer flags)
-
RotateHandle
(mat, axis, part, sAngle, eAngle, facing, flags)¶ RotateHandle(vector pos,matrix mat,integer axis,integer part,float sAngle,float eAngle,integer facing,integer flags)
-
RotateMouseHandle
(pos, mat, axis, part, flags)¶ RotateMouseHandle(vector center,vector pos,matrix mat,integer axis,integer part,integer flags)
-
ScaleHandle
(mat, axis, part, offset, line, flags)¶ ScaleHandle(vector pos,matrix mat,integer axis,integer part,float offset,integer line,integer flags)
-
XHandle
(mat, part, flags)¶ XHandle(vector pos,matrix mat,integer part,integer flags)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Image¶
-
class
lxu.object.
Image
¶ -
Components
()¶
-
Format
()¶ integer = Format()
-
GetLine
(type, buf)¶ data[] = GetLine(integer y,integer type,data[] buf)
-
GetPixel
(y, type, pixel)¶ GetPixel(integer x,integer y,integer type,data[] pixel)
-
IsFloat
()¶
-
Size
()¶ The basic image interface allows clients to read colored pixels or entire lines. When reading pixels the client should always ask for an RGBA format, but for lines the full range of format conversions is possible.
(integer w,integer h) = Size()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ImageFilter¶
-
class
lxu.object.
ImageFilter
¶ Empty ImageFilter Python user class.
-
Generate
(height, monitor)¶ Generate is called on the first filter to generate the base image.
Image object = Generate(integer width,integer height,object monitor)
-
MultiSample
(image)¶ Multi Sample filters can perform convolutes and other operations that involve sampling multiple pixels. They are responsible for creating the output image itself, which can even be at a different resolution, although I’m not sure how good of an idea this is. Blurs, sharpen, trace edge and similar filters requiring multiple samples of an image should be of this type.
Image object = MultiSample(object monitor,object image)
-
SingleSample
()¶ Single Sample filters are provided with the RGBA values of a single pixel to evaluate. The filter function is called for each pixel in turn. This is a good choice for things like creating negatives, performing gamma correction, tinting and other operations that don’t rely on multiple samples.
vector dest = SingleSample(vector src)
-
SingleSampleN
(num)¶ The multi-sample version of the single-sample filter allows an array of RGBA tuples to be transformed at once. This is used when entire lines need to be filtered but pixels are still independent. Filters that support
float dest = SingleSampleN(float[] src,integer num)
-
Type
()¶ Full image evaluation is using the
integer = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ImageLevelSample¶
-
class
lxu.object.
ImageLevelSample
¶ Empty ImageLevelSample Python user class.
-
Count
()¶ Images can present an alternate interface that allows them to be accessed as a set of levels. The levels are filtered versions of the image at different scales, and typically are arranged in power-law series. The underlying implementation may be tiled, enabling access to images that are larger than the available memory, since the image server only needs sufficient memory for a single tile. Levels can be used directly when rendering so that the only levels used are those approximating the visual scale of the image in the rendered scene. The count returns the number of different levels in the image.
integer = Count()
-
GetLevelSize
()¶ Each resolution level should be twice the size of the previous level, starting at 1x1 pixels for level zero, although the tiled image load can pass back slightly different dimensions for each resolution level, according to the needs of the tiled format. The image may or may not provide the full image as a level, although the full image must be accessible through the required
(integer width,integer height) = GetLevelSize(integer level)
-
GetLine
(y, buf)¶ Levels also support line-by-line access through a modified version of the
float[] = GetLine(integer level,integer y,float[] buf)
-
GetPixel
(x, y, type, pixel)¶ Pixels can be directly accessed from a given level, in either integer or floating-point RGBA format, using an x- and y-coordinate in the local coordinate system of the specified level.
GetPixel(integer level,integer x,integer y,integer type,data[] pixel)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ImageLoaderTarget¶
-
class
lxu.object.
ImageLoaderTarget
¶ Empty ImageLoaderTarget Python user class.
-
SetColorspace
()¶ SetColorspace(string colorspace)
-
SetColorspaceDepth
()¶ SetColorspaceDepth(integer depth)
-
SetMap
()¶ SetMap(integer ncolor)
-
SetSize
(width, height)¶ The latest image loader target interface. This has two additional methods.
SetSize(integer type,integer width,integer height)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ImageMonitor¶
-
class
lxu.object.
ImageMonitor
¶ Empty ImageMonitor Python user class.
-
AspectRange
()¶ This returns the minimum and maximum aspect ratio for the monitor. The image provided (to draw the monitor into) will never exceed this aspect. This is useful for monitors like histograms that look better when laid out horizontally, but don’t look like much when stretched vertically. If not implemented or if one of the values is set to 0, the aspect is unconstrained.
(float minAspect,float maxAspect,float idealAspect) = AspectRange()
-
Draw
()¶ This is called to draw the monitor into the ILxImageWriteID provided.
Draw(object imageForDrawing)
-
Image
(frameBufferToAnalyze, bufferIndex, x1, y1, x2, y2, imageProcessingRead, processedThumbnail)¶ This is called with the image (ILxImageID) or frame buffer (ILxFrameBufferID) to be analyzed. The new image may be NULL if there is not currently an image to be analyzed, and it may be the same image as previously passed in if the image has changed for some reason. If imageToAnalyze is NULL, frameBufferToAnalyze may be non-NULL, in which case bufferIndex is the index of the specific buffer within the frame buffer to be analyzed. If both imageToAnalyze and frameBufferToAnalyze are NULL, no image is selected and the monitor should draw in a default or disabled style. x1, y1, xc2 and y2 define a region within the image to analyze. If these are 0,0 and 1,1, then the entire image should be analyzed; otherwise, only the specified region should be analyzed. The
Image(object imageToAnalyze,object frameBufferToAnalyze,integer bufferIndex,float x1,float y1,float x2,float y2,object imageProcessingRead,object processedThumbnail)
-
ImageProcChanged
()¶ This method is called when the properties of the
ImageProcChanged()
-
ImageSource
()¶ Image monitors accept images from an image source. The image source is set through the viewport, and is provided to the monitor through this method. Clients can use the image source string to execute commands that target the image source, respond to monitor-specific commands (like setting ranges for display) based on image source, and so on. For example, a histogram monitor for the clip items image source might be embedded in the clip item’s properties. A command to change the channels shown in the histogram might include the image source as an argument, so that just that monitor’s channel option can be changed, without affecting the other histogram monitors, such as the one used by the Render Window histogram. This argument would also be used when querying the command for a value. This method will be called whenever the image source changes. The server should make a copy of the string for future reference.
ImageSource(string source)
-
MouseDown
(starty, w, h)¶ We support limited mousing support through the use of the Mouse…() methods. We have a down/move/up cycle that occurs when the mouse button is clicked over the montior. The server is provided with the down x/y as well as the current x/y of the mosue relative to the top-left corner of the monitor. Only the left mouse button is supported at this time. The dimensions of the drawing monitor are also passed to each method.
MouseDown(integer startx,integer starty,integer w,integer h)
-
MouseMove
(starty, cx, cy, w, h)¶ MouseMove(integer startx,integer starty,integer cx,integer cy,integer w,integer h)
-
MouseTrack
(cy, w, h)¶ MouseTrack(integer cx,integer cy,integer w,integer h)
-
MouseTrackEnter
()¶ We also support tracking, which is when the mouse is moving over the view but is not being clicked. TrackEnter() is called when the mouse moves into the monitor, and TrackExit() is called when the mouse leaves the monitor. Track() is moved while the mouse moves over the view with the current mouse coordinates and the size of the monitor.
MouseTrackEnter()
-
MouseTrackExit
()¶ MouseTrackExit()
-
MouseUp
(starty, cx, cy, w, h)¶ MouseUp(integer startx,integer starty,integer cx,integer cy,integer w,integer h)
-
ToolTip
(cy, w, h)¶ Tooltips are also supported. As usual, the tooltip should be composed from a message table lookup. Returning LXe_NOTIMPL or any other failure code will result in no tooltip being displayed.
string = ToolTip(integer cx,integer cy,integer w,integer h)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ImageProcessing¶
-
class
lxu.object.
ImageProcessing
¶ Empty ImageProcessing Python user class.
-
ApplyToFrameBuffer
(bufferIndex)¶ Apply image processing settings directly to a frame buffer.
ApplyToFrameBuffer(object frameBuffer,integer bufferIndex)
-
ApplyToFrameBufferOverride
(bufferIndex, opOverride)¶ ApplyToFrameBufferOverride(object frameBuffer,integer bufferIndex,integer opOverride)
-
ApplyToImage
(dstImage)¶ Apply image processing settings to an image.
ApplyToImage(object srcImage,object dstImage)
-
ApplyToImageFromFrameBuffer
(bufferIndex, image, xOffset, yOffset, zoom)¶ Apply image processing settings to an image from a frame buffer.
ApplyToImageFromFrameBuffer(object frameBuffer,integer bufferIndex,object image,float xOffset,float yOffset,float zoom)
-
ApplyToImageFromFrameBufferOverride
(bufferIndex, image, xOffset, yOffset, zoom, opOverride)¶ ApplyToImageFromFrameBufferOverride(object frameBuffer,integer bufferIndex,object image,float xOffset,float yOffset,float zoom,integer opOverride)
-
ApplyToImageOverride
(dstImage, opOverride)¶ ApplyToImageOverride(object srcImage,object dstImage,integer opOverride)
-
AreaProcessingActive
()¶ Determine if area image processing is active. When image processing is limited to functions that operate on pixels with no dependencies on neighboring pixels, it is safe to optimize by passing in a cropped portion of the overall image. For example, if the image is larger than the viewport, or is zoomed in, just that portion of the image can be passed to the Apply functions if the AreaProcessingActive function indicates that area functions are inactive.
integer active = AreaProcessingActive()
-
CopySettingsFromFrameBuffer
(bufferIndex)¶ Copy image processing settings from a frame buffer.
CopySettingsFromFrameBuffer(object frameBuffer,integer bufferIndex)
-
CopySettingsToFrameBuffer
(bufferIndex)¶ Copy image processing settings from a frame buffer.
CopySettingsToFrameBuffer(object frameBuffer,integer bufferIndex)
-
GetAsReadOnly
()¶ This method provides access to a read-only version of the
ImageProcessing object = GetAsReadOnly()
-
GetBloomEnabled
()¶ Bloom options control a post-processing effect that redistributes excess energy to neighboring pixels. Bloom threshold is the level above which the bloom effect is applied. Bloom radius controls the size of the bloom effect. The bloom effect can be switched on or off with the BloomEnabled setting.
integer enabled = GetBloomEnabled()
-
GetBloomRadius
()¶ float radius = GetBloomRadius()
-
GetBloomThreshold
()¶ float threshold = GetBloomThreshold()
-
GetColorSpaceEmbedding
()¶ integer colorSpaceEmbedding = GetColorSpaceEmbedding()
-
GetColorization
()¶ Colorization and target color pull the colors of an image. Colorization is the amount of pull, where 0 is no pull and 1.0 is maximum pull. The target color is the color towards which the colors of the image are pulled.
float colorization = GetColorization()
-
GetExpType
()¶ Exposure control determines how frame buffer pixel values (expressed in physical units of radiance) should be mapped to output pixel values. The simple way is to specify a white level (the input value that corresponds to an output of 1.0), but another method is to emulate a camera’s film or sensor, in which the mapping depends on film speed (ISO), exposure time, and f-stop.
integer expType = GetExpType()
-
GetHueOffset
()¶ Hue offset is an angle of rotation for the hue of the image colors, given in radians. For example, rotating by PI radians changes red colors to cyan.
float hueOffset = GetHueOffset()
-
GetISO
()¶ float iso = GetISO()
-
GetIdentifier
()¶ string string = GetIdentifier()
-
GetImageProcessingOperators
()¶ Control which image processing operators are enabled.
integer ops = GetImageProcessingOperators()
-
GetInputBlackLevel
()¶ Input black and white levels set the true black and white exposure levels of the rendered or source image, after which additional post processing is applied. Gray level is a subjective gamma adjustment to the midtone levels of the image colors, which is applied as part of the input level adjustment. (The inverse functions provide a pre-computed inverse of the last set gray level.)
float inputBlackLevel = GetInputBlackLevel()
-
GetInputBlueGrayLevel
()¶ float gamma = GetInputBlueGrayLevel()
-
GetInputGrayLevel
()¶ float gamma = GetInputGrayLevel()
-
GetInputGreenGrayLevel
()¶ float gamma = GetInputGreenGrayLevel()
-
GetInputMaxBlueLevel
()¶ float inputLevel = GetInputMaxBlueLevel()
-
GetInputMaxGreenLevel
()¶ float inputLevel = GetInputMaxGreenLevel()
-
GetInputMaxRedLevel
()¶ float inputLevel = GetInputMaxRedLevel()
-
GetInputMinBlueLevel
()¶ float inputLevel = GetInputMinBlueLevel()
-
GetInputMinGreenLevel
()¶ float inputLevel = GetInputMinGreenLevel()
-
GetInputMinRedLevel
()¶ float inputLevel = GetInputMinRedLevel()
-
GetInputRedGrayLevel
()¶ float gamma = GetInputRedGrayLevel()
-
GetInputWhiteLevel
()¶ float inputWhiteLevel = GetInputWhiteLevel()
-
GetInvInputBlueGrayLevel
()¶ float invGamma = GetInvInputBlueGrayLevel()
-
GetInvInputGrayLevel
()¶ float invGamma = GetInvInputGrayLevel()
-
GetInvInputGreenGrayLevel
()¶ float invGamma = GetInvInputGreenGrayLevel()
-
GetInvInputRedGrayLevel
()¶ float invGamma = GetInvInputRedGrayLevel()
-
GetOutputBlackLevel
()¶ Output black and white levels set the final mapping to white and black, which is applied just before output gamma as the image is output to its final destination.
float outputBlackLevel = GetOutputBlackLevel()
-
GetOutputColorspace
()¶ Output colorspace holds information about the name and mapping of the colorspace intended for the final image color display. Additionaly colorspace embedding toggle has been exposed to enable or disable embedding ICC profile and EXIF data in the exported images.
string = GetOutputColorspace()
-
GetOutputGamma
()¶ Output gamma is the final level adjustment intended to conform the final image levels to a standard gamma level, such as 2.2 for sRGB. The inverse functions provide a pre-computed inverse of the last set value.
float outputGamma = GetOutputGamma()
-
GetOutputInvGamma
()¶ float outputInvGamma = GetOutputInvGamma()
-
GetOutputMaxBlueLevel
()¶ float outputLevel = GetOutputMaxBlueLevel()
-
GetOutputMaxGreenLevel
()¶ float outputLevel = GetOutputMaxGreenLevel()
-
GetOutputMaxRedLevel
()¶ float outputLevel = GetOutputMaxRedLevel()
-
GetOutputMinBlueLevel
()¶ float outputLevel = GetOutputMinBlueLevel()
-
GetOutputMinGreenLevel
()¶ float outputLevel = GetOutputMinGreenLevel()
-
GetOutputMinRedLevel
()¶ float outputLevel = GetOutputMinRedLevel()
-
GetOutputWhiteLevel
()¶ float outputWhiteLevel = GetOutputWhiteLevel()
-
GetSaturation
()¶ Saturation is a multiplier on the existing saturation of the image colors, such that values greater than 1.0 increase saturation, and values smaller than 1.0 decrease saturation. The default value of 1.0 has no effect.
float saturation = GetSaturation()
-
GetSaveProcessed
()¶ SaveProcessed controls whether or not an image is saved with post- processing effects applied. When SaveProcessed is turned off, the raw, original image is saved with no post processing.
integer enabled = GetSaveProcessed()
-
GetSourceImageGamma
()¶ Source image gamma is the original gamma of an image loaded into an image slot in the render window. This gamma is used to convert the image into linear space before image processing begins. Gamma is re-applied using the output gamma before the image is saved.
float gamma = GetSourceImageGamma()
-
GetSourceImageIsStereoSideBySide
()¶ A stereo image can be stored in a side-by-side format, which can be displayed as stereo when this setting is enabled.
integer isStereo = GetSourceImageIsStereoSideBySide()
-
GetStereoComposite
()¶ integer mode = GetStereoComposite()
-
GetStereoEye
()¶ See the LXtStereoEye type for the stereo eye modes, and the LXtStereoComposite type for the stereo composite modes.
integer eye = GetStereoEye()
-
GetTargetColor
()¶ float color = GetTargetColor()
-
GetToneAmt
()¶ float toneAmt = GetToneAmt()
-
GetToneMap
()¶ Tone mapping remaps the dynamic range of the image colors, enabling high- dynamic-range (HDR) colors to be brought into the visible range, and also to be mapped for saving to low-dynamic-range (LDR) integer file formats.
integer toneMap = GetToneMap()
-
GetVignetteAmount
()¶ Vignette amount is the amount of darkening to apply to pixels based on their distance from the center of the frame.
float amount = GetVignetteAmount()
-
Reset
()¶ The Reset method restores all of the remaining states to default values (the identifier is not affect).
Reset()
-
SetBloomEnabled
()¶ SetBloomEnabled(integer enabled)
-
SetBloomRadius
()¶ SetBloomRadius(float radius)
-
SetBloomThreshold
()¶ SetBloomThreshold(float threshold)
-
SetColorization
()¶ SetColorization(float colorization)
-
SetExpType
()¶ SetExpType(integer expType)
-
SetHueOffset
()¶ SetHueOffset(float hueOffset)
-
SetISO
()¶ SetISO(float iso)
-
SetIdentifier
()¶ A processing object can include an identifier string. If set, any changes to the object’s image processing objects will be broadcast over the global image processing port. If the object is being used as a one-off, then this string need not be set.
SetIdentifier(string string)
-
SetImageProcessingOperators
()¶ SetImageProcessingOperators(integer ops)
-
SetInputBlackLevel
()¶ SetInputBlackLevel(float blackLevel)
-
SetInputBlueGrayLevel
()¶ SetInputBlueGrayLevel(float gamma)
-
SetInputGrayLevel
()¶ SetInputGrayLevel(float gamma)
-
SetInputGreenGrayLevel
()¶ SetInputGreenGrayLevel(float gamma)
-
SetInputMaxBlueLevel
()¶ SetInputMaxBlueLevel(float level)
-
SetInputMaxGreenLevel
()¶ SetInputMaxGreenLevel(float level)
-
SetInputMaxRedLevel
()¶ SetInputMaxRedLevel(float level)
-
SetInputMinBlueLevel
()¶ SetInputMinBlueLevel(float level)
-
SetInputMinGreenLevel
()¶ SetInputMinGreenLevel(float level)
-
SetInputMinRedLevel
()¶ SetInputMinRedLevel(float level)
-
SetInputRedGrayLevel
()¶ SetInputRedGrayLevel(float gamma)
-
SetInputWhiteLevel
()¶ SetInputWhiteLevel(float whiteLevel)
-
SetOutputBlackLevel
()¶ SetOutputBlackLevel(float blackLevel)
-
SetOutputColormapping
()¶ SetOutputColormapping(object colormapping)
-
SetOutputColorspace
()¶ SetOutputColorspace(string colorspace)
-
SetOutputGamma
()¶ SetOutputGamma(float gamma)
-
SetOutputMaxBlueLevel
()¶ SetOutputMaxBlueLevel(float outputLevel)
-
SetOutputMaxGreenLevel
()¶ SetOutputMaxGreenLevel(float outputLevel)
-
SetOutputMaxRedLevel
()¶ SetOutputMaxRedLevel(float outputLevel)
-
SetOutputMinBlueLevel
()¶ SetOutputMinBlueLevel(float outputLevel)
-
SetOutputMinGreenLevel
()¶ SetOutputMinGreenLevel(float outputLevel)
-
SetOutputMinRedLevel
()¶ SetOutputMinRedLevel(float outputLevel)
-
SetOutputWhiteLevel
()¶ SetOutputWhiteLevel(float whiteLevel)
-
SetSaturation
()¶ SetSaturation(float saturation)
-
SetSaveProcessed
()¶ SetSaveProcessed(integer enabled)
-
SetSourceImageGamma
()¶ SetSourceImageGamma(float gamma)
-
SetSourceImageIsStereoSideBySide
()¶ SetSourceImageIsStereoSideBySide(integer isStereo)
-
SetStereoComposite
()¶ SetStereoComposite(integer mode)
-
SetStereoEye
()¶ SetStereoEye(integer eye)
-
SetTargetColor
()¶ SetTargetColor(double[] color)
-
SetToneAmt
()¶ SetToneAmt(float toneAmt)
-
SetToneMap
()¶ SetToneMap(integer toneMap)
-
SetVignetteAmount
()¶ SetVignetteAmount(float amount)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ImageProcessingRead¶
-
class
lxu.object.
ImageProcessingRead
¶ Empty ImageProcessingRead Python user class.
-
ApplyToFrameBuffer
(bufferIndex)¶ ApplyToFrameBuffer(object frameBuffer,integer bufferIndex)
-
ApplyToFrameBufferOverride
(bufferIndex, opOverride)¶ ApplyToFrameBufferOverride(object frameBuffer,integer bufferIndex,integer opOverride)
-
ApplyToImage
(dstImage)¶ ApplyToImage(object srcImage,object dstImage)
-
ApplyToImageFromFrameBuffer
(bufferIndex, image, xOffset, yOffset, zoom)¶ ApplyToImageFromFrameBuffer(object frameBuffer,integer bufferIndex,object image,float xOffset,float yOffset,float zoom)
-
ApplyToImageFromFrameBufferOverride
(bufferIndex, image, xOffset, yOffset, zoom, opOverride)¶ ApplyToImageFromFrameBufferOverride(object frameBuffer,integer bufferIndex,object image,float xOffset,float yOffset,float zoom,integer opOverride)
-
ApplyToImageOverride
(dstImage, opOverride)¶ ApplyToImageOverride(object srcImage,object dstImage,integer opOverride)
-
AreaProcessingActive
()¶ integer active = AreaProcessingActive()
-
CopySettingsToFrameBuffer
(bufferIndex)¶ CopySettingsToFrameBuffer(object frameBuffer,integer bufferIndex)
-
GetBloomEnabled
()¶ integer enabled = GetBloomEnabled()
-
GetBloomRadius
()¶ float radius = GetBloomRadius()
-
GetBloomThreshold
()¶ float threshold = GetBloomThreshold()
-
GetColorization
()¶ float colorization = GetColorization()
-
GetExpType
()¶ integer expType = GetExpType()
-
GetHueOffset
()¶ float hueOffset = GetHueOffset()
-
GetISO
()¶ float iso = GetISO()
-
GetIdentifier
()¶ These methods are identical to the Get…() methods in
string string = GetIdentifier()
-
GetImageProcessingOperators
()¶ integer ops = GetImageProcessingOperators()
-
GetInputBlackLevel
()¶ float inputLevel = GetInputBlackLevel()
-
GetInputBlueGrayLevel
()¶ float gamma = GetInputBlueGrayLevel()
-
GetInputGrayLevel
()¶ float gamma = GetInputGrayLevel()
-
GetInputGreenGrayLevel
()¶ float gamma = GetInputGreenGrayLevel()
-
GetInputMaxBlueLevel
()¶ float inputLevel = GetInputMaxBlueLevel()
-
GetInputMaxGreenLevel
()¶ float inputLevel = GetInputMaxGreenLevel()
-
GetInputMaxRedLevel
()¶ float inputLevel = GetInputMaxRedLevel()
-
GetInputMinBlueLevel
()¶ float inputLevel = GetInputMinBlueLevel()
-
GetInputMinGreenLevel
()¶ float inputLevel = GetInputMinGreenLevel()
-
GetInputMinRedLevel
()¶ float inputLevel = GetInputMinRedLevel()
-
GetInputRedGrayLevel
()¶ float gamma = GetInputRedGrayLevel()
-
GetInputWhiteLevel
()¶ float inputLevel = GetInputWhiteLevel()
-
GetInvInputBlueGrayLevel
()¶ float invGamma = GetInvInputBlueGrayLevel()
-
GetInvInputGrayLevel
()¶ float invGamma = GetInvInputGrayLevel()
-
GetInvInputGreenGrayLevel
()¶ float invGamma = GetInvInputGreenGrayLevel()
-
GetInvInputRedGrayLevel
()¶ float invGamma = GetInvInputRedGrayLevel()
-
GetOutputBlackLevel
()¶ float outputLevel = GetOutputBlackLevel()
-
GetOutputColorspace
()¶ string = GetOutputColorspace()
-
GetOutputGamma
()¶ float outputGamma = GetOutputGamma()
-
GetOutputInvGamma
()¶ float outputInvGamma = GetOutputInvGamma()
-
GetOutputMaxBlueLevel
()¶ float outputLevel = GetOutputMaxBlueLevel()
-
GetOutputMaxGreenLevel
()¶ float outputLevel = GetOutputMaxGreenLevel()
-
GetOutputMaxRedLevel
()¶ float outputLevel = GetOutputMaxRedLevel()
-
GetOutputMinBlueLevel
()¶ float outputLevel = GetOutputMinBlueLevel()
-
GetOutputMinGreenLevel
()¶ float outputLevel = GetOutputMinGreenLevel()
-
GetOutputMinRedLevel
()¶ float outputLevel = GetOutputMinRedLevel()
-
GetOutputWhiteLevel
()¶ float outputLevel = GetOutputWhiteLevel()
-
GetSaturation
()¶ float saturation = GetSaturation()
-
GetSaveProcessed
()¶ integer enabled = GetSaveProcessed()
-
GetSourceImageGamma
()¶ float gamma = GetSourceImageGamma()
-
GetSourceImageIsStereoSideBySide
()¶ integer isStereo = GetSourceImageIsStereoSideBySide()
-
GetStereoComposite
()¶ integer mode = GetStereoComposite()
-
GetStereoEye
()¶ integer eye = GetStereoEye()
-
GetTargetColor
()¶ float color = GetTargetColor()
-
GetToneAmt
()¶ float toneAmt = GetToneAmt()
-
GetToneMap
()¶ integer toneMap = GetToneMap()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ImageSegment¶
-
class
lxu.object.
ImageSegment
¶ Empty ImageSegment Python user class.
-
GetSegment
(left, right, rgba)¶ An image segment is a sub-range of pixels within a scanline, which is always read in FP RGBA format, and written in any given format.
GetSegment(integer y,integer left,integer right,float[] rgba)
-
SetSegment
(left, right, type, line)¶ SetSegment(integer y,integer left,integer right,integer type,data[] line)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ImageWrite¶
-
class
lxu.object.
ImageWrite
¶ -
AddAttribute
(type)¶ integer index = AddAttribute(string name,string type)
-
Components
()¶
-
Format
()¶ integer = Format()
-
IsFloat
()¶
-
SetLine
(type, line)¶ SetLine(integer y,integer type,data[] line)
-
SetPixel
(y, type, pixel)¶ SetPixel(integer x,integer y,integer type,data[] pixel)
-
Size
()¶ Writing to an image requires a different interface. This provides methods for assigning color values to pixels or lines. Not all images will be writable.
(integer w,integer h) = Size()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
IndexImage¶
-
class
lxu.object.
IndexImage
¶ -
Components
()¶
-
Format
()¶ integer = Format()
-
GetIndex
(y)¶ integer index = GetIndex(integer x,integer y)
-
GetMap
(type, pixel)¶ GetMap(integer index,integer type,data[] pixel)
-
IsFloat
()¶
-
MapSize
()¶ integer numColors = MapSize()
-
Size
()¶ An index image is one that stores index values at the pixel locations and uses a lookup table to get the color. While the
(integer w,integer h) = Size()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
IndexImageWrite¶
-
class
lxu.object.
IndexImageWrite
¶ -
AddAttribute
(type)¶ integer index = AddAttribute(string name,string type)
-
Components
()¶
-
Format
()¶ integer = Format()
-
IsFloat
()¶
-
SetIndex
(y, index)¶ SetIndex(integer x,integer y,integer index)
-
SetMap
(type, pixel)¶ SetMap(integer index,integer type,data[] pixel)
-
Size
()¶ Writing to an index image can only be done with one of these interfaces.
(integer w,integer h) = Size()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
InputDeviceInstance¶
-
class
lxu.object.
InputDeviceInstance
¶ Empty InputDeviceInstance Python user class.
-
AnalogCount
()¶ There are two kinds of analog inputs, aboslute and relative. Arbitrary numbers of analog inputs are supported. An analog input only has a single value, and thus moves on a single axis. Joysticks, for example, are two analog inputs, one for the X axis and one for the Y axis.
integer = AnalogCount()
-
AnalogMetrics
()¶ Analog inputs also have some other metrics telling us how they behave. If isAbsolute is true, this is considered to be an absolute axis like a slider, and the values will be used directly. If false, it is considered to be a relative adjustment to existing values. If isDirectional is true, the values returned by the axis are expected to be in the 0 to 1 range. This is common for sliders and analog triggers on game controllers. If false, then this is a bidirectional axis like a joystick, where the values range from -1 to 1.
(integer isAbsolute,integer isDirectional) = AnalogMetrics(integer index)
-
AnalogName
()¶ As with buttons, each input has an internal name and a username.
string = AnalogName(integer index)
-
AnalogUserName
()¶ string = AnalogUserName(integer index)
-
AnalogValue
()¶ This returns the current value of an analog input. This should be normalized to 0 to 1 or -1 to 1.
float value = AnalogValue(integer index)
-
ButtonCount
()¶ There can be an arbitrary number of buttons on the device, the count of which is returned by this method.
integer = ButtonCount()
-
ButtonIsDown
()¶ This returns LXe_TRUE if the button is down, and LXe_FALSE if up.
boolean = ButtonIsDown(integer index)
-
ButtonName
()¶ Each button has an internal name and a username. The username, as always, should be a message table lookup, and returning “@table@message@” is all that is necessary for inmap to do the lookup for you. The internal name is used for storing any mappings to this button in the config.
string = ButtonName(integer index)
-
ButtonUserName
()¶ string = ButtonUserName(integer index)
-
IsConnected
()¶ This returns LXe_TRUE if the device is currently connected.
IsConnected()
-
Name
()¶ This returns the unqiue name of the device instance. If multiple identical pieces of hardware are connected, each must still have a unique name. These names are expected to persist between sessions, so that any mappings associated with it can be restored properly when the app is relaunched.
Name(string name)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
InputDevices¶
-
class
lxu.object.
InputDevices
¶ Empty InputDevices Python user class.
-
DeviceCount
()¶ These methods walk the list of devices currently available from the server.
integer = DeviceCount()
-
DeviceInstanceByIndex
()¶ This returns an instance of the device object, and expects to get back an object with the
InputDeviceInstance object = DeviceInstanceByIndex(integer index)
-
DeviceNameByIndex
(name)¶ This returns the unique name of this device. This name should be unique across devices of the same type (ie: two identical pieces of game controller hardware should have different “names”), and is used to decide if devices have been added or removed.
DeviceNameByIndex(integer index,string name)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
IntRange¶
-
class
lxu.object.
IntRange
¶ Empty IntRange Python user class.
-
AllAfter
()¶ boolean = AllAfter()
-
AllBefore
()¶ These return true LXe_TRUE if there are leading or trailing ellipses, and LXe_FALSE if not.
boolean = AllBefore()
-
Current
()¶ This gets the current integer.
integer current = Current()
-
First
()¶ integer first = First()
-
Last
()¶ integer last = Last()
-
Max
()¶ integer max = Max()
-
Min
()¶ Numerical order starts at lowest integer in the range and goes to the highest integer. Example uses are print ranges, where you always want to print from the first page to the last page. User order starts from the first integer the user specified to the last, including reversed ranges. This is useful for things such as rendering sequences backward. In both cases, each integer will be returned only once. Note that these functions will fail if the range consists entirely of “…”, as there is no meaningful beginning or end to the range.
integer min = Min()
-
Next
()¶ These functions allow the integer range to be walked. The basic walking functions are
integer i = Next()
-
Prev
()¶ integer i = Prev()
-
Test
()¶ It is often useful to be able to simply test to see if an integer is within the range. This returns LXe_TRUE if in range. This does not affect the current position used to walk the range.
boolean = Test(integer i)
-
set
()¶ bool = set(object source)
-
test
()¶ It is often useful to be able to simply test to see if an integer is within the range. This returns LXe_TRUE if in range. This does not affect the current position used to walk the range.
bool = test()
-
Item¶
-
class
lxu.object.
Item
¶ This python method returns true if an item matches or inherits from a given type. The type can be passed as a type code or string.
-
BaseName
()¶ 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.
string name = BaseName()
-
ChannelAdd
()¶ New user channels can be added directly to items using the following method. This returns an
Unknown object = ChannelAdd()
-
ChannelCount
()¶ 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.
integer count = ChannelCount()
-
ChannelEvalType
()¶ 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.
string type = ChannelEvalType(integer index)
-
ChannelGradient
()¶ This method returns LXe_TRUE if the channel is a gradient, and returns the input and output types indirectly as well.
(string input,string output) = ChannelGradient(integer index)
-
ChannelIntHint
()¶ 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.
hints hints = ChannelIntHint(integer index)
-
ChannelIsDriven
()¶ This returns LXe_TRUE if the specified channel is driven by a modifier, otherwise LXe_FALSE is returned.
boolean = ChannelIsDriven(integer index)
-
ChannelList
()¶ list of channel names = ChannelList()
-
ChannelLookup
()¶ This can be used to lookup the channel by name, returning its index.
integer index = ChannelLookup(string name)
-
ChannelName
()¶ This returns the internal name of the channel, suitable for lookup.
string name = ChannelName(integer index)
-
ChannelPackage
()¶ The package a channel belongs to can be found with this function. The package name is returned unless this is a user channel.
string package = ChannelPackage(integer index)
-
ChannelStorageType
()¶ This method returns the storage type of the channel, which can be valid exo-type name for numeric and stored custom types.
string type = ChannelStorageType(integer index)
-
ChannelType
()¶ 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.
integer type = ChannelType(integer index)
-
ChannelValue
(index)¶ Read channel values: val = ChannelValue(channel) Channel can be given by name or index.
-
ChannelVectorMode
()¶ 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.
(integer mode,integer components) = ChannelVectorMode(integer index)
-
Context
()¶ This method returns the scene that the item belongs to.
Scene object = Context()
-
Delete
()¶ Delete the item from the scene.
Delete()
-
GetTag
()¶ Look up an item’s tag value by type code.
string = GetTag(integer type)
-
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.
string ident = Ident()
-
InvalidateName
()¶ This is called by the package that implements the item, indicating that its synthetic name, if it has one, should be updated.
InvalidateName()
-
IsA
(type)¶
-
IsReferenced
()¶ 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.
boolean = IsReferenced()
-
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.
string name = Name()
-
PackageAdd
()¶ 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.
PackageAdd(string package)
-
PackageRemove
()¶ Packages can be removed with this function.
PackageRemove(string package)
-
PackageStartIndex
()¶ 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.
integer index = PackageStartIndex(string package)
-
PackageTest
()¶ 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.
boolean = PackageTest(string package)
-
Parent
()¶ This returns the parent item, or LXe_NOTFOUND if there is no parent because this is a root item.
Item object = Parent()
-
ReadAction
(name, time)¶ Read channel values from named action: ReadAction(<name>, <time>)
-
ReadEvaluated
(time)¶ Read evaluated channel values: ReadEvaluated(<time>)
-
ReadNone
()¶
-
ReadSetup
()¶ Read evaluted channel values from setup: ReadSetup()
-
Reference
()¶ 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.
Item object = Reference()
-
Root
()¶ This returns the item’s ancestor at the root of the scene, failing with LXe_NOTFOUND if this is a root item.
Item object = Root()
-
SetChannel
(index, value, key)¶ Set channel values: SetChannel(channel, value, <key>) Channel can be given by name or index. Set key to true to make a keyframe.
-
SetIdent
()¶ 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.
SetIdent(string ident)
-
SetName
()¶ 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.
SetName(string name)
-
SetParent
()¶ This can be used to set the parent item and place the child at the end of the list of parents children.
SetParent(object parent)
-
SetParentAndPosition
(pos)¶ This can be used to set the parent item and childs position in the list of parents children.
SetParentAndPosition(object parent,integer pos)
-
SetSource
()¶ This method sets the source item.
SetSource(object source)
-
SetTag
(tag)¶ Set the tag string associated with the type code.
SetTag(integer type,string tag)
-
SetUniqueIndex
()¶ This method allows the index to be reset during loading.
SetUniqueIndex(integer index)
-
Source
()¶ 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.
Item object = Source()
-
SubByIndex
()¶ This returns a child item by index.
Item object = SubByIndex(integer index)
-
SubCount
()¶ These methods allow the item hierarchy within the scene to be walked. This returns the number of child items parented to this item.
integer count = SubCount()
-
SubList
()¶ list of sub-items = SubList()
-
TestType
()¶ This returns true if an item matches or inherits from a given type.
boolean = TestType(integer type)
-
TestTypes
()¶ This returns true if an item matches or inherits from a list of types.
boolean = TestTypes(int[] types)
-
Type
()¶ This returns the item’s type. Returns LXiTYPE_NONE if the item has been destroyed.
integer = Type()
-
UniqueIndex
()¶ 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.
integer index = UniqueIndex()
-
UniqueName
()¶ 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.
string name = UniqueName()
-
WasLoaded
()¶ 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.
boolean = WasLoaded(integer test)
-
WriteAction
(name, time)¶ Write channel values to named action: WriteAction(<name>, <time>)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ItemCollection¶
-
class
lxu.object.
ItemCollection
¶ Python method gets list of items.
-
Add
()¶ Add(object item)
-
ByIndex
(index)¶ Item object = ByIndex(integer type,integer index)
-
Count
()¶ integer count = Count(integer type)
-
ItemList
()¶ list of items = ItemList()
-
Test
()¶ Item collections are sets of items that can be expanded to include related items.
boolean = Test(object item)
-
set
()¶ bool = set(object source)
-
test
()¶ Item collections are sets of items that can be expanded to include related items.
bool = test()
-
ItemGraph¶
-
class
lxu.object.
ItemGraph
¶ Empty ItemGraph Python user class.
-
AddLink
(to_obj)¶ 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.
AddLink(object from_obj,object to_obj)
-
DeleteLink
(to_obj)¶ 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.
DeleteLink(object from_obj,object to_obj)
-
FwdByIndex
(index)¶ This get the destination of the forward link by index.
Item object = FwdByIndex(object item,integer index)
-
FwdCount
()¶ 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.
integer count = FwdCount(object item)
-
RevByIndex
(index)¶ This get the source of the reverse link by index.
Item object = RevByIndex(object item,integer index)
-
RevCount
()¶ This gets the count of reverse links.
integer count = RevCount(object item)
-
SetLink
(fromIndex, to_obj, 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.
SetLink(object from_obj,integer fromIndex,object to_obj,integer toIndex)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ItemInfluence¶
-
class
lxu.object.
ItemInfluence
¶ Empty ItemInfluence Python user class.
-
AllowTransform
()¶ integer flags = AllowTransform(integer index)
-
Enumerate
()¶ Enumerate(object visitor)
-
GetItem
()¶ Item object = GetItem()
-
HasItems
()¶ Analogous to MeshInfluence, except that there’s no concept of a partition. It’s just a list of items. The list is accessed with a visitor.
boolean = HasItems()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ItemListType¶
-
class
lxu.object.
ItemListType
¶ -
GenerateList
(collection)¶ To generate the list the item is passed an empty item collection. The server should add the items to the collection in order. The scene will be assured to contain the root item, if any.
GenerateList(object scene,object collection)
-
SetArgument
()¶ When first created an item list type object will have the argument string and root item set to define the context for this list.
SetArgument(string arg)
-
SetRootItem
()¶ SetRootItem(object item)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Keyframe¶
-
class
lxu.object.
Keyframe
¶ Empty Keyframe Python user class.
-
AddF
(value)¶ These methods allow keys to be created at the given time (or other independent parameter) and value.
AddF(float time,float value)
-
AddI
(value)¶ AddI(float time,integer value)
-
Delete
()¶ This deletes the current key.
Delete()
-
Find
(side)¶ Find(float time,integer side)
-
First
()¶ The keyframe interface has a state which is a current key, so it acts as an iterator. The next four methods set the current key based on its position in the sequence, or relative to the current key. They return LXe_NOTFOUND on errors.
First()
-
GetBroken
()¶ This method returns flags for which attributes of the key are broken and are different for the incoming and outgoing sides of the key. If the value of the key itself is broken, the side flag indicates which side of the key controls the value exactly at the given time.
(integer breaks,integer side) = GetBroken()
-
GetSlope
()¶ float slope = GetSlope(integer side)
-
GetSlopeType
()¶ The slope type, slope and weight may likewise be read for the current key.
(integer type,integer weighted) = GetSlopeType(integer side)
-
GetTime
()¶ The time (or other independent parameter) of the key can be read with this method.
float time = GetTime()
-
GetValueF
()¶ Read the value of the key as a float or int for either side of the key. For unbroken keys this will be the same.
float value = GetValueF(integer side)
-
GetValueI
()¶ integer value = GetValueI(integer side)
-
GetWeight
()¶ float weight = GetWeight(integer side)
-
Last
()¶ Last()
-
Next
()¶ Next()
-
Previous
()¶ Previous()
-
SetSlope
(side)¶ SetSlope(float slope,integer side)
-
SetSlopeType
(side)¶ SetSlopeType(integer type,integer side)
-
SetTime
()¶ This alters the time (or independent parameter) of the key, potentially changing its relative position in the sequence of keys.
SetTime(float time)
-
SetValueF
(side)¶ These methods allow the various parameters of the keyframe to be set. Breaking and unbreaking are controlled implicitly with the ‘side’ parameter. Setting the side to IN or OUT will break the parameter and only affect the specified side. Setting the side to BOTH will unbreak the parameter. The last side set when breaking the value will be the controlling side for the key.
SetValueF(float value,integer side)
-
SetValueI
(side)¶ SetValueI(integer value,integer side)
-
SetWeight
(reset, side)¶ This will set the weight for the key unless ‘reset’ is true, in which case the weight will be set back to automatic.
SetWeight(float weight,integer reset,integer side)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LayerScan¶
-
class
lxu.object.
LayerScan
¶ Empty LayerScan Python user class.
-
Apply
()¶ Called at the end of an edit operation,
Apply()
-
Count
()¶ Get the number of layers in the scan.
integer count = Count()
-
GetState
()¶ Query the state of a given layer. The state is a combination of the ACTIVE, BACKGROUND or PRIMARY layer scan flags.
integer state = GetState(integer index)
-
MeshAction
()¶ ChannelRead object = MeshAction(integer index)
-
MeshBase
()¶ Clients can access the mesh in one of three forms. The “base” mesh is the mesh as stored in the scene. The “instance” mesh is the same mesh but deformed by the currently selected modeling morph. The “edit” mesh is the same mesh again, but allowing modifications. This version is only available if the WRITEMESH flag was set.
Mesh object = MeshBase(integer index)
-
MeshEdit
()¶ Mesh object = MeshEdit(integer index)
-
MeshInstance
()¶ Mesh object = MeshInstance(integer index)
-
MeshItem
()¶ Each layer is associated with a mesh item. The client can also get the action for the item to read channel values.
Item object = MeshItem(integer index)
-
MeshTransform
()¶ Clients can access the mesh item transforms using this function. It returns a Matrix4 representing the world transform of the mesh item.
matrix matrix = MeshTransform(integer index)
-
SetMeshChange
(edits)¶ The layer scan client is responsible for indicating what types of changes they are making to a mesh. The mesh change bit mask should be set for all edited meshes before changes are applied.
SetMeshChange(integer index,integer edits)
-
Update
()¶ Called at intermediate points of an edit operation,
Update()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LayeredImage¶
-
class
lxu.object.
LayeredImage
¶ Empty LayeredImage Python user class.
-
Blend
()¶ (float opacity,integer mode) = Blend(integer index)
-
ChannelName
(channelIndex)¶ string name = ChannelName(integer layerIndex,integer channelIndex)
-
Count
()¶ Adding a standard format() method here would allow this object to masquerade as an
integer = Count()
-
Image
()¶ Image object = Image(integer index)
-
IsGroup
()¶ integer isGroup = IsGroup(integer layerIndex)
-
Name
()¶ string name = Name(integer index)
-
Offset
()¶ (integer x,integer y) = Offset(integer index)
-
Parent
()¶ integer parentIndex = Parent(integer layerIndex)
-
Size
()¶ In many cases it is useful to add channels to images beyond the basic R, G, B, and A. In other cases, it is useful to preserve multiple sub-images in a composition. These requirements can be met with a layered image object, consisting of a list of named, independent sub-images, each with their own dimensions, offset, and pixel type. Interlayer blending information is also associated with each layer, Photoshop style.
(integer w,integer h) = Size()
-
Type
()¶ (integer flags,string type) = Type(integer index)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LayeredImageWrite¶
-
class
lxu.object.
LayeredImageWrite
¶ Empty LayeredImageWrite Python user class.
-
AddAttribute
(type)¶ integer index = AddAttribute(string name,string type)
-
AddLayer
(name)¶ Layered image objects will provide an
string channelNames = AddLayer(object image,string name)
-
SetBlending
(blend, mode)¶ SetBlending(integer index,float blend,string mode)
-
SetOffset
(x, y)¶ SetOffset(integer index,integer x,integer y)
-
SetType
(flags, type)¶ SetType(integer index,integer flags,string type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Lighting¶
-
class
lxu.object.
Lighting
¶ Empty Lighting Python user class.
-
EnvironmentEvaluate
(samples, flags)¶ vector lum = EnvironmentEvaluate(object vector,integer samples,integer flags)
-
GIRequired
()¶ integer = GIRequired(object vector)
-
LightSourceCount
()¶ The lighting object can be used to evaluate the light samples reaching the surface from the various light sources in the scene. It can also be used to evaluate the environment for global illumination. The lighting object is a packet object that can be accessed from the sample vector.
integer num = LightSourceCount(object vector)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LineExecution¶
-
class
lxu.object.
LineExecution
¶ Empty LineExecution Python user class.
-
CookedLine
()¶ All of these methods are optional and hold the results of ececuting the interpreted line.
CookedLine(string text)
-
Info
()¶ Info(string text)
-
Message
()¶ Message(object message)
-
ResultHints
()¶ ResultHints(hints hints)
-
Results
()¶ Results(object valArray)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LineInterpreter¶
-
class
lxu.object.
LineInterpreter
¶ Empty LineInterpreter Python user class.
-
Execute
(execFlags, execution)¶ Execute a line. The flags are used for executing commands, and the execution object receives the results. Errors can be returned as the return value or through the message object, although return values take precedence. The special value LINEISCOMMENT can also be returned.
Execute(string line,integer execFlags,object execution)
-
Flags
()¶ integer = Flags()
-
Prompt
()¶ string prompt = Prompt(integer type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LinkPacketTranslation¶
-
class
lxu.object.
LinkPacketTranslation
¶ Empty LinkPacketTranslation Python user class.
-
From
()¶ (integer channel,Item object) = From(pointer packet)
-
Packet
(fromChannel, toItem, toChannel)¶ pointer = Packet(object fromItem,integer fromChannel,object toItem,integer toChannel)
-
To
()¶ (integer channel,Item object) = To(pointer packet)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ListenerPort¶
-
class
lxu.object.
ListenerPort
¶ Empty ListenerPort Python user class.
-
AddListener
()¶ Many nexus objects may also support listener ports. By querying for a port interface on an item or scene and adding to that, the listener client will receive events for changes only on that specific object.
AddListener(object object)
-
RemoveListener
()¶ RemoveListener(object object)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Loader¶
-
class
lxu.object.
Loader
¶ Empty Loader Python user class.
-
Cleanup
()¶ After any attempt at recognition
Cleanup()
-
LoadInstance
(monitor)¶ The loader can also set other data by querying for additional interfaces based on object type. This is useful when doing a direct load to specify the attributes of the object to contain the data. For instance to do a direct load of an image the loader would query for ImageLoaderTarget and use its methods to set the pixel format and size of the destination image. The LoadInfo object can also be queried for a monitor. After recognition, the
Unknown object = LoadInstance(object loadInfo,object monitor)
-
LoadObject
(monitor, dest)¶ LoadObject(object loadInfo,object monitor,object dest)
-
Recognize
(loadInfo)¶ An
Recognize(string filename,object loadInfo)
-
SpawnOptions
()¶ This method creates an option object for this loader. This should have a StreamIO interface to allow it to be saved and loaded.
Unknown object = SpawnOptions()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LoaderInfo¶
-
class
lxu.object.
LoaderInfo
¶ Empty LoaderInfo Python user class.
-
SetClass
()¶ During recognition the loader can set information about a file that it’s capable of loading. All of this is optional. The class is the object type for loaders that can load more than one type. Flags can suggest opaque versus direct load and if the format has options. The format can be set if a different saver should be used for this object type.
SetClass(string clsGUID)
-
SetFlags
()¶ SetFlags(integer flags)
-
SetFormat
()¶ SetFormat(string format)
-
TestClass
()¶ The LoaderInfo interface can be used to read the context of the load and to set the attributes that apply to this file. For loaders that can load more than one object type,
integer priority = TestClass(string clsGUID)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Locator¶
-
class
lxu.object.
Locator
¶ Empty Locator Python user class.
-
AddPostTransformItem
(type, value)¶ This is like the above, but it inserts the transform AFTER the standard transforms.
(Item object,integer index) = AddPostTransformItem(object chanWrite,integer type,vector value)
-
AddPreTransformItem
(type, value)¶ This method creates a new transform of the requested type and inserts into the transform chain before the standard transform. It returns the new object, optionally the first value channel of the xfrm as well. If ‘value’ is not NULL, it sets the value of one of the transforms. The chanWrite object can be an object presenting an
(Item object,integer index) = AddPreTransformItem(object chanWrite,integer type,vector value)
-
AddTransformItem
()¶ This method adds a given transform or returns the existing one. It can optionally return the index of the first value channel of the xfrm as well.
(Item object,integer index) = AddTransformItem(integer type)
-
AppendTransformItem
(type, value)¶ Inserts the transform AFTER the very last transform.
(Item object,integer index) = AppendTransformItem(object chanWrite,integer type,vector value)
-
ExtractLocalPosition
()¶ Items may have several position transforms (zeroed, pivot etc) making it difficult to set a local position directly. This function takes the desired local position values for an item and updates them to the values that need to be set on the standard position transform item to give the desired position after taking all other transforms into account.
vector pos = ExtractLocalPosition(object chanRead)
-
ExtractLocalRotation
()¶ As above above but for the local rotation matrix.
matrix m3 = ExtractLocalRotation(object chanRead)
-
GetTransformItem
()¶ This method returns the transform item of the given type for the locator item. If no item exists this method returns LXe_NOTFOUND. Otherwise the item is returned.
Item object = GetTransformItem(integer type)
-
LocalTransform
()¶ This gets the evaluated local transform (position offset and 3x3 matrix - relative to its parent) for a given item at a given time.
(matrix xfrm,vector pos) = LocalTransform(object chanRead)
-
LocalTransform4
()¶ This is similar to LocalTransform, except the evaluated local transform is returned in a full 4x4 matrix.
matrix xfrm4 = LocalTransform4(object chanRead)
-
PrependTransformItem
(type, value)¶ Inserts the transform BEFORE the very first transform.
(Item object,integer index) = PrependTransformItem(object chanWrite,integer type,vector value)
-
SetPosition
(chanWrite, pos, type, comp)¶ SetPosition(object chanRead,object chanWrite,vector pos,integer type,integer comp)
-
SetRotation
(chanWrite, m3, type, comp)¶ SetRotation(object chanRead,object chanWrite,matrix m3,integer type,integer comp)
-
SetScale
(chanWrite, m4, type, comp)¶ SetScale(object chanRead,object chanWrite,matrix m4,integer type,integer comp)
-
SetTarget
()¶ Item object = SetTarget(object target)
-
SetTransformVector
(type, value)¶ This method sets the value of one of the transforms for the given locator item. The chanWrite object can be an object presenting an
SetTransformVector(object chanWrite,integer type,vector value)
-
Visible
()¶ Locator-type item visibility is controlled both locally and by parent items. If an item evaluates as visible, the return value is LXe_TRUE, otherwise the return value is LXe_FALSE.
boolean = Visible(object chanRead)
-
WorldInvertTransform
()¶ This gets the invert transformation matrix and offset
(matrix xfrm,vector pos) = WorldInvertTransform(object chanRead)
-
WorldTransform
()¶ Locator-type items have support methods for getting and setting their transforms. This gets the evaluated world transform (position offset and 3x3 matrix) for a given item at a given time.
(matrix xfrm,vector pos) = WorldTransform(object chanRead)
-
WorldTransform4
()¶ This is similar to WorldTransform, except the evaluated world transform is returned in a full 4x4 matrix.
matrix xfrm4 = WorldTransform4(object chanRead)
-
ZeroTransform
(chanWrite, type)¶ ZeroTransform(object chanRead,object chanWrite,integer type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LocatorDest¶
-
class
lxu.object.
LocatorDest
¶ -
Item
()¶ The locator item that was dropped on can be obtained with this function. Note that the item may be NULL if the drop was performed on a non-locator item or not on an item.
Item object = Item()
-
Location
()¶ integer = Location()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Log¶
-
class
lxu.object.
Log
¶ Empty Log Python user class.
-
AddEntry
()¶ This adds an entry to a subsystem. Old entries will be dropped if needed. This does an AddRef() on the object, meaning you’ll still need to do your own release on it after it has been added.
AddEntry(object entry)
-
ClearAll
()¶ This clears all entries from the subsystem. If called on the master subsystem, all subsystems are cleared.
ClearAll()
-
EntryByIndex
()¶ LogEntry object = EntryByIndex(integer index)
-
EntryCount
()¶ Logged events specific to a particular subsystem can be scanned with these methods.
integer count = EntryCount()
-
GetCurrentEntry
()¶ The most recently added entry can be fetched with this function. This may be NULL if there is no recent entry.
LogEntry object = GetCurrentEntry()
-
GetMaxEntries
()¶ integer max = GetMaxEntries()
-
GetRolling
()¶ The current rolling message can also be read. This returns LXe_NOTFOUND if there is currently no rolling entry.
LogEntry object = GetRolling()
-
Name
()¶ The name of a subsystem can be returned at any time.
string name = Name()
-
PeekEntryByIndex
()¶ If you don’t want to or can’t release an entry, you can “peek” at the entry with this method. These entries should be considered volatile and should not be held onto for very long unless you AddRef them yourself.
object = PeekEntryByIndex(integer index)
-
RollClear
()¶ The rolling message can also be cleared when it is no longer needed.
RollClear()
-
RollEntry
()¶ It is also possible to create rolling messages. For example, it is not useful to log all of the Box Tool Info messages as described above; you really only want to see the current state of the Box Info Tool at any given time. A rolling message can be used to accomplish this. Another example is a context-sensitive status bar that provides specific information based on what the mouse is hovering over. This changes the rolling message. A separate rolling message is stored for each subsystem, with the one most recently changed being used as the master message.
RollEntry(object entry)
-
SetMaxEntries
()¶ The maximum number of entries that a particular subsystem can store can be set and read with these functions.
SetMaxEntries(integer max)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LogEntry¶
-
class
lxu.object.
LogEntry
¶ Empty LogEntry Python user class.
-
AddEntry
()¶ Log entries can have child entries. A common child event is simply another message that provides more detail for the first, such as why an event failed. Normally the root event is a warning or error, with one or more child messages describing exactly why this occured. Info messages may also have children, providing more details on what might be an otherwise simple statement. Note that this only applies to simple messages, and not to complex data such as info blocks and name/value pairs. This does an AddRef() on the object, meaning you’ll still need to do your own release on it after it has been added. A log entry can have multiple parents, and will thus appear as a child of each parent. Care should be taken to avoid loops.
AddEntry(object entry)
-
AddPair
(value)¶ AddPair(string name,string value)
-
ChildByIndex
()¶ LogEntry object = ChildByIndex(integer index)
-
ChildCount
()¶ The list of child entries for MESSAGE class entries can be enumerated with these methods.
integer count = ChildCount()
-
Class
()¶ integer classType = Class()
-
Desc
()¶ string desc = Desc()
-
InfoBlock
()¶ This returns the info block definition.
LogInfoBlock object = InfoBlock()
-
InfoBlockValue
(index)¶ The ILxValueID for a particular field in the block can be extracted with this method. The value should be freed by the client when no longer needed. The field can be referenced by index or by name.
Unknown object = InfoBlockValue(string name,integer index)
-
Message
()¶ The message stored in a MESSAGE-type log entry can be read out with this function. This fails if used on a non-MESSAGE type.
string message = Message()
-
PairCount
()¶ These mehtods return the number of pairs, and the name and value strings by index.
integer count = PairCount()
-
PairName
()¶ string name = PairName(integer index)
-
PairValue
()¶ string value = PairValue(integer index)
-
PeekChildByIndex
()¶ A peek method is also available.
object = PeekChildByIndex(integer index)
-
SetDesc
()¶ This sets a description, which here is the three lines of text at the bottom of the block.
SetDesc(string desc)
-
SetTitle
()¶ This sets a title that can appear at the top of the block, which in this case is “Box (Squared)”.
SetTitle(string title)
-
SetValue
(index, value)¶ This sets the value of one of the fields in the info block. The specific field can be specified by either it’s name or it’s index, if the name is NULL. A matching ILxValueID must be provided for the field.
SetValue(string name,integer index,object value)
-
SubSystemByIndex
()¶ Unknown object = SubSystemByIndex(integer index)
-
SubSystemCount
()¶ Each root-level entry knows what subsystems it has been added to.
integer count = SubSystemCount()
-
TimeString
()¶ string string = TimeString()
-
Title
()¶ The title and description stored in a block-type log entry can be read out with these functions. These fail if used on a MESSAGE entry.
string title = Title()
-
Type
()¶ The type can be returned as an LxResult code.
integer type = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LogInfoBlock¶
-
class
lxu.object.
LogInfoBlock
¶ Empty LogInfoBlock Python user class.
-
FieldCount
()¶ This walks the list of fields, returning the total count and the name and datatype of each field. Note that
integer count = FieldCount()
-
FieldName
()¶ string name = FieldName(integer index)
-
FieldType
()¶ string type = FieldType(integer index)
-
Name
()¶ These return the name of the block.
string name = Name()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
LogListener¶
-
class
lxu.object.
LogListener
¶ Empty LogListener Python user class.
-
ChildEntryAdded
(parentEntry)¶ Called when a new entry was added as a child of anohter log entry. This is only sent for root entries.
ChildEntryAdded(object entry,object parentEntry)
-
EntryAdded
(entry)¶ Called when a new log entry is added to a subsystem. Note that a single log entry many belong to multiple subsystems.
EntryAdded(object system,object entry)
-
EntryDropped
(entry)¶ Called when an entry has been dropped from the log, usually because the number of entries exceeds te maximum number allowed, and thus the oldest entry is removed.
EntryDropped(object system,object entry)
-
RollingChildEntryAdded
(parentEntry)¶ RollingChildEntryAdded(object entry,object parentEntry)
-
RollingEntryAdded
(entry)¶ Rolling log entries are much the same as normal logged entries. Since rolling logs only contain a single entry,
RollingEntryAdded(object system,object entry)
-
RollingEntryDropped
(entry)¶ RollingEntryDropped(object system,object entry)
-
SystemAdded
()¶ This is called when a new log subsystem (ILxLogID) has been added to the application.
SystemAdded(object system)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Matrix¶
-
class
lxu.object.
Matrix
¶ Empty Matrix Python user class.
-
Get3
()¶ Matrices are one of the more common complex types, so we provide an interface (polymorphic with ILxValue-type objects) to access them more directly. These functions allow 3x3 and 4x4 transformation matrices to be read.
matrix mat3 = Get3()
-
Get4
()¶ matrix mat4 = Get4()
-
GetOffset
()¶ vector offset = GetOffset()
-
Invert
()¶ Invert()
-
Multiply3
()¶ Multiply3(matrix mat3)
-
Multiply4
()¶ Multiply4(matrix mat4)
-
MultiplyVector
()¶ As a convenience, this method composes a vector with the matrix.
vector result = MultiplyVector(vector vector)
-
Set3
()¶ Writable matrices have some operations to change them. First directly:
Set3(matrix mat3)
-
Set4
()¶ Set4(matrix mat4)
-
SetIdentity
()¶ Then indirectly:
SetIdentity()
-
SetOffset
()¶ SetOffset(vector offset)
-
Transpose
()¶ Transpose()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MergedDirCacheEntry¶
-
class
lxu.object.
MergedDirCacheEntry
¶ -
EntryByIndex
()¶ DirCacheEntry object = EntryByIndex(integer index)
-
EntryCount
()¶ Get the list of entries that were merged to create this entry. These will only have the
integer count = EntryCount()
-
Parent
()¶ This returns the parent directory as a merged object.
DirCacheEntry object = Parent()
-
Path
()¶ Get the path of this entry in the merged hierarchy, which means it starts with “#basePathIdent(setName):”. For directories, this is the same as their actual path, since merged directories are their own construct. For files, this will be different from the path returned by
string = Path()
-
UserPath
()¶ For directories, this returns the user path, which is where new files are writen to. For files, this is the location the file would exist if it were in the user path (and will be if it actually does exist there).
string = UserPath()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MergedFileSysDest¶
-
class
lxu.object.
MergedFileSysDest
¶ Empty MergedFileSysDest Python user class.
-
EntryByIndex
()¶ Unknown object = EntryByIndex(integer index)
-
EntryCount
()¶ The rest of these methods are just convenience methods that pass through to the object returned by
integer count = EntryCount()
-
MergedEntry
()¶ This returns the entry represented by the merged path. This can be queried for the
Unknown object = MergedEntry()
-
Path
()¶ This returns the merged version of the path (ie: “#basePathIdent(setName):path”).
string = Path()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Mesh¶
-
class
lxu.object.
Mesh
¶ Empty Mesh Python user class.
-
BeginEditBatch
()¶ If multiple operations need to be batched together, this function will start and end a mesh edit batch on the specified mesh.
BeginEditBatch()
-
BoundingBox
()¶ This method returns the bounding box of the mesh.
bounds bbox = BoundingBox(integer pick)
-
ChangeEvent
()¶ ChangeEvent(integer event)
-
Clear
()¶ This removes all data in the current mesh.
Clear()
-
EdgeAccessor
()¶ Edge object = EdgeAccessor()
-
EdgeCount
()¶ integer count = EdgeCount()
-
EndEditBatch
()¶ EndEditBatch()
-
MapCount
()¶ integer count = MapCount()
-
MaxPointPolygons
()¶ This method returns the maximum number of polygons shared by any point in the mesh.
integer count = MaxPointPolygons(integer pick)
-
MaxPolygonSize
()¶ This method returns the maximum size of any polygon marked in the mesh.
integer count = MaxPolygonSize(integer pick)
-
Merge
(flags)¶ Merge(object other,integer flags)
-
MergeWithTransform
(xfrm, flags)¶ This merges the provided mesh with the current mesh, copying all the data from other. The flags argument controls which elements are copied from the source mesh to the target mesh. A matrix can also be provided to apply as transform to all merged elements.
MergeWithTransform(object other,matrix xfrm,integer flags)
-
MeshMapAccessor
()¶ MeshMap object = MeshMapAccessor()
-
PSUBDispLayerCurrent
()¶ This method returns the current selected multi-resolution layer. index.
integer index = PSUBDispLayerCurrent()
-
PSUBDispLayerEnable
()¶ This method returns the enable state of multi-resolution layer for given layer index.
integer enable = PSUBDispLayerEnable(integer index)
-
PSUBDispLayerLookupByName
()¶ This method look up multi-resolution layer by layer name and set the index and retruns OK if it is found.
integer index = PSUBDispLayerLookupByName(string name)
-
PSUBDispLayerName
()¶ This method returns name of multi-resolution layer for given layer index.
string = PSUBDispLayerName(integer index)
-
PSUBDispLayerOpacity
()¶ This method returns the opacity of multi-resolution layer for given layer index.
float opacity = PSUBDispLayerOpacity(integer index)
-
PSUBDispLayerSetOpacity
(opacity)¶ This method set the opacity of multi-resolution layer for given layer index. This is not undoable action.
PSUBDispLayerSetOpacity(integer index,float opacity)
-
PSUBDispNumLayer
()¶ Multi-Resolution layers are new displacement data for 901. Displpacement vectors in layers are composited based on the opacity ratio. This method returns number of multi-resolution layer.
integer num = PSUBDispNumLayer()
-
PSUBGetBoundRule
()¶ integer bound = PSUBGetBoundRule()
-
PSUBGetCurrentLevel
()¶ Set and get PSUB subdivision level for the mesh.
integer n = PSUBGetCurrentLevel()
-
PSUBGetLevel
()¶ Set and get PSUB subdivision level for the mesh.
integer n = PSUBGetLevel()
-
PSUBSetBoundRule
()¶ PSUBSetBoundRule(integer bound)
-
PSUBSetCurrentLevel
()¶ PSUBSetCurrentLevel(integer n)
-
PSUBSetLevel
()¶ PSUBSetLevel(integer n)
-
PSUBSetSubdivObj
()¶ PSUBSetSubdivObj(object subObj)
-
PTagByIndex
(index)¶ string tag = PTagByIndex(integer type,integer index)
-
PTagCount
()¶ These methods separate contents of a PICK ptag into component selection sets, presenting a list of the distinct selection sets, rather than the large and redundant list of all distinct PICK poly tag values.
integer = PTagCount(integer type)
-
PointAccessor
()¶ Most data about a mesh is obtained through the accessors. These methods return new accessors, which must be released by the client when no longer needed. Multiple accessors can exist at the same time for the same mesh without conflicting. Accessors can be used to walk the list of elements in a mesh or to obtain specific information about a particular element. These methods create and return the various accessors. Each one is unique to the caller can so can be used in parallel with others obtained from these methods.
Point object = PointAccessor()
-
PointCount
()¶ These methods return the number of elements of their type in the mesh.
integer count = PointCount()
-
PolyTagSetDefault
(tag)¶ Sets the the value of the specified tag that will be applied to any newly created polys.
PolyTagSetDefault(integer type,string tag)
-
PolygonAccessor
()¶ Polygon object = PolygonAccessor()
-
PolygonCount
()¶ integer count = PolygonCount()
-
SUBDGetLevel
()¶ Polygon types can have overall settings that affect all the polygons of that type in the mesh. Set and get SUBD subdivision level for the mesh.
integer n = SUBDGetLevel()
-
SUBDGetLinearUV
()¶ Set and get SUBD UV interpolation flag.
integer isLinear = SUBDGetLinearUV()
-
SUBDSetLevel
()¶ SUBDSetLevel(integer n)
-
SUBDSetLinearUV
()¶ SUBDSetLinearUV(integer isLinear)
-
SetMeshEdits
()¶ If a mesh is accessed for write, any edits made have to be signalled back to the mesh.
SetMeshEdits(integer edits)
-
TestSameMesh
()¶ Give a mesh interface and another mesh object, this returns true if they refer to the same actual mesh.
boolean = TestSameMesh(object other)
-
TrackChanges
()¶ Often, it can be useful to track multiple changes to a mesh within a particular time period. The TrackChanges function returns an
Unknown object = TrackChanges()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshBlend¶
-
class
lxu.object.
MeshBlend
¶ Empty MeshBlend Python user class.
-
BlendMesh
()¶ It can be useful to be able to compare the result of one mesh stack with the result of another. The MeshBlend object provides methods for finding equivalent elements on two mesh stack results, as well as a blending the topology of one mesh stack, into the positions of another. The BlendMesh method returns a new mesh that contains the source mesh stack topology, in the positions of the target mesh stack. The t argument determines how the mesh is blended, with a value of 0.0 representing the original source mesh positions, and a value of 1.0 representing the target mesh positions.
Unknown object = BlendMesh(float t)
-
EnumeratePoints
(target, visitor)¶ Points can be enumerated by providing a source point accessor, a target point accessor and a visitor. For each source point, the accessor for the source and target will be set, and the visitor will be called.
EnumeratePoints(object source,object target,object visitor)
-
EnumeratePolygons
(target, visitor)¶ Polygons can be enumerated by providing a source polygon accessor, a target polygon accessor and a visitor. For each source polygon, the accessor for the source and target will be set, and the visitor will be called.
EnumeratePolygons(object source,object target,object visitor)
-
GetPoint
()¶ Provided with a point on the source mesh, the GetPoint method will return the equivalent point on the target mesh.
id target = GetPoint(id source)
-
GetPolygon
()¶ Provided with a polygon on the source mesh, the GetPolygon method will return the equivalent polygon on the target mesh.
id target = GetPolygon(id source)
-
SetPoint
(target)¶ Equivalent points can be updated by providing a point on the source mesh, and a point on the target mesh. If the list of equivalent elements cannot be edited, NOACCESS will be returned.
SetPoint(id source,id target)
-
SetPolygon
(target)¶ Equivalent polygons can be updated by providing a polygon on the source mesh, and a polygon on the target mesh. If the list of equivalent elements cannot be edited, NOACCESS will be returned.
SetPolygon(id source,id target)
-
SourceMesh
()¶ The SourceMesh method returns the source mesh.
Unknown object = SourceMesh()
-
TargetMesh
()¶ The TargetMesh method returns the target mesh.
Unknown object = TargetMesh()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshDest¶
-
class
lxu.object.
MeshDest
¶ -
HitNormal
()¶ The surface normal of the hit location in world space can be obtained with this function.
vector nrm = HitNormal()
-
HitPosition
()¶ The world position of the hit location can be obtained with this function.
vector pos = HitPosition()
-
Item
()¶ The mesh item that was dropped on can be obtained with this function.
Item object = Item()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshElementGroup¶
-
class
lxu.object.
MeshElementGroup
¶ Empty Mesh Element Group Python user class.
-
GroupCount
()¶ This method is expected to return the number of element groups.
integer count = GroupCount()
-
GroupName
()¶ This method should return the name of an element group by index.
string name = GroupName(integer index)
-
GroupUserName
()¶ This method should return the username of an element group by index. Ideally, this would be a translatable entry in a message table.
string username = GroupUserName(integer index)
-
TestEdge
(edge)¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given edge exists in the group. The group to test is given by index.
boolean = TestEdge(integer index,id edge)
-
TestPoint
(point)¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given point exists in the group. The group to test is given by index.
boolean = TestPoint(integer index,id point)
-
TestPolygon
(polygon)¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given polygon exists in the group. The group to test is given by index.
boolean = TestPolygon(integer index,id polygon)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshFilter¶
-
class
lxu.object.
MeshFilter
¶ Empty MeshFilter Python user class.
-
Evaluate
(tracker)¶ If the type of filter is MODIFY, then the
Evaluate(object mesh,object tracker)
-
Generate
()¶ For GENERATE and SOURCE type filters the
Mesh object = Generate()
-
Type
()¶ Mesh filters are added to evaluation stacks in order to perform mesh operations during evaluation. They can also be read during evaluation to get deforming meshes. The
integer = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshFilterBlend¶
-
class
lxu.object.
MeshFilterBlend
¶ Empty MeshFilterBlend Python user class.
-
Evaluate
(blend)¶ The Evaluate method is provided with a second mesh filter storing alternate state for the mesh filter, as well as an
Evaluate(object other,object blend)
-
Generate
()¶ The MeshFilterBlend interface allows the result of one mesh filter to be blended with another. The Generate method is provided with a second mesh filter storing alternate state for the mesh filter. The function is expected to return an
MeshBlend object = Generate(object other)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshInfluence¶
-
class
lxu.object.
MeshInfluence
¶ Empty MeshInfluence Python user class.
-
MeshByIndex
()¶ Item object = MeshByIndex(integer index)
-
MeshChange
(change)¶ MeshChange(integer index,integer change)
-
MeshCount
()¶ A mesh influence is a specific sub-type of deform influence that operates on points in meshes. The partition of the mesh influence is different meshes. The mesh influence interface can be found in two contexts. The first is by reading the influence channel of an item that affects meshes. In that case it will be polymorphic with the deform influence interface, and each mesh in the list is a partition in the deform. The mesh influence interface may also be found on items. If it is then that item affects direct control over a set of meshes. An item without a mesh influence interface that nonetheless generates a mesh influence object on its influence channel is an “any mesh” influence. It will be automatically wrapped as a deform influence acting on linked meshes. Meshes are given by a count and indices.
integer = MeshCount()
-
PartitionIndex
()¶ This returns the partition index for the given mesh index, since they may not match exactly.
integer = PartitionIndex(integer index)
-
SetMesh
(mesh, item)¶ Before reading out values, the client sets the actual mesh and transform based on the index of the mesh item. Once set these don’t change unless the mesh or transform are changed.
SetMesh(integer index,object mesh,object item)
-
SetTransform
()¶ matrix xfrm = SetTransform(integer index)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshLayerPreDest¶
-
class
lxu.object.
MeshLayerPreDest
¶ Empty MeshLayerPreDest Python user class.
-
Mesh
()¶ The mesh layer preset needs an existing mesh to load into (what else?). This method returns the destination mesh. It may be a current user mesh, or it may be a newly created ‘template’ mesh which will then be used like a BG layer for cloning, booleans, etc.
Mesh object = Mesh()
-
ShaderDest
()¶ To facilitate the loading of a mesh layer’s various shader tree components, we will simply demand a shader tree destination object.
ShaderPreDest object = ShaderDest()
-
Transform
()¶ For false convenience, and to adhere to the fascination with bloated, lossy homogeneous matrices for passing transformations around, the desired transformation of the mesh elements as they are placed in the mesh is returned in an LXtMatrix4 by this function. If this function returns not implemented, no transformation is applied.
matrix xform = Transform()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshMap¶
-
class
lxu.object.
MeshMap
¶ Empty MeshMap Python user class.
-
Clear
()¶ Clear()
-
Dimension
()¶ This method returns the dimension of the current map.
integer dimension = Dimension()
-
Enumerate
(visitor, monitor)¶ Enumerate(integer mode,object visitor,object monitor)
-
EnumerateContinuous
(point)¶ It’s possible for the client to enumerate just the elements that are members of the map. This function enumerates continuous values, calling the visitor with the point accessor set to each point.
EnumerateContinuous(object visitor,object point)
-
EnumerateDiscontinuous
(point, poly)¶ Discontinuous values are the same but require a point and a polygon.
EnumerateDiscontinuous(object visitor,object point,object poly)
-
EnumerateEdges
(edge)¶ Likewise edge map can also be enumerated with an associated edge accessor.
EnumerateEdges(object visitor,object edge)
-
EnumerateUVSeamEdges
(edge, poly)¶ Enumerates UV seam edges.
EnumerateUVSeamEdges(object visitor,object edge,object poly)
-
FilterByType
()¶ Maps can also be filtered by type which affects their enumeration. Passing a type of zero clears the filter.
FilterByType(integer type)
-
ID
()¶ This method returns the ID of the current map.
id = ID()
-
IsContinuous
()¶ This returns LXe_TRUE if it is a continuous (vs. a discontinuous) map.
boolean = IsContinuous()
-
IsEdgeMap
()¶ This returns LXe_TRUE if this is an edge map.
boolean = IsEdgeMap()
-
Name
()¶ These return the map’s name and type.
string name = Name()
-
New
(name)¶ id mapID = New(integer type,string name)
-
Remove
()¶ Remove()
-
Select
()¶ This method sets the accessor to the given point map.
Select(id map)
-
SelectByName
(name)¶ This can be used to select a map by type and name.
SelectByName(integer type,string name)
-
SetName
()¶ This sets the map’s name
SetName(string name)
-
Spawn
()¶ As mentioned previously, all accessors share common interface methods for walking their respective lists.
MeshMap object = Spawn()
-
Type
()¶ integer type = Type()
-
UVBoundingBox
()¶ This method returns the bounding box for the MeshMapAccessor’s current VMap.
bounds bbox = UVBoundingBox()
-
UVSeamOppositeEdge
(originalPoly)¶ Returns with the opposite edge. Call only from the Evaluate of a the
(id opppositePoly,integer isReverse) = UVSeamOppositeEdge(id originalEdge,id originalPoly)
-
ZeroDefault
()¶ This returns LXe_TRUE if the default value of elements not in the map should be zero.
boolean = ZeroDefault()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshOperation¶
-
class
lxu.object.
MeshOperation
¶ Empty Mesh Operation Python user class.
-
Blend
(blend)¶ The Blend function is used to map elements generated by one mesh operation to elements generated by another. A second mesh operation is provided with alternate settings, along with an
Blend(object other,object blend)
-
Clone
()¶ The Clone function is expected to return a clone of this mesh operation and it’s internal state. A target item is provided to use as a key, allowing the mesh operation to return an existing cloned mesh operation, if one has already been created for this target item.
Unknown object = Clone(object target)
-
Compare
()¶ integer = Compare(object other)
-
Convert
()¶ If the previous mesh operation is compatible, then Convert will be called to transfer variables and user data from the old mesh operation to the new mesh operation. The function will be passed the old operation and any variables should be transferred.
Convert(object other)
-
Evaluate
(type, mode)¶ The Evaluate function is used to perform the main evaluation. It is given an editable mesh, which should be edited in place, to perform the modeling operation. A selection mark mode and selection type is provided, to limit the operation to a particular subset of components.
Evaluate(object mesh,integer type,integer mode)
-
ReEvaluate
(type)¶ The ReEvaluate function is called to perform a fast update to a previous mesh. The mesh from the previous evaluation result is passed to the function, and the mesh operation is expected to simply update the mesh in place.
ReEvaluate(object mesh,integer type)
-
SetTransform
()¶ The SetTransform function is used to provide the Mesh Operation with a transform matrix to use for evaluation.
SetTransform(matrix matrix)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshTracker¶
-
class
lxu.object.
MeshTracker
¶ Empty MeshTracker Python user class.
-
Active
()¶ This returns if the mesh tracker is active or not. The function will return either LXe_TRUE or LXe_FALSE.
Active()
-
AddPoint
(change)¶ The AddPoint function is used to store a point that has been edited. An edit flag allows the type of change to be recorded. The flag should be one of the LXf_ELTEDIT flags.
AddPoint(id point,integer change)
-
AddPolygon
(change)¶ The AddPolygon function is used to store a polygon that has been edited. An edit flag allows the type of change to be recorded. The flag should be one of the LXf_ELTEDIT flags.
AddPolygon(id poly,integer change)
-
Changes
()¶ This function returns a flag describing the edits that have been performed on the mesh. The flag will be a combination of the LXf_MESHEDIT flags.
integer edit = Changes()
-
EnumeratePoints
(visitor, point)¶ This function allows the modified points on the mesh to be enumerated. A change flag argument will be used as a mask for enumeration, for example if the LXf_ELTEDIT_POINT_POS flag is provided, only points that have had their position modified will be enumerated. A change flag of 0 will enumerate all points.
EnumeratePoints(integer change,object visitor,object point)
-
EnumeratePolygons
(visitor, poly)¶ This function allows the modified polygons on the mesh to be enumerated. A change flag argument will be used as a mask for enumeration, for example if the LXf_ELTEDIT_POLTAGS flag is provided, only polygons that have had their tags modified will be enumerated. A change flag of 0 will enumerate all polygons.
EnumeratePolygons(integer change,object visitor,object poly)
-
Filter
()¶ The filter state can also be queried.
integer filter = Filter()
-
Mesh
()¶ Returns the
Unknown object = Mesh()
-
Reset
()¶ After the changes have been queried and enumerated by the client, the list of changes should be cleared. The Reset function will clear the list of changes, ready to start tracking new change events.
Reset()
-
SetChange
()¶ The SetChange function is used to describe the overall change performed by the filter. It should be one of the LXf_MESHEDIT flags.
SetChange(integer change)
-
SetFilter
()¶ Clients can provide a combination of change flags to filter the tracker to tracker matching change types. For example, if the client only cares about position changes, they can specify LXf_ELTEDIT_POINT_POS. Other kinds of changes may be tracked, but this can provide a performance improvement if clients are going to ignore certain change types. By default, all types of changes will be tracked.
SetFilter(integer filter)
-
Start
()¶ Often, it can be useful to track multiple changes to a mesh within a particular time period. The MeshTracker interface will record a series of mesh changes, and maintain a list of modified points and polygons. The list of changes can be queried, enumerated and cleared at any point. This provides a efficient way to be kept informed of multiple changes, without reacting to every mesh change event. The Start function starts tracking mesh changes. If this tracker is already running, this function does nothing. The tracker can be started and stopped multiple times, however, it will only record changes when it’s active.
Start()
-
Stop
()¶ The Stop function stops tracking mesh changes. If this tracker is already stopped, this function does nothing. The tracker can be started and stopped multiple times, however, it will only record changes when it’s active.
Stop()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
MeshXtraData¶
-
class
lxu.object.
MeshXtraData
¶ Empty MeshXtraData Python user class.
-
ClearPoint
()¶ If the data associated with a point is no longer needed, the ClearPoint function will remove it. The
ClearPoint(id point)
-
ClearPolygon
()¶ If the data associated with a polygon is no longer needed, the ClearPolygon function will remove it. The
ClearPolygon(id poly)
-
GetPointObject
()¶ Unknown object = GetPointObject(id point)
-
GetPolygonObject
()¶ Unknown object = GetPolygonObject(id poly)
-
SetPointData
(data)¶ This method sets the xtra data for a point to some arbitrary data. It must be free’d by the
SetPointData(id point,pointer data)
-
SetPointObject
(obj)¶ Points can also have reference counted COM objects associated with them. This object is automatically released when no longer needed.
SetPointObject(id point,object obj)
-
SetPolygonData
(data)¶ This method sets the xtra data for a polygon to some arbitrary data. It must be free’d by the
SetPolygonData(id poly,pointer data)
-
SetPolygonObject
(obj)¶ Polygons can also have reference counted COM objects associated with them. This object is automatically released when no longer needed.
SetPolygonObject(id poly,object obj)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Message¶
-
class
lxu.object.
Message
¶ The Python SetArg() method passes every value as a string using repr(). We also allow ‘msg[1] = “Hello”’.
-
Code
()¶ This returns the code, which can be an error, info (success) or warning LxResult.
Code()
-
Name
()¶ string name = Name()
-
Reset
()¶ This resets a message object to LXe_OK and clears the string to NULL.
Reset()
-
SetArg
(arg, value)¶
-
SetArgumentFloat
(value)¶ SetArgumentFloat(integer arg,float value)
-
SetArgumentInt
(value)¶ Messages in message tables may have arguments marked in the form of %1, %2, etc. One of the SetArgument…() functions should be called for each to provide a meaningful dynamic value to the user. Note that these argument indices match the numbers in the message string itself; if you want to set %1, use argument index 1. Technically, you can have a %0 and use arg index 0, but that is discouraged.
SetArgumentInt(integer arg,integer value)
-
SetArgumentObject
(object)¶ SetArgumentObject(integer arg,object object)
-
SetArgumentString
(string)¶ SetArgumentString(integer arg,string string)
-
SetCode
()¶ This sets that code.
SetCode(integer code)
-
SetMessage
(name, id)¶ To set the message, the client provides a message table name and either a message name or numeric ID representing the message. If the text name is NULL, the ID is converted to text and used instead. Setting a message clears any existing message.
SetMessage(string table,string name,integer id)
-
SetMessageResult
()¶ To set the message from a result code, the client provides the numeric ID representing the message. Setting a message clears any existing message. This also sets the result code itself by treating the numeric ID as an LxResult.
SetMessageResult(integer id)
-
Table
()¶ Some clients need access to the table and message name.
string table = Table()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Modifier¶
-
class
lxu.object.
Modifier
¶ Empty Modifier Python user class.
-
Evaluate
()¶ Evaluate()
-
Free
()¶ Free(pointer cache)
-
Invalidate
(index)¶ boolean = Invalidate(object item,integer index)
-
Required
()¶ (integer attr,Item object) = Required(integer index)
-
RequiredCount
()¶ integer = RequiredCount()
-
Test
(index)¶ boolean = Test(object item,integer index)
-
Validate
(index, rc)¶ Validate(object item,integer index,integer rc)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Monitor¶
-
class
lxu.object.
Monitor
¶ Similar methods for Python.
-
Increment
()¶ This steps the monitor by the count provided. Care should be taken to keep from exceeding the total number of steps set with
Increment(integer count)
-
Init
(count)¶
-
Initialize
()¶ An
Initialize(integer count)
-
Step
()¶
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
NeedContext¶
-
class
lxu.object.
NeedContext
¶ Empty NeedContext Python user class.
-
SetContext
()¶ The “need context” interface can be defined by any module or server that wants to be informed about the application context when it’s first created. The application passed to the
SetContext(object app)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Notifier¶
-
class
lxu.object.
Notifier
¶ Empty Notifier Python user class.
-
AddClient
()¶ A client is added to a notifier through this method. The client object has to implement an interface compatible with this type of modifier.
AddClient(object object)
-
Args
()¶ string args = Args()
-
Name
()¶ Get the name of the notifier, which should always be the same as the plug-in’s name own name.
string name = Name()
-
RemoveClient
()¶ This removes a client from a notifier that has been previously added.
RemoveClient(object object)
-
SetArgs
()¶ These set and get the argument strings. The argument string allows specific events to be filtered through the notifier. For example, a tool notifier might only recognize specific tools, with the tool name provided through the argument string.
SetArgs(string args)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Package¶
-
class
lxu.object.
Package
¶ Empty Package Python user class.
-
Attach
()¶ Unknown object = Attach()
-
CollectItems
(mode)¶ CollectItems(object collection,integer mode)
-
PostLoad
()¶ PostLoad(object scene)
-
SetupChannels
()¶ Packages are defined by a server interface that describes the channels for the package and adds instances to items. The
SetupChannels(object addChan)
-
TestInterface
()¶ boolean = TestInterface(string guid)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PackageInstance¶
-
class
lxu.object.
PackageInstance
¶ -
Add
()¶ Add()
-
AfterLoad
()¶ AfterLoad()
-
Cleanup
()¶ Cleanup()
-
Doomed
()¶ Doomed()
-
DupType
()¶ integer = DupType()
-
Initialize
(super)¶ The implementation of a package (or item type) is a package instace object. These are allocated by the Attach() method of the package interface, and may optionally implement this interface to be informed of changes to the item. N5: init and cleanup are not really necessary. The arguments to init can be sent to attach, and cleanup can be done in instance destroy.
Initialize(object item,object super)
-
Loading
()¶ Loading()
-
Newborn
(flags)¶ Newborn(object original,integer flags)
-
Remove
()¶ Remove()
-
SynthName
()¶ string = SynthName()
-
TestParent
()¶ boolean = TestParent(object item)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PacketEffect¶
-
class
lxu.object.
PacketEffect
¶ Empty PacketEffect Python user class.
-
ByIndex
()¶ (string name,string typeName,integer type) = ByIndex(integer index)
-
Count
()¶ integer = Count()
-
Get
(packet, item)¶ float val = Get(integer index,pointer packet,pointer item)
-
Packet
()¶ Alternatively, this interface let’s you define all the effects for a packet, this is a faster way to define texture effects for custom materials and shaders
string packet = Packet()
-
Set
(packet, val, item)¶ Set(integer index,pointer packet,float[] val,pointer item)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PaintBrushPacket¶
-
class
lxu.object.
PaintBrushPacket
¶ Empty PaintBrushPacket Python user class.
-
BBox
(center, size)¶ (integer,bounds bbox) = BBox(object toolVector,vector center,float size)
-
Eval3D
(center, wpos, bpos, rad)¶ (float,float rgba) = Eval3D(object toolVector,vector center,vector wpos,vector bpos,float rad)
-
Flags
()¶ integer = Flags()
-
Size
()¶ float = Size()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PaintNozzlePacket¶
-
class
lxu.object.
PaintNozzlePacket
¶ Empty PaintNozzlePacket Python user class.
-
Jitter
(brushSize)¶ (integer,integer xj,integer yj) = Jitter(object toolVector,float brushSize)
-
Nozzle
()¶ (integer,float strength,float size,float rotation) = Nozzle(object toolVector)
-
Paint
(brushSize)¶ The paint nozzle is an object packet that can be used by paint tools.
integer = Paint(object toolVector,float brushSize)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ParticleCoOperator¶
-
class
lxu.object.
ParticleCoOperator
¶ Empty ParticleCoOperator Python user class.
-
Cleanup
()¶ Cleanup()
-
Initialize
()¶ A particle co-operator is an item that can be linked to a particle operator. This allows it to be part of the process for a specific operator. Init and cleanup are called at the start and end of the sim.
Initialize(object eval)
-
Particle
()¶ Particle()
-
Step
()¶ The operator is called at the start of the step with the time, and for each particle.
Step(float dT)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ParticleEvalFrame¶
-
class
lxu.object.
ParticleEvalFrame
¶ -
AddParticle
()¶ integer index = AddParticle(float[] state)
-
AliveCount
()¶ integer = AliveCount()
-
GetVector
()¶ The state vector for a particle can be read and set using these methods. For
float vector = GetVector(integer index)
-
IsAlive
()¶ This method tests if a given particle is active.
integer = IsAlive(integer index)
-
KillParticle
()¶ This changes an active particle into an inactive one. Inactive particle slots may be reused for new particles.
KillParticle(integer index)
-
MaxCount
()¶ integer = MaxCount()
-
Neighbors
(maxCount)¶ Find nearest particles to the given 3D position. The maxDist is the range to search for particles, and can be -1 for searching everywhere. The maxCount is the maximum number to return, and the index and dist arrays should be at least that long. If you are giving an existing particle position you need to ask for one more particle than you want since the particle itself will be first.
(vector pos,integer index,float dist,integer count) = Neighbors(float maxDist,integer maxCount)
-
SetVector
(vector)¶ SetVector(integer index,float[] vector)
-
VertexDescription
()¶ The particle evaluation frame object maintains the state of the particle simulation. There can be any number of particles, but all of them contain the same information in the form of a vector of floats. This method gets the description of the complete vertex vector for the simulation.
object = VertexDescription()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ParticleFilter¶
-
class
lxu.object.
ParticleFilter
¶ Empty ParticleFilter Python user class.
-
Cleanup
()¶ Cleanup()
-
Flags
()¶ A filter can have one of several types. These determine which processing method will be used for the filter. Additional flags can be set to select the stage of the process where the filter wants to run.
integer = Flags()
-
Frame
()¶ Frame(integer stage)
-
Initialize
(frame, time)¶ Initialize(object vertex,object frame,float time)
-
Particle
(vertex)¶ Particle(integer stage,float[] vertex)
-
Step
(dt)¶ Step(object other,float dt)
-
Vertex
()¶ Process layers are filters that are called in sequence to generate the simulation. The filter provides a peek at the vertex features that it wants to read or write. For all operations on the particle state, these are the only features that the filter will see. The particle frame will remap the full state into the state requested by the filter. If ‘full’ is null, then this should return the features required by this filter. If ‘full’ is non-null, then it contains the full set of features in the simulation and the filter can return a second vertex containing any of the features in the full set. Filters that don’t want optional features can just return the same required vertex for both cases.
object = Vertex(object full)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ParticleItem¶
-
class
lxu.object.
ParticleItem
¶ Empty ParticleItem Python user class.
-
Evaluate
(index)¶ Unknown object = Evaluate(object attr,integer index)
-
Prepare
()¶ Any item can potentially act as a particle source. This interface allocates a particle object for a given item.
integer index = Prepare(object eval)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PathGeneratorPacket¶
-
class
lxu.object.
PathGeneratorPacket
¶ Empty PathGeneratorPacket Python user class.
-
Bank
(t)¶ float = Bank(object vts,float t)
-
Count
()¶ integer = Count(object vts)
-
Current
()¶ integer = Current(object vts)
-
KnotDataSet
()¶ KnotDataSet(object gen)
-
Length
(t0, t1)¶ float = Length(object vts,float t0,float t1)
-
Tangent
(t)¶ float tan = Tangent(object vts,float t)
-
Value
(t)¶ A path generator packet delivers access to a continuous path through 3D space defined by a parametric curve. For some paths, the tangents may not be continuous. The curve implementation is not exposed. Instead the position in 3D along the path at a given parameter value is returned by the “Value” method.
vector pos = Value(object vts,float t)
-
Walk
(pathStep, angle, ti, tf)¶ integer = Walk(object vts,object pathStep,float angle,float ti,float tf)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PathStep¶
-
class
lxu.object.
PathStep
¶ Empty PathStep Python user class.
-
CleanUp
()¶ CleanUp()
-
Setup
()¶ In many cases, travelling the along path can also be done more efficiently internally. The Path Generator thus provides a method for scanning the entire curve with a client-supplied
Setup()
-
Step
()¶ The step function can end the walk at any time by returning a non-zero value.
(integer,vector pos) = Step(float t)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Pattern¶
-
class
lxu.object.
Pattern
¶ Empty Pattern Python user class.
-
GenerateSequenceString
(end)¶ Given a start index and an end index, this method will return a comma seperated string populated with any number between the start and end index, masked by the filter. For example if the pattern is True, False, True, True, False, and the start and end of the range is 0 and 9 respectively, the returned string will be “0,2,3,5,7,8”. Similar to the Test method, the offset argument allows the pattern to be offset.
string = GenerateSequenceString(integer start,integer end)
-
Test
(offset)¶ The Test method returns LXe_TRUE or LXe_FALSE for the specified index in the pattern. The offset for the index can be specified. For example, if the pattern True, False, True, True, False, and the index is 1 and the offset is 0, the return value would be LXe_FALSE. However, if the offset is 2, the returned value would match the fourth element in the pattern and return LXe_TRUE.
boolean = Test(integer index,integer offset)
-
set
()¶ bool = set(object source)
-
test
()¶ The Test method returns LXe_TRUE or LXe_FALSE for the specified index in the pattern. The offset for the index can be specified. For example, if the pattern True, False, True, True, False, and the index is 1 and the offset is 0, the return value would be LXe_FALSE. However, if the offset is 2, the returned value would match the fourth element in the pattern and return LXe_TRUE.
bool = test()
-
PersistentEntry¶
-
class
lxu.object.
PersistentEntry
¶ Empty PersistentEntry Python user class.
-
Append
()¶ These methods add new values
Append()
-
Clear
()¶ Clear()
-
Count
()¶ Entry objects also have an
integer count = Count()
-
Delete
()¶ These methods remove values.
Delete()
-
Hash
()¶ For hash entries, this returns the hash itself.
string key = Hash()
-
Insert
()¶ Insert(string key)
-
Lookup
()¶ Lookup(string key)
-
Select
()¶ These methods pick the specific entry.
Select(integer index)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Point¶
-
class
lxu.object.
Point
¶ Empty Point Python user class.
-
ClearMapValue
()¶ This removes any value for the point in the given map.
ClearMapValue(id map)
-
Copy
()¶ This creates a new point in the mesh duplicating the current point. If this point has already been copied this function returns the same pointer.
id pointID = Copy()
-
Corner
()¶ The corner control point for a vertex can also be accessed. This is the location of the actual intersection of the patch mesh.
vector pos = Corner()
-
EdgeByIndex
()¶ id edgeID = EdgeByIndex(integer index)
-
EdgeCount
()¶ These methods return the number of edges connecting this point as a point, and get the edge ID for a specific index.
integer count = EdgeCount()
-
Enumerate
(visitor, monitor)¶ Enumerate(integer mode,object visitor,object monitor)
-
ID
()¶ This methods returns the ID of the curent point or null if none.
id = ID()
-
Index
()¶ This methods returns the index of the curent point.
integer index = Index()
-
MapEvaluate
(value)¶ This method is the same as
boolean = MapEvaluate(id map,float[] value)
-
MapValue
(value)¶ This returns the value of the current point in the given map. This returns LXe_FALSE for points with no value set in the map.
boolean = MapValue(id map,float[] value)
-
Mesh
()¶ This function returns the
Unknown object = Mesh()
-
New
()¶ This creates a new point in the mesh. It sets the current point to the new point.
id pointID = New(vector pos)
-
Normal
()¶ This method returns the geometric normal of this point for the given polygon. This is the average of the connected polyon normals if the polygon is null.
vector normal = Normal(id pol)
-
OnSymmetryCenter
()¶ This returns LXe_TRUE if the symmetry state is enabled and the current point is on the symmetry center plane, otherwise it returns LXe_FALSE.
OnSymmetryCenter()
-
Part
()¶ This function returns the part number for the current point. All connected points share the same part number.
integer part = Part()
-
PointByIndex
()¶ id pointID = PointByIndex(integer index)
-
PointCount
()¶ These methods return the number of points connecting this point as a point, and get the point ID for a specific index.
integer count = PointCount()
-
PolygonByIndex
()¶ id polygonID = PolygonByIndex(integer index)
-
PolygonCount
()¶ These methods return the number of polygons sharing this point as a vertex, and get the polygon ID for a specific index.
integer count = PolygonCount()
-
Pos
()¶ This returns the position of the point.
vector pos = Pos()
-
Remove
()¶ This removes a point from the mesh. Any polygons that use this point should already have been altered to remove the point from their vertex list. Maps are automatically updated to reflect the removed point.
Remove()
-
Select
()¶ This method sets the accessor to the given point. Only points that are known to be in the mesh should be passed to this method.
Select(id point)
-
SelectByIndex
()¶ A point can be selected by its index in the mesh.
SelectByIndex(integer index)
-
SelectPolygonVertex
(index)¶ A point can also be selected by its index within a polygon.
SelectPolygonVertex(id polygon,integer index)
-
SetMapValue
(value)¶ This sets the value for the point in the given map.
SetMapValue(id map,float[] value)
-
SetMarks
()¶ SetMarks(integer set)
-
SetPos
()¶ This sets a point’s position.
SetPos(vector pos)
-
Spawn
()¶ As mentioned previously, all accessors share common interface methods for walking their respective lists.
Point object = Spawn()
-
Symmetry
()¶ This sets the symmetric point corresponding to the current point when the symmetry mode is enabled. This returns LXe_OK when the symmetric point is found, otherwise it returns LXe_FAILED. When the current point is on the symmetry center plane, it returns LXe_FAILED.
id pointID = Symmetry()
-
TestMarks
()¶ boolean = TestMarks(integer mode)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PointCacheItem¶
-
class
lxu.object.
PointCacheItem
¶ Empty PointCacheItem Python user class.
-
Cleanup
()¶ Cleanup()
-
Initialize
(attr, index, time, sample)¶ Initialize(object vdesc,object attr,integer index,float time,float sample)
-
Prepare
()¶ Other items can function as point caches. If they provide a PointCacheItem interface then the particle simulation can store its results into the cache. The cache item will typically also have a ParticleItem interface to allow the cache to be used.
integer index = Prepare(object eval)
-
SaveFrame
(time)¶ SaveFrame(object pobj,float time)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Polygon¶
-
class
lxu.object.
Polygon
¶ Empty Polygon Python user class.
-
AddContourEdge
(endPt)¶ This call adds an edge to the contour. Edges must form a set of closed loops.
AddContourEdge(id startPt,id endPt)
-
Area
()¶ This function returns the approximate surface area of the current polygon.
float area = Area()
-
ClearMapValue
(map)¶ This removes any value for the point/polygon pair in the given map.
ClearMapValue(id point,id map)
-
ClearTriangles
()¶ This clears the internal triangle list.
ClearTriangles()
-
Closest
(pos)¶ This method finds the closest polygon from the given position. If it finds a polygon, it sets the current polygon, the hit position, the distance to the hit position and the surface normal, and returns LXe_TRUE. It returns LXe_FALSE if there are no polygons. If ‘maxDist’ is set, the method finds polygons in the radius given by ‘maxDist’ from the given position.
(boolean,vector hitPos,vector hitNorm,float hitDist) = Closest(float maxDist,vector pos)
-
EdgeIndex
()¶ This returns the index of the edge on the polygon. It return -1 if the given edge is not belong to the polygon.
integer index = EdgeIndex(id edgeID)
-
Enumerate
(visitor, monitor)¶ Enumerate(integer mode,object visitor,object monitor)
-
EnumerateBBox
(visitor, min, max)¶ Enumerate polygons using test conditions. The mode selects which subset of elements to traverse. The visitor will be called with the accessor set to each successive element. This function enumerates the polygons conatined in the given bounding box.
EnumerateBBox(integer mode,object visitor,vector min,vector max)
-
EnumerateBin
(visitor, bin)¶ This function enumerates all the polygons with a given surface bin.
EnumerateBin(integer mode,object visitor,object bin)
-
EnumerateByPTag
(type, tag, visitor)¶ Clients can also enumerate over all polygons that have the same tags. The type of tag must be specified, along with the value to match.
EnumerateByPTag(integer mode,integer type,string tag,object visitor)
-
EnumerateByUV
(vMapName, quality, uv, visitor)¶ This function enumerates the polygons that contain the given texture coordinate position.
EnumerateByUV(integer mode,string vMapName,integer quality,vector uv,object visitor)
-
EnumerateLine
(visitor, org, dir)¶ This function enumerates the polygons along the line given by its origin and direction vectors.
EnumerateLine(integer mode,object visitor,vector org,vector dir)
-
EnumerateRay
(visitor, org, ray)¶ This function enumerates the polygons along the ray given by its origin and direction vectors.
EnumerateRay(integer mode,object visitor,vector org,vector ray)
-
FirstIsControlEndpoint
()¶ There are two special polygon flags, which are used by curves. The first method returns LXe_TRUE if the first point on is an extended control point, while the second returns true if the last point is a control point. If the polygon is not a curve, this method fails.
boolean = FirstIsControlEndpoint()
-
GenerateContour
()¶ When all the contour edges are added, this adds a set of polygons describing the same surface as the closed contour. Since multiple polygons may be added this only returns the new polygon ID if there was only one. Multiple polygons must be inferred some other way.
id polygonID = GenerateContour(integer type)
-
GenerateContourProto
()¶ This is the same but uses the current polygon as prototype for all the new polygons to be created from the contour.
id polygonID = GenerateContourProto()
-
GenerateTriangles
()¶ These functions provide a way to triagulate surface type polygons. ‘GenerateTriangles’ generates triangle lists and it returns the number of triangle to ‘count’. If the current polygon is not a surface type, it returns FAILED.
integer count = GenerateTriangles()
-
GoodPoint
(nPoints)¶ Find a representative position for point list. This returns an index that is on the interior or the point list but not on an edge.
integer index = GoodPoint(id[] points,integer nPoints)
-
ID
()¶ This method returns the ID of the current polygon.
id = ID()
-
Index
()¶ This methods returns the index of the curent polygon.
integer index = Index()
-
IntersectRay
(dir)¶ This method traces a ray with a given start position and direction (normalized). If the ray intersects a polygon it sets the current polygon, sets the distance to the hit point and the surface normal, and returns LXe_TRUE. It returns LXe_FALSE if there are no polygons in the path of the ray.
(boolean,vector hitNorm,float hitDist) = IntersectRay(vector pos,vector dir)
-
IsBorder
()¶ This returns LXe_TRUE if the polygon is on border or the polygon type is not surface.
boolean = IsBorder()
-
LastIsControlEndpoint
()¶ boolean = LastIsControlEndpoint()
-
MapEvaluate
(point, value)¶ Evaluating the map first tries to find a discontinuous value specific to this polygon. If there is none it falls back on the continuous value for the point itself. Failing that it may return zero for a map that allows that.
boolean = MapEvaluate(id map,id point,float[] value)
-
MapValue
(point, value)¶ This method gets the map value of a specific point in this polygon given a map. It returns LXe_FALSE if the specific is unmapped.
boolean = MapValue(id map,id point,float[] value)
-
Mesh
()¶ This function returns the
Unknown object = Mesh()
-
New
(vertices, numVert, rev)¶ This method creates a new polygon of the given type from a prepared list of point IDs. If ‘rev’ is true, the point list will be used in reverse.
id polygonID = New(integer type,id[] vertices,integer numVert,integer rev)
-
NewCurveFill
(numPols)¶ Create curve fill polygon from continuous linear type polygons.
id polygonID = NewCurveFill(id[] polygons,integer numPols)
-
NewProto
(vertices, numVert, rev)¶ This method is the same as
id polygonID = NewProto(integer type,id[] vertices,integer numVert,integer rev)
-
Normal
()¶ This method returns the geometric normal of this polygon. This fails if there is no normal or the polygon has only one or two points. The normal is the same as the normal for the triangle containing the first point.
vector normal = Normal()
-
Part
()¶ This function returns the part number for the current polygon. All connected polygons share the same part number.
integer part = Part()
-
PointIndex
()¶ This returns the index of the point on the polygon. It return -1 if the given point is not belong to the polygon.
integer index = PointIndex(id pointID)
-
Remove
()¶ This removes a polygon from the mesh.
Remove()
-
RepresentativePosition
()¶ Find a representative position for a polygon. This returns a position that is on the interior or the polygon but not on an edge.
vector pos = RepresentativePosition()
-
Select
()¶ This method sets the accessor to the given polygon.
Select(id polygon)
-
SelectByIndex
()¶ SelectByIndex(integer index)
-
SetFirstIsControlEndpoint
()¶ These set if the first or last endpoints of a curve are control points, failing if this is not a curve-type polygon.
SetFirstIsControlEndpoint(integer state)
-
SetLastIsControlEndpoint
()¶ SetLastIsControlEndpoint(integer state)
-
SetMapValue
(map, value)¶ This sets the value in the given point map for a point/polygon pair. The number of elements in the ‘value’ array should match the dimension of the map.
SetMapValue(id point,id map,float[] value)
-
SetMarks
()¶ SetMarks(integer set)
-
SetVertexList
(numVert, rev)¶ This method allows the vertex list of a polygon to be changed.
SetVertexList(id[] vertices,integer numVert,integer rev)
Returns the edge that is shared by both edges.
id edgeID = SharedEdge(id polygonID)
-
Spawn
()¶ As mentioned previously, all accessors share common interface methods for walking their respective lists.
Polygon object = Spawn()
-
StartContour
()¶ Polygons can also be created from a contour. A contour defines a path that can consist of multiple closed loops with reversed loops inside that act as holes. this call starts a contour.
StartContour()
-
Symmetry
()¶ This sets the symmetric point corresponding to the current polygon when the symmetry mode is enabled. This returns LXe_OK when the symmetric polygon is found, otherwise it returns LXe_FAILED.
id polygonID = Symmetry()
-
TestMarks
()¶ boolean = TestMarks(integer mode)
-
TriangleByIndex
()¶ This function returns three points consist of the triangle given by the index. ‘GenerateTriangles’ must be called to generate triangle list before calling this function.
(id point0,id point1,id point2) = TriangleByIndex(integer index)
-
Type
()¶ This returns the type of the polygon.
integer type = Type()
-
UVLookup
(uv)¶ This returns surface point, normal, DPDU and DPDV for a given UV position on the polygon. The normal and the DPDU/DPDV can be null, if not interested in those values.
(vector surfacePosition,vector surfaceNormal,vector surfaceDPDU,vector surfaceDPDV) = UVLookup(string vMapName,vector uv)
-
UVPart
()¶ This function returns the uv part number for the current polygon. All polygons connected on the given UV map share the same part number.
integer part = UVPart(id map)
-
VertexByIndex
()¶ id point = VertexByIndex(integer index)
-
VertexCount
()¶ These return the number of vertices in the polygon, and get the point ID’s by index.
integer count = VertexCount()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PolygonPacketTranslation¶
-
class
lxu.object.
PolygonPacketTranslation
¶ Empty PolygonPacketTranslation Python user class.
-
Item
()¶ Item object = Item(pointer packet)
-
Mesh
()¶ Mesh object = Mesh(pointer packet)
-
Packet
(mesh)¶ pointer = Packet(id polygon,object mesh)
-
Polygon
()¶ id polygon = Polygon(pointer packet)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PolygonSlice¶
-
class
lxu.object.
PolygonSlice
¶ -
ByLine
(pos1)¶ Cut the polygon by the line segment given by two positions.
ByLine(vector pos0,vector pos1)
-
Done
()¶ Complete the slicing of a polygon. This will either leave the polygon unmarked if it was untouched by any knife, or it will leave the polygon marked for deletion and create a set of new polygons to replace the old, after having been sliced by all the knives.
integer = Done()
-
SetAxis
()¶ Set the polygon slicing plane. This can be set at any time, but must be set before any knives are applied.
SetAxis(integer axis)
-
SetAxisByVector
()¶ SetAxisByVector(vector axis)
-
Start
(pol, setAxis)¶ Initialize the slice data for the given polygon. This decomposes the polygon into edges and is ready for knife action. If “setAxis” is true, the slice axis will be set based on the polygon.
Start(object meshObj,id pol,integer setAxis)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PresetLoaderTarget¶
-
class
lxu.object.
PresetLoaderTarget
¶ Empty PresetLoaderTarget Python user class.
-
CategoryByIndex
()¶ string category = CategoryByIndex(integer index)
-
CategoryCount
()¶ integer count = CategoryCount()
-
ServerName
()¶ When using LoaderFind() or LoaderFindAny(), the LoadAccess->target member will point to one of these objects. This contains the name of the server that recognized the file, and the categories that the server said the file belongs to.
string = ServerName()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PresetMetrics¶
-
class
lxu.object.
PresetMetrics
¶ Empty PresetMetrics Python user class.
-
Flags
()¶ Servers can also return per-file flags, which indicate special behaviors for the file. These are the same LXiDCFM_ defines used by the DirBrowser. For example, LXiDCFM_DYNAMIC_THUMBNAILS is commonly set on color presets, since the thumbnail can be quickly generated at an arbitrary size, and thus need not be cached on disk.
integer flags = Flags()
-
Markup
()¶ Markup is defined by the browser and is generated by the user, and includes things like star ratings, tags and ohter properties.
Attributes object = Markup()
-
Metadata
()¶ Attributes object = Metadata()
-
ThumbnailIdealSize
()¶ The ideal width and height are the native resolution of the thumbnail. When no new thumbnail is yet available, the browser will temporarily scale the old thumbnail to be no larger than the ideal size. This avoids popping if the image were to become larger than ideal, then pop back to ideal when the final image comes in. If the thumbnail is computed dynamically and thus has no ideal or maximum size, idealW and idealH can be set to 0.
(integer idealW,integer idealH) = ThumbnailIdealSize()
-
ThumbnailImage
()¶ This method returns an ILxImageID representing the thumbnail of a preset. The dimensions of the thumbnail should be those passed to the ILxPresetBrowserClient’s Metrics() method, or smaller if the dimensions requested are larger than the preset can provide. Returning a larger image is discouraged, but if done it will be scaled down as necessary. The returned image can be NULL if no thumbnail is available, but if non-NULL it should be AddRef()’ed, as the caller will release it.
Image object = ThumbnailImage()
-
ThumbnailResource
()¶ If the above method fails, this method will be called to get a generic image representing the preset. The image a named resource that will be looked up from the configs, and will be scaled down as appropriate (it won’t be scaled up, only down). If this also fails, we fall back to the server’s GenericThumbnailResource() method.
string resourceName = ThumbnailResource()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PresetPathPacketTranslation¶
-
class
lxu.object.
PresetPathPacketTranslation
¶ Empty PresetPathPacketTranslation Python user class.
-
Identifier
()¶ string identifier = Identifier(pointer packet)
-
Packet
(identifier)¶ This creates anew packet from a given path and identifier. This packet is only valid until the next call to this function.
pointer = Packet(string path,string identifier)
-
Path
()¶ The preset path selection packet includes the path to a preset on disk, and an optional client identifier that can be used as a selection sub-type. These identifiers are usually associated with a Preset Browser viewport instance. See the Preset Browser documentation for more information on the preset path selection packet. These return the path and identifier. If these strings are not set or empty in the packet, the pointers returned will be NULL.
string path = Path(pointer packet)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
PresetType¶
-
class
lxu.object.
PresetType
¶ Empty PresetType Python user class.
-
Apply
(destination)¶ The
Apply(string path,object destination)
-
BaseAspect
()¶ Servers can also define an aspect ratio that should be used for the thumbnails representing their content. If not implemented, the default aspect of 1.0 is used. Since the browser can only show one aspect, there is no point in returning per-thumbnail aspects. Note that thumbnail images themselves need not be this aspect, and will automatically be centered within the thumbnail’s bounds.
float aspect = BaseAspect()
-
DefaultThumbnail
()¶ This indicates that any previosuly stored thumbnail should be removed and the default should be used. This only makes sense if a thumbnail can be generated procedurally, and can return LXe_NOTIMPL if this isn’t supported.
DefaultThumbnail(string path)
-
Do
()¶ It is also possible to load a preset without a destination. An example would be double-clicking on a preset in the browser, rather than using drag and drop. In this case, the server needs to look at the current selection state and intelligently apply the preset itself. We just call this a “do” instead of an “apply”. Note that the
Do(string path)
-
DoCommandFlags
()¶ This method returns the execution flags for a file previously recognized by the server. If not implemented, the default UI flags are used.
integer flags = DoCommandFlags(string path)
-
GenericThumbnailResource
()¶ Servers can define a generic named resource image that is used if the metrics themselves do not provide either a specific thumbnail or a named resource. If this fails, no thumbnail will be shown.
string resourceName = GenericThumbnailResource(string path)
-
Metrics
(flags, w, h, prevMetrics)¶ Lastly, it is valid for a client to return LXe_NOTIMPL and not generate any metrics at all. This allows the creation of clients that only recognize file types and allow them to show up in the browser with default properties.
PresetMetrics object = Metrics(string path,integer flags,integer w,integer h,object prevMetrics)
-
Recognize
()¶ The recognize method is passed the full path to a file. The server should return an OK code if the server wants to take ownership of it, in which case it may be asked to present the relative metrics, thumbnails and so on, or asked to apply (load) the preset into a compatible object. Returning a failure code will pass the file on to the next server. If no servers recognize the file, it will not be shown in the browser, and no servers will be asked to try to load the file. A category string is returned indirectly, and should be one of the categories provided by the server through LXsPBS_CATEGORY. This is used to decide if the preset should be be shown when the browser is set to only show a specific category. As of 801, the
string category = Recognize(string path)
-
StoreMarkup
(attr)¶ User-defined markup (favorites, tags, etc) can be stored in the file. The object passed in will have an
StoreMarkup(string path,object attr)
-
StoreThumbnail
(image)¶ The user can update the thumbnail at will. If the preset format supports it, the new thumbnail can be stored directly in the prefest file itself when this method is called. If not supported, this can return LXe_NOTIMPL.
StoreThumbnail(string path,object image)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Preview¶
-
class
lxu.object.
Preview
¶ Empty Preview Python user class.
-
GetBuffer
()¶ And finally, we can get the current state of the rendering image. The client must release this object once it’s done.
Image object = GetBuffer()
-
GetCurrentTime
()¶ Returns what frame preview is currently being rendered.
float = GetCurrentTime()
-
GetResHeight
()¶ Get the current resolution height of a Preview render.
integer = GetResHeight()
-
GetResWidth
()¶ Get the current resolution width of a Preview render.
integer = GetResWidth()
-
IsComplete
()¶ Query whether the render is complete. It returns LXe_TRUE or LXe_FALSE;
boolean = IsComplete()
-
Pause
()¶ Alternatively, we can pause the Preview. This stops rendering, but a future start will not clear the image and will resume where it left off, unless the scene has been updated.
Pause()
-
Reset
()¶ This function will both set Preview such that the next time it starts, it will do a full update, completely rebuilding all the render data and tableau from scratch.
Reset()
-
SetAlpha
()¶ Sets if Preview should set the alpha channel
SetAlpha(integer enable)
-
SetCameraOverrideApertureX
()¶ Sets the horizontal aperture for a camera that is tied only to the preview. Setting this will not change the state of any camera items.
SetCameraOverrideApertureX(float apertureX)
-
SetCameraOverrideApertureY
()¶ Sets the vertical aperture for a camera that is tied only to the preview. Setting this will not change the state of any camera items.
SetCameraOverrideApertureY(float apertureY)
-
SetCameraOverrideFocalLength
()¶ Sets the field of view for a camera that is tied only to the preview. Setting this will not change the state of any camera items.
SetCameraOverrideFocalLength(float focalLength)
-
SetCameraOverrideProjectionType
()¶ Sets the projection type of a camera that is tied only to the preview. Setting this will not change the state of any camera items. The projection type can be set to one of the following integers: PERSP 0 ORTHO 1 CYLINDRICAL 2 SPHERICAL 3
SetCameraOverrideProjectionType(integer projectionType)
-
SetCameraOverrideTransform
()¶ Sets the camera matrix. This will only be used when ‘UseCameraOverride’ is enabled.
SetCameraOverrideTransform(matrix transform)
-
SetMotionBlur
()¶ Sets whether to render motion blur or not
SetMotionBlur(integer enable)
-
SetNotifier
()¶ This function takes a
SetNotifier(object notifier)
-
SetQuality
(samples)¶ This method is used to set the quality of a Preview render.
SetQuality(integer quality,integer samples)
-
SetRenderAllOutputs
()¶ Sets whether to render all outputs or just do a final color output
SetRenderAllOutputs(integer enable)
-
SetRenderTime
()¶ Sets what time to render at. Currently this calls select.time but might change in future to render at a different time
SetRenderTime(float time)
-
SetRes
(height)¶ This method is used to set the resolution of a Preview render. If Preview is currently rendering, it will stop and restart Preview once it has updated the resolution.
SetRes(integer width,integer height)
-
SetStereo
(eye)¶ Set whether the Preview should render in stereo or not.
SetStereo(integer enable,integer eye)
-
SetUseAllThreads
()¶ Sets whether to use all threads or not.
SetUseAllThreads(integer enable)
-
Start
()¶ The first method will start a Preview rendering. The Preview could either be stopped or paused. If it’s neither, this will have no effect.
Start()
-
Stop
()¶ And this method will stop it.
Stop()
-
UseCameraOverride
()¶ Is used to enable/disable per preview camera overrides. If enabled, preview specific camera attributes will be used in place of attributes specific by a camera item in the scene. If disabled then the camera attributes are got from a camera item. Camera overrides allow us to change the camera settings without changing the scene itself. The settings are per preview and so do not affect any other views of the Cinema. The SetCameraOverride set of preview methods are used for setting these preview specific fields.
UseCameraOverride(integer useCameraOverride)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Profile1DPreDest¶
-
class
lxu.object.
Profile1DPreDest
¶ Empty Profile1DPreDest Python user class.
-
Box
()¶ “Box” method sets the bounding box on the profile space.
bounds box = Box()
-
Count
()¶ “Count” method returns the number of profile in the packet.
integer = Count()
-
CurveTo
(y0, x1, y1, x2, y2)¶ CurveTo(float x0,float y0,float x1,float y1,float x2,float y2)
-
Evaluate
(flags, axis)¶ “Evaluate” method returns X or Y value at position ‘t’ along the path. If ‘NORMALIZE’ is set, it returns the normalized value between 0 and 1. If ‘RESETZERO’ is set, the origin is reset to the minimum of the bbox.
float = Evaluate(float t,integer flags,integer axis)
-
LineTo
(y)¶ LineTo(float x,float y)
-
MoveTo
(y)¶ 1D profile is a single path consist of lines and cubic bezier curves and it would be used for a parametric function to modulate a scale parameter along a path in modeling tools such as tube, sketch extrude and path step generator. The 1D profile would be also worked with lathe tool as a source profile curve. The following are methods to build an open path. “MoveTo” sets the start position. “LineTo” makes a segment line with the last position and the given position. “CurveTo” defines a cubic bezier curve.
MoveTo(float x,float y)
-
PathSteps
(flags, x, y, nstep)¶ “PathSteps” generates all freezed positions and it returns the number of steps. “tol” is allowable maximum height when the function subdivides bezier curve to polyline. If “nstep” is zero, it returns only returns the best number of steps with the given tolerance.
integer = PathSteps(float tol,integer flags,double[] x,double[] y,integer nstep)
-
SelectByIndex
()¶ “SelectByIndex” method sets the current profile to generate by “PathSteps” by index. The index must be between 0 to count-1.
SelectByIndex(integer index)
-
SelectByParameter
()¶ “SelectByParameter” method sets the current profile to generate by “PathSteps” by parameter value between 0.0 to 1.0.”PathSteps” generates an interpolated x and y positions at ‘t’.
SelectByParameter(float t)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Profile2DPreDest¶
-
class
lxu.object.
Profile2DPreDest
¶ Empty Profile2DPreDest Python user class.
-
Box
()¶ “Box” method sets the bounding box on the profile space.
bounds box = Box()
-
Closed
()¶ Set closed flag to the current path. The default is true.
Closed(integer closed)
-
Count
()¶ “Count” method returns the number of profile in the packet.
integer = Count()
-
CurveTo
(y0, x1, y1, x2, y2)¶ CurveTo(float x0,float y0,float x1,float y1,float x2,float y2)
-
LineTo
(y)¶ LineTo(float x,float y)
-
MoveTo
(y)¶ 2D profile is a 2-dimentional pattern shape consist of lines and cubic bezier curves. This profile would be useful when it is used with sweep tools. The following are methods to build an open path. “MoveTo” sets the start position. “LineTo” makes a segment line with the last position and the given position. “CurveTo” defines a cubic bezier curve.
MoveTo(float x,float y)
-
NewPath
()¶ “NewPath” starts a new profile in the object. 2D profile allows to have multiple pathes.
NewPath()
-
SelectByIndex
()¶ “SelectByIndex” method sets the current profile to generate by “PathSteps” by index. The index must be between 0 to count-1.
SelectByIndex(integer index)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ProjDirOverride¶
-
class
lxu.object.
ProjDirOverride
¶ Empty ProjDirOverride Python user class.
-
OverrideWith
()¶ The interface has a single method. Returning a failure code will cause the search to walk up the hierarchy of the scene as normal. A success code will cause the search to start from the path provided by the method. If that path is empty or doesn’t exist, we will not try to find a project directory. We only really expect one server to exist at a time, since this interface is intended for special cases only. If multiple servers are found, the order is undefined and the first one that returns a success code is the path that is tested.
string = OverrideWith(string originalPath)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ProxyOptions¶
-
class
lxu.object.
ProxyOptions
¶ Empty ProxyOptions Python user class.
-
AddItem
(internal_name, user_name)¶ Add an item to the set of items to load
AddItem(integer type,string internal_name,string user_name)
-
LoadList
()¶ Set the loader to only parses the LXO file and return a list of the item names it contains.
LoadList()
-
LoadNone
()¶ Set the loader to load not items. This is a prelude to selecting the items to load.
LoadNone()
-
SetFlags
()¶ Set flags about the proxy item loading to the loader.
SetFlags(integer flags)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Quaternion¶
-
class
lxu.object.
Quaternion
¶ Empty Quaternion Python user class.
-
GetAngleAxis
()¶ (float ang,vector axis) = GetAngleAxis()
-
GetMatrix
()¶ matrix mat3 = GetMatrix()
-
GetQuaternion
()¶ Quaternions are often useful when working with rotations, however they are a rather complex data type, so we provide an interface (polymorphic ILxValue-type object) to access them more directly. These functions allow the quaternion to be read. Either as a direct quaternion, a 3x3 matrix, or as an angle + axis.
quaternion q = GetQuaternion()
-
SetAngleAxis
(axis)¶ SetAngleAxis(float ang,vector axis)
-
SetMatrix
()¶ SetMatrix(matrix mat3)
-
SetQuaternion
()¶ Writable quaternions have some operations to change them.
SetQuaternion(quaternion q)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Raycast¶
-
class
lxu.object.
Raycast
¶ Empty Raycast Python user class.
-
GetSurfaceType
()¶ integer = GetSurfaceType(object vector)
-
InternalShade
()¶ InternalShade(object vector)
-
RayPop
()¶ RayPop(object vector)
-
Raycast
(pos, dir)¶ float = Raycast(object vector,vector pos,vector dir)
-
Raytrace
(pos, dir, flags)¶ float = Raytrace(object vector,vector pos,vector dir,integer flags)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Raymarch¶
-
class
lxu.object.
Raymarch
¶ Empty Raymarch Python user class.
-
GetOpacity
(dist)¶ float opa = GetOpacity(object vector,float dist)
-
Jitter1D
()¶ float offset = Jitter1D(object vector)
-
ShaderEvaluate
(shader)¶ ShaderEvaluate(object vector,object shader)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
RenderJob¶
-
class
lxu.object.
RenderJob
¶ Empty RenderJob Python user class.
-
ActionName
()¶ This returns the name of the action used to evaluate the scene’s channels.
string action = ActionName()
-
FrameBufferRegionBackgroundSlot
()¶ This determines what “slot” is used as the background of a region render. Region renders are sub-sets of a frame, and are often composited over another render for display in a render window. If this method is not implemented or otherwise fails, no backgorund frame buffer is displayed under the region.
(integer slotIndex,integer passIndex) = FrameBufferRegionBackgroundSlot()
-
FrameBufferSlot
()¶ This determines what “slot” is used to store the frame buffer on disk. The slot index can be arbitrary (although it must be positive), and is used as part of the frame buffer’s filename. If this method fails or is not implemented, slot zero is used. The frame buffer represents the raw rendered frame, and should not be confused with the
integer index = FrameBufferSlot()
-
GroupName
()¶ This returns the name of the group whose layers should be rendered. If not implemented (or if the group string is NULL or the method fails), everything is rendered.
string group = GroupName()
-
Options
()¶ integer options = Options()
-
OutputFilename
()¶ This returns the filename to save the rendered image. to. Returning LXe_RENDER_USE_OUTPUT_ITEMS will cause the filenames set in the output items to be used. Returning LXe_RENDER_WITHOUT_SAVING will cause no images to be saved.
string filename = OutputFilename()
-
OutputFormat
()¶ This method returns the file format to save the rendered image in as a string, and may be a layered format, or a movie format if rendering an animation. If it returns LXe_RENDER_USE_OUTPUT_ITEMS, the output items in the scene will be used for the format. If it returns LXe_RENDER_WITHOUT_SAVING, no images will be saved.
string format = OutputFormat()
-
ProgressAborted
()¶ These methods are called as the scene renders to provide status updates. These methods do not need to be implemented. This method is called if the render is aborted or fails for any reason.
ProgressAborted()
-
ProgressBegin
()¶ These methods are called when a render begins or ends. All other progress messages will be sent between these two calls.
ProgressBegin(object renderStats)
-
ProgressBucketBegin
(col)¶ Individual buckets are rendered within each frame pass. These methods are called when a bucket starts or ends, and must be thread safe. Note that multiple buckets may be rendered at the same time, and thus multiple begin calls may occur before an end call is received. When a bucket begins, this method is called with the row and column of the bucket passed, (where 0,0 is the top-left corner).
ProgressBucketBegin(integer row,integer col)
-
ProgressBucketEnd
(col, code)¶ This is called when the bucket ends. The bucket index is provided along with an LxResult code specifying how the bucket finished. This can be an OK code for success, LXe_ABORT for a user abort or a failure code. Note that ProgressAbort() will still be called from the main thread when a LXe_ABORT is sent to
ProgressBucketEnd(integer row,integer col,integer code)
-
ProgressEnd
(finalStats)¶ ProgressEnd(object finalFrameBuffer,object finalStats)
-
ProgressFrameBegin
(w, h)¶ We have a series of begin/end pairs indicating which frame, render pass and sub-frame pass that is currently being rendered. The hierarchy is like so:
ProgressFrameBegin(integer frame,integer w,integer h)
-
ProgressFrameEnd
(stats)¶ When a frame finishes rendering, this method is called with the frame, eye, and an object with an
ProgressFrameEnd(integer frame,object stats)
-
ProgressFramePassBegin
(renderPass, eye, pass_int)¶ The frame is further broken down into frame passes (not to be confused with render passes). These methods are called when a frame pass begins or ends.
ProgressFramePassBegin(integer frame,integer renderPass,integer eye,integer pass_int)
-
ProgressFramePassEnd
(renderPass, eye, pass_int)¶ ProgressFramePassEnd(integer frame,integer renderPass,integer eye,integer pass_int)
-
ProgressImage
()¶ Every time a pixel is rendered, the progress image (an object with the ILxImageID interface) is updated. This image is created when a frame starts rendering, and is passed to the job through this method. The job can hold onto this image for redrawing by incrementing its reference count. This image should be considered read-only, The image dimensions may be smaller than the actual render resolution. If the image’s dimensions have changed (due to a call to RefreshProgressImageMetrics()), this may be called during a render. The client should AddRef() the image so they can draw it in the future.
ProgressImage(object img)
-
ProgressImageMetrics
(resH)¶ Before rendering a frame, the job is asked for the desired resolution of the progress image, as well as any zoom factor or panning offset within the image. These metrics can be changed at an time by calling
(integer w,integer h,float zoom,integer panX,integer panY,integer output) = ProgressImageMetrics(integer resX,integer resH)
-
ProgressImageUpdated
()¶ The progress image is updated frequently during the render, and the job is notified of this through the
ProgressImageUpdated()
-
ProgressPercentDone
(progressFrame, progressRenderPass)¶ While rendering, this is called with the current progress of the render as a number between 0.0 and 1.0. The render can be canceled by returning LXe_ABORT.
ProgressPercentDone(float progressScene,float progressFrame,float progressRenderPass)
-
ProgressRenderPassBegin
(renderPassIndex, renderPassName, eye)¶ Note that the renderPassName may be NULL if the pass is unnamed.
ProgressRenderPassBegin(integer frameIndex,integer renderPassIndex,string renderPassName,integer eye)
-
ProgressRenderPassEnd
(renderPassIndex, renderPassName, eye, frameBuffer, stats)¶ ProgressRenderPassEnd(integer frame,integer renderPassIndex,string renderPassName,integer eye,object frameBuffer,object stats)
-
ProgressString
(userString)¶ As the render progresses, this function is called with a status string, which the client can display in its UI. The first string provided is an internal string, while the second is a user-readable, translated string. Note that an empty info string/user string is valid, and usually just means that the any previous string can now be cleared as it is no longer relevant.
ProgressString(string infoString,string userString)
-
ProgressTickle
()¶ It is common from render jobs to present an interactive UI. To keep the render from locking out the UI when both are in the same thread, the job can implement the “tickle” method. This method is called frequently enough (about 8 times a second) to allow a UI to check for input without causing undue overhead. The job can abort the render by returning LXe_ABORT.
ProgressTickle()
-
RenderAs
()¶ integer mode = RenderAs()
-
RenderAtTime
()¶ If the mode is FRAME or one of the TURNTABLEs, the
float time = RenderAtTime()
-
RenderBakeCageVMap
()¶ This returns the name of the vertex map used when doing cage baking. This should be a morph vmap.
string vmap = RenderBakeCageVMap()
-
RenderBakeEffect
()¶ When baking to a texture, this determines the baking effect. These effects are the same as used by texture layers. LXs_FX_NORMAL, LXs_FX_DISPLACE and LXs_FX_VECDISPLACE are common effects.
string effect = RenderBakeEffect()
-
RenderBakeFromRGBA
()¶ When baking to a texture, this returns the mode of baking from RGBA channels of source frames
integer mode = RenderBakeFromRGBA()
-
RenderBakeImage
()¶ When baking to a texture, this is the ILxImageID that will contain the result of the bake. The caller will release the object when it is done with it. This object must have both
Image object = RenderBakeImage()
-
RenderBakeLookDistance
()¶ This returns the look distance used when baking.
float distance = RenderBakeLookDistance()
-
RenderBakeToRGBA
()¶ When baking to a texture, this returns the mode of baking to RGBA channels of the texture
integer mode = RenderBakeToRGBA()
-
RenderBakeVMap
()¶ This returns the name of the vertex map used when using one of the BAKE render types. This should be a UV map when using texture baking.
string vmap = RenderBakeVMap()
-
RenderItem
()¶ This method returns the render item, which in turn contains the various settings for this scene. The item will be released by the caller, so be sure to AddRef() it before returning it.
Item object = RenderItem()
-
RenderTurntableFPS
()¶ This determines the frame rate of the TURNTABLE-style animation when rendering to a movie format. If not implemented, it will default to the current system frame rate.
integer fps = RenderTurntableFPS()
-
RenderTurntableNumFrames
()¶ This determines how many frames are rendered when using one of the TURNTABLE modes. If not implemented, the default of 30 frames is used.
integer numFrames = RenderTurntableNumFrames()
-
TestItem
(eval)¶ The
TestItem(object item,object eval)
-
UDIM
()¶ This returns the UDIM tile to bake to. This value causes the bake region to be overridden with this UDIM tile (but only if it’s a valid UDIM number).
integer udim = UDIM()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
RenderStats¶
-
class
lxu.object.
RenderStats
¶ Empty RenderStats Python user class.
-
GetFrameStats
()¶ This convenience function gets the stats representing an entire frame (ie: the last pass in the frame). As usual, the object must be released when no longer needed.
Unknown object = GetFrameStats(integer frameIndex)
-
GetPassStats
(passIndex)¶ This can be used to get the
Unknown object = GetPassStats(integer frameIndex,integer passIndex)
-
GetSceneStats
()¶ This similarly gets the stats representing the entire scene (ie: the last pass in the last frame). As usual, the object must be released when no longer needed.
Unknown object = GetSceneStats()
-
NumFrames
()¶ This returns the number of frames in the render.
integer count = NumFrames()
-
NumPasses
()¶ This returns the number of passes per frame. Under normal circumstances all frames will have the same number of passes, but if the render is in progress or aborted the last frame (the one currently being rendered) may not yet have stats for all of its passes (ie: the ones not yet rendered).
integer count = NumPasses(integer frameIndex)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ReplicatorEnumerator¶
-
class
lxu.object.
ReplicatorEnumerator
¶ Empty ReplicatorEnumerator Python user class.
-
Dissolve
()¶ float = Dissolve()
-
Enumerate
(chan, localXform)¶ The
Enumerate(object visitor,object chan,integer localXform)
-
Geometry
()¶ Unknown object = Geometry()
-
GroupId
()¶ float = GroupId()
-
Id
()¶ float = Id()
-
Item
()¶ Item object = Item()
-
Orientation
()¶ matrix mx = Orientation()
-
Position
()¶ vector pos = Position()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Scene¶
-
class
lxu.object.
Scene
¶ Likewise in python.
-
AllocAssets
()¶ This method allocates a new asset object for the scene.
SceneAssets object = AllocAssets()
-
AnyItemOfType
()¶ This method returns LXe_TRUE if an item of a given type exists in the scene and returns it.
Item object = AnyItemOfType(integer type)
-
BatchCopyAbort
()¶ Abort batch item copy.
BatchCopyAbort()
-
BatchCopyBegin
()¶ 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.
BatchCopyBegin(object destination)
-
BatchCopyEnd
()¶ End batch item copy.
BatchCopyEnd()
-
BatchCreateAbort
()¶ Abort batch item creation.
BatchCreateAbort()
-
BatchCreateBegin
()¶ 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.
BatchCreateBegin()
-
BatchCreateEnd
()¶ End batch item creation.
BatchCreateEnd()
-
Changed
()¶ Pass in 1 to indicate that the scene has been modified, and 0 to reset the state back to unchanged.
Changed(integer changed)
-
Channels
(time)¶ This function can allocate a channel I/O object presenting
ChannelRead object = Channels(string name,float time)
-
CustomLoad
()¶ 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.
CustomLoad(object visitor)
-
DeleteCollection
(closeMode)¶ Delete all items belonging to a collection. The collection can be closed first, either deep or shallow.
DeleteCollection(object collection,integer closeMode)
-
EvalModInvalidate
()¶ 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.
EvalModInvalidate(string modName)
-
EvalModReset
()¶ Reset the state of an eval modifier. Modifier nodes remain as they are but any cached state is invalidated.
EvalModReset(string modName)
-
FileFormat
()¶ This returns the file format of the scene, which determines how the scene will be saved.
string format = FileFormat()
-
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.
string filename = Filename()
-
FriendlyFilename
()¶ 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.
string filename = FriendlyFilename(integer flags)
-
GeneralCollection
(arg, rootItem)¶ 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.
Unknown object = GeneralCollection(string typeName,string arg,object rootItem)
-
GeneralCollectionRaw
(arg, rootItem)¶ Get a collection of all items.
Unknown object = GeneralCollectionRaw(string typeName,string arg,object rootItem)
-
GraphByIndex
()¶ This method returns the graph from the scene by index.
SceneGraph object = GraphByIndex(integer index)
-
GraphCount
()¶ The graph list can be walked directly to get all graphs in the scene. This method returns the number of graphs.
integer count = GraphCount()
-
GraphLookup
()¶ This method returns a scene graph from an
SceneGraph object = GraphLookup(string name)
-
HasChanged
()¶ 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.
integer numChanges = HasChanged()
-
Import
(monitor)¶ This loads a file into an existing scene. A monitor must be provided, and can be obtained from [[DialogService (interface)]].
Import(string path,object monitor)
-
ItemAdd
()¶ This method creates a new item of the given type and adds it to the scene.
Item object = ItemAdd(integer type)
-
ItemAddReference
()¶ This creates a new reference top an existing item in the scene. If the reference already exists, it is returned isntead.
Item object = ItemAddReference(object item)
-
ItemByIndex
(index)¶ This returns an item of the given type by index.
Item object = ItemByIndex(integer type,integer index)
-
ItemByIndexByTypes
(index)¶ This method gets an item by types by index.
Item object = ItemByIndexByTypes(int[] types,integer index)
-
ItemCopy
()¶ This method creates a duplicate of an existing item.
Item object = ItemCopy(object item)
-
ItemCount
()¶ 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.
integer count = ItemCount(integer type)
-
ItemCountByTypes
()¶ 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.
integer count = ItemCountByTypes(int[] types)
-
ItemInstance
()¶ This method creates a duplicate of an existing item. Also known as an instance.
Item object = ItemInstance(object item)
-
ItemList
(type)¶ list of items = ItemList(type)
-
ItemLocalize
()¶ 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.
Item object = ItemLocalize(object item)
-
ItemLookup
()¶ Items can be looked up by their ID string or by unique name.
Item object = ItemLookup(string id)
-
ItemLookupIdent
()¶ Lookup item using ident only, not full name.
Item object = ItemLookupIdent(string id)
-
ItemLookupImported
()¶ During import old idents can be used to look up imported items which will have been given new idents.
Item object = ItemLookupImported(string id)
-
ItemRemove
()¶ Methods are added here since we want them at the end of the structure.
ItemRemove(object item)
-
ItemReplace
(type)¶ Create a new item with the specified type from passed item, replacing the original.
Item object = ItemReplace(object item,integer type)
-
ItemRootType
()¶ 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.
integer = ItemRootType()
-
LoadFlags
()¶ Scene target flags ( LXf_SCENETARG_ ) set by the loader can be read with this method.
integer = LoadFlags()
-
Parent
()¶ This method returns the parent
Item object = Parent()
-
RenderCameraByIndex
()¶ Note that if RenderCameraCount gives zero, feeding a value of -1 into RenderCameraByIndex will actually get the render camera (which can be any camera).
Item object = RenderCameraByIndex(integer index)
-
RenderCameraCount
()¶ These functions can be used to get a list of all the possible (linked) render cameras.
integer count = RenderCameraCount()
-
RenderCameraIndex
()¶ And this function, which takes in an eval, gets the current render camera index.
integer index = RenderCameraIndex(object eval)
-
SetupChannels
()¶ Alternate version of the Channels function, which evaluates channels in Setup mode.
ChannelRead object = SetupChannels()
-
SetupMode
()¶ This returns LXe_TRUE if the scene is in “Setup Mode”, and LXe_FALSE otherwise.
boolean = SetupMode()
-
SubSceneByIndex
(index)¶ This method returns the sub-scene by index.
Scene object = SubSceneByIndex(integer type,integer index)
-
SubSceneCount
()¶ 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.
integer count = SubSceneCount(integer type)
-
TextureCopy
()¶ This method creates a duplicate of an existing texture layer, including its children and texture locators.
Item object = TextureCopy(object item)
-
WorkPlanePosition
()¶ This function can be used to get the world position of the workplane.
vector pos = WorkPlanePosition(object chanRead)
-
WorkPlaneRotation
()¶ This function can be used to get the world rotation of the workplane.
matrix m3 = WorkPlaneRotation(object chanRead)
-
from_item
(item)¶ Set the scene wrapper from an item: scene.from_item(item)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SceneContents¶
-
class
lxu.object.
SceneContents
¶ Empty SceneContents Python user class.
-
AddLink
(internal_name, user_name)¶ Set an item to link to the last item container.
AddLink(integer type,string internal_name,string user_name)
-
BBox
()¶ This gets bounding box from the container given by the index.
bounds box = BBox(integer index)
-
ByInternalName
()¶ These returns the index of the first container with the given name. If there is no container with the name, it returns LXe_OK, otherwise LXe_NOTFOUND.
integer index = ByInternalName(string internal_name)
-
ByUserName
()¶ integer index = ByUserName(string user_name)
-
Count
()¶ This returns the number of values currently in the container.
integer = Count()
-
InternalName
()¶ These get names out of the container.
string = InternalName(integer index)
-
Item
(internal_name, user_name)¶ This adds a new item container with type, internal name and user name.
Item(integer type,string internal_name,string user_name)
-
LinkCount
()¶ This returns the number of links in the item given by the index.
integer = LinkCount(integer index)
-
Reset
()¶ Free all item containers.
Reset()
-
SetBBox
(min_Y, min_Z, max_X, max_Y, max_Z)¶ Set the bounding box to the last item container.
SetBBox(float min_X,float min_Y,float min_Z,float max_X,float max_Y,float max_Z)
-
Type
()¶ This gets item type from the container given by the index.
integer type = Type(integer index)
-
UserName
()¶ string = UserName(integer index)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SceneEvalListener¶
-
class
lxu.object.
SceneEvalListener
¶ Empty SceneEvalListener Python user class.
-
ChannelPostValue
()¶ ChannelPostValue()
-
ChannelPreValue
()¶ It can be useful to know about a series of related evaluated channel changes. These functions wrap the ChannelValue method call to signal the start and end of a series of changes.
ChannelPreValue()
-
ChannelValue
(index)¶ The Scene Evaluation Listener sends events related to the evaluation of the scene. The ChannelValue change signals that a channel value has changed. This is called whenever any evaluated channel value changes.
ChannelValue(object item,integer index)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SceneGraph¶
-
class
lxu.object.
SceneGraph
¶ Empty SceneGraph Python user class.
-
Context
()¶ This returns the scene that the graph belongs to.
Scene object = Context()
-
Name
()¶ This method returns the name of a graph.
string name = Name()
-
RootByIndex
()¶ This method gets a root item by index.
Item object = RootByIndex(integer index)
-
RootCount
()¶ 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. .
integer count = RootCount()
-
RootFirst
()¶ 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.
Item object = RootFirst()
-
RootNext
()¶ Once the first root item has been read, calling this function will read subsequent root items.
Item object = RootNext()
-
RootRemove
()¶ 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.
RootRemove(object item)
-
RootSetPos
(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.
RootSetPos(object item,integer pos)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SceneItemListener¶
-
class
lxu.object.
SceneItemListener
¶ Empty SceneItemListener Python user class.
-
ChanLinkAdd
(itemFrom, chanFrom, itemTo, chanTo)¶ ChanLinkAdd(string graph,object itemFrom,integer chanFrom,object itemTo,integer chanTo)
-
ChanLinkRemAfter
(itemFrom, chanFrom, itemTo, chanTo)¶ ChanLinkRemAfter(string graph,object itemFrom,integer chanFrom,object itemTo,integer chanTo)
-
ChanLinkRemBefore
(itemFrom, chanFrom, itemTo, chanTo)¶ ChanLinkRemBefore(string graph,object itemFrom,integer chanFrom,object itemTo,integer chanTo)
-
ChanLinkSet
(itemFrom, chanFrom, itemTo, chanTo)¶ ChanLinkSet(string graph,object itemFrom,integer chanFrom,object itemTo,integer chanTo)
-
ChannelValue
(item, index)¶ ChannelValue(string action,object item,integer index)
-
ItemAdd
()¶ ItemAdd(object item)
-
ItemAddChannel
()¶ ItemAddChannel(object item)
-
ItemChannelDefault
(index)¶ This function is triggered whenever the default value of a channel is modified.
ItemChannelDefault(object item,integer index)
-
ItemChannelMinMax
(index)¶ This function is triggered whenever the min/max of a channel is modified.
ItemChannelMinMax(object item,integer index)
-
ItemChannelName
(index)¶ This function is triggered whenever the name or the username of a channel changes.
ItemChannelName(object item,integer index)
-
ItemChannelType
(index)¶ This function is triggered whenever a channel type is modified.
ItemChannelType(object item,integer index)
-
ItemChild
()¶ ItemChild(object item)
-
ItemLocal
()¶ ItemLocal(object item)
-
ItemName
()¶ ItemName(object item)
-
ItemPackage
()¶ ItemPackage(object item)
-
ItemParent
()¶ ItemParent(object item)
-
ItemPostDelete
()¶ ItemPostDelete(object scene)
-
ItemPreChange
()¶ ItemPreChange(object scene)
-
ItemRemove
()¶ ItemRemove(object item)
-
ItemRemoveChannel
()¶ User Channel events, added in 901. This function is triggered whenever a channel is removed. It is the opposite of the ItemAddChannel event.
ItemRemoveChannel(object item)
-
ItemSource
()¶ ItemSource(object item)
-
ItemTag
()¶ Item Tag events, added in 901.
ItemTag(object item)
-
LinkAdd
(itemFrom, itemTo)¶ LinkAdd(string graph,object itemFrom,object itemTo)
-
LinkRemAfter
(itemFrom, itemTo)¶ LinkRemAfter(string graph,object itemFrom,object itemTo)
-
LinkRemBefore
(itemFrom, itemTo)¶ LinkRemBefore(string graph,object itemFrom,object itemTo)
-
LinkSet
(itemFrom, itemTo)¶ LinkSet(string graph,object itemFrom,object itemTo)
-
SceneClear
()¶ SceneClear(object scene)
-
SceneCreate
()¶ SceneCreate(object scene)
-
SceneDestroy
()¶ SceneDestroy(object scene)
-
SceneFilename
(filename)¶ SceneFilename(object scene,string filename)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SceneItemPreDest¶
-
class
lxu.object.
SceneItemPreDest
¶ Empty SceneItemPreDest Python user class.
-
ContainerItem
()¶ This method returns the parent or container for the the destination item.
Item object = ContainerItem()
-
Item
()¶ This is the target item, presumably the same type as the preset, that will have channels replaced by the incoming item’s channels.. or whatever. It can be null to just add a new item from the preset to the scene.
(integer mode,Item object) = Item()
-
Orientation
()¶ This method returns an orientation for the item, if it has been set, or LXe_FAIL otherwise. The orientation is stored in a matrix to assure that no useful information can be retrieved from it and rotations are clipped to 1 cycle.
matrix xfrm = Orientation()
-
Position
()¶ This method returns a position at which to place the item, if it has been set, or LXe_FAIL otherwise
vector pos = Position()
-
Scene
()¶ Return the
Scene object = Scene()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SceneLoaderTarget¶
-
class
lxu.object.
SceneLoaderTarget
¶ Empty SceneLoaderTarget Python user class.
-
ClearFlags
()¶ ClearFlags(integer flags)
-
SetFlags
()¶ SetFlags(integer flags)
-
SetRootType
()¶ Loading a scene sets the target info to the root item type and some flags.
SetRootType(string typeName)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SchemaDest¶
-
class
lxu.object.
SchemaDest
¶ Empty SchemaDest Python user class.
-
Channel
()¶ This method is used to obtain the item channel being dropped onto, it any.
Unknown object = Channel()
-
Graph
()¶ This method is used to obtain the item graph being dropped onto, it any.
Unknown object = Graph()
-
Group
()¶ This method is used to obtain the Group (assembly, workspace) at the drop location.
Item object = Group()
-
Item
()¶ This method is used to obtain the item being dropped onto, it any.
Item object = Item()
-
Link
()¶ This method is used to obtain the schematic link being dropped onto, it any.
Unknown object = Link()
-
Node
()¶ This method is used to obtain the schematic node being dropped onto, it any.
Item object = Node()
-
Position
()¶ This method is used to obtain the mouse position in the schematic
vector pos = Position()
-
ViewType
()¶ This method returns the type of scheamtic view
integer = ViewType()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SchematicConnection¶
-
class
lxu.object.
SchematicConnection
¶ Empty SchematicConnection Python user class.
-
AllowConnect
(to_obj)¶ Given a pair of items, this function returns LXe_TRUE if the connection is allowed. The ‘to’ item is the one with the connection point, and is assumed to have valid item flags, above.
boolean = AllowConnect(object from_obj,object to_obj)
-
AllowConnectType
(type)¶ This function returnes LXe_TRUE if the connection is allowed between an item and an item type.
boolean = AllowConnectType(object to_obj,integer type)
-
BaseFlags
()¶ This method is called once to determine the minimum flags that will be used for any item. Certain flags can vary by item type, such as LXfSCON_SINGLE, LXfSCON_MULTIPLE and LXfSCON_ORDERED, but the flags LXfSCON_USESERVER and LXfSCON_REVERSE must be consistent for all item types. LXfSCON_PERITEM should be added as a base flag if the flags can change over time. If set,
integer = BaseFlags()
-
ByIndex
(index)¶ Item object = ByIndex(object item,integer index)
-
ChannelAllowConnect
(fromIndex, to_obj, toIndex)¶ The following “Channel” functions are used for Schematic Conections that work with connections between Items and Channels. Given a ‘from’ Item and Channel index and a ‘to’ Item and Channel index, this function returns LXe_TRUE if the connection is allowed.
boolean = ChannelAllowConnect(object from_obj,integer fromIndex,object to_obj,integer toIndex)
-
ChannelByIndex
(fromIndex, index)¶ (Item object,integer toIndex) = ChannelByIndex(object xItem,integer fromIndex,integer index)
-
ChannelConnect
(fromIndex, to_obj, toIndex)¶ Servers that enumerate the links themselves also need to manage creating and breaking links. The schematic view will call these methods from a context where undos are allowed.
ChannelConnect(object from_obj,integer fromIndex,object to_obj,integer toIndex)
-
ChannelCount
(fromIndex)¶ These functions are used to iterate over the Channel connections into or out of an Item or Channel.
integer count = ChannelCount(object xItem,integer fromIndex)
-
ChannelDisconnect
(fromIndex, to_obj, toIndex)¶ ChannelDisconnect(object from_obj,integer fromIndex,object to_obj,integer toIndex)
-
ChannelIOType
()¶ Called to determine whether the connection should be an input or output. The type should be set to LXvSCON_INPUT or LXvSCON_OUTPUT.
integer ioType = ChannelIOType()
-
Connect
(to_obj, toIndex)¶ Servers that enumerate the links themselves also need to manage creating and breaking links. The schematic view will call these methods from a context where undos are allowed.
Connect(object from_obj,object to_obj,integer toIndex)
-
Count
()¶ For connections not given by a single graph, the server has to provide the list of connections coming into an item presenting a connection point. These are given by a count and items by index.
integer count = Count(object item)
-
Disconnect
(to_obj)¶ Disconnect(object from_obj,object to_obj)
-
GraphName
()¶ This returns the name of a single graph. For connection points that can be described by one graph the graph name is sufficient for schematic to do all the legwork. Connecting adds a link from the source to the target in the graph, and drawing just enumerates the graph. This must be implemented (to traverse output links), but all connections will be handled fully by the server (as given by the methods below) as long as
string name = GraphName()
-
ItemFlags
()¶ A SchematicConnection server manages a particular connection point for inter-item relations. Normally this is a graph link but can be any type of relation that the client wants to implement. The name of the connection point (the text shown on the node) is the name of the server. This method is called for every item displayed in the schematic to determine if and how it supports this connection point. Failure or a zero falgs value means that the item does not have a connection.
integer flags = ItemFlags(object item)
-
ItemFlagsValid
()¶ When per-item flags are used, there are circumstances under which the flags for an item may change (e.g. a Dynamics package may be added or removed from a mesh). When this happens, any cached per-item data would need to be refreshed. This method is called before any schematic redraw, and if implemented, should return 1 if all item flags are still valid, or 0 if not. This function will only be called once before validating, so once called, you can restore your internal valid flag.
integer = ItemFlagsValid()
-
PerItemFlags
()¶ When a graph should only be present on
integer flags = PerItemFlags(object item)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SchematicGroup¶
-
class
lxu.object.
SchematicGroup
¶ Empty Schematic Group Python user class.
-
AddItem
()¶ This function adds an item to the schematic group. If successful, the node is returned indirectly as an
SchematicNode object = AddItem(object item)
-
Group
()¶ This returns the group item associated with a schematic group interface.
Item object = Group()
-
InputNode
()¶ This function returns an assembly input node. The returned object is of the type
SchematicNode object = InputNode()
-
IsWorkspace
()¶ This returns LXe_TRUE or LXe_FALSE if the group is a workspace.
boolean = IsWorkspace()
-
NodeByIndex
()¶ This function returns a schematic node by index. The returned object is of the type
SchematicNode object = NodeByIndex(integer index)
-
NodeCount
()¶ This function returns the number of schematic nodes in the workspace.
integer count = NodeCount()
-
OutputNode
()¶ This function returns an assembly output node. The returned object is of the type
SchematicNode object = OutputNode()
-
RemoveItem
()¶ This function removes an item from the schematic group.
RemoveItem(object item)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SchematicNode¶
-
class
lxu.object.
SchematicNode
¶ Empty Schematic Node Python user class.
-
AbsoluteSize
()¶ This function returns the size of a root schematic node. If this schematic node is a sub-node, the function will fail.
(float width,float height) = AbsoluteSize()
-
AddChannel
()¶ This function adds a channel to a schematic node. The index provided should be the index of the channel on the item this node represents. If the channel already exists on another node, it will be moved.
AddChannel(integer index)
-
ChannelByIndex
(type)¶ This function returns a SchematicNodeChannel object representing a specific channel by index. The type argument should be one of the LXi_SCHMNODE values, and specifies whether the input connection or the output connection is requested. The function will return NOTAVAILABLE if no input or output connection is available for the requested channel.
SchematicNodeChannel object = ChannelByIndex(integer index,integer type)
-
ChannelCount
()¶ This function returns the number of channels on a schematic node item.
integer count = ChannelCount()
-
ConnectionByIndex
(type)¶ This function returns a SchematicNodeConnection object representing a specific item connection by index. The type argument should be one of the LXi_SCHMNODE values, and specifies whether the input connection or the output connection is requested. The function will return NOTAVAILABLE if no input or output connection is available.
SchematicNodeConnection object = ConnectionByIndex(integer index,integer type)
-
ConnectionCount
()¶ This function returns the number of item connections that are exposed on a schematic node.
integer count = ConnectionCount()
-
Expanded
()¶ This function returns LXe_TRUE or LXe_FALSE if the node is expanded to show connections.
boolean = Expanded()
-
Group
()¶ This returns the group item that the node belongs to.
Item object = Group()
-
IsRoot
()¶ A single “root” node that is presented to the user may be constructed from multiple sub-nodes, each representing different item types. For example, a locator item can have any number of associated transform items, but these may be presented to the user as a single node. This function returns LXe_TRUE if the node is a root node, otherwise it returns LXe_FALSE.
boolean = IsRoot()
-
Item
()¶ This returns the item that the node represents.
Item object = Item()
-
Position
()¶ This function returns the position of the schematic node. If this schematic node is a sub-node, the function will fail.
(float x,float y) = Position()
-
RemoveChannel
()¶ Removes a channel from a schematic node. The index provided should be the index of the channel on the item this node represents.
RemoveChannel(integer index)
-
RootNode
()¶ Given any sub-node, this function returns the root node.
SchematicNode object = RootNode()
-
SetPosition
(y)¶ This function allows the position of the schematic node to be set. If this schematic node is a sub-node, the function will fail.
SetPosition(float x,float y)
-
Size
()¶ This function returns the size of the schematic node. This function will return the size of this specific node only, not including any sub-nodes.
(float width,float height) = Size()
-
SubNodeByIndex
()¶ Given any node, this function allows the sub-nodes to be accessed by index. The returned object is of the type
SchematicNode object = SubNodeByIndex(integer index)
-
SubNodeCount
()¶ Given any node, this function returns the number of associated sub-nodes.
integer count = SubNodeCount()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Script¶
-
class
lxu.object.
Script
¶ Empty Script Python user class.
-
Desc
()¶ string desc = Desc()
-
GetBuffer
()¶ This gets the full text of the script as one large buffer, read-only NUL-terminated text buffer. The length of the buffer is also returned.
(string buffer,integer bufferLength) = GetBuffer()
-
Hash
()¶ Scripts have a hash used for lookup. For macros, it’s just the hash in the config; for scripts in files, it might be the filename.
string hash = Hash()
-
HelpKey
()¶ The script manager can also return a help key, which will be looked up in the HelpURLs config entries. An argument string can also be provided for more specific lookups.
string key = HelpKey(string args)
-
Icon
()¶ This returns a semicolon-delimited list of icon resources. If not implemented, the hash of the script is used.
string icon = Icon()
-
Manager
()¶ The script’s type is obtained by asking for its manager.
Unknown object = Manager()
-
SetBuffer
(bufferLength)¶ This replaces the existing script’s contents with a new one. The buffer should be NUL-terminated, and the buffer length should include the NUL.
SetBuffer(string buffer,integer bufferLength)
-
SetDesc
()¶ SetDesc(string desc)
-
SetUserName
()¶ SetUserName(string userName)
-
UserName
()¶ Scripts may have a username and description.
string userName = UserName()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ScriptManager¶
-
class
lxu.object.
ScriptManager
¶ -
ByIndex
(write)¶ Unknown object = ByIndex(integer index,integer write)
-
Count
()¶ These functions allow the list of available scripts to be walked. When getting a script from the manager, the write flag determines if the script is read-only or read/write. This is just a hint; if the script cannot be modified and the write flag is set, the function should fail with LXe_SCRIPT_READONLY.
integer count = Count()
-
Flags
()¶ integer flags = Flags()
-
Lookup
(write, tryAsUserName)¶ This looks up a script by its hash. Note the lookup may succeed even if it is not in the script list, as the manager may try to load the script off disk, for example. If tryAsUserName is true, the hash will be looked up as a username if it cannot be found as a hash. It is important to note that the hash may not be what you expect. For example, if you normally expect a path to a file, you should be able to handle arbitrary cases like config hashes (say, “872345659345:macro”) and not try to pass them to file system functions that might hit the network and create long delays. Similarly, if you recognize the hash as your own but cannot find the contents, you should return LXe_SCRIPT_RECOGNIZED_INVALID. This keeps other servers from having to scan servers that only you recognize.
Unknown object = Lookup(string hash,integer write,integer tryAsUserName)
-
Name
()¶ This returns the name of the script manager, which should be the name of the plug-in itself, or else the system will get very confused. Script manager names should have the format “name.scriptservice”, as the .scriptservice part is automatically skipped during lookup for convenience.
string name = Name()
-
New
()¶ A new script for this manager can be created and filled in by the client.
Unknown object = New(string name)
-
ReadWrite
(index)¶ Scripts can be read-only (for example, if the perl script is read-only on disk, or the config the macro is in is imported). This function tells if the script can be instanced as read/write or just read-only. Since the intention is to see if the script can be instanced as read/write before you have a script ID, this takes a hash or index as its args; the index is checked if the hash is NULL.
ReadWrite(string hash,integer index)
-
Remove
()¶ An existing script can be removed from the system. This only removes the script; it does not necessarily delete it from disk.
Remove(object script)
-
Run
(execFlags, args, msg)¶ A script can be executed with this function. The command services global can be used to query and execute commands as needed. Commend execution flags are also provided, which can be used to decide how to interact with the user for warnings, etc. A list of optional arguments can also be provided as a string, or be NULL.
Run(object script,integer execFlags,string args,object msg)
-
Validate
(msg)¶ Scripts can be validated to ensure that they are supported by the interpreter and to check that they are free of errors before execution. The interpreter should return SCRIPT_UNKNOWN if the script is not supported by the interpreter, and SCRIPT_ERROR if there is a problem parsing the script. SCRIPT_WARNING can be returned if there are only warnings, but since this is an OK code, the script can still be considered mostly valid and thus executable.
Validate(object script,object msg)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ScriptQuery¶
-
class
lxu.object.
ScriptQuery
¶ Empty ScriptQuery Python user class.
-
Query
(query)¶ Once selected, we can query the selected item for it’s values by providing an attribute and an
Query(string attribute,object query)
-
Select
(which)¶ Select(string attribute,string which)
-
Type
()¶ The type (LXi_TYPE_*) of the attribute can be obtained with this method. The ILxValueArrayID passed to
integer type = Type(string attribute)
-
TypeName
()¶ The specific ExoType name can be read with this method.
string type = TypeName(string attribute)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SelectionListener¶
-
class
lxu.object.
SelectionListener
¶ Empty SelectionListener Python user class.
-
Add
(subtType)¶ Add(integer type,integer subtType)
-
Current
()¶ Current(integer type)
-
Remove
(subtType)¶ Remove(integer type,integer subtType)
-
Time
()¶ Time(float time)
-
TimeRange
()¶ TimeRange(integer type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SelectionOperation¶
-
class
lxu.object.
SelectionOperation
¶ Empty Selection Operation Python user class.
-
Evaluate
(state)¶ This function is called at the start of selection evaluation. It can be used to modify a previous selection, or initialize any state needed to evaluate individual elements. The function is called with the selection type that is being evaluated, as well as a
Evaluate(integer type,object state)
-
SetMesh
()¶ This function is called before any elements are tested, to set the mesh that the elements belong to.
SetMesh(object mesh)
-
SetTransform
()¶ This function is called before any elements are tested. It provides the transform matrix for the mesh being tested. It can then be used for transforming any component position tests into world space.
matrix xfrm = SetTransform()
-
TestEdge
()¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given edge should be included in the selection.
boolean = TestEdge(id edge)
-
TestPoint
()¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given point should be included in the selection.
boolean = TestPoint(id point)
-
TestPolygon
()¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given polygon should be included in the selection.
boolean = TestPolygon(id polygon)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SelectionState¶
-
class
lxu.object.
SelectionState
¶ Empty Selection State Python user class.
-
SetEdge
(state)¶ This method is used to set an edge as selected. The function should be passed either LXe_TRUE or LXe_FALSE to specify the selection state.
SetEdge(id edge,integer state)
-
SetPoint
(state)¶ This method is used to set a point as selected. The function should be passed either LXe_TRUE or LXe_FALSE to specify the selection state.
SetPoint(id point,integer state)
-
SetPolygon
(state)¶ This method is used to set a polygon as selected. The function should be passed either LXe_TRUE or LXe_FALSE to specify the selection state.
SetPolygon(id polygon,integer state)
-
TestEdge
()¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given edge is selected.
boolean = TestEdge(id edge)
-
TestPoint
()¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given point is selected.
boolean = TestPoint(id point)
-
TestPolygon
()¶ This method returns either LXe_TRUE or LXe_FALSE, indicating whether or not the given polygon is selected.
boolean = TestPolygon(id polygon)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SelectionType¶
-
class
lxu.object.
SelectionType
¶ Empty SelectionType Python user class.
-
Compare
(pelt)¶ integer = Compare(pointer pkey,pointer pelt)
-
Flags
()¶ integer = Flags()
-
MessageTable
()¶ string = MessageTable()
-
Size
()¶ integer = Size()
-
SubType
()¶ integer = SubType(pointer pkt)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SessionListener¶
-
class
lxu.object.
SessionListener
¶ Empty SessionListener Python user class.
-
BeforeStartupCommands
()¶ This is called just before the startup commands are executed. This can be used to execute other startup commands from code, for example, or to query commands.
BeforeStartupCommands()
-
CheckQuitUI
()¶ This is called when the app’s UI is told to quit, usually because the user tried to close the main window or chose Quit from the system menu. Most importantly, the main window is still open at this time, and the listener can open dialogs and is able to abort the quit by returning LXe_FALSE. Remember that you may not be the only session listener, that all listeners will get this event, and that the abort state won’t be read until all listeners have returned (this is jsut how listeners work). Before opening a dialog or doing any other quit tests, you should check the value of quitWasAborted; if ture, you may simply want to exit early because another listeener has decided that we’re not going to quit after all. As the name implies, this method is only sent from the UI, and never from headless. If you need to save critical state, yous hould do so from
boolean = CheckQuitUI(integer quitWasAborted)
-
FirstWindowOpening
()¶ This is called just before the first window (usually the main window) is opened, which generally means that the app is nearing final readiness. This is not sent in headless mode for obvious reasons.
FirstWindowOpening()
-
LastWindowClosed
()¶ This is called just after the last window (usually the main window) has closed, indicating that the application is about to shut down. This is not sent in headless mode for obvious reasons.
LastWindowClosed()
-
QuittingUI
()¶ If no listeners have aborted the quit, this method is called to indicate that we really are going to exit the app. At this point the main window is still open, so if you want to save something with a progress bar or the possibility of opening an error dialog, you can. However, you will not be able to keep the app from quitting. Once again, this is not sent from headless mode.
QuittingUI()
-
ShuttingDown
()¶ After all windows have been closed (or in headless, if we’re about to quit), this is called to indicate that we’re going to start shutting down the remaining systems and exit the app. This is a good time to store any other state you may want to persist between sessions.
ShuttingDown()
-
SystemReady
()¶ This is called after any startup comamnds have executed, and just before the application main loop starts, and indicates that the application is fully initialized and ready.
SystemReady()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Shader¶
-
class
lxu.object.
Shader
¶ Empty Shader Python user class.
-
Enumerate
()¶ This is used to actually enumerate over all the shaders in the list
Enumerate(object visitor)
-
ShaderItemGet
()¶ Item object = ShaderItemGet()
-
Spawn
()¶ These are used to duplicate a shader enumerator.
Shader object = Spawn()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ShaderPreDest¶
-
class
lxu.object.
ShaderPreDest
¶ Empty ShaderPreDest Python user class.
-
ContainerItem
()¶ This method returns the parent or container for the the destination item. In most cases, this is simply the scene’s render item, and if this method returns NOT_IMPLEMENTED, the client can just find the first render item in the scene, as so much other code does. It will often be useful however, to provide a container group for the preset. In the case of a material preset, this could specify the group into which the material should be added, (though the Item should have returned a material in this group…). For a group preset, the group would be added inside the container, which will let a preset import be encapsulated by the client.
Item object = ContainerItem()
-
GetTag
()¶ This method allows the client to read tags defining the surface being shaded. This can be useful for positioning some more complex shading presets.
string tag = GetTag(integer type)
-
HitItem
()¶ This method returns the geometry item the preset was dropped on. This may be NULL if the preset wasn’t dropped on actual geometry.
Item object = HitItem()
-
Item
()¶ The destination item will ‘receive’ the preset, and either have some channels changed, or have some items added as children, or possibly, have its children all killed, and replaced by new children that it must love just as much. The mode argument gives the loader’s Apply method a hint about how to treat the destination content.
(integer mode,Item object) = Item()
-
Mode
()¶ This method returns the preset mode either add or apply.
integer mode = Mode()
-
Scene
()¶ The shader preset may need a scene to load into, if it was no item is directly applicable. In this case, the contents of the preset will simply be added to the scene.
Scene object = Scene()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ShapeDraw¶
-
class
lxu.object.
ShapeDraw
¶ Empty ShapeDraw Python user class.
-
Arc
(alpha, pos, rad, start, end, axis, flags)¶ Arc(vector col,float alpha,vector pos,float rad,float start,float end,integer axis,integer flags)
-
Arrow
(pos, size, axis, flags)¶ Arrow(vector col,vector pos,float size,integer axis,integer flags)
-
Axis
(pos, size, flags)¶ Axis(vector col,vector pos,vector size,integer flags)
-
BBox
(size, flags)¶ BBox(vector col,float size,integer flags)
-
Bone
(rlen, active)¶ Bone(vector col,float rlen,integer active)
-
BoxShape
(colF, pos, size, flags)¶ BoxShape(vector colW,vector colF,vector pos,vector size,integer flags)
-
CSeg
(offset, screen, col, flags)¶ CSeg(vector cen,vector offset,float screen,vector col,integer flags)
-
Circle
(alpha, pos, rad, axis, flags)¶ Circle(vector col,float alpha,vector pos,float rad,integer axis,integer flags)
-
CircleShape
(colF, pos, radius, axis, flags)¶ CircleShape(vector colW,vector colF,vector pos,float radius,integer axis,integer flags)
-
Cone
(pos, rad, height, axis, flags)¶ Cone(vector col,vector pos,float rad,float height,integer axis,integer flags)
-
ConeShape
(colF, pos, radius, height, axis, flags)¶ ConeShape(vector colW,vector colF,vector pos,float radius,float height,integer axis,integer flags)
-
Cross
(pos, rad, flags)¶ Cross(vector col,vector pos,vector rad,integer flags)
-
CrossHair
(alpha, pos, flags)¶ CrossHair(vector col,float alpha,vector pos,integer flags)
-
Cube
(pos, size, flags)¶ Cube(vector col,vector pos,vector size,integer flags)
-
CubeFill
(alpha, pos, size, flags)¶ CubeFill(vector col,float alpha,vector pos,vector size,integer flags)
-
Cylinder
(pos, rad, height, axis, flags)¶ Cylinder(vector col,vector pos,float rad,float height,integer axis,integer flags)
-
CylinderShape
(colF, pos, radius, height, axis, flags)¶ CylinderShape(vector colW,vector colF,vector pos,float radius,float height,integer axis,integer flags)
-
Dimension
(A, B, format, top, flags)¶ Dimension(vector col,vector A,vector B,string format,integer top,integer flags)
-
Distance
(pos, dist, axis, flags)¶ Distance(vector col,vector pos,float dist,integer axis,integer flags)
-
Ellipse
(alpha, pos, rad, axis, flags)¶ Ellipse(vector col,float alpha,vector pos,vector rad,integer axis,integer flags)
-
Ellipsoid
(alpha, pos, rad, flags)¶ Ellipsoid(vector col,float alpha,vector pos,vector rad,integer flags)
-
Grid
(pos, siz, divX, divY, divZ, axis, flags)¶ Grid(vector col,vector pos,vector siz,integer divX,integer divY,integer divZ,integer axis,integer flags)
-
Line
(v1, col, alpha, flags)¶ Line(vector v0,vector v1,vector col,float alpha,integer flags)
-
Link
(posS, posE, solid, flags)¶ Link(vector col,vector posS,vector posE,integer solid,integer flags)
-
Pill
(alpha, pos, width, height, rad, axis, flags)¶ Pill(vector col,float alpha,vector pos,float width,float height,float rad,integer axis,integer flags)
-
Plane
(pos, size, axis, flags)¶ Plane(vector col,vector pos,vector size,integer axis,integer flags)
-
PlaneIndicator
(alpha, pos, rad, axis, flags)¶ PlaneIndicator(vector col,float alpha,vector pos,float rad,integer axis,integer flags)
-
PlaneShape
(colF, pos, size, axis, flags)¶ PlaneShape(vector colW,vector colF,vector pos,vector size,integer axis,integer flags)
-
PreciseHandle
(alpha, pos, size, flags)¶ PreciseHandle(vector col,float alpha,vector pos,vector size,integer flags)
-
Pyramid
(pos, size, axis, flags)¶ Pyramid(vector col,vector pos,vector size,integer axis,integer flags)
-
PyramidShape
(colF, pos, size, axis, flags)¶ PyramidShape(vector colW,vector colF,vector pos,vector size,integer axis,integer flags)
-
RadialMap
(col, cen, size, sel, flags)¶ RadialMap(object image,vector col,vector cen,float size,integer sel,integer flags)
-
RadialRays
(col, cen, size, sel, flags)¶ RadialRays(object image,vector col,vector cen,float size,integer sel,integer flags)
-
Rhombus
(pos, size, axis, flags)¶ Rhombus(vector col,vector pos,vector size,integer axis,integer flags)
-
RhombusShape
(colF, pos, size, axis, flags)¶ RhombusShape(vector colW,vector colF,vector pos,vector size,integer axis,integer flags)
-
Ruler
(pos, xfrm, len, axis, flags)¶ Ruler(vector col,vector pos,matrix xfrm,float len,integer axis,integer flags)
-
SphereShape
(colF, pos, radius, axis, flags)¶ SphereShape(vector colW,vector colF,vector pos,float radius,integer axis,integer flags)
-
Star
(pos, rad, flags)¶ Star(vector col,vector pos,vector rad,integer flags)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SimulationListener¶
-
class
lxu.object.
SimulationListener
¶ -
End
()¶ End()
-
Invalidate
()¶ Any time the simulation has new results the listener clients are invalidated.
Invalidate()
-
Start
()¶ These methods are called when the simulation mode starts and ends. The start event is passed a ChannelRead object for reading the outputs of the simulation.
Start(object channels)
-
Time
()¶ Current time for the simulation is set here.
Time(float time)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SimulationModifier¶
-
class
lxu.object.
SimulationModifier
¶ Empty SimulationModifier Python user class.
-
Bake
()¶ Bake(float time)
-
Cleanup
()¶ Cleanup()
-
Enabled
()¶ The modifier instance can also present a simulation interface. If this is present then the modifier’s Evaluate() method will never be called. Instead it will only be evaluated in the context of a simulation, and the results cached by the eval system.
boolean = Enabled(object chanRead)
-
Initialize
(sample)¶ Initialize(float time,float sample)
-
Step
()¶ Step(float dt)
-
StepSize
()¶ float stepSize = StepSize()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SolidDrill¶
-
class
lxu.object.
SolidDrill
¶ -
AddMesh
(xfrm)¶ Add a mesh to drill the edit mesh. The xfrm is the matrix to convert the vertex positions in the driver mesh to the local space for the edit mesh. If the space of driver mesh is same as the edit mesh, “xfrm” can be null. The solid drill uses only FACE polygons and the mesh shape must be closed. This must be called in the main thread.
AddMesh(object meshObj,matrix xfrm)
-
Clear
()¶ This object provides the interface to access internal solid drill and CSG boolean functions. Clear the solid drill context.
Clear()
-
Execute
(xfrm, pick, mode, sten, monitor)¶ Execute the given operation to the edit mesh by added driver meshes. The operation modes are exact same as options from solid drill and CSG boolean commands. “sten” is a string for STENCIL mode. This must be called in the main thread.
Execute(object meshObj,matrix xfrm,integer pick,integer mode,string sten,object monitor)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
StackFilter¶
-
class
lxu.object.
StackFilter
¶ Empty StackFilter Python user class.
-
Compare
()¶ integer = Compare(object other)
-
Convert
()¶ Convert(object other)
-
Identifier
()¶ string identifier = Identifier()
-
Type
()¶ Stacks are made of filters. Here we define an interface that is common to all filter types:
string = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
StringConversionNice¶
-
class
lxu.object.
StringConversionNice
¶ Empty StringConversionNice Python user class.
-
Decode
()¶ Decode(string buf)
-
Encode
()¶ Nice is the same as raw. Too bad there’s no reasonable way to use the same interface with different GUIDs.
string = Encode()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
StringTag¶
-
class
lxu.object.
StringTag
¶ Empty StringTag Python user class.
-
ByIndex
()¶ This method returns the type and value of a tag by index.
(integer type,string tag) = ByIndex(integer index)
-
Count
()¶ This methods gets the total number of tags.
integer count = Count()
-
Get
()¶ The ID is an LXtID4, which can be generated with the
string tag = Get(integer type)
-
Set
(tag)¶ This sets the value of a tag, overwriting the one for the given ID. Passing null for the string pointer will clear the tag.
Set(integer type,string tag)
-
set
()¶ This sets the value of a tag, overwriting the one for the given ID. Passing null for the string pointer will clear the tag.
bool = set(object source)
-
test
()¶ bool = test()
-
StrokeDraw¶
-
class
lxu.object.
StrokeDraw
¶ Empty StrokeDraw Python user class.
-
Begin
(color, alpha)¶ Begin(integer type,vector color,float alpha)
-
BeginI
(type, color, alpha)¶ BeginI(object texture,integer type,vector color,float alpha)
-
BeginPoints
(color, alpha)¶ BeginPoints(float size,vector color,float alpha)
-
BeginPolygons
(color, alpha, stip, offsetX, offsetY, fill, cull)¶ BeginPolygons(integer type,vector color,float alpha,float stip,float offsetX,float offsetY,integer fill,integer cull)
-
BeginW
(color, alpha, width)¶ BeginW(integer type,vector color,float alpha,float width)
-
BeginWD
(color, alpha, width, dashPattern)¶ BeginWD(integer type,vector color,float alpha,float width,integer dashPattern)
-
Image
(just)¶ Image(integer texID,integer just)
-
PopTransform
()¶ PopTransform()
-
PushTransform
(m)¶ PushTransform(vector v,matrix m)
-
SetPart
()¶ SetPart(integer part)
-
Text
(just)¶ Text(string text,integer just)
-
TextureUV
(v)¶ TextureUV(float u,float v)
-
Vertex
(flags)¶ Vertex(vector pos,integer flags)
-
Vertex3
(y, z, flags)¶ Vertex3(float x,float y,float z,integer flags)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Subject2Packet¶
-
class
lxu.object.
Subject2Packet
¶ Empty Subject2Packet Python user class.
-
ScanAllocate
()¶ The subject packet provides a wrapper around the layer service, allowing a layer scan object to be allocated for accessing geometry.
LayerScan object = ScanAllocate(integer flags)
-
Type
()¶ integer = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Surface¶
-
class
lxu.object.
Surface
¶ Empty Surface Python user class.
-
BinByIndex
()¶ SurfaceBin object = BinByIndex(integer index)
-
BinCount
()¶ integer count = BinCount()
-
FrontBBox
(dir)¶ bounds bbox = FrontBBox(vector pos,vector dir)
-
GLCount
()¶ integer count = GLCount()
-
GetBBox
()¶ bounds bbox = GetBBox()
-
TagByIndex
(index)¶ string stag = TagByIndex(integer type,integer index)
-
TagCount
()¶ integer count = TagCount(integer type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SurfaceBin¶
-
class
lxu.object.
SurfaceBin
¶ Empty SurfaceBin Python user class.
-
FrontBBox
(dir)¶ bounds bbox = FrontBBox(vector pos,vector dir)
-
GetBBox
()¶ Finally we have surface bins which represents a segment of the surface with the same tags and thus the same shader.
bounds bbox = GetBBox()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SurfaceItem¶
-
class
lxu.object.
SurfaceItem
¶ Empty SurfaceItem Python user class.
-
Evaluate
(index)¶ Surface object = Evaluate(object attr,integer index)
-
GetSurface
(morph)¶ All item types that produce a surface can be queried for their
Surface object = GetSurface(object chanRead,integer morph)
-
Prepare
()¶ integer index = Prepare(object eval)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
SymmetryPacket¶
-
class
lxu.object.
SymmetryPacket
¶ Empty SymmetryPacket Python user class.
-
Active
()¶ The symmetry packet provides interfaces to tools about the state of the symmetry.
integer = Active()
-
Axis
()¶ (integer,vector axvec,float offset) = Axis()
-
BaseSide
()¶ integer = BaseSide()
-
Position
()¶ (integer,vector sv) = Position(vector pos)
-
SetBase
()¶ SetBase(vector pos)
-
TestSide
(useBase)¶ integer = TestSide(vector pos,integer useBase)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Tableau¶
-
class
lxu.object.
Tableau
¶ Empty Tableau Python user class.
-
AddElement
(shader)¶ AddElement(object element,object shader)
-
AddInstance
(element, shader)¶ AddInstance(object inst,object element,object shader)
-
AddInstanceItem
(fromItem, inst, vdesc, vertex)¶ This allows clients to add instance of other items, not just their own elements. This takes the item to be instanced (inst), the item doing the instacing (from), the TableauInstance object giving the transforms for the item. The final arguments give a TableauVertex for particle features and an array of those features, and can both be null if there are no particle features for the instance.
AddInstanceItem(object instItem,object fromItem,object inst,object vdesc,float[] vertex)
-
AddInstanceableElement
(tags)¶ Items that provide an instanceable object channel call this method to define the elements that make up the item. The element is the TableauElement to be added and the tags are the string tags to be used for getting shaders for this element. Both objects are often the same.
AddInstanceableElement(object elt,object tags)
-
Channels
()¶ Get a ChannelRead object for subframe times: ‘type’ is 0,1,2 for t0, t1 and frame time.
ChannelRead object = Channels(integer type)
-
EltNotify
(event)¶ EltNotify(object element,integer event)
-
FindShader
(tags)¶ Get a tableau shader given an item and string tags for material tags.
TableauShader object = FindShader(object item,object tags)
-
InstNotify
(event)¶ InstNotify(object instance,integer event)
-
InstanceItem
()¶ Return a peek of the item currently being instanced.
object = InstanceItem()
-
Time
()¶ A Tableau is a snapshot of the 3D scene, partially frozen in time and suitable for rendering. It consists of a collection of various types of elements such as surfaces, volumes, lights, and filters which all contribute to the final rendered appearance. A tableau is created by traversing the item database. Tableaus have a start time and duration interval, and method for adding new elements or instances of existing elements. This interface is provided mainly so clients can add elements to populate the tableau, so this does not give full access.
(float t0,float interval) = Time()
-
Update
(immediate)¶ These events are used for incremental updates to the tableau. Update takes in a visitor, which acts as a callback to update the tableau data. When the tableau is “safe”, such as when the render is stopped, it will perform the update. The “immediate” argument is whether or not the tableau contains dangerous / invalid data, in which case any tableau clients need to stop / abort immediately The tableau will add-ref and release the visitor when it’s done, so the client doesn’t need to keep a reference around. UpdateAll tells the tableau that it needs to be completely invalidated and rebuilt. EltNotify notifies clients of the tableau (like the render caches) that a tableau element has changed. It takes in the element object (which the tableau source should have retained) and the event indicating what’s changed. InstNotify is effectively the same.
Update(object visitor,integer immediate)
-
UpdateAll
()¶ UpdateAll()
-
Visible
()¶ Returns LXe_TRUE for items that are visible in this tableau.
boolean = Visible(object item)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauElement¶
-
class
lxu.object.
TableauElement
¶ Empty TableauElement Python user class.
-
Bound
()¶ We have an element interface, but all the other elements have the same functions at the start as well.
bounds bbox = Bound()
-
FeatureByIndex
(index)¶ string name = FeatureByIndex(integer type,integer index)
-
FeatureCount
()¶ integer = FeatureCount(integer type)
-
SetVertex
()¶ SetVertex(object vdesc)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauInstance¶
-
class
lxu.object.
TableauInstance
¶ Empty TableauInstance Python user class.
-
GetDissolve
()¶ The instance may be dissolved independently.
float dissolve = GetDissolve()
-
GetTransform
()¶ The transformation of an instance (or any element) can be read with this method. The endpoint can specify either the start or end of the tableau time interval.
(vector offset,matrix xfrm) = GetTransform(integer endPoint)
-
ParticleArray
()¶ float vector = ParticleArray()
-
ParticleDescription
()¶ An instance can define particle features. These are given by a tableau vertex to describe the feature vector, which can then be read.
Unknown object = ParticleDescription()
-
Properties
()¶ An instance is a copy of another element, with variations. It most likely has a different position and orientation, and it may have differences in shading or shading parameters. These differences are encoded in the instance interface. Any normal element may also present this interface, if it wants to have these attributes as well. Instances can set packets in the sample vector for global parameters of the element to be used by its shader.
Properties(object vecstack)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauLight¶
-
class
lxu.object.
TableauLight
¶ Empty TableauLight Python user class.
-
Bound
()¶ Lights are 3D elements, where the bound (if any) represents the effective coverage area for anything illuminated by the light. The light source can be sampled at any desired quality level, which is simply the number of samples over the emissive volume defined by the light. ‘Emit’ traces photons from a light. ‘ShadowMap’ returns the map and true if the light uses a shadow map.
bounds bbox = Bound()
-
FeatureByIndex
(index)¶ string name = FeatureByIndex(integer type,integer index)
-
FeatureCount
()¶ integer = FeatureCount(integer type)
-
Geometry
()¶ integer = Geometry(pointer gc)
-
Sample
(v, dir, t)¶ (vector wPos,vector oPos,vector norm) = Sample(float u,float v,vector dir,float t)
-
SetVertex
()¶ SetVertex(object vdesc)
-
ShadowMap
()¶ (integer,Unknown object) = ShadowMap()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauProxy¶
-
class
lxu.object.
TableauProxy
¶ Empty TableauProxy Python user class.
-
Bound
()¶ A proxy is sampled to add elements to the tableau. The proxy object needs to keep track of which sub-elements have been added to the tableau so they are only added once.
bounds bbox = Bound()
-
FeatureByIndex
(index)¶ string name = FeatureByIndex(integer type,integer index)
-
FeatureCount
()¶ integer = FeatureCount(integer type)
-
Sample
(tableau)¶ Sample(bounds bbox,object tableau)
-
SetVertex
()¶ SetVertex(object vdesc)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauShader¶
-
class
lxu.object.
TableauShader
¶ Empty TableauShader Python user class.
-
Select
(tvDesc)¶ All 3D elements have shaders, which are used by the renderer to compute desired sample vector packets from a set of input packets. Shaders are polymorphic with an
Select(object teElt,object tvDesc)
-
Slice
(tvDesc)¶ ShaderSlice object = Slice(object vtOutput,object tvDesc)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauSource¶
-
class
lxu.object.
TableauSource
¶ Empty TableauSource Python user class.
-
ElementType
()¶ integer supported = ElementType(integer type)
-
Elements
()¶ Elements(object tableau)
-
GetCurves
(tags)¶ Unknown object = GetCurves(object tableau,object tags)
-
Instance
(instance)¶ Instance(object tableau,object instance)
-
Preview
()¶ Preview(object tableau)
-
PreviewUpdate
()¶ integer update = PreviewUpdate(integer chanIndex)
-
SubShader
()¶ Unknown object = SubShader(object tableau)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauSurface¶
-
class
lxu.object.
TableauSurface
¶ Empty TableauSurface Python user class.
-
Bound
()¶ 2D surface elements are 3D elements that interact with the renderer as a pool of triangles. The
bounds bbox = Bound()
-
FeatureByIndex
(index)¶ string name = FeatureByIndex(integer type,integer index)
-
FeatureCount
()¶ integer = FeatureCount(integer type)
-
Padding
()¶ Surface elements can also provide a padding distance that will be added to the bounding box. In general this will be zero but certain surfaces need to add an extra padding. For example surfaces modeling hair may need to set the padding distance as the maximum length of hair guides.
float dist = Padding()
-
Sample
(scale, trisoup)¶ Sample(bounds bbox,float scale,object trisoup)
-
SegmentBox
()¶ The bounding boxes of individual segments can be read. The client need to get the segment IDs by sampling the surface, but once given they can be passed to this function. If it return any error (incluing not-impl) the client should assume that no box is available.
bounds bbox = SegmentBox(integer segID)
-
SetVertex
()¶ SetVertex(object vdesc)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauVertex¶
-
class
lxu.object.
TableauVertex
¶ Empty TableauVertex Python user class.
-
AddFeature
(name)¶ A tableau vertex object encodes information about the structure of the vertex data for sampling elements. Shaders and the renderer negotiate for the features they want from the element. These are added to the vertex object and are given offsets into the master vector. Once set, the vector can be queried for its total size, and for the offsets of each of the selected vertex features.
integer index = AddFeature(integer type,string name)
-
ByIndex
()¶ (integer type,string name,integer offset) = ByIndex(integer index)
-
Count
()¶ integer = Count()
-
Lookup
(name)¶ integer offset = Lookup(integer type,string name)
-
Size
()¶ integer = Size()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TableauVolume¶
-
class
lxu.object.
TableauVolume
¶ Empty TableauVolume Python user class.
-
Bound
()¶ bounds bbox = Bound()
-
Density
(sv, raycastObj, pos, worldPos)¶ float dens = Density(object densitySlice,object sv,object raycastObj,vector pos,integer worldPos)
-
FeatureByIndex
(index)¶ string name = FeatureByIndex(integer type,integer index)
-
FeatureCount
()¶ integer = FeatureCount(integer type)
-
RayCast
(sv, raycastObj)¶ (float dist,integer localShader) = RayCast(object densitySlice,object sv,object raycastObj)
-
RaySample
(shadingSlice, sv, raycastObj, raymarchObj)¶ RaySample(object densitySlice,object shadingSlice,object sv,object raycastObj,object raymarchObj)
-
RenderInit
()¶ RenderInit(object sv)
-
SetVertex
()¶ SetVertex(object vdesc)
-
Type
()¶ integer = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TextEncoding¶
-
class
lxu.object.
TextEncoding
¶ Empty TextEncoding Python user class.
-
Convert
(buf, max)¶ Convert(string src,byte[] buf,integer max)
-
Default
()¶ integer = Default()
-
NumChar
(target)¶ integer = NumChar(string string,integer target)
-
PullChar
(target)¶ (string,integer code,integer len) = PullChar(string string,integer target)
-
SetSource
()¶ SetSource(integer encoding)
-
SetTarget
()¶ SetTarget(integer encoding)
-
Source
()¶ integer = Source()
-
Target
()¶ integer = Target()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TextScriptInterpreter¶
-
class
lxu.object.
TextScriptInterpreter
¶ Empty TextScriptInterpreter Python user class.
-
Run
(execFlags, args, msg)¶ A script can be executed with this function. The command services global can be used to query and execute commands as needed. Commend execution flags are also provided, which can be used to decide how to interact with the user for warnings, etc. A list of optional arguments can also be provided as a string, or be NULL. The ILxMessageID can be used to report specific errors.
Run(object script,integer execFlags,string args,object msg)
-
Validate
(msg)¶ Before execution of a script, this function is called to ensure that the script is properly formatted for execution by this interpreter. SCRIPT_ERROR can be returned on failer, and SCRIPT_WARNING if the script can be executed, but there may be problems with it. The ILxMessageID can be used to report specific errors.
boolean = Validate(object script,object msg)
-
ValidateFileType
(firstLine)¶ An initial validation of the file is performed to figure out what interpreters support which files. The interpreter is provided with an ILxScriptID and the first line of the script, which allows for a common first-line check or a more complete check of the script’s contents via GetBuffer(). The hash of the script is the path of the file on disk, and can be used to check the extension if desired. The interpreter should return LXe_OK if it can deal with this script, and LXe_SCRIPT_UNKNOWN if it cannot. This method should be quick, since it may be called often. Simply check the file type here; don’t test the script for errors or anything like that.
boolean = ValidateFileType(object script,string firstLine)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Texture¶
-
class
lxu.object.
Texture
¶ Empty Texture Python user class.
-
Effect
()¶ string = Effect()
-
EvalImage
()¶ Image object = EvalImage(object scene)
-
Image
()¶ Item object = Image()
-
ImageName
()¶ string = ImageName()
-
Locator
()¶ Item object = Locator()
-
LocatorProjectionAxis
()¶ integer = LocatorProjectionAxis(float time)
-
LocatorProjectionMode
()¶ integer = LocatorProjectionMode(float time)
-
SetEffect
()¶ SetEffect(string effect)
-
SetImage
()¶ SetImage(object img)
-
SetLocator
()¶ SetLocator(object tloc)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TileImage¶
-
class
lxu.object.
TileImage
¶ Empty TileImage Python user class.
-
DeterminePixel
(x, y)¶ (integer adjX,integer adjY) = DeterminePixel(integer level,integer x,integer y)
-
DetermineTile
(x, y)¶ (integer tileX,integer tileY) = DetermineTile(integer level,integer x,integer y)
-
GetLevelSize
()¶ (integer width,integer height,integer tilesWidth,integer tilesHeight) = GetLevelSize(integer level)
-
GetTile
(tileX, tileY)¶ Image object = GetTile(integer level,integer tileX,integer tileY)
-
GetTileSize
(tileX, tileY)¶ (integer width,integer height) = GetTileSize(integer level,integer tileX,integer tileY)
-
LevelCount
()¶ The tiled image interface provides a way for clients to implement images using tile trees. Tiles will themselves simply be images, so we can manage a global cache of them internally rather than depending on each implementation to manage an internal cache. A tile tree is a collection of “levels”, which are intended to be images of decreasing size. Each image level is broken into tiles, which allows us to only work on small portions of the image instead of loading an entire image. Typically, the image levels decrease in size by power of two. For example, one dimension of a normal tile tree of an image with size 1024x1024, and tiles of size 256x256, would look like this: Level 2 _ Level 1 _ _ Level 0 _ _ _ _ Where each _ represents a tile. One thing to note is that the meaning of “level” is reverse from ImageLevelSample; level 0 is the base of the tile tree, where each tile is the original size, and the highest value of level will have a single tile. Implementations of the TileImage interface are only required to be able to get the tiles at level 0; they may require the clients to generate tiles above level 0 by resizing the tiles below them.
integer = LevelCount()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Tool¶
-
class
lxu.object.
Tool
¶ Empty Tool Python user class.
-
CompareOp
(toolop)¶ integer = CompareOp(object vts,object toolop)
-
Evaluate
()¶ Evaluate(object vts)
-
GetOp
()¶ It is often desirable to perform incremental updates to meshes, rather than simply evaluating a tool from scratch, every time an attribute changes. This is performed using a tool operation. A tool operation is spawned for every mesh the tool is expected to edit, and is used to perform an initial edit to the mesh. When a tool attribute changes, the tool operation is compared against the current state of the tool. If the tool operation is still valid, it will be updated to use the new tool attributes and re-evaluated to perform an incremental update to the previous evaluation. Tool Operations also are used in a procedural context. When a tool has been auto converted into a procedural tool item, it’s tool operation is evaluated as part of the procedural modeling system to perform initial and incremental edits to a procedural mesh. This set of functions is used to get the tool op, compare it against tool state and update the tool operation if the tool state is still valid.
Unknown object = GetOp(integer flags)
-
Order
()¶ string = Order()
-
Reset
()¶ The basic interface for tools is
Reset()
-
Sequence
()¶ Sequence(object seq)
-
ShouldBeAttribute
()¶ integer = ShouldBeAttribute(integer task)
-
Task
()¶ integer = Task()
-
UpdateOp
()¶ UpdateOp(object toolop)
-
VectorType
()¶ object = VectorType()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ToolModel¶
-
class
lxu.object.
ToolModel
¶ Empty ToolModel Python user class.
-
Down
(adjust)¶ The
Down(object vts,object adjust)
-
Draw
(stroke, flags)¶ Tools can draw themselves in graphic viewports with the
Draw(object vts,object stroke,integer flags)
-
Drop
()¶ Called when the tool is dropped.
Drop()
-
Enable
()¶ Tell whether tool can be set. This method retuns LXe_DISABLED if the tool is not ready to run and it also set the reason to the message. Otherwise it returns LXe_OK.
Enable(object msg)
-
Filter
(adjust)¶ Filter(object vts,object adjust)
-
Flags
()¶ A tool’s flags encode various interactive behaviors of the tool. This value should not change.
integer = Flags()
-
Haul
()¶ Some attributes can have automatic hauling behavior. Tools may expose up to 2 attributes for automatic hauling: the first attribute (index = 0) is displayed with horizontal graduations, the seconde one (index = 1) is displayed vertically. The ‘haul’ method returns the attribute name given its index.
string = Haul(integer index)
-
Help
()¶ Help or tips messages can be displayed during tool interaction using the ‘Help’ method. This function gets the tool vector and returns a pointer to a string.
string = Help(object vts)
-
Initialize
(adjust, flags)¶ The
Initialize(object vts,object adjust,integer flags)
-
Move
(adjust)¶ Move(object vts,object adjust)
-
Post
()¶ Post(object vts)
-
Test
(stroke, flags)¶ Test(object vts,object stroke,integer flags)
-
TestType
()¶ Test if the tool can be operated on the given viewport type. This meshod should return LXe_FALSE if the tool does not work on the viewport type. Otherwise it returns LXe_TRUE.
TestType(integer type)
-
Tooltip
(part)¶ This function allows clients to return a tooltip for the given tool part number.
string = Tooltip(object vts,integer part)
-
Track
(eventType)¶ Track(object vts,integer eventType)
-
TrackFlags
()¶ integer flags = TrackFlags()
-
Up
(adjust)¶ Up(object vts,object adjust)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ToolOperation¶
-
class
lxu.object.
ToolOperation
¶ Empty Tool Operation Python user class.
-
Blend
(blend)¶ Blend(object other,object blend)
-
Evaluate
()¶ A Tool Operation is a special interface that allows tools to be incrementally evaluated. The tool spawns and returns a Tool Operation interface. This tool operation interface is then used for evaluation and re-evaluation of the tool.
Evaluate(object vts)
-
ReEvaluate
()¶ ReEvaluate(object vts)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TransformScan¶
-
class
lxu.object.
TransformScan
¶ Empty TransformScan Python user class.
-
AlternateAxis
()¶ (matrix matrix,matrix inverse) = AlternateAxis()
-
AlternateCenter
()¶ vector center = AlternateCenter()
-
Enumerate
()¶ The transform scan interface is also for editing, but is specifically for use in tools which perform transformations. The encapsulates all the different element types
Enumerate(object visitor)
-
Flags
()¶ integer = Flags()
-
Position
()¶ The main function of the transform is to read the current position and write a new one.
float[] = Position()
-
SetPosition
()¶ vector pos = SetPosition()
-
Weight
()¶ The methods allow values to be read for per-element properties indicated by the flags.
float = Weight()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Tree¶
-
class
lxu.object.
Tree
¶ Empty Tree Python user class.
-
ChildIsLeaf
()¶ This returns LXe_TRUE if the current element has no children. It’s equivalent to calling
boolean = ChildIsLeaf()
-
Count
()¶ This returns the number of elements in this tier. This can be zero for elements with no children.
integer count = Count()
-
Current
()¶ The tree object maintains a current element, whose properties can be accessed through an
integer index = Current()
-
IsRoot
()¶ This returns LXe_TRUE if this tree has no parent. If so, calling
boolean = IsRoot()
-
ItemState
()¶ integer state = ItemState(string guid)
-
SetCurrent
()¶ SetCurrent(integer index)
-
SetItemState
(state)¶ SetItemState(string guid,integer state)
-
Spawn
()¶ The tree interface represents a single tier of a tree, which is a list of siblings, and a currently selected member of that list.
Tree object = Spawn(integer mode)
-
ToChild
()¶ ToChild()
-
ToParent
()¶ The tree object itself can be walked around the tree.
ToParent()
-
ToRoot
()¶ ToRoot()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TreeListener¶
-
class
lxu.object.
TreeListener
¶ -
ClearAllCachedThumbnails
()¶ ClearAllCachedThumbnails()
-
ClearCachedThumbnail
()¶ If the tree is using thumbnails with identifier strings, these allow it to purge specific thumbnails or all thubnails from the cache when it wants to provide new ones. Thumbnails are identified by the stirng assigned to them when they were originally returned.
ClearCachedThumbnail(string ident)
-
NewAttributes
()¶ NewAttributes just refreshes the contents of the existing tree cells, asking for new values to display.
NewAttributes()
-
NewShape
()¶ NewShape rebuilds the entire tree, and is used when the hierarchy or number visible of rows has changed in any way, including when folding or unfolding an entry to hide/show its children.
NewShape()
-
NewShowDescriptionText
()¶ This toggles the visibility of the smaller description text in the tree.
NewShowDescriptionText()
-
NewSpaceForThumbnails
()¶ This indicates that the size of the space reserved for thumbnails has changed, and that new thumbnails hsould be obtained.
NewSpaceForThumbnails()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TreeView¶
-
class
lxu.object.
TreeView
¶ Empty TreeView Python user class.
-
BadgeDetail
(badgeIndex, badgeDetail)¶ string = BadgeDetail(integer columnIndex,integer badgeIndex,integer badgeDetail)
-
BadgeType
(badgeIndex)¶ integer badgeType = BadgeType(integer columnIndex,integer badgeIndex)
-
BadgeType2
(badgeIndex)¶ integer badgeType = BadgeType2(integer columnIndex,integer badgeIndex)
-
BatchCommand
()¶ string = BatchCommand(integer columnIndex)
-
CanFilter
()¶ boolean = CanFilter()
-
CellCommand
()¶ Command cells are a powerful feature for both defining the contents of a cell and for interacting with it. Since all user interaction with a tree should be done with commands, it makes sense to use the command to define the cell itself.
string = CellCommand(integer columnIndex)
-
ColumnByIndex
()¶ This method defines the column and sets its title and width. ‘buf’ is a simple character buffer of length ‘len’ that is to be set to the human-readable title displayed in the column header, usually in the form of a “@table@msg” message table lokoup. Titles support message alternates, where the longest of the available messages that will fit is displayed in the title. The longest title is also displed in the hide/show column context menu (when you’ve also set an internal name with ColumnSetInternalName()). For this reason you should not encode icons in your title, instead specifying them separately via ColumnSetIconResource(); ‘columnWidth’ returns the width of the column. Positive numbers define the width in pixels, while negative numbers will set a column’s width to its relative fraction of the total remaining space. For example, two columns with widths -2 and -3 would get 2/5th and 3/5th of the width remaining in the pane after the fixed width columns are subtracted. A width of zero behaves the same as -1.
(string,integer columnWidth) = ColumnByIndex(integer columnIndex)
-
ColumnCount
()¶ These methods are used for controlling what columns are present in the tree view and some of their properties.
integer colCount = ColumnCount()
-
ColumnIconResource
()¶ An optional icon resource name can also be set for the column. This will be displayed in place of the column’s title if the column is too narrow for it to fit. The icon should be 13x13 pixels.
string = ColumnIconResource(integer columnIndex)
-
ColumnInternalName
()¶ nexus 10.1 introduces new column defintions that enchance the behavior of trees:
string = ColumnInternalName(integer columnIndex)
-
ColumnJustification
()¶ integer justification = ColumnJustification(integer columnIndex)
-
DescriptionText
()¶ Description text is optional smaller text displayed below the main text in a cell, usually providing secondary information like the path to a file or image resolution.
string = DescriptionText(integer columnIndex)
-
Filter
()¶ integer flags = Filter()
-
GetDragDropDestinationObject
(location)¶ Unknown object = GetDragDropDestinationObject(integer columnIndex,integer location)
-
GetDragDropSourceObject
(type)¶ Unknown object = GetDragDropSourceObject(integer columnIndex,string type)
-
IconResource
(width, height)¶ Get the icon by returning a string representing its resource name. If the icon is larger than the width and height requested, it will simply not be drawn.
string = IconResource(integer columnIndex,integer width,integer height)
-
IsDescendantSelected
()¶ The following method is entirely optional. Descendant selection highlighting will still work if this is not implemented, but if this IS implemented the treeview will be significantly more responsive. This should return true if the current node or any of it’s children is currently selected, or false otherwise.
boolean = IsDescendantSelected()
-
IsInputRegion
(regionID)¶ This is used by trees containing an input map based regions. If the given cell corresponds to a region at this location, the function should return LXe_TRUE. This allows regions to be restricted to specific items, types and/or columns. Selection and command execution will automatically be performed as necessary.
boolean = IsInputRegion(integer columnIndex,integer regionID)
-
IsSelected
()¶ boolean = IsSelected()
-
PrimaryColumnPosition
()¶ The final method of the treeview setup functionality is PrimaryColumnPosition. This allows you to change where in the treeview the primary column (the one with index 0 that contains the nesting) is displayed. 0 leaves it where it is, and other number pushing it that number of columns to the right.
integer index = PrimaryColumnPosition()
-
ReservedSpaceForIcons
()¶ This sets if the tree supports icons. Icons are defined through image resources, and space is resreved for them even if no icon is returned, ensuring that everything lines up nicely. By convention icons are 13x13, but other sizes can be chosen, and each column can have its own icon metrics. If iconAsValue is true, the icon will be drawn centered as the entire contents of the cell.
(integer columnIndex,integer width,integer height,integer iconAsValue) = ReservedSpaceForIcons()
-
ReservedSpaceForThumbnails
()¶ This sets if the tree supports thumbnails, reserving space for them and causing the tree to be asked for thumbnails to display. Note that only one column can have thumbnails at this time. Setting w/h to 0/0 will effectively turn off thumbnail support.
(integer columnIndex,integer width,integer height) = ReservedSpaceForThumbnails()
-
RestoreState
()¶ RestoreState(string uid)
-
Select
()¶ Select(integer mode)
-
ShowDescriptionText
()¶ This should return LXe_TRUE (or NOTIMPL) if the description text should be shown for the entire view, and false to hide it.
ShowDescriptionText()
-
StoreState
()¶ StoreState(string uid)
-
StyleHints
()¶ Note that the above flags MUST match the ICTSf_ (comp) and TPSTYLEf_ (panes) flags!
integer flags = StyleHints()
-
SupportedDragDropSourceTypes
()¶ string = SupportedDragDropSourceTypes(integer columnIndex)
-
Thumbnail
(width, height)¶ If space is reserved for a thumbnail, this method is called to return it as an ILxImageID. The thumbnail is drawn to the immediate left of the cell’s contents. Optimally, the thumbnail is already the correct resolution or smaller. If it is larger, by default it will be synchronously resized to fit, but this is slow and should be avoided if at all possible. The buf/len pair is used to get an identifier string to identify the thumbnail. This is only necessariy if you want the tree system to efficiently resize the thumbnail for you. If this string is empty, the thumbanil will be slowly resized (or not at all, if it’s equal to or smaller than requested size). When the string is not empty, large thumbnails will be asynchronously resized in the background to fit the reserved space. If a thumbnail with this string already exists in the cache, the ILxImageID returned is ignored and the cached one is used instead. Multiple entries in the tree can use the same thumbnail (by using the same string) if desired. If you are always returning icons at the requested size or smaller, you do not need to provide an identifier string, as the image can be used directly.
(Image object,string) = Thumbnail(integer columnIndex,integer width,integer height)
-
ToPrimary
()¶ Selection methods. ToPrimary should set the current referenced item to be the primary selection, and IsSelected returns LXe_TRUE or LXe_FALSE to determine whether the current item is selected or not. Select is called when a new primary selection is made (dropping any current selection)first, or when additional selections are added or removed. It is up to the client to maintain the list of selected items. Batch begin and end events are sent to the
boolean = ToPrimary()
-
ToolTip
()¶ The
string = ToolTip(integer columnIndex)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TriangleSoup¶
-
class
lxu.object.
TriangleSoup
¶ Empty TriangleSoup Python user class.
-
Connect
()¶ Connect allows the source to give hints about the connectivity of the elements in the soup. This is completely optional and there is no possibility of an error return.
Connect(integer type)
-
Polygon
(v1, v2)¶ Polygon(integer v0,integer v1,integer v2)
-
Segment
(type)¶ Segment(integer segID,integer type)
-
TestBox
()¶ A triangle “soup” consists of unconnected triangles grouped into segments. The idea of a soup is that although triangles may border on each other and share normals at those borders, there is no connectivity information in the data structure. What we have is just a big batch of triangles and it’s up to the renderer to assure that any transformations it applies will maintain continuity. While this places definite limitations on the renderer, it also makes it much easier to deal with gigantic meshes since they can be processed in arbitrarily small units. The triangle soup interface is passed to the surface object from the renderer, and the surface has the job of generating all the triangles that intersect the bounding box. The triangles are grouped into segments by the surface, each with a unique ID code. Before sending a segment the surface calls the
integer = TestBox(bounds bbox)
-
Vertex
()¶ Within each segment the surface calls
integer index = Vertex(float[] vertex)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
TriangleSurface¶
-
class
lxu.object.
TriangleSurface
¶ Empty TriangleSurface Python user class.
-
AddVector
(name)¶ integer index = AddVector(integer type,string name)
-
FixNormals
()¶ unsigned[] = FixNormals()
-
GetSize
()¶ (integer nvrt,integer ntri) = GetSize()
-
SetEdge
()¶ unsigned[] = SetEdge(integer edge)
-
SetEdgeCount
()¶ SetEdgeCount(integer nedge)
-
SetSize
(ntri)¶ SetSize(integer nvrt,integer ntri)
-
SetTriangle
()¶ unsigned[] = SetTriangle(integer tri)
-
SetVector
(vrt)¶ float[] = SetVector(integer index,integer vrt)
-
Triangles
()¶ unsigned[] = Triangles()
-
Vector
()¶ float[] = Vector(integer index)
-
VectorInfo
()¶ (integer type,string name,integer dim) = VectorInfo(integer index)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
UIHints¶
-
class
lxu.object.
UIHints
¶ It is not uncommon to want to use another command as the base for your own filter command’s priority. For example, the item.withTypeIsSelected command is used in for the Item Properties forms. In that case you could use ILxCommandService::SpawnFromString() to get an ILxCommand, then call ILxCommandService::AllocateUIHintsFromCommand() to get its hints. You can then use the ILxUIHintsRead interface on the returned object to call FormFilterPriority(), using that as the baiss for the new priority in your hints. You can also modify those hints and return them directly from your own command. Empty UIHints Python user class.
-
BooleanStyle
()¶ BooleanStyle(integer style)
-
ButtonHasPopoverDecoration
()¶ Most buttons perform actions or are toggles. Buttons that open dialogs usually have ellipsis in the label (like “Save…”), and ToolChoices have a small triangle in the lower-right corner. It is also useful to mark buttons that open popovers differently from the others. This flag can be set to indicate executing the command opens a popopover instead of performing an action, and will result in special decoration being added to the button’s face.
ButtonHasPopoverDecoration(integer state)
-
ChannelFlags
()¶ ChannelFlags(integer flags)
-
Class
()¶ Class changes the class of an attribute. The class change should be consistent with the argument type. Classes match those used by the old XPanels system (“iBoolean”, “integer”, “iPopChoice”, etc).
Class(string c)
-
ClipChoiceSupportsGroups
()¶ For ClipChoices (&clip datatype) the brower normally shows only clip items which can be evalauted for an actual image. Flags can be set with this method to allow other types of items as well.
ClipChoiceSupportsGroups(integer flags)
-
ForceUpdate
()¶ Force update is a special flag; if set, this will force the UI to refresh even if the UI object hasn’t otherwise changed since the last time the UI object was requested. This is most useful if your popup functions changed their list of properties since the last time they we called, thus forcing a refresh.
ForceUpdate()
-
FormFilterPriority
()¶ FormFilterPriority(integer priority)
-
InfoTextUseSmallFont
()¶ Info text controls (usually queried read-only command arguments) can be set to draw with a small font instead of the default font.
InfoTextUseSmallFont(integer state)
-
Label
()¶ The argument’s user-readable label can be set with this method. The string should be translated into the user’s language.
Label(string label)
-
MaxFloat
()¶ MaxFloat(float max)
-
MaxInt
()¶ MaxInt(integer max)
-
MinFloat
()¶ MinFloat(float min)
-
MinInt
()¶ These can be used to set the minimum and maximum for integer and float-based controls.
MinInt(integer min)
-
StepFloat
()¶ StepFloat(float step)
-
StepInt
()¶ This controls the step size of a minislider.
StepInt(integer step)
-
StringList
()¶ Choice/Popup controls can take a simple string list if desired.
string strings = StringList()
-
TextFixedWidthFont
()¶ String controls can also be told to use a fixed width font.
TextFixedWidthFont(integer state)
-
TextLines
()¶ String controls can have multiple lines, as set by this hint.
TextLines(integer lines)
-
TextPasswordMode
()¶ Sometimes it is useful for string controls to obscure their text, such as when entering a password, which can be set with this method.
TextPasswordMode(integer state)
-
Track
()¶ If tracking is turned on, drags on the minislider will cause instant updates.
Track(integer state)
-
ValuePresetCookie
()¶ Control types like numeric edit fields support “value presets”. This creates a popup containing a user-extensible list of common values for the argument. For example, rather than forcing the user to lookup or remember what the index of refraction is for glass, they can simply click on the popup and select glass from the list. Value presets are handled completely automatically by the attributes/forms system. All the client needs to do is provide a cookie, which is used to load and save the list of values from the config. The cookie can be shared by multiple controls if desired, and need not be unique.
ValuePresetCookie(string cookie)
-
VertmapAllowNone
()¶ Specifies when a value of (none) is allowed in the list. Default is TRUE.
VertmapAllowNone(integer state)
-
VertmapItemMode
()¶ Specifies that the list is only generated from the selected item. Default is FALSE.
VertmapItemMode(integer state)
-
VertmapType
()¶ The type of vertex map. Default is UV map.
VertmapType(integer type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
UIHintsRead¶
-
class
lxu.object.
UIHintsRead
¶ Empty UIHintsRead Python user class.
-
BooleanStyle
()¶ integer style = BooleanStyle()
-
ButtonHasPopoverDecoration
()¶ integer state = ButtonHasPopoverDecoration()
-
ChannelFlags
()¶ integer flags = ChannelFlags()
-
Class
()¶ The remainder of the methods match those in ILxUIHInts; see the ILxUIHInts docs for more information about how they are used and what values they return. The only method that is missing is StringList(), which is replaced with the enumeration methods
string = Class()
-
ClipChoiceSupportsGroups
()¶ integer flags = ClipChoiceSupportsGroups()
-
ForceUpdate
()¶ integer state = ForceUpdate()
-
FormFilterPriority
()¶ integer priority = FormFilterPriority()
-
InfoTextUseSmallFont
()¶ integer state = InfoTextUseSmallFont()
-
Label
()¶ string = Label()
-
MaxFloat
()¶ float max = MaxFloat()
-
MaxInt
()¶ integer max = MaxInt()
-
MinFloat
()¶ float min = MinFloat()
-
MinInt
()¶ integer min = MinInt()
-
StepFloat
()¶ float step = StepFloat()
-
StepInt
()¶ integer step = StepInt()
-
StringListByIndex
()¶ string = StringListByIndex(integer index)
-
StringListCount
()¶ integer count = StringListCount()
-
TextFixedWidthFont
()¶ integer state = TextFixedWidthFont()
-
TextLines
()¶ integer lines = TextLines()
-
TextPasswordMode
()¶ integer state = TextPasswordMode()
-
Track
()¶ integer state = Track()
-
ValuePresetCookie
()¶ string = ValuePresetCookie()
-
VertmapAllowNone
()¶ integer state = VertmapAllowNone()
-
VertmapItemMode
()¶ integer state = VertmapItemMode()
-
VertmapType
()¶ integer type = VertmapType()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
UIValueHints¶
-
class
lxu.object.
UIValueHints
¶ Empty UIValueHints Python user class.
-
ColorPickerCommands
(alpha, rgbAlt, alphaAlt, useAlt, bufLens)¶ Commands with arguments using the “color” datatype are available for use in the color picker. This happens automatically when the user clicks on a color control in a form, which calls select.color to add the queried command to the color selection. Any command with a queriable “color”-datatype argument can be selected for the color picker through select.color. The limitation of the color controls adding the command that created them is that it can only add a single command representing the RGB component of the color. Sometimes there is a related command that implements the alpha component. Other times there is an alternate color, such as the FG and BG colors used by the paint tools. This method allows a command to override what commands are placed in the color picker selection when a control created from this command’s queried “color” argument is clicked on by the user A command can implement this method to return one or more command queries that should be used in place of the command itself. Note that the alpha commands are separate from the RGB commands. The useAlt command is used to decide if the main or alternate RGB and alpha are displayed in the color picker, and is used to swap them. RGB commands should have “color”-datatype arguments being queried. For example, “item.channel diffCol ?”. The queried argument is used both to get the current value and to change the value when the user picks a new color. Similarly, alpha commands should have a “percent”-datatype argument queried, and the useAlt command should have a “boolean” argument queried. All of these command are optional, and can be set to empty strings (first char ‘') to skip them. If the method is not implemented, the current color selection will be used. If the RGB command string is empty, then the command itself will be used for that. If the alpha command is empty, then the alpha control in the color picker will be disabled. If rgbAlt is not empty, then the alternate color swatch and the swap icon will appear in the color picker. If the useAlt command is empty, “color.useAlt ?” will automatically be used instead. It is important to note that some clients may not want all the strings, in which case some of the pointers may be NULL.
ColorPickerCommands(byte[] rgb,byte[] alpha,byte[] rgbAlt,byte[] alphaAlt,byte[] useAlt,integer bufLens)
-
CueText
()¶ For strings, this is shown when the field contains no value and is otherwise completely empty. It is drawn dimmed, and disappears as soon as the user clicks in the field. Cue text is also used as the default value for read-only string controls when the string is empty so that we don’t leave a hole in the interface.
string = CueText()
-
Flags
()¶ integer = Flags()
-
FormCommandListByIndex
()¶ string command = FormCommandListByIndex(integer index)
-
FormCommandListCount
()¶ The Form Command List (FCL) is a special feature used by very few commands. It is a powerful mechanism that allows a command to effectively dynamically insert controls in a form by providing them as a list of command strings. In this context, the “owning” command itself will not be execute, but rather those in the Form Command List may. Here’s how it works: when a command is in a form and an argument is queried, the attrs/forms system will first check for the LXfVALHINT_FORM_COMMAND_LIST flag. If not found, the command appears as normal. If the flag is found, however, the command itself will not appear in the form. Instead, each command represented by the strings returned by the Form Command List will be displayed in instead. If the command string starts with a dash and a space (“- “), then a divider will be inserted into the form using whatever follows the space as the label (and which is hopefully a translated, user-readable string). Ganging is also supported through its own special syntax. Ganging is started by prefixing a command string with an open curly brace and a space (“{ “). All controls after that will be ganged until a command prefixed with a closing curly brace and a space (“} “) is found. Note that even though the brace is closed before the command string, the command is still considered part of the gang. Viewports can be embedded in forms as well. This can be done through presets and viewport types. Viewport presets can be embedded with “+vpPreset presetHash”, where “presetHash” is the hash of the preset as stored in the config. A viewport type is added with “+vpType viewportType”. Arguments can then be set on the instanced viewport by immediately following the “+vpType” line with one or more “> argName argDataType argValue” lines, where “argName” is the internal name of the viewport’s argument, “argDataType” the internal name of the dargument’s datatype, and and everything after that space is the argument’s value. Any number of arguments can be added this way. Viewport types also have a special entry, “> =hash:”. This allows viewport types to save their state to the config with a custom hash, which immediately follows the colon. This is not supported for viewport presets, only for types. Since UI hints are defined per argument, the argument must be marked as queriable, even if the query method fails. When commands exist solely for the purposes of creating an FCL (item.channelsAsFormControls, for example), the LXfCMD_NO_EXEC command flag should be set to indicate that it is not executable, after which the Execute() method does not need to be implemented. It also also suggested to providing the NoExecReason cmdhelp atom to tell the user why the command does not support execution.
integer count = FormCommandListCount()
-
ItemTest
()¶ The
boolean = ItemTest(object item)
-
NotifierByIndex
()¶ This second method returns the name of the notifier and its arguments as strings given a notifier index.
(string name,string args) = NotifierByIndex(integer index)
-
NotifierCount
()¶ integer count = NotifierCount()
-
PopCategory
()¶ This returns the name of a category. Combined with the popup functions defined above, this can be used to create a hierarchical popup based on categorization defined through the config. Each entry is assigned to a part of the hierarchy by adding named entries to the appropriate portion of the config file, and are easily extensible by third parties by simply adding new config entries. An example of category use is Add Layer popup in the Shader Tree. There is no flag matching this method; it will always be called for string-style controls, but you can return LXe_NOTIMPL if you do not want to use categories in your popup.
string category = PopCategory()
-
PopCount
()¶ Popups are flat lists, and can be represented by integer or, preferably, string stirng-based arguments. Strings are prefereed because they are more scriptable and the order can be changed more easily without affecting legacy use.
integer = PopCount()
-
PopFlags
()¶ integer flags = PopFlags(integer index)
-
PopIconImage
()¶ These return an icon for a specific entry. If both fail, no icon will be drawn for that entry. The icon can be the name of an icon resource from a config file, or a custom ILxImageID, which will be released by the popup system.
Image object = PopIconImage(integer index)
-
PopIconResource
()¶ string iconResource = PopIconResource(integer index)
-
PopIconSize
()¶ Each entry in a poup can have an icon or image associated with it, which will appear to the left of the entry’s name. This method returns the amount of space reserved for the icons. If not implemented, no space is reserved.
(integer,integer w,integer h) = PopIconSize()
-
PopInternalName
()¶ string = PopInternalName(integer index)
-
PopToolTip
()¶ Tooltips strings can be returned by individual entries in the popup.
string = PopToolTip(integer index)
-
PopUserName
()¶ string = PopUserName(integer index)
-
TextValidate
()¶ For strings, this function will be called to validate the text value. It allows the client to modify the string, performing operations such as removing invalid characters, changing case, or clipping the length of the string.
string = TextValidate(string value)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
UserValue¶
-
class
lxu.object.
UserValue
¶ Empty UserValue Python user class.
-
Action
()¶ Get the action (command string) executed when the user value changes. Returns NOTFOUND if no action is set.
string action = Action()
-
ArgType
()¶ string argType = ArgType()
-
AsUI
()¶ Get if changing the user value via user.value be treated as an undoable UI command instead of an undoable model command. UI commands exist in the undo stack only until a model command is executed, while model commands persist in the stack. UI mode is useful when creating preferences, while model mode is useful when the user value is used to directly affect the scene itself, usually by performing an assocated action when the value changes. This returns LXe_TRUE for UI style behavior, and LXe_FALSE for model style behaviors.
boolean = AsUI()
-
DefaultValue
()¶ Get the default value as an
Unknown object = DefaultValue()
-
DeferAction
()¶ This returns LXe_TRUE if an action is to be deferred after refiring has completed, and LXe_FALSE if not. It returns NOTFOUND if no action is set.
boolean = DeferAction()
-
DialogUserName
()¶ Get the dialog username string for the user value. Returns NOTFOUND if none is set.
string username = DialogUserName()
-
EnableCommand
()¶ Get the command whose enable state is also applied to this user value. Returns NOTFOUND if none is set.
string command = EnableCommand()
-
FloatRange
()¶ Get the min/max values. There are separate functions for float and int types, as well as flags indiciating if min/max is set.
(integer hasMin,float min,integer hasMax,float max) = FloatRange()
-
GetFlt
()¶ float val = GetFlt()
-
GetInt
()¶ These return the value of the user value.
integer val = GetInt()
-
GetString
()¶ string = GetString()
-
IntRange
()¶ (integer hasMin,integer min,integer hasMax,integer max) = IntRange()
-
InvertEnableCommandTest
()¶ Get if the enable command test is inverted or not. Normally, when the enable command is disabled, or it is enabled but queries to false, then the user value is also disabled. This simply flips the test.
boolean = InvertEnableCommandTest()
-
IsTransient
()¶ For config user values, this returns LXe_TRUE if a user value is transient, and LXe_FAILS if not. Transient values have a default that is loaded from the config, but the new value is never written to the config
(boolean,integer isTransient) = IsTransient()
-
Lifespan
()¶ integer life = Lifespan()
-
List
()¶ Get the list and their names as string, similar to the one passed to user.def. The ArgumentType used to get usernames from the config is also available. These methods fail with NOTAVAILABLE for non-integer types, and fail with NOTFOUND if they are not set.
string list = List()
-
ListNames
()¶ string listNames = ListNames()
-
Name
()¶ These methods get the value’s name and username. If the username is not set, this just returns the name. The
string name = Name()
-
Notifier
()¶ Get the notifier that causes the user value’s control to be updated in the interface. Returns NOTFOUND if none is set.
string notifier = Notifier()
-
Type
()¶ These return the type (as an LXi_TYPE_ define) and type name of the user value.
integer type = Type()
-
TypeName
()¶ string tname = TypeName()
-
UIMode
()¶ integer uiMode = UIMode()
-
UserName
()¶ string username = UserName()
-
ValuePresetCookie
()¶ Get the value preset cookie string for the user value. Returns NOTFOUND if no action is set.
string cookie = ValuePresetCookie()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
UserValueListener¶
-
class
lxu.object.
UserValueListener
¶ Empty UserValueListener Python user class.
-
Added
()¶ This is called after a new user value is added. The object provided has an
Added(object userValue)
-
DefChanged
()¶ This is called when the definition (one of the properties) of a user value has changed. The object provided has an
DefChanged(object userValue)
-
Deleted
()¶ This is called just after an existing user value is deleted. Since the object was just deleted, only the name is provided.
Deleted(string name)
-
ValueChanged
()¶ This is called when the user value’s value changes. It is also called for all user values on startup, thus ensuring that clients that only listen for this event can get useful default values. The object provided has an
ValueChanged(object userValue)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Value¶
-
class
lxu.object.
Value
¶ The Python user class add Get() and Set() methods that try to hide type conversions.
-
Clone
()¶ The Clone method returns a duplicate of the value server. The data for the value is also copied, allowing the clone to be modified, without affecting the source value.
Value object = Clone()
-
Compare
()¶ The Compare method will compare this Value object against another of the same type. This works in a similar way to string comparison, with a diff value of -1 for less than, 0 for equal to, and 1 for greater than. If the objects are the same, the result code will be LXe_TRUE.
integer diff = Compare(object other)
-
Copy
()¶ Similar to Clone, the Copy method will be copy the data from the Value object, however, instead of returning a new object, the data will be copied to the object passed in. The target and source Value servers must have the same implementation.
Copy(object from_obj)
-
Get
()¶
-
GetFlt
()¶ float val = GetFlt()
-
GetInt
()¶ The actual value of the value can be read and optionally set several different ways.
integer val = GetInt()
-
GetString
()¶ string = GetString()
-
Intrinsic
()¶ A somewhat more raw method can give generic access to the intrinsic types. For integer types this is a pointer to int; for float types it’s a pointer to double; for string types it’s a pointer to char. Other value types may return null.
pointer = Intrinsic()
-
Set
(value)¶
-
SetFlt
()¶ SetFlt(float val)
-
SetInt
()¶ SetInt(integer val)
-
SetString
()¶ SetString(string val)
-
SubTypeName
()¶ In some cases, Value objects are simply containers for other value types. The SubTypeName method returns the name of the value type contained.
string name = SubTypeName()
-
Type
()¶ The Type method returns the intrinsic type, in a similar way to the Attributes interface. The return value will either be LXi_TYPE_INTEGER, LXi_TYPE_FLOAT, LXi_TYPE_STRING or LXi_TYPE_OBJECT.
integer = Type()
-
TypeName
()¶ The TypeName method indirectly returns a string representing the name of the value type. This is usually the name of the server that implements the value, but this is not guaranteed.
string name = TypeName()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ValueArray¶
-
class
lxu.object.
ValueArray
¶ In Python we support ‘x = array[i]’, and ‘array + x’ for appending atomic value types.
-
AddEmptyValue
()¶ This adds an uninitialized value to the container, optionally returning it to the caller. This is useful if you just need a dummy value to fill a gap. Another common use is to the returned value object to decode a string.
Value object = AddEmptyValue()
-
AddFloat
()¶ AddFloat(float value)
-
AddInt
()¶ AddInt(integer value)
-
AddString
()¶ AddString(string value)
-
AddValue
()¶ These add new values to the container. Note that the original value is still owned by the client. Also note that these only work on matching datatypes
AddValue(object value)
-
Count
()¶ This returns the number of values currently in the container.
integer = Count()
-
FirstUnique
()¶ This returns the index of the first unique value found that is different from the 0th index, or -1 if all the values are identical. This is useful for creating mixed argument lists for user interfaces.
integer uniqueIndex = FirstUnique()
-
GetFloat
()¶ float value = GetFloat(integer index)
-
GetInt
()¶ integer value = GetInt(integer index)
-
GetString
()¶ string = GetString(integer index)
-
GetValue
()¶ These get values out of the container. Note that the ILxValueID provided from
Value object = GetValue(integer index)
-
Remove
()¶ This removes an element from the array at the specified index. If the index is out of bounds, the function returns LXe_OUTOFBOUNDS.
Remove(integer index)
-
Reset
()¶ This empties the container, freeing all values within.
Reset()
-
SetFloat
(value)¶ SetFloat(integer index,float value)
-
SetInt
(value)¶ SetInt(integer index,integer value)
-
SetString
(value)¶ SetString(integer index,string value)
-
SetValue
(value)¶ These methods set the value of an existing element in the value array, replacing the value stored at the specified index.
SetValue(integer index,object value)
-
Type
()¶ These returns the type of the values stored in the container. Type is an LXi_TYPE_* identifier, while TypeName is the ExoType’s actual name string.
integer type = Type()
-
TypeName
()¶ string name = TypeName()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ValueConversion¶
-
class
lxu.object.
ValueConversion
¶ Empty ValueConversion Python user class.
-
Convert
(fromType, to_obj, toType)¶ When the conversion occurs, the “from” value and it’s type is passed to this method along with the “to” value, and it’s type. This method should set the value of the “to” object, using the value of the “from” object.
Convert(object from_obj,string fromType,object to_obj,string toType)
-
Test
(toType)¶ Value Conversion servers allow one value type to be converted into another. For example, converting an integer into a string. This method should return LXe_TRUE or LXe_FALSE if the value type can handle a conversion from one type to another.
Test(string fromType,string toType)
-
set
()¶ bool = set(object source)
-
test
()¶ Value Conversion servers allow one value type to be converted into another. For example, converting an integer into a string. This method should return LXe_TRUE or LXe_FALSE if the value type can handle a conversion from one type to another.
bool = test()
-
ValueMath¶
-
class
lxu.object.
ValueMath
¶ Empty ValueMath Python user class.
-
Add
()¶ Add(float delta)
-
Blend
(blend)¶ Blend(object other,float blend)
-
Detent
()¶ integer = Detent()
-
Multiply
()¶ Multiply(float factor)
-
Step
()¶ Numeric or quasi-numeric values can be modified through the value-math interface.
Step(integer direction)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ValueReference¶
-
class
lxu.object.
ValueReference
¶ Empty ValueReference Python user class.
-
GetObject
()¶ Unknown object = GetObject()
-
IsSet
()¶ Some values are references to other object types. This interface allows access to the referenced object, as well as a query for knowing if a reference is set.
boolean = IsSet()
-
SetObject
()¶ SetObject(object obj)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ValueTexture¶
-
class
lxu.object.
ValueTexture
¶ Empty ValueTexture Python user class.
-
Cleanup
()¶ Cleanup(pointer data)
-
IsSampleDriven
()¶ (integer,integer idx) = IsSampleDriven()
-
LinkChannels
(item)¶ LinkChannels(object eval,object item)
-
LinkSampleChannels
(item)¶ integer idx = LinkSampleChannels(object nodalEtor,object item)
-
Setup
()¶ Setup(pointer data)
-
SetupChannels
()¶ The new and current version of the interface support the ‘LinkSampleChannels’, ‘IsSampleDriven’ and ‘Setup’ methods.
SetupChannels(object addChan)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
Variation¶
-
class
lxu.object.
Variation
¶ Empty Variation Python user class.
-
Do
(y)¶ When the user double clicks on a variation in the variation viewer, this method will be called. A undoable command should be used to apply the changes to the scene.
Do(float x,float y)
-
Initialize
(chanRead)¶ Initialize is called to get the initial X and Y values to determine the start position for the variation viewport. This allow the center thumbnail in the viewport to correctly match the current state of the selected item.
(float x,float y) = Initialize(object item,object chanRead)
-
RangeX
()¶ The client should provide the min and max range of the X value and Y value. The variation viewport will be limited to these bounds.
(float min,float max) = RangeX()
-
RangeY
()¶ (float min,float max) = RangeY()
-
TestItem
(chanRead)¶ This method should return either LXe_TRUE or LXe_FALSE, indicating whether the variation server supports the provided item.
boolean = TestItem(object item,object chanRead)
-
Thumb
(y, size, chanRead)¶ Given a specific X and Y value, the Thumb method is expected to return an
Unknown object = Thumb(float x,float y,integer size,object chanRead)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorCanvas¶
-
class
lxu.object.
VectorCanvas
¶ Empty Vector Canvas Python user class.
-
BeginEditBatch
()¶ Editing canvas data can be expensive, as any change to the data can trigger events that other systems react to. The edit batch allows a group of similar changes to be combined, so the events will not be triggered until the edit is finished and the batch is closed.
BeginEditBatch()
-
EndEditBatch
()¶ EndEditBatch()
-
GetItem
()¶ The GetItem function returns the item that the vector canvas server is stored on. If the canvas is not associated with an item, the function will return NOTAVAILABLE.
Item object = GetItem()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorKnotPacketTranslation¶
-
class
lxu.object.
VectorKnotPacketTranslation
¶ Empty VectorKnotPacketTranslation Python user class.
-
Canvas
()¶ VectorCanvas object = Canvas(pointer packet)
-
Item
()¶ Item object = Item(pointer packet)
-
Path
()¶ VectorPath object = Path(pointer packet)
-
Shape
()¶ VectorShape object = Shape(pointer packet)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorList¶
-
class
lxu.object.
VectorList
¶ Empty VectorList Python user class.
-
Append
()¶ integer index = Append()
-
Clear
()¶ Clear()
-
Count
()¶ integer = Count()
-
Current
()¶ integer = Current()
-
Optional
()¶ pointer = Optional(integer offset)
-
SetCurrent
()¶ SetCurrent(integer index)
-
SetPacket
(pdat)¶ SetPacket(integer offset,pointer pdat)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorListener¶
-
class
lxu.object.
VectorListener
¶ Empty Vector Listener Python user class.
-
Destroy
()¶ This event is sent when the canvas is destroyed.
Destroy()
-
KnotPosition
(path)¶ When a knot changes position, this event will be called. The shape and path are provided as arguments, and the path accessor is pointing at the knot that has changed.
KnotPosition(object shape,object path)
-
PathAdd
(path)¶ After a path is added, this event will be called. The shape and path are passed as arguments.
PathAdd(object shape,object path)
-
PathRemove
(path)¶ Before a path is removed, this event will be called. The shape and path are passed as arguments.
PathRemove(object shape,object path)
-
ShapeAdd
()¶ After a shape is added, this event will be called. The shape is passed as an argument.
ShapeAdd(object shape)
-
ShapeRemove
()¶ Before a shape is removed, this event will be called. The shape is passed as an argument.
ShapeRemove(object shape)
-
ShapeStyle
(name)¶ This event is used to mark a shape style change. The shape and name of the style are passed as arguments.
ShapeStyle(object shape,string name)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorPath¶
-
class
lxu.object.
VectorPath
¶ Empty Vector Path Python user class.
-
ID
()¶ This methods returns the ID of the curent knot or null if none.
id = ID()
-
IsPathClosed
()¶ Paths can either be open or closed. This state can be queried and modified using the following functions.
boolean = IsPathClosed()
-
KnotCount
()¶ This function returns the number of knots that make up the path.
integer count = KnotCount()
-
KnotEnumerate
()¶ Knots can be enumerated using a visitor. For each knot, the visitor evaluate function will be called, and the path accessor will be updated to point at the new knot.
KnotEnumerate(object visitor)
-
Pos
()¶ This methods returns the position of the curent knot.
(float x,float y) = Pos()
-
SelectKnot
()¶ Knots can be “selected” directly. When a knot is selected, querying the properties of the knot will return information about this knot.
SelectKnot(id knot)
-
SelectKnotByIndex
()¶ Knots can be “selected” by index. When a knot is selected, querying the properties of the knot will return information about this knot.
SelectKnotByIndex(integer index)
-
SetPathClosed
()¶ SetPathClosed(integer closed)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorPathPacketTranslation¶
-
class
lxu.object.
VectorPathPacketTranslation
¶ Empty VectorPathPacketTranslation Python user class.
-
Canvas
()¶ VectorCanvas object = Canvas(pointer packet)
-
Item
()¶ Item object = Item(pointer packet)
-
Packet
()¶ pointer = Packet(object path)
-
Path
()¶ VectorPath object = Path(pointer packet)
-
Shape
()¶ VectorShape object = Shape(pointer packet)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorShape¶
-
class
lxu.object.
VectorShape
¶ Empty Vector Shape Python user class.
-
Parent
()¶ A shape can be queried for it’s parent using the following function. If this shape is the top-most shape, the function will return NOTFOUND, however this shape can be queried for an
VectorShape object = Parent()
-
PathByIndex
()¶ This allows a path to be accessed by index. The object returned can be queried for an
VectorPath object = PathByIndex(integer index)
-
PathCount
()¶ A shape can contain multiple paths. This function returns the number of paths stored on a shape.
integer count = PathCount()
-
ShapeByIndex
()¶ This allows a child shape to be accessed by index. The object returned can be queried for an
VectorShape object = ShapeByIndex(integer index)
-
ShapeCount
()¶ Shapes can contain multiple sub-shapes. This function returns the number of child shapes that a shape contains.
integer count = ShapeCount()
-
Transform
()¶ A shape can be transformed by passing a 3x3 matrix that encodes a 2D rotation, 2D transform, and 2D scale to be applied to the shape.
Transform(matrix matrix)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorShapePacketTranslation¶
-
class
lxu.object.
VectorShapePacketTranslation
¶ Empty VectorShapePacketTranslation Python user class.
-
Canvas
()¶ VectorCanvas object = Canvas(pointer packet)
-
Item
()¶ Item object = Item(pointer packet)
-
Packet
()¶ pointer = Packet(object shape)
-
Shape
()¶ VectorShape object = Shape(pointer packet)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorStack¶
-
class
lxu.object.
VectorStack
¶ Empty VectorStack Python user class.
-
Optional
()¶ The two variants are stacks and lists. The stack interface adds methods for pushing and popping, and the list interface allows access to the current value index.
pointer = Optional(integer offset)
-
Pop
()¶ Pop()
-
Push
()¶ Push()
-
SetPacket
(pdat)¶ SetPacket(integer offset,pointer pdat)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VectorType¶
-
class
lxu.object.
VectorType
¶ Empty VectorType Python user class.
-
ByIndex
(index)¶ (integer,integer flags) = ByIndex(integer type,integer index)
-
Category
()¶ string = Category()
-
Count
()¶ integer = Count(integer type)
-
Test
()¶ integer = Test(integer offset)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VertexPacketTranslation¶
-
class
lxu.object.
VertexPacketTranslation
¶ Empty VertexPacketTranslation Python user class.
-
Item
()¶ Item object = Item(pointer packet)
-
Mesh
()¶ Mesh object = Mesh(pointer packet)
-
Packet
(polygon, mesh)¶ pointer = Packet(id vertex,id polygon,object mesh)
-
Polygon
()¶ id polygon = Polygon(pointer packet)
-
Vertex
()¶ id vertex = Vertex(pointer packet)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
View¶
-
class
lxu.object.
View
¶ Empty View Python user class.
-
Aspect
()¶ float = Aspect()
-
Axis
()¶ integer = Axis()
-
Center
()¶ vector center = Center()
-
Dimensions
()¶ (integer w,integer h) = Dimensions()
-
EyeVector
()¶ (float,vector eye) = EyeVector(vector pos)
-
Focal
()¶ (float flen,float fdist) = Focal()
-
GridSize
()¶ float = GridSize()
-
GridSnap
()¶ float = GridSnap()
-
InvMatrix
()¶ matrix xfrm = InvMatrix()
-
Matrix
()¶ matrix xfrm = Matrix()
-
Ortho
()¶ (integer index,integer spin) = Ortho()
-
PixelScale
()¶ float = PixelScale()
-
Scale
()¶ float = Scale()
-
ScreenNormals
()¶ (vector ax,vector ay,vector az) = ScreenNormals(vector pos)
-
ToModel
(y, snap)¶ vector pos = ToModel(integer x,integer y,integer snap)
-
ToScreen
()¶ (integer,float x,float y) = ToScreen(vector pos)
-
ToScreen3
()¶ (integer,vector vp) = ToScreen3(vector pos)
-
Type
()¶ integer = Type()
-
WorkPlane
()¶ (integer,vector center) = WorkPlane()
-
Zoom
()¶ float = Zoom()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
View3D¶
-
class
lxu.object.
View3D
¶ Empty View3D Python user class.
-
Angles
()¶ vector hpb = Angles()
-
Axis
()¶ (integer,integer cam,vector axis) = Axis()
-
BackdropAspect
()¶ (integer,float asp) = BackdropAspect()
-
BackdropLook
()¶ (integer,float brit,float cont,float trns) = BackdropLook()
-
BackdropName
()¶ string = BackdropName()
-
BackdropOrient
()¶ (integer,float ang) = BackdropOrient()
-
BackdropPlace
()¶ (float cx,float cy,float w,float h) = BackdropPlace()
-
BackdropRender
()¶ (integer,integer resolution,integer blend) = BackdropRender()
-
Bounds
()¶ (integer x,integer y,integer w,integer h) = Bounds()
-
Center
()¶ vector center = Center()
-
Deformers
()¶ Deformers()
-
EyeVector
()¶ (float,vector pos,vector dir) = EyeVector()
-
FrameRate
()¶ float = FrameRate()
-
GridSize
()¶ float = GridSize()
-
InvalidateSurface
()¶ InvalidateSurface(object item)
-
ItemIsVisible
()¶ ItemIsVisible(object item)
-
ItemShade
()¶ These functions are to get item specific properties on the viewport. When “Enable Independent Drawing” is enabled on the viewport, they returns the properties from “Draw Options” on the item.
integer shade = ItemShade(object item)
-
Matrix
()¶ matrix mat = Matrix(integer inverse)
-
PixelSize
()¶ float = PixelSize()
-
SetCenter
()¶ SetCenter(vector vec)
-
SetMatrix
()¶ SetMatrix(matrix mat)
-
SetScale
()¶ SetScale(float scl)
-
Space
()¶ integer = Space()
-
Style
()¶ integer = Style(integer option)
-
To3D
(y, flags)¶ vector pos = To3D(float x,float y,integer flags)
-
To3DHit
(y)¶ (vector pos,vector nrm) = To3DHit(float x,float y)
-
ToUVHit
(x, y, layer)¶ (float u,float v) = ToUVHit(string name,float x,float y,integer layer)
-
WorkPlane
()¶ (integer,vector center) = WorkPlane()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
ViewItem3D¶
-
class
lxu.object.
ViewItem3D
¶ Empty ViewItem3D Python user class.
-
Draw
(strokeDraw, selectionFlags, itemColor)¶ Draw(object chanRead,object strokeDraw,integer selectionFlags,vector itemColor)
-
DrawBackground
(strokeDraw, itemColor)¶ DrawBackground(object chanRead,object strokeDraw,vector itemColor)
-
HandleChannel
()¶ integer chanIndex = HandleChannel(integer handleIndex)
-
HandleCount
()¶ integer count = HandleCount()
-
HandleMotion
()¶ (integer handleFlags,float min,float max,vector plane,vector offset) = HandleMotion(integer handleIndex)
-
HandlePositionToValue
(position)¶ float chanValue = HandlePositionToValue(integer handleIndex,vector position)
-
HandleValueToPosition
(chanValue)¶ vector position = HandleValueToPosition(integer handleIndex,double[] chanValue)
-
Test
(strokeDraw, selectionFlags, itemColor)¶ “Test” is called to hit test the item. If “Test” is not implemented, “Draw” method is called for hit testing.
Test(object chanRead,object strokeDraw,integer selectionFlags,vector itemColor)
-
WorldSpace
()¶ boolean = WorldSpace()
-
set
()¶ bool = set(object source)
-
test
()¶ “Test” is called to hit test the item. If “Test” is not implemented, “Draw” method is called for hit testing.
bool = test()
-
ViewObject¶
-
class
lxu.object.
ViewObject
¶ Empty View Object Python user class.
-
ByIndex
(index)¶ The ByIndex method is expected to return draw passes by index of the requested type.
ViewObject object = ByIndex(integer type,integer index)
-
ByView
()¶ If the ViewObject drawing varies per viewport, this function will be called. It is expected to return a copy of itself, configured to generate draw passes for the provided viewport.
ViewObject object = ByView(object view)
-
Count
()¶ The Count method is expected to return the number of available draw passes of the requested type.
integer = Count(integer type)
-
Flags
()¶ The Flags method allows the ViewObject to declare some properties that determine how it should be evaluated.
integer = Flags()
-
Generate
()¶ If the TestMode function has declared that work needs to be done to generate the ViewObject data, the Generate function will be called. It is expected to generate new draw passes of the requested type. This function may be called from threads if that is supported.
Generate(integer type)
-
TestMode
()¶ The TestMode function is used to test if a draw pass type is available. It is called with a single type, such as BBox or Surface. If the function returns LXe_TRUE, it has been generated and is available. If the function returns LXe_FALSE, the Generate function should be called to generate that data. The function can also return LXe_NOTREADY to specify that the ViewObject is working on generating the data in a thread, or LXe_NOTAVAILABLE if the requested data is not supported.
TestMode(integer type)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VirtualDevice¶
-
class
lxu.object.
VirtualDevice
¶ Empty VirtualDevice Python user class.
-
Date
()¶ string = Date()
-
Extract
()¶ Extract(string dest)
-
Initialize
()¶ Initialize(string path)
-
Name
()¶ string = Name()
-
Scan
()¶ Scan(object visitor)
-
Select
()¶ Select(string sub)
-
Size
()¶ float bytes = Size()
-
Type
()¶ integer type = Type()
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
VirtualModel¶
-
class
lxu.object.
VirtualModel
¶ Empty VirtualModel Python user class.
-
Down
()¶ Virtual Models can handle mouse input using the Down, Move and Up methods.
Down(object vts)
-
Draw
()¶ Virtual Models can draw into graphic viewports with the Draw and Test methods. Draw is called to update the stroked model in the view, and Test is called when performing mouse rollover to define regions for hit testing.
Draw(object stroke)
-
Flags
()¶ The flags method determines various interactive behaviors for the virtual model. These values should be a combination of LXfTMOD flags. This value should not change.
integer = Flags()
-
Move
()¶ Move(object vts)
-
Test
()¶ Test(object stroke)
-
Tooltip
()¶ This function allows clients to return a tooltip for the given part number.
string = Tooltip(integer part)
-
Track
()¶ This function allows clients to get the part number the mouse is over. If the mouse is not over a part, the part number is -1.
Track(integer part)
-
Up
()¶ Up(object vts)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-
WeightMapDeformerItem¶
-
class
lxu.object.
WeightMapDeformerItem
¶ Empty WeightMapDeformerItem Python user class.
-
GetColor
()¶ vector col = GetColor(object chanRead)
-
GetMapName
()¶ A subset of deformer items get their weights from weight maps. This interface allows the weight map for the deformer to be displayed and edited in the 3D view.
string = GetMapName(object chanRead)
-
set
()¶ bool = set(object source)
-
test
()¶ bool = test()
-