<node3d>.drawOrder

Set the order in which the object will be drawn

 

<node3d>.drawOrder(
    order    
    node = ''    
    bin = viz.BIN_OPAQUE    
    op = viz.OP_DEFAULT    

)

 

order

The draw order. A higher number means the object will be drawn later.


node = ''

Name of sub-node to apply changes to


bin = viz.BIN_OPAQUE

Can be one of the following values:

Bin modes

viz.BIN_OPAQUE

Place the object into the standard non-sorted draw order bin.

viz.BIN_TRANSPARENT

Place the object into the depth-sorted draw order bin. This ensures correct ordering for objects with transparency.


op = viz.OP_DEFAULT

Can be viz.OP_DEFAULT to use the nodes default op mode or a combination of the following values:

Op modes

viz.OP_TRAVERSE

When performing an operation on a node, traverse the entire subgraph and process all subnodes as well. This is the default value.

viz.OP_OVERRIDE

When applying attributes, have them override attributes of subnodes.

viz.OP_ROOT

When performing an operation on the node, start at the root transform of the node, instead of the model. Processing the root will include all child Vizard nodes.


Remarks

Use this command to force an object to be drawn after another object. The higher the order the latest it will be drawn. This command is usefull when you have transparent objects and you want to force one object to be drawn last.

Return Value

None

Example

object1 = viz.add('model.wrl')
object2 = viz.add('model2.wrl')

#Force object2 to be drawn after object1 is drawn
object1.drawOrder(0)
object2.drawOrder(1)

See also

<node3d>.setOpaqueDrawOrder
<node3d>.setTransparentDrawOrder