LightAttrib
from panda3d.core import LightAttrib
- class LightAttrib
Bases:
RenderAttrib
Indicates which set of lights should be considered “on” to illuminate geometry at this level and below. A LightAttrib can either add lights or remove lights from the total set of “on” lights.
Inheritance diagram
- OAdd = 1
- ORemove = 2
- OSet = 0
- O_add = 1
- O_remove = 2
- O_set = 0
- __init__(*args, **kwargs)
- addLight()
C++ Interface: add_light(LightAttrib self, Light light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
added to the list of lights.
@deprecated Use add_on_light() or add_off_light() instead.
*/
- addOffLight()
C++ Interface: add_off_light(LightAttrib self, const NodePath light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
added to the list of lights turned off by this attrib.
*/
- addOnLight()
C++ Interface: add_on_light(LightAttrib self, const NodePath light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
added to the list of lights turned on by this attrib.
*/
- add_light()
C++ Interface: add_light(LightAttrib self, Light light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
added to the list of lights.
@deprecated Use add_on_light() or add_off_light() instead.
*/
- add_off_light()
C++ Interface: add_off_light(LightAttrib self, const NodePath light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
added to the list of lights turned off by this attrib.
*/
- add_on_light()
C++ Interface: add_on_light(LightAttrib self, const NodePath light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
added to the list of lights turned on by this attrib.
*/
- class_slot = 17
- getAmbientContribution()
C++ Interface: get_ambient_contribution(LightAttrib self)
- /**
Returns the total contribution of all the ambient lights.
*/
- getClassSlot()
C++ Interface: get_class_slot()
- getClassType()
C++ Interface: get_class_type()
- getLight()
C++ Interface: get_light(LightAttrib self, int n)
- /**
Returns the nth light listed in the attribute.
@deprecated LightAttribs nowadays have a separate list of on_lights and
off_lights, so this method no longer makes sense. Query the lists
independently.
*/
- getMostImportantLight()
C++ Interface: get_most_important_light(LightAttrib self)
- /**
Returns the most important light (that is, the light with the highest
priority) in the LightAttrib, excluding any ambient lights. Returns an
empty NodePath if no non-ambient lights are found.
*/
- getNumLights()
C++ Interface: get_num_lights(LightAttrib self)
- /**
Returns the number of lights listed in the attribute.
@deprecated LightAttribs nowadays have a separate list of on_lights and
off_lights, so this method no longer makes sense. Query the lists
independently.
*/
- getNumNonAmbientLights()
C++ Interface: get_num_non_ambient_lights(LightAttrib self)
- /**
Returns the number of non-ambient lights that are turned on by this
attribute.
*/
- getNumOffLights()
C++ Interface: get_num_off_lights(LightAttrib self)
- /**
Returns the number of lights that are turned off by the attribute.
*/
- getNumOnLights()
C++ Interface: get_num_on_lights(LightAttrib self)
- /**
Returns the number of lights that are turned on by the attribute.
*/
- getOffLight()
C++ Interface: get_off_light(LightAttrib self, int n)
- /**
Returns the nth light turned off by the attribute, sorted in arbitrary
(pointer) order.
*/
- getOffLights()
- getOnLight()
C++ Interface: get_on_light(LightAttrib self, int n)
- /**
Returns the nth light turned on by the attribute, sorted in render order.
*/
- getOnLights()
- getOperation()
C++ Interface: get_operation(LightAttrib self)
- /**
Returns the basic operation type of the LightAttrib. If this is O_set, the
lights listed here completely replace any lights that were already on. If
this is O_add, the lights here are added to the set of lights that were
already on, and if O_remove, the lights here are removed from the set of
lights that were on.
@deprecated LightAttribs nowadays have a separate list of on_lights and
off_lights, so this method no longer makes sense. Query the lists
independently.
*/
- get_ambient_contribution()
C++ Interface: get_ambient_contribution(LightAttrib self)
- /**
Returns the total contribution of all the ambient lights.
*/
- get_class_slot()
C++ Interface: get_class_slot()
- get_class_type()
C++ Interface: get_class_type()
- get_light()
C++ Interface: get_light(LightAttrib self, int n)
- /**
Returns the nth light listed in the attribute.
@deprecated LightAttribs nowadays have a separate list of on_lights and
off_lights, so this method no longer makes sense. Query the lists
independently.
*/
- get_most_important_light()
C++ Interface: get_most_important_light(LightAttrib self)
- /**
Returns the most important light (that is, the light with the highest
priority) in the LightAttrib, excluding any ambient lights. Returns an
empty NodePath if no non-ambient lights are found.
*/
- get_num_lights()
C++ Interface: get_num_lights(LightAttrib self)
- /**
Returns the number of lights listed in the attribute.
@deprecated LightAttribs nowadays have a separate list of on_lights and
off_lights, so this method no longer makes sense. Query the lists
independently.
*/
- get_num_non_ambient_lights()
C++ Interface: get_num_non_ambient_lights(LightAttrib self)
- /**
Returns the number of non-ambient lights that are turned on by this
attribute.
*/
- get_num_off_lights()
C++ Interface: get_num_off_lights(LightAttrib self)
- /**
Returns the number of lights that are turned off by the attribute.
*/
- get_num_on_lights()
C++ Interface: get_num_on_lights(LightAttrib self)
- /**
Returns the number of lights that are turned on by the attribute.
*/
- get_off_light()
C++ Interface: get_off_light(LightAttrib self, int n)
- /**
Returns the nth light turned off by the attribute, sorted in arbitrary
(pointer) order.
*/
- get_off_lights()
- get_on_light()
C++ Interface: get_on_light(LightAttrib self, int n)
- /**
Returns the nth light turned on by the attribute, sorted in render order.
*/
- get_on_lights()
- get_operation()
C++ Interface: get_operation(LightAttrib self)
- /**
Returns the basic operation type of the LightAttrib. If this is O_set, the
lights listed here completely replace any lights that were already on. If
this is O_add, the lights here are added to the set of lights that were
already on, and if O_remove, the lights here are removed from the set of
lights that were on.
@deprecated LightAttribs nowadays have a separate list of on_lights and
off_lights, so this method no longer makes sense. Query the lists
independently.
*/
- hasAllOff()
C++ Interface: has_all_off(LightAttrib self)
- /**
Returns true if this attrib turns off all lights (although it may also turn
some on).
*/
- hasAnyOnLight()
C++ Interface: has_any_on_light(LightAttrib self)
- /**
Returns true if any light is turned on by the attrib, false otherwise.
*/
- hasLight()
C++ Interface: has_light(LightAttrib self, Light light)
- /**
Returns true if the indicated light is listed in the attrib, false
otherwise.
@deprecated LightAttribs nowadays have a separate list of on_lights and
off_lights, so this method no longer makes sense. Query the lists
independently.
*/
- hasOffLight()
C++ Interface: has_off_light(LightAttrib self, const NodePath light)
- /**
Returns true if the indicated light is turned off by the attrib, false
otherwise.
*/
- hasOnLight()
C++ Interface: has_on_light(LightAttrib self, const NodePath light)
- /**
Returns true if the indicated light is turned on by the attrib, false
otherwise.
*/
- has_all_off()
C++ Interface: has_all_off(LightAttrib self)
- /**
Returns true if this attrib turns off all lights (although it may also turn
some on).
*/
- has_any_on_light()
C++ Interface: has_any_on_light(LightAttrib self)
- /**
Returns true if any light is turned on by the attrib, false otherwise.
*/
- has_light()
C++ Interface: has_light(LightAttrib self, Light light)
- /**
Returns true if the indicated light is listed in the attrib, false
otherwise.
@deprecated LightAttribs nowadays have a separate list of on_lights and
off_lights, so this method no longer makes sense. Query the lists
independently.
*/
- has_off_light()
C++ Interface: has_off_light(LightAttrib self, const NodePath light)
- /**
Returns true if the indicated light is turned off by the attrib, false
otherwise.
*/
- has_on_light()
C++ Interface: has_on_light(LightAttrib self, const NodePath light)
- /**
Returns true if the indicated light is turned on by the attrib, false
otherwise.
*/
- isIdentity()
C++ Interface: is_identity(LightAttrib self)
- /**
Returns true if this is an identity attrib: it does not change the set of
lights in use.
*/
- is_identity()
C++ Interface: is_identity(LightAttrib self)
- /**
Returns true if this is an identity attrib: it does not change the set of
lights in use.
*/
- make()
C++ Interface: make() make(int op, Light light) make(int op, Light light1, Light light2) make(int op, Light light1, Light light2, Light light3) make(int op, Light light1, Light light2, Light light3, Light light4)
// The following is the new, more general interface to the LightAttrib.
- /**
Constructs a new LightAttrib object that turns on (or off, according to op)
the indicated light(s).
@deprecated Use add_on_light() or add_off_light() instead.
*/
- /**
Constructs a new LightAttrib object that turns on (or off, according to op)
the indicate light(s).
@deprecated Use add_on_light() or add_off_light() instead.
*/
- /**
Constructs a new LightAttrib object that turns on (or off, according to op)
the indicate light(s).
@deprecated Use add_on_light() or add_off_light() instead.
*/
- /**
Constructs a new LightAttrib object that turns on (or off, according to op)
the indicate light(s).
@deprecated Use add_on_light() or add_off_light() instead.
*/
- /**
Constructs a new LightAttrib object that does nothing.
*/
- makeAllOff()
C++ Interface: make_all_off()
- /**
Constructs a new LightAttrib object that turns off all lights (and hence
disables lighting).
*/
- makeDefault()
C++ Interface: make_default()
- /**
Returns a RenderAttrib that corresponds to whatever the standard default
properties for render attributes of this type ought to be.
*/
- make_all_off()
C++ Interface: make_all_off()
- /**
Constructs a new LightAttrib object that turns off all lights (and hence
disables lighting).
*/
- make_default()
C++ Interface: make_default()
- /**
Returns a RenderAttrib that corresponds to whatever the standard default
properties for render attributes of this type ought to be.
*/
- off_lights
- on_lights
- removeLight()
C++ Interface: remove_light(LightAttrib self, Light light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
removed from the list of lights.
@deprecated Use remove_on_light() or remove_off_light() instead.
*/
- removeOffLight()
C++ Interface: remove_off_light(LightAttrib self, const NodePath light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
removed from the list of lights turned off by this attrib.
*/
- removeOnLight()
C++ Interface: remove_on_light(LightAttrib self, const NodePath light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
removed from the list of lights turned on by this attrib.
*/
- remove_light()
C++ Interface: remove_light(LightAttrib self, Light light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
removed from the list of lights.
@deprecated Use remove_on_light() or remove_off_light() instead.
*/
- remove_off_light()
C++ Interface: remove_off_light(LightAttrib self, const NodePath light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
removed from the list of lights turned off by this attrib.
*/
- remove_on_light()
C++ Interface: remove_on_light(LightAttrib self, const NodePath light)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
removed from the list of lights turned on by this attrib.
*/
- replaceOffLight()
C++ Interface: replace_off_light(LightAttrib self, const NodePath source, const NodePath dest)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
replaced with the given other light.
*/
- replaceOnLight()
C++ Interface: replace_on_light(LightAttrib self, const NodePath source, const NodePath dest)
- /**
Returns a new LightAttrib, just like this one, but with the indicated light
replaced with the given other light.
*/