Layerservice

layerservice

Commands are executed and queried directly through the command syntax description previously in this guide, but this doesn?t provide any detailed information about meshes and their related elements.

The layerservice ScriptQuery can be used to obtain this detailed mesh information.

Many item-level operations in layerservice have been superseded by those in ‘’’sceneservice]]’’’. Be sure to check [[sceneservice to see if it is more appropriate to your task than layerservice. In general, when you want to deal with items and their channels or when you want scene-level information, you’ll mostly be making use of sceneservice. When you want to deal with modeling operations or need to obtain information about the specific vertices, polygons and edges of a mesh, you’d use layerservice.

Due to its design, layerservice is only meant to work on mesh items. Attempting to pass other kinds of items to any of the attributes will fail.

Special Selectors

This interface hosts a series of global lists of layers, models, materials, parts, textures, clips and vertex maps. There are also local lists specific to the layer selection for accessing vertices, edges and polygons.

The root-level attributes ending in an ?s? all return valid selectors for the more specific property attributes, similar to how the return values from the commandservice]] commands and [[categories attributes are the selectors for the more specific property attributes. However, the layerservice ?s? attributes require the use of selectors returned by the various attributes ending in _groups to filter the query to specific groups of elements.

The ?s? attributes are ‘’layers, kids, materials, parts, textures, clips, vmaps, verts, polys, edges’’ and ‘’models’’.

The _groups attributes are ‘’layer_groups, kid_groups, material_groups, part_groups, texture_groups, clip_groups, vmap_groups, vert_groups, poly_groups’’ and ‘’edge_groups’’.

Using Selectors

In the case of layers, the _groups attribute returns the keywords ‘’main, fg, bg’’ and all’’. Getting a list of foreground layers is done in the following example.

1
 query layerservice layers ? fg

Each of the values returned by this query can be passed into the a more specific property attribute, such as ‘’layer.subdivLevel’’. In the following example we assume that the query returned “0”, and we provided that as the selector to ‘’layer.subdivLevel’’:

1
 query layerservice layers.subdivLevel ? 0

Alternatively, all of the different ?s? attributes support the list walking keywords returned by the layers_element attributes ‘’first, last, next’’ and ‘’prev’’, which are fairly self-explanatory. This example returns the first vertex map:

1
 query layerservice vmaps ? first

The result of this query can then be passed to the property attributes. The next vertex map can then be obtained with:

1
 query layerservice vmaps ? next

And so on.

Layer-Specific Selections

In the case of vertices, edges and polygons, a layer selection is required before any of their attributes can be used. This can be done by using any of the layer attributes that takes a selection.

The layer.index attribute, for example, actually gets the index of a specific layer, but it also changes the selection in the service.

In this example we switch the layer selection to the primary layer, discarding the returned value:

1
 query layerservice layer.index ? main

After that, the various vertex, polygon and edge attributes can be used to get information specifically related to that layer, such as this query to get the number of selected vertices in the layer:

1
  query layerservice vert.N ? selected

The above example also demonstrates the different grouping keywords used by the local lists. A complete list of keywords can be obtained by querying ‘’vert_groups, edge_groups and poly_groups’’, and includes ‘’selected, unselected’’, and ‘’all’’.

“Selecting” Layers, Vertex Maps, etc.

As mentioned above, it is important to note that all attributes work only on the current layer chosen for querying. This is especially true of the ‘’vert.???, poly.???’’ and edge.??? element attributes.

This is termed as selection, but is not the same as how you select elements with the mouse through the interface; rather this is to provide layerservice with a context to query another attribute. This kind of selection is performed by simply querying one of the attributes of the element you want to select.

For example, to “select” a layer, simply query any layer.??? attribute, such as layer.index.

1
  query layerservice layer.index ? main

After this, the various ‘’vert.???, poly.???’’, etc. attributes can be used. The return value from the query above can be ignored; our only purpose is to tell layerservice which layer we plan to query the properties of.

Once “selected”, it remains until a new call to one of the layer.??? attributes.

Similarly, attributes such as vert.vmapValue and poly.vmapValue require a vertex map selection, as mentioned in the attribute?s description

Selecting Points, Polygons and Edges

The select.element command can be used to select vertices, polygons and edges (this is selecting like how you would select a polygon in a model viewport, not the query selecting described in the previous section).

Once selected, elements can be manipulated using other commands. In all cases, the selectors returned by the verts, polys and edges attributes can be used to select those individual elements. verts and polys bother return element indices, while edges returns a vertex pair separated by commas and wrapped in parentheses, such as “(21, 18)”.

layers

The ‘’’layer attributes’’’ provide information about the individual layers that make up a mesh.

layer

Get a list of layer attributes. No selection needed.

Datatype: string

Example:

1
 query layerservice layer ?

Result: [list the layer.??? attribute names]


layer_groups

Get a list of layer group keywords, used to querying subsets of layers:

  • All: All layers.

  • Fg: Foreground layers; currently active.

  • Foregruond: Synonym for “fg”

  • Bg: Background layers; currently inactive, for reference.

  • Background: Synonym for “bg”

  • Main: Main; new geometry creation will go here.

string

Example:

1
 query layerservice layer_groups ?

Result:

all fg bg primary main


layer_elements

Get a list of keywords for walking lists:

  • First: Go to the head of the list.

  • Last: Go to the tail element in the list.

  • Prev: Go to the prev element in the list.

  • Next: Go to the next element in the list.

string

Example:

1
 query layerservice layer_elements ?

Result: first last prev next


layer_lists

Get a list of layer group keywords, used to querying subsets of layers:

  • Kids: A list of child layers parented to this one.

  • Part: A list of parts used in these layers.

  • Material: A list of materials used in these layers.

  • Texture: A list of textures used in these layers.

  • Clip: A list of clips (images) used in these layers.

  • VMap: A list of vertex maps used in these layers.

  • Poly: A list of polygons in these layers.

  • Vert: A list of vertices in these layers.

  • Edge: A list of edges in these layers.

string

Example:

1
 query layerservice layer_lists ?

Result:

kids part material texture clip vmap poly vert edge model uv


layers

Get a list of layer possible selections to pass into the more specific “layer.???” attributes.

Datatype: integer

Example:

1
 query layerservice layers ? fg

Result: [list of foreground layers]

layer.N

Get the number of layers.

Datatype: integer

Example:

1
 query layerservice layer.N ? fg

Result: 1


layer.name

Get the layer?s name.

Datatype: string

Example:

1
 query layerservice layer.name ? 1

Result: Mesh


layer.index

Get the absolute index of the layer. Indicies start a 1.

Datatype: integer

Example:

1
 query layerservice layer.index ? mesh020

Result: 0

layer.subdivLevel

Get the subdivision level of the layer.

Datatype: integer

Example:

1
 query layerservice layer.subdivLevel ? mesh020

Result: 2


layer.curveAngle

Get the curve angle setting of a layer.

Datatype: angle

Example:

1
 query layerservice layer.curveAngle ? mesh020

Result: 6.0


layer.parent

Get the parent index of the layer.

Datatype: integer

Example:

1
 query layerservice layer.parent ? mesh020

Result: -1


layer.childCount

Get the number of layers parented to this one. The selector must be a layer_elements keyword or a specific selection from a layers query.

Datatype: integer

Example:

1
 query layerservice layer.childCount ? mesh020

Result: 0

layer.children

Get the item IDs of the children of this layer. Returns an empty list if there are no children.

Datatype: integer

Example:

1
 query layerservice layer.children ? mesh020

Result:


layer.pivot

Get the pivot point of the layers. Three numbers are returned, representing the X, Y and Z axes.

Datatype: distance

Example:

1
 query layerservice layer.pivot ? mesh020

Result: 0.0 0.0 0.0


layer.bounds

Get the bounding box enclosing the layers. Six numbers are returned; which should be two pairs of X, Y and Z coordinates marking the opposite corners of the volume.

Datatype: distance

Example:

1
 query layerservice layer.bounds ? mesh020

Result: -0.5 -0.5 -0.5 0.5 0.5 0.5


layer.visible

Get the layer visibility, returning fg, bg, main or none.

Datatype: string

Example:

1
 query layerservice layer.visible ? mesh020

Result: fg


layer.model

Get the filename of the model the layer belongs to. This includes the full path to the file.

Datatype: string

Example:

1
 query layerservice layer.model ? mesh020

Result: c:PathFilename.lwo


layer.id

Get the item reference ID of the layer.

Datatype: string

Example:

1
 query layerservice layer.id ? mesh020

Result: mesh_375A8C59897A


layer.splPatchLevel

Return the spline patch level of the layer

Datatype: string

Example:

1
 query layerservice layer.splPatchLevel ? first

Result: 16


layer.wpos

Return the world position of the layer

Datatype: string

Example:

1
  query layerservice layer.wpos ? first

Result:

0.1 0.5 0.0


layer.wbounds

??? Datatype: string

Example:

1
 query layerservice layer.wbounds ? first

Result: ???


kids

The kid series of attributes are a subset of the layer attributes, and are used to list the children of the a layer. The ‘’kid.???’’ and layer.??? attributes use the same layer selectors. The kid attribute itself is use to get the list of available kid.??? attributes. The kid_groups attribute is used to provide group filters for the other attributes.

kid

Get a list of kid attributes. No selection is needed.

Datatype: string

Example:

1
 query layerservice kid ?

Result: [list the kid.??? attribute names]


kid_groups

Get a list of kid keywords to pass as the selection for the other attributes. No selection is needed.

  • All: Children of all layers.

  • Fg: Children of the foreground layers.

  • Bg: Children of the background layers.

  • Main: Children of the primary layer.

string

Example:

1
 query layerservice kid_groups ?

Result:

all fg bg main


kids

Get a list of selectors for the “kid.???” attributes. These are in the form of absolute indices into the global layer list, and representing the children of the layer selection.

Datatype: string

Example:

1
 query layerservice kids ? main

Result: 1


kid.N

Get the number of children of the layer selection.

Datatype: string

Example:

1
 query layerservice kid.n ? main

Result: 1


kid.name

Name of a child of the layer selection. The selection must be one of the keywords returned by layer_element, or a previous layer_element selection must exist.

Datatype: string

Example:

1
 query layerservice kid.name ? first

Result: Mesh


kid.index

Index of a child layer in the global layer list. Indices start from 1.

Datatype: string

Example:

1
 query layerservice kid.index ? first

Result: 1


kid.layer

Get the layer index of the child. Indices start from 1.

Datatype: index

Example:

1
 query layerservice kid.layer ? first

Result: 1


kid.parent

Index of a parent of this specific child layer in the global layer list. Returns 0 if the kid has no parent.

Datatype: string

Example:

1
 query layerservice kid.parent ? first

Result: 0


parts

The part attributes provide access to the lists of polygons associated with part names.

The part attribute is use to get the list of available part.??? attributes. The part_groups attribute is used to provide group filters for the other attributes.

The parts attribute returns a list of possible, specific selectors for the various part.??? attributes, while part.N returns the number of parts in that grouping. Both attributes require a keyword from the part_group attribute as a selector.

The part.??? attributes query specific properties of an individual part. For each, the selector must be a Layerservice#layer_elements keywords (first, last, prev or next), or a specific selection from a parts query, or simply an index between 0 and part.N.

part

Get a list of part attributes.

Datatype: string

Example:

1
 query layerservice part ?

Result: [list the part.??? attribute names]


part_groups

Get a list of group keywords to pass as the selection for the other attributes. No selection is needed. There is currently only one keyword, All, which returns all parts.

Datatype: string

Example:

1
 query layerservice part_groups ?

Result: all


parts

Get a list of selectors for the “part.???” attributes. These are provided as absolute indices in the global part list.

Datatype: integer

Example:

1
 query layerservice parts ? all

Result:

0 1


part.N

Get the number of parts.

Datatype: integer

Example:

1
 query layerservice part.n ? all

Result: 2


part.name

Name of a part in the part list.

Datatype: string

Example:

1
 query layerservice part.name ? first

Result:

Bolt Nut


part.index

Index of a part in the part list. Indices start from 0.

Datatype: integer

Example:

1
 query layerservice part.index ? first

Result: 0


part.layer

Get the current layer index, usually of the current mesh. Indices start from 1.

Datatype: integer

Example:

1
 query layerservice part.layer ? first

Result: 1


models

The model series of attributes provide information about the models, which are defined as a collection of layers stored in a file.

The model attribute itself will return the list of available model.??? attributes.

The model.??? attributes query specific properties of an individual model. For each, the selector must be a specific selection from a models query, or an index between 0 and model.N, or one of the models_groups selectors.

model

Get a list of model attributes. No selection is needed.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice model ?

‘’’Result:’’’ [list of model.??? attribute names]


model.N

Get the number of models in memory.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice model.n ?

‘’’Result:’’’ 2


model.name

Get the filename of the model, or an empty list if it has not yet been saved. This is the filename only, without the path to the file.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice model.name ? 0

‘’’Result:’’’ Filename.lxo


model.index

Index of a model in the global model list. Note that the indices start from 1.

‘’’Datatype:’’’ integer

‘’’Example:’’’

1
 query layerservice model.index ? 0

‘’’Result:’’’ 1


model.layer

Return the index of the current layer of the model. Layer indices start from 1.

‘’’Datatype:’’’ integer

‘’’Example:’’’

1
 query layerservice model.layer ? first

‘’’Result:’’’ 1


model.curName

Get the name of the current model. If the file has not yet been saved, this may be “untitled” or “untitled*”.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice model.curName ?

‘’’Result:’’’ Filename.lxo


model.curIndex

Return the currently selected model?s index. Indices start from 1.

‘’’Datatype:’’’ integer

‘’’Example:’’’

1
 query layerservice model.curIndex ?

‘’’Result:’’’ 1


model.file

Get the filename of the model, or an empty list if it has not yet been saved. This includes the full path to the file as well as the filename.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice model.file ? 0

‘’’Result:’’’ C:pathFilename.lwo


materials

The material attribute is use to get the list of available material.??? attributes. used to provide group filters for the other attributes.

The materials attribute returns a list of possible, specific selectors for the various material.??? attributes, while material.N returns the number of materials in that grouping. Both attributes require a keyword from the material_group attribute as a selector.

material

Get a list of material attributes. No selection is needed.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice material ?

‘’’Result:’’’ [list the material.??? attribute names]


material_groups

Description: Get a list of group keywords for use as the selection for the other attributes. No selection is needed.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice material_groups ?

‘’’Result:’’’ all


materials depricated?

Get a list of selectors for the material.??? attributes. These are in the form of absolute indices into the global materials list. Material indices start from 0.

‘’’Datatype:’’’ integer

‘’’Example:’’’

1
 query layerservice materials ?

‘’’Result:’’’ 0


material.N

Get the number of materials.

‘’’Datatype:’’’ integer

‘’’Example:’’’

1
 query layerservice material.n ? all

‘’’Result:’’’ 1


material.name

Name of a material in the material list. The selection must be one of the keywords returned by layer_element, or a previous layer_element selection must exist.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice material.name ? first

‘’’Result:’’’ Default


material.index

Index of a material in the material list.

‘’’Datatype:’’’ integer

‘’’Example:’’’

1
 query layerservice material.index ? first

‘’’Result:’’’ 0


material.layer

Returns the index of the current layer, usually that of a mesh item.

‘’’Datatype:’’’ integer

‘’’Example:’’’

1
 query layerservice material.index ?

‘’’Result:’’’ 0


material.opacity

Get the material?s opacity.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.opacity ? 0

‘’’Result:’’’ 1.0


material.color

Get the material?s color. Returns three floats representing the red, green and blue components of the color.

‘’’Datatype:’’’ float

‘’’Example:’’’

1
 query layerservice material.color ? 0

‘’’Result:’’’ 0.8 0.8 0.8


material.luminous

Get the material?s luminosity.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.luminous ? 0

‘’’Result:’’’ 0.0


material.diffuse

Get the material?s diffusion.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.diffuse ? 0

‘’’Result:’’’ 1.0


material.specular

Get the material?s specular.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.specular ? 0

‘’’Result:’’’ 0.0


material.gloss

Get the material?s glossiness.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.gloss ? 0

‘’’Result:’’’ 0.3


material.reflect

Get the material?s reflection amount.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.reflect ? 0

‘’’Result:’’’ 0.0


material.transp

Get the material?s transparency.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.transp ? 0

‘’’Result:’’’ 0.0


material.transl

Get the material?s translucency.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.transl ? 0

‘’’Result:’’’ 0.0


material.refIndex

Get the material?s refraction index.

‘’’Datatype:’’’ float

‘’’Example:’’’

1
 query layerservice material.diffuse ? 0

‘’’Result:’’’ 1.0


material.bump

Get the material?s bump amount.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.bump ? 0

‘’’Result:’’’ 1.0


material.colHigh

Get the material?s color highlights value.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.colHigh ? 0

‘’’Result:’’’ 0.0


material.colFilt

Get the material?s color filter value.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.colrilt ? 0

‘’’Result:’’’ 0.0


material.difSharp

Get the material?s diffuse sharpness amount.

‘’’Datatype:’’’ percent

‘’’Example:’’’

1
 query layerservice material.difsharp ? 0

‘’’Result:’’’ 0.0


material.id

Get the item reference ID of the material.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice material.id ? 0

‘’’Result:’’’ textureLayer_01253459C65C


material.textures

Get a list of item reference IDs for the textures associated with the material.

‘’’Datatype:’’’ string

‘’’Example:’’’

1
 query layerservice material.textures ? first

‘’’Result:’’’

textureLayer_8F767159B978 textureLayer_82B83B59C65B textureLayer_01253459C65C texturelayer_14059A598979


textures

The texture attributes are used to obtain the properties of attributes.

The texture attribute is use to get the list of available texture.??? attributes. The texture_groups attribute is used to provide group filters for the other attributes.

The textures attribute returns a list of possible, specific selectors for the various texture.??? attributes, while texture.N returns the number of parts in that grouping. Both attributes require a keyword from the texture_group attribute as a selector.

The texture.??? attributes query specific properties of an individual texture. For each, the selector must be a layer_elements keyword (first, last, prev or next), or a specific selection from a textures query, or simply an index between 0 and texture.N.

texture

Get a list of texture attributes.

Datatype: string

Example:

1
 query layerservice texture ?

Result: [list the texture.??? attribute names]


texture_groups

Get a list of group keywords to pass as the selection for the other attributes. No selection is needed. There is currently only one keyword, All, which returns all textures.

Datatype: string

Example:

1
 query layerservice texture_groups ?

Result: all


textures

Get a list of selectors for the texture.??? attributes, which are absolute indices into the texture list.

Datatype: string

Example:

1
 query layerservice texture ? all

Result:

0 1


texture.N

Total number of textures.

Datatype: string

Example:

1
 query layerservice texture.n ? all

Result: 2


texture.name

Name of a texture in the texture list.

Datatype: string

Example:

1
 query layerservice texture.name ? first

Result:

Bolt Nut


texture.index

Index of a texture in the texture list. Indiices start from 0.

Datatype: integer

Example:

1
 query layerservice texture.index ? first

Result: 0


texture.layer

Get the current layer index, usually of the current mesh. Indices start from 1.

Datatype: integer

Example:

1
 query layerservice texture.material ? first

Result: 0


texture.id

Get the item reference ID of the texture.

Datatype: integer

Example:

1
 query layerservice texture.id ? first

Result: textureLayer_8F767159B978


texture.type

Get the type name of a texture.

Datatype: string

Example:

1
 query layerservice texture.type ? first

Result: advancedMaterial


texture.channel

Get the channel name in the material that the texture is applied to.

Datatype: string

Example:

1
 query layerservice texture.channel ? first

Result: color


texture.opacity

Get the texture opacity.

Datatype: percent

Example:

1
 query layerservice texture.opacity ? first

Result: 0.0


texture.enable

Get the texture enable state.

Datatype: integer

Example:

1
 query layerservice texture.enable ? first

Result: 1


texture.invert

Get the texture inversion state.

Datatype: integer

Example:

1
 query layerservice texture.invert ? first

Result: 0


texture.blendMode

Get the texture blending mode.

Datatype: string

Example:

1
 query layerservice texture.blendMode ? first

Result: normal


texture.position

Get the texture position. Returns three distances representing the X, Y and Z position.

Datatype: distance

Example:

1
 query layerservice texture.position ? first

Result:

3.126 1.25 1.0


texture.rotation

Get the texture rotation. Returns three angles representing the X, Y and Z rotation.

Datatype: integer

Example:

1
 query layerservice texture.rotation ? first

Result:

0.0 90.0 0.0


texture.scale

Get the texture scale. Returns three floats representing the X, Y and Z rotation.

Datatype: float

Example:

1
 query layerservice texture.scale ? first

Result:

1.0 1.0 1.0


texture.projType

Get the texture projection type.

Datatype: string

Example:

1
 query layerservice texture.projType ? first

Result: planar


texture.projAxis

Get the texture projection axis.

Datatype: integer

Example:

1
 query layerservice texture.projAxis ? first

Result: 0


texture.coordSys

Get the texture coordinate system, such as particle, object and world.

Datatype: string

Example:

1
 query layerservice texture.coordSys ? first

Result: object


texture.fallType

Get the texture falloff type, such as cube, sphere, linearX, linearY, and linearZ.

Datatype: string

Example:

1
 query layerservice texture.falloffType ? first

Result: cube


texture.falloff

Get the texture falloff amount. Returns three distances representing the X, Y and Z falloff.

Datatype: distance

Example:

1
 query layerservice texture.falloff ? first

Result:

1.0 100.0 1.0


texture.uvName

Get the name of the UV map associated with the texture.

Datatype: string

Example:

1
 query layerservice texture.uvName ? first

Result: My UV Map


texture.uvMap

Get the index of the UV map associated with the texture.

Datatype: distance

Example:

1
 query layerservice texture.uvMap ? first

Result: 0


texture.clip

Get the index of the clip applied to the texture.

Datatype: integer

Example:

1
 query layerservice texture.clip ? first

Result: 0


texture.clipFile

texture.clipFile

Description: Get the path and filename of the clip applied to the texture.

Datatype: string

Example:

1
 query layerservice texture.clipFile ? first

Result: c:pathcreatureface.tga


texture.locator

Get the id of the texture locator

Datatype: string

Example:

1
 query layerservice texture.locator ? first

Result: txtrLocator024


clips

The clip attributes give access to the clip list.

The clip attribute is use to get the list of available clip.??? attributes. The clip_groups attribute is used to provide group filters for the other attributes.

The clips attribute returns a list of possible, specific selectors for the various clip.??? attributes, while clip.N returns the number of parts in that grouping. Both attributes require a keyword from the clip_group attribute as a selector.

The clip.??? attributes query specific properties of an individual clip (image). For each, the selector must be a layer_elements keyword (first, last, prev or next), or a specific selection from a clips query, or simply an index between 0 and clip.N.

clip

Get a list of clip attributes.

Datatype: string

Example:

1
 query layerservice clip ?

Result: [list the clip.??? attribute names]


clip_groups

Get a list of group keywords to pass as the selection for the other attributes. No selection is needed. There is currently only one keyword, All, which returns all clips.

Datatype: string

Example:

1
 query layerservice clip_groups ?

Result: all


clips

Get a list of selectors for the clip.??? attributes. These are provided as absolute indices into the clip list.

Datatype: string

Example:

1
 query layerservice clips ? all

Result: 0 1


clip.N

Total number of clips. The selection must be one of the keywords returned by clip_groups, or a previous clip_groups selection must exist.

Datatype: integer

Example:

1
 query layerservice clip.n ? all

clip.name

Name of a clip in the clip list. This is often the filename to the image without the path.

Datatype: string

Example:

1
 query layerservice clip.name ? first

Result: creatureface.tga


clip.file

Filename of a clip in the clip list, including the full path to the file.

Datatype: string

Example:

1
 query layerservice clip.file ? first

Result: c:pathcreatureface.tga


clip.index

Index of a clip in the clip list.

Datatype:

integer

Example:

1
 query layerservice clip.index ? first

Result: 0


clip.layer

Get the layer index of the clip. Layer indices start from 1.

Datatype: index

Example:

1
 query layerservice clip.layer ? first

Result: 0


clip.id

Get the item reference ID of the clip.

Datatype: string

Example:

1
 query layerservice clip.id ? first

Result: videoClip_CB383659CFDD


clip.info

Get some information about the clip. This includes the pixel type, (such as RGB), the width, height, bits per pixel, and pixel aspect ratio.

Datatype: string

Example:

1
 query layerservice clip.info ? first

Result: RGB w:188 h:120 bpp:8 pa:1

vmaps

The Vertex Map attributes can be used to get the information about vertex maps, or vmaps.

The vmap attribute is use to get the list of available vmap.??? attributes. The vmap_groups attribute is used to provide group filters for the other attributes.

The vmaps attribute returns a list of possible, specific selectors for the various vmap.??? attributes, while vmap.N returns the number of parts in that grouping. Both attributes require a keyword from the vmap_group attribute as a selector.

The vmap.??? attributes query specific properties of an individual vertex map. For each, the selector must be a layer_elements keyword (first, last, prev or next), or a specific selection from a vmaps query, or simply an index between 0 and vmap.N.

vmap

Get a list of vertex map attributes.

Datatype: string

Example:

1
 query layerservice vmap ? first

Result: [list the vmap.??? attribute names]


vmap_groups

Get a list of group keywords to pass as the selection for the other attributes.

  • All: All vertex maps.

  • Selected: Selected vertex maps.

  • Weight: All weight maps.

  • Texture: All texture maps.

  • Subweight: All subdivision surface weight maps.

  • Morph: All morph maps.

  • AbsMorph: All absolute morph maps.

  • RGB: All RGB color maps.

  • RGBA: All RGBA color maps.

  • Normal: All vertex normal maps.

string

Example:

1
 query layerservice vmap_groups ?

Result:

all selected weight texture subweight morph absmorph rgb rgba


vmaps

Get a list of selectors for the ?vmap.???? attributes. These are in the form of absolute indices into the global vertex map list.

Datatype: integer

Example:

1
 query layerservice vmaps ? all

Result: 0 1


vmaps.N

Total number of vertex maps. The selection must be one of the keywords returned by vmap_groups, or a previous vmap_groups selection must exist.

Datatype: integer

Example:

1
 query layerservice vmap.n ?

Result: 1


vmap.name

Name of a vertex map in the vertex map list.

Datatype: string

Example:

1
 query layerservice vmap.name ? first

Result: Subdivision


vmap.index

Index of a vertex map in the vertex map list. Indices start from 0.

Datatype: integer

Example:

1
 query layerservice vmap.index ? first

Result: 0


vmap.layer

Index of the vertex map in the layer list. Layer indices start from 1.

Datatype: integer

Example:

1
 query layerservice vmap.layer ? first

Result: 1


vmap.type

Get the type of a vertex map in the vertex map list.

Datatype: string

Example:

1
 query layerservice vmap.type ? first

Result: subweight


vmap.dim

Get the dimensions of a vertex map in the vertex map list.

Datatype: integer

Example:

1
 query layerservice vmap.dim ? first

Result: 1


vmap.selected

Returns true if the vertex map is selected

Datatype: integer

Example:

1
 query layerservice vmap.selected ? first

Result: 1


verts

The vertex attributes provide detailed information about individual vertices in a mesh.

The vert attribute is used to get the list of available vert.??? attributes. The vert_groups attribute is used to provide group filters for the other attributes.

The verts attribute returns a list of possible, specific selectors for the various vert.??? attributes, while vert.N returns the number of parts in that grouping. Both attributes require a keyword from the vert_group attribute as a selector.

Before using any of the remaining vertex attributes, you must first select a layer with a layer.??? attribute. The following example selects the first layer, but first can be replaced with a specific index or any of the layer_element keywords as described in the layer.index documentation above.

1
 query layerservice layer.index ? first

vert

Get a list of vertex attributes.

Datatype: string

Example:

1
 query layerservice vert ?

Result: [list the vert.??? attribute names]


vert_groups

Get a list of group keywords to pass as the selection for the other attributes.

  • Selected: Selected vertices.

  • Unselected: Unselected vertices.

  • All: All vertices.

  • Visible: All vertices that are not hidden.

string

Example:

1
 query layerservice vert_groups ?

Result:

all selected unselected visible


verts

Get a list of selectors for the vert.??? attributes, provided in the form of absolute vertex indices.

Datatype: integer

Example:

1
 query layerservice verts ? all

Result:

0 1 2 3


vert.N

Get the number of vertices in the grouping.

Datatype: integer

Example:

1
 query layerservice vert.N ? selected

Result: 4


vert.name

Get the “name” of a vertex. This name is in the form of layer index:vertex index. For example the tenth vertex in the third layer has the name 3:10.

Datatype: integer

Example:

1
 query layerservice vert.name ? first

Result: 0:0


vert.index

Get the absolute index of a vertex. Indices start from 0.

Datatype: string

Example:

1
 query layerservice vert.index ? first

Result: 0


vert.layer

Get the index of the layer the vertex is in. Layer indices start from 1.

Datatype: integer

Example:

1
 query layerservice vert.layer ? first

Result: 1


vert.pos

Get the position of the vertex. The query returns three numbers representing the X, Y and Z coordinates of the vertex.

Datatype: distance

Example:

1
 query layerservice vert.pos ? first

Result:

5.0 -0.28 -6.48


vert.normal

Get the normal of the vertex. The query returns three numbers representing the vertex normal as an average of the normals of the polygons it belongs to.

Datatype: distance

Example:

1
 query layerservice vert.normal ? first

Result:

1.0 0.0 0.0


vert.numPolys

Get the number of polygons sharing this vertex.

Datatype: integer

Example:

1
 query layerservice vert.numPolys ? first

Result: 1


vert.polyList

Get a list of the absolute indices of the polygons sharing this vertex. The queried values can be used as selections for the poly.??? attributes.

Datatype: integer

Example:

1
 query layerservice vert.polyList ? first

Result: 0


vert.numVerts

Get the number of vertices connected to this vertex by edges. This is also called the valence.

Datatype: integer

Example:

1
 query layerservice vert.numVerts ? first

Result: 2


vert.vertList

Get a list of the absolute indices of the vertices connected to this vertex by edges. The queried values can be used as selections for the vert.??? attributes.

Datatype: integer

Example:

1
 query layerservice vert.vertList ? first

Result:

1 3


vert.selected

Returns true if the vertex is selected.

Datatype: integer

Example:

1
 query layerservice vert.selected ? first

Result: 1


vert.hidden

Returns true if the vertex is hidden.

Datatype: integer

Example:

1
 query layerservice vert.hidden ? first

Result: 0


vert.selSets

Returns a list of selection sets the vertex belongs to. Returns an empty list if the vertex does not belong to any selection sets. This requires an index.

Datatype: string

Example:

1
 query layerservice vert.selSets ? 0

Result:


vert.vmapValue

Returns the value of the vertex map last queried for this vertex. Note that a vertex map must have previously been “selected” using one of the vmap.??? attributes.

Datatype: float

Example:

1
 query layerservice vert.vmapValue ? first

Result: 0.5


vert.symmetric

Return the name of the vertex opposite this one. This is the vertex that would also be affected by tools when symmetry is active.

Datatype: string

Example:

1
 query layerservice vert.symmetric ? first

Result: 0:3


vert.wpos

Return the world position of the vertex

Datatype: string

Example:

1
 query layerservice vert.wpos ? first

Result:

0.0 -0.5 0.0


polys

  • poly

  • poly_groups

  • poly.N

  • poly.name

  • poly.index

  • poly.layer

  • poly.numVerts

  • poly.vertList

  • poly.normal

  • poly.type

  • poly.vmapValue

  • poly.discos

  • poly.material

  • poly.part

  • poly.selected

  • poly.hidden

  • poly.pos

  • poly.tags

  • poly.tagTypes

  • poly.selSets

  • poly.symmetric

  • poly.wpos

  • poly.wnormal

  • poly.vertNormals

  • poly.wvertNormals

  • poly.workpos

  • poly.worknormal

  • edge

  • edge_groups

  • edge.N

  • edge.name

  • edge.index

  • edge.layer

  • edge.vertList

  • edge.numPolys

  • edge.polyList

  • edge.length

  • edge.creaseWeight

  • edge.vector

  • edge.pos

  • edge.selected

  • edge.hidden

  • edge.selSets

  • edge.symmetric

  • edge.wpos

  • edge.wvector

  • edge.workpos

  • edge.workvector

  • uv

  • uv_groups

  • uv.N

  • uv.name

  • uv.index

  • uv.layer

  • uv.vert

  • uv.poly

  • uv.vmap

  • uv.disco

  • uv.pos

  • uv.selected

  • uv.hidden

  • polset

  • polset_groups

  • polset.N

  • polset.name

  • polset.index

  • polset.layer

  • vrtset

  • vrtset_groups

  • vrtset.N

  • vrtset.name

  • vrtset.index

  • vrtset.layer

  • itmset

  • itmset_groups

  • itmset.N

  • itmset.name

  • itmset.index

  • itmset.layer

More Information