EggNameUniquifier

from panda3d.egg import EggNameUniquifier
class EggNameUniquifier

Bases: EggObject

This is a handy class for guaranteeing unique node names in an egg hierarchy. It is an abstract class; to use it you must subclass off of it. See the comment above.

Inheritance diagram

Inheritance diagram of EggNameUniquifier

__init__(*args, **kwargs)
addName()

C++ Interface: add_name(const EggNameUniquifier self, str category, str name, EggNode node)

/**
  • Adds the name to the indicated category. This name will not be used for

  • any other egg node within this category. Returns true if the name was

  • added, or false if it was already in use for the category.

*/

add_name()

C++ Interface: add_name(const EggNameUniquifier self, str category, str name, EggNode node)

/**
  • Adds the name to the indicated category. This name will not be used for

  • any other egg node within this category. Returns true if the name was

  • added, or false if it was already in use for the category.

*/

clear()

C++ Interface: clear(const EggNameUniquifier self)

/**
  • Empties the table of used named and prepares the Uniquifier for a new tree.

*/

filterName()

C++ Interface: filter_name(const EggNameUniquifier self, EggNode node)

/**
  • Returns the name of the given node, or at least the name it should be.

  • This provides a hook to adjust the name before attempting to uniquify it,

  • if desired, for instance to remove invalid characters.

*/

filter_name()

C++ Interface: filter_name(const EggNameUniquifier self, EggNode node)

/**
  • Returns the name of the given node, or at least the name it should be.

  • This provides a hook to adjust the name before attempting to uniquify it,

  • if desired, for instance to remove invalid characters.

*/

generateName()

C++ Interface: generate_name(const EggNameUniquifier self, EggNode node, str category, int index)

/**
  • Generates a new name for the given node when its existing name clashes with

  • some other node. This function will be called repeatedly, if necessary,

  • until it returns a name that actually is unique.

  • The category is the string returned by get_category(), and index is a

  • uniquely-generated number that may be useful for synthesizing the name.

*/

generate_name()

C++ Interface: generate_name(const EggNameUniquifier self, EggNode node, str category, int index)

/**
  • Generates a new name for the given node when its existing name clashes with

  • some other node. This function will be called repeatedly, if necessary,

  • until it returns a name that actually is unique.

  • The category is the string returned by get_category(), and index is a

  • uniquely-generated number that may be useful for synthesizing the name.

*/

getCategory()

C++ Interface: get_category(const EggNameUniquifier self, EggNode node)

getClassType()

C++ Interface: get_class_type()

getNode()

C++ Interface: get_node(EggNameUniquifier self, str category, str name)

/**
  • Returns the node associated with the given category and name, or NULL if

  • the name has not been used.

*/

get_category()

C++ Interface: get_category(const EggNameUniquifier self, EggNode node)

get_class_type()

C++ Interface: get_class_type()

get_node()

C++ Interface: get_node(EggNameUniquifier self, str category, str name)

/**
  • Returns the node associated with the given category and name, or NULL if

  • the name has not been used.

*/

hasName()

C++ Interface: has_name(EggNameUniquifier self, str category, str name)

/**
  • Returns true if the name has been used for the indicated category already,

  • false otherwise.

*/

has_name()

C++ Interface: has_name(EggNameUniquifier self, str category, str name)

/**
  • Returns true if the name has been used for the indicated category already,

  • false otherwise.

*/

uniquify()

C++ Interface: uniquify(const EggNameUniquifier self, EggNode node)

/**
  • Begins the traversal from the indicated node.

*/