ModelNode

from panda3d.core import ModelNode
class ModelNode

Bases: PandaNode

This node is placed at key points within the scene graph to indicate the roots of “models”: subtrees that are conceptually to be treated as a single unit, like a car or a room, for instance. It doesn’t affect rendering or any other operations; it’s primarily useful as a high-level model indication.

ModelNodes are created in response to a <Model> { 1 } flag within an egg file.

Inheritance diagram

Inheritance diagram of ModelNode

PTDropNode = 3
PTLocal = 1
PTNet = 2
PTNoTouch = 4
PTNone = 0
PT_drop_node = 3
PT_local = 1
PT_net = 2
PT_no_touch = 4
PT_none = 0
__init__(*args, **kwargs)
getClassType()

C++ Interface: get_class_type()

getPreserveAttributes()

C++ Interface: get_preserve_attributes(ModelNode self)

/**
  • Returns the current setting of the preserve_attributes flag. See

  • set_preserve_attributes().

*/

getPreserveTransform()

C++ Interface: get_preserve_transform(ModelNode self)

/**
  • Returns the current setting of the preserve_transform flag. See

  • set_preserve_transform().

*/

get_class_type()

C++ Interface: get_class_type()

get_preserve_attributes()

C++ Interface: get_preserve_attributes(ModelNode self)

/**
  • Returns the current setting of the preserve_attributes flag. See

  • set_preserve_attributes().

*/

get_preserve_transform()

C++ Interface: get_preserve_transform(ModelNode self)

/**
  • Returns the current setting of the preserve_transform flag. See

  • set_preserve_transform().

*/

setPreserveAttributes()

C++ Interface: set_preserve_attributes(const ModelNode self, int attrib_mask)

/**
  • Sets the preserve_attributes flag. This restricts the ability of a flatten

  • operation to affect the render attributes stored on this node.

  • The value should be the union of bits from SceneGraphReducer::AttribTypes

  • that represent the attributes that should not be changed.

*/

setPreserveTransform()

C++ Interface: set_preserve_transform(const ModelNode self, int preserve_transform)

/**
  • Sets the preserve_transform flag. This restricts the ability of a flatten

  • operation to affect the transform stored on this node, and/or the node

  • itself. In the order from weakest to strongest restrictions, the possible

  • flags are:

  • PT_drop_node - This node should be removed at the next flatten call.

  • PT_none - The transform may be adjusted at will. The node itself will not

  • be removed. This is the default.

  • PT_net - Preserve the net transform from the root, but it’s acceptable to

  • modify the local transform stored on this particular node if necessary, so

  • long as the net transform is not changed. This eliminates the need to drop

  • an extra transform on the node above.

  • PT_local - The local (and net) transform should not be changed in any way.

  • If necessary, an extra transform will be left on the node above to

  • guarantee this. This is a stronger restriction than PT_net.

  • PT_no_touch - The local transform will not be changed, the node will not be

  • removed, and furthermore any flatten operation will not continue below this

  • node–this node and all descendents are protected from the effects of

  • flatten.

*/

setTransformLimit()

C++ Interface: set_transform_limit(const ModelNode self, float limit)

set_preserve_attributes()

C++ Interface: set_preserve_attributes(const ModelNode self, int attrib_mask)

/**
  • Sets the preserve_attributes flag. This restricts the ability of a flatten

  • operation to affect the render attributes stored on this node.

  • The value should be the union of bits from SceneGraphReducer::AttribTypes

  • that represent the attributes that should not be changed.

*/

set_preserve_transform()

C++ Interface: set_preserve_transform(const ModelNode self, int preserve_transform)

/**
  • Sets the preserve_transform flag. This restricts the ability of a flatten

  • operation to affect the transform stored on this node, and/or the node

  • itself. In the order from weakest to strongest restrictions, the possible

  • flags are:

  • PT_drop_node - This node should be removed at the next flatten call.

  • PT_none - The transform may be adjusted at will. The node itself will not

  • be removed. This is the default.

  • PT_net - Preserve the net transform from the root, but it’s acceptable to

  • modify the local transform stored on this particular node if necessary, so

  • long as the net transform is not changed. This eliminates the need to drop

  • an extra transform on the node above.

  • PT_local - The local (and net) transform should not be changed in any way.

  • If necessary, an extra transform will be left on the node above to

  • guarantee this. This is a stronger restriction than PT_net.

  • PT_no_touch - The local transform will not be changed, the node will not be

  • removed, and furthermore any flatten operation will not continue below this

  • node–this node and all descendents are protected from the effects of

  • flatten.

*/

set_transform_limit()

C++ Interface: set_transform_limit(const ModelNode self, float limit)