NodePathCollection

from panda3d.core import NodePathCollection
class NodePathCollection

Bases: DTOOL_SUPER_BASE

This is a set of zero or more NodePaths. It’s handy for returning from functions that need to return multiple NodePaths (for instance, NodePaths::get_children).

Inheritance diagram

Inheritance diagram of NodePathCollection

__init__(*args, **kwargs)
addPath()

C++ Interface: add_path(const NodePathCollection self, const NodePath node_path)

/**
  • Adds a new NodePath to the collection.

*/

addPathsFrom()

C++ Interface: add_paths_from(const NodePathCollection self, const NodePathCollection other)

/**
  • Adds all the NodePaths indicated in the other collection to this path. The

  • other paths are simply appended to the end of the paths in this list;

  • duplicates are not automatically removed.

*/

add_path()

C++ Interface: add_path(const NodePathCollection self, const NodePath node_path)

/**
  • Adds a new NodePath to the collection.

*/

add_paths_from()

C++ Interface: add_paths_from(const NodePathCollection self, const NodePathCollection other)

/**
  • Adds all the NodePaths indicated in the other collection to this path. The

  • other paths are simply appended to the end of the paths in this list;

  • duplicates are not automatically removed.

*/

append()

C++ Interface: append(const NodePathCollection self, const NodePath node_path)

// Method names to satisfy Python’s conventions.

/**
  • Adds a new NodePath to the collection. This method duplicates the

  • add_path() method; it is provided to satisfy Python’s naming convention.

*/

calcTightBounds()

C++ Interface: calc_tight_bounds(NodePathCollection self, LPoint3f min_point, LPoint3f max_point)

/**
  • Calculates the minimum and maximum vertices of all Geoms at these

  • NodePath’s bottom nodes and below This is a tight bounding box; it will

  • generally be tighter than the bounding volume returned by get_bounds() (but

  • it is more expensive to compute).

  • The return value is true if any points are within the bounding volume, or

  • false if none are.

*/

calc_tight_bounds()

C++ Interface: calc_tight_bounds(NodePathCollection self, LPoint3f min_point, LPoint3f max_point)

/**
  • Calculates the minimum and maximum vertices of all Geoms at these

  • NodePath’s bottom nodes and below This is a tight bounding box; it will

  • generally be tighter than the bounding volume returned by get_bounds() (but

  • it is more expensive to compute).

  • The return value is true if any points are within the bounding volume, or

  • false if none are.

*/

clear()

C++ Interface: clear(const NodePathCollection self)

/**
  • Removes all NodePaths from the collection.

*/

composeColorScale()

C++ Interface: compose_color_scale(const NodePathCollection self, const LVecBase4f scale) compose_color_scale(const NodePathCollection self, const LVecBase4f scale, int priority) compose_color_scale(const NodePathCollection self, float r, float g, float b, float a, int priority)

/**
  • Applies color scales to all NodePaths in the collection. The existing

  • color scale, if any, is multiplied by the specified color scale.

*/

/**
  • Applies color scales to all NodePaths in the collection. The existing

  • color scale, if any, is multiplied by the specified color scale.

*/

compose_color_scale()

C++ Interface: compose_color_scale(const NodePathCollection self, const LVecBase4f scale) compose_color_scale(const NodePathCollection self, const LVecBase4f scale, int priority) compose_color_scale(const NodePathCollection self, float r, float g, float b, float a, int priority)

/**
  • Applies color scales to all NodePaths in the collection. The existing

  • color scale, if any, is multiplied by the specified color scale.

*/

/**
  • Applies color scales to all NodePaths in the collection. The existing

  • color scale, if any, is multiplied by the specified color scale.

*/

detach()

C++ Interface: detach(const NodePathCollection self)

/**
  • Detaches all NodePaths in the collection.

*/

extend()

C++ Interface: extend(const NodePathCollection self, const NodePathCollection other)

/**
  • Appends the other list onto the end of this one. This method duplicates

  • the += operator; it is provided to satisfy Python’s naming convention.

*/

findAllMatches()

C++ Interface: find_all_matches(NodePathCollection self, str path)

/**
  • Returns the complete set of all NodePaths that begin with any NodePath in

  • this collection and can be extended by path. The shortest paths will be

  • listed first.

*/

find_all_matches()

C++ Interface: find_all_matches(NodePathCollection self, str path)

/**
  • Returns the complete set of all NodePaths that begin with any NodePath in

  • this collection and can be extended by path. The shortest paths will be

  • listed first.

*/

getCollideMask()

C++ Interface: get_collide_mask(NodePathCollection self)

/**
  • Returns the union of all of the into_collide_masks for nodes at this level

  • and below. This is the same thing as node()->get_net_collide_mask().

  • If you want to return what the into_collide_mask of this node itself is,

  • without regard to its children, use node()->get_into_collide_mask().

*/

getNumPaths()

C++ Interface: get_num_paths(NodePathCollection self)

/**
  • Returns the number of NodePaths in the collection.

*/

getPath()

C++ Interface: get_path(NodePathCollection self, int index)

/**
  • Returns the nth NodePath in the collection.

*/

getPaths()
getTightBounds()

C++ Interface: get_tight_bounds(NodePathCollection self)

get_collide_mask()

C++ Interface: get_collide_mask(NodePathCollection self)

/**
  • Returns the union of all of the into_collide_masks for nodes at this level

  • and below. This is the same thing as node()->get_net_collide_mask().

  • If you want to return what the into_collide_mask of this node itself is,

  • without regard to its children, use node()->get_into_collide_mask().

*/

get_num_paths()

C++ Interface: get_num_paths(NodePathCollection self)

/**
  • Returns the number of NodePaths in the collection.

*/

get_path()

C++ Interface: get_path(NodePathCollection self, int index)

/**
  • Returns the nth NodePath in the collection.

*/

get_paths()
get_tight_bounds()

C++ Interface: get_tight_bounds(NodePathCollection self)

hasPath()

C++ Interface: has_path(NodePathCollection self, const NodePath path)

/**
  • Returns true if the indicated NodePath appears in this collection, false

  • otherwise.

*/

has_path()

C++ Interface: has_path(NodePathCollection self, const NodePath path)

/**
  • Returns true if the indicated NodePath appears in this collection, false

  • otherwise.

*/

hide()

C++ Interface: hide(const NodePathCollection self)

/**
  • Hides all NodePaths in the collection.

*/

isEmpty()

C++ Interface: is_empty(NodePathCollection self)

/**
  • Returns true if there are no NodePaths in the collection, false otherwise.

*/

is_empty()

C++ Interface: is_empty(NodePathCollection self)

/**
  • Returns true if there are no NodePaths in the collection, false otherwise.

*/

ls()

C++ Interface: ls(NodePathCollection self) ls(NodePathCollection self, ostream out, int indent_level)

// Handy operations on many NodePaths at once.

/**
  • Lists all the nodes at and below each node in the collection

  • hierarchically.

*/

/**
  • Lists all the nodes at and below each node in the collection

  • hierarchically.

*/

output()

C++ Interface: output(NodePathCollection self, ostream out)

/**
  • Writes a brief one-line description of the NodePathCollection to the

  • indicated output stream.

*/

removeDuplicatePaths()

C++ Interface: remove_duplicate_paths(const NodePathCollection self)

/**
  • Removes any duplicate entries of the same NodePaths on this collection. If

  • a NodePath appears multiple times, the first appearance is retained;

  • subsequent appearances are removed.

*/

removePath()

C++ Interface: remove_path(const NodePathCollection self, const NodePath node_path)

/**
  • Removes the indicated NodePath from the collection. Returns true if the

  • path was removed, false if it was not a member of the collection.

*/

removePathsFrom()

C++ Interface: remove_paths_from(const NodePathCollection self, const NodePathCollection other)

/**
  • Removes from this collection all of the NodePaths listed in the other

  • collection.

*/

remove_duplicate_paths()

C++ Interface: remove_duplicate_paths(const NodePathCollection self)

/**
  • Removes any duplicate entries of the same NodePaths on this collection. If

  • a NodePath appears multiple times, the first appearance is retained;

  • subsequent appearances are removed.

*/

remove_path()

C++ Interface: remove_path(const NodePathCollection self, const NodePath node_path)

/**
  • Removes the indicated NodePath from the collection. Returns true if the

  • path was removed, false if it was not a member of the collection.

*/

remove_paths_from()

C++ Interface: remove_paths_from(const NodePathCollection self, const NodePathCollection other)

/**
  • Removes from this collection all of the NodePaths listed in the other

  • collection.

*/

reparentTo()

C++ Interface: reparent_to(const NodePathCollection self, const NodePath other)

/**
  • Reparents all the NodePaths in the collection to the indicated node.

*/

reparent_to()

C++ Interface: reparent_to(const NodePathCollection self, const NodePath other)

/**
  • Reparents all the NodePaths in the collection to the indicated node.

*/

reserve()

C++ Interface: reserve(const NodePathCollection self, int num)

/**
  • This is a hint to Panda to allocate enough memory to hold the given number

  • of NodePaths, if you know ahead of time how many you will be adding.

*/

setAttrib()

C++ Interface: set_attrib(const NodePathCollection self, const RenderAttrib attrib, int priority)

/**
  • Applies the indicated RenderAttrib to all NodePaths in the collection. An

  • effort is made to apply the attrib to many NodePaths as quickly as

  • possible; redundant RenderState compositions are not duplicated.

*/

setCollideMask()

C++ Interface: set_collide_mask(const NodePathCollection self, BitMask new_mask, BitMask bits_to_change, TypeHandle node_type)

/**
  • Recursively applies the indicated CollideMask to the into_collide_masks for

  • all nodes at this level and below.

  • The default is to change all bits, but if bits_to_change is not all bits

  • on, then only the bits that are set in bits_to_change are modified,

  • allowing this call to change only a subset of the bits in the subgraph.

*/

setColor()

C++ Interface: set_color(const NodePathCollection self, const LVecBase4f color) set_color(const NodePathCollection self, const LVecBase4f color, int priority) set_color(const NodePathCollection self, float r, float g, float b, float a, int priority)

/**
  • Colors all NodePaths in the collection

*/

/**
  • Colors all NodePaths in the collection

*/

setColorScale()

C++ Interface: set_color_scale(const NodePathCollection self, const LVecBase4f scale) set_color_scale(const NodePathCollection self, const LVecBase4f scale, int priority) set_color_scale(const NodePathCollection self, float r, float g, float b, float a, int priority)

/**
  • Applies color scales to all NodePaths in the collection. The existing

  • color scale is replaced.

*/

/**
  • Applies color scales to all NodePaths in the collection. The existing

  • color scale is replaced.

*/

setTexture()

C++ Interface: set_texture(const NodePathCollection self, Texture tex) set_texture(const NodePathCollection self, TextureStage stage, Texture tex, int priority) set_texture(const NodePathCollection self, Texture tex, int priority)

/**
  • Adds the indicated texture to the list of textures that will be rendered on

  • the default texture stage.

  • This is the deprecated single-texture variant of this method; it is now

  • superceded by set_texture() that accepts a stage and texture. However,

  • this method may be used in the presence of multitexture if you just want to

  • adjust the default stage.

*/

/**
  • Adds the indicated texture to the list of textures that will be rendered on

  • the indicated multitexture stage. If there are multiple texture stages

  • specified (possibly on multiple different nodes at different levels), they

  • will all be applied to geometry together, according to the stage

  • specification set up in the TextureStage object.

*/

setTextureOff()

C++ Interface: set_texture_off(const NodePathCollection self) set_texture_off(const NodePathCollection self, TextureStage stage, int priority) set_texture_off(const NodePathCollection self, int priority)

/**
  • Sets the geometry at this level and below to render using no texture, on

  • any stage. This is different from not specifying a texture; rather, this

  • specifically contradicts set_texture() at a higher node level (or, with a

  • priority, overrides a set_texture() at a lower level).

*/

/**
  • Sets the geometry at this level and below to render using no texture, on

  • the indicated stage. This is different from not specifying a texture;

  • rather, this specifically contradicts set_texture() at a higher node level

  • (or, with a priority, overrides a set_texture() at a lower level).

*/

set_attrib()

C++ Interface: set_attrib(const NodePathCollection self, const RenderAttrib attrib, int priority)

/**
  • Applies the indicated RenderAttrib to all NodePaths in the collection. An

  • effort is made to apply the attrib to many NodePaths as quickly as

  • possible; redundant RenderState compositions are not duplicated.

*/

set_collide_mask()

C++ Interface: set_collide_mask(const NodePathCollection self, BitMask new_mask, BitMask bits_to_change, TypeHandle node_type)

/**
  • Recursively applies the indicated CollideMask to the into_collide_masks for

  • all nodes at this level and below.

  • The default is to change all bits, but if bits_to_change is not all bits

  • on, then only the bits that are set in bits_to_change are modified,

  • allowing this call to change only a subset of the bits in the subgraph.

*/

set_color()

C++ Interface: set_color(const NodePathCollection self, const LVecBase4f color) set_color(const NodePathCollection self, const LVecBase4f color, int priority) set_color(const NodePathCollection self, float r, float g, float b, float a, int priority)

/**
  • Colors all NodePaths in the collection

*/

/**
  • Colors all NodePaths in the collection

*/

set_color_scale()

C++ Interface: set_color_scale(const NodePathCollection self, const LVecBase4f scale) set_color_scale(const NodePathCollection self, const LVecBase4f scale, int priority) set_color_scale(const NodePathCollection self, float r, float g, float b, float a, int priority)

/**
  • Applies color scales to all NodePaths in the collection. The existing

  • color scale is replaced.

*/

/**
  • Applies color scales to all NodePaths in the collection. The existing

  • color scale is replaced.

*/

set_texture()

C++ Interface: set_texture(const NodePathCollection self, Texture tex) set_texture(const NodePathCollection self, TextureStage stage, Texture tex, int priority) set_texture(const NodePathCollection self, Texture tex, int priority)

/**
  • Adds the indicated texture to the list of textures that will be rendered on

  • the default texture stage.

  • This is the deprecated single-texture variant of this method; it is now

  • superceded by set_texture() that accepts a stage and texture. However,

  • this method may be used in the presence of multitexture if you just want to

  • adjust the default stage.

*/

/**
  • Adds the indicated texture to the list of textures that will be rendered on

  • the indicated multitexture stage. If there are multiple texture stages

  • specified (possibly on multiple different nodes at different levels), they

  • will all be applied to geometry together, according to the stage

  • specification set up in the TextureStage object.

*/

set_texture_off()

C++ Interface: set_texture_off(const NodePathCollection self) set_texture_off(const NodePathCollection self, TextureStage stage, int priority) set_texture_off(const NodePathCollection self, int priority)

/**
  • Sets the geometry at this level and below to render using no texture, on

  • any stage. This is different from not specifying a texture; rather, this

  • specifically contradicts set_texture() at a higher node level (or, with a

  • priority, overrides a set_texture() at a lower level).

*/

/**
  • Sets the geometry at this level and below to render using no texture, on

  • the indicated stage. This is different from not specifying a texture;

  • rather, this specifically contradicts set_texture() at a higher node level

  • (or, with a priority, overrides a set_texture() at a lower level).

*/

show()

C++ Interface: show(const NodePathCollection self)

/**
  • Shows all NodePaths in the collection.

*/

stash()

C++ Interface: stash(const NodePathCollection self)

/**
  • Stashes all NodePaths in the collection.

*/

unstash()

C++ Interface: unstash(const NodePathCollection self)

/**
  • Unstashes all NodePaths in the collection.

*/

write()

C++ Interface: write(NodePathCollection self, ostream out, int indent_level)

/**
  • Writes a complete multi-line description of the NodePathCollection to the

  • indicated output stream.

*/

wrtReparentTo()

C++ Interface: wrt_reparent_to(const NodePathCollection self, const NodePath other)

/**
  • Reparents all the NodePaths in the collection to the indicated node,

  • adjusting each transform so as not to move in world coordinates.

*/

wrt_reparent_to()

C++ Interface: wrt_reparent_to(const NodePathCollection self, const NodePath other)

/**
  • Reparents all the NodePaths in the collection to the indicated node,

  • adjusting each transform so as not to move in world coordinates.

*/