MCPcopy Create free account
hub / github.com/vispy/vispy / add

Method add

vispy/visuals/shaders/function.py:760–771  ·  view source on GitHub ↗

Add an item to the list unless it is already present. If the item is an expression, then a semicolon will be appended to it in the final compiled code.

(self, item, position=5)

Source from the content-addressed store, hash-verified

758 ShaderObject.__init__(self)
759
760 def add(self, item, position=5):
761 """Add an item to the list unless it is already present.
762
763 If the item is an expression, then a semicolon will be appended to it
764 in the final compiled code.
765 """
766 if item in self.items:
767 return
768 self.items[item] = position
769 self._add_dep(item)
770 self.order = None
771 self.changed(code_changed=True)
772
773 def remove(self, item):
774 """Remove an item from the list."""

Callers 15

__init__Method · 0.45
__init__Method · 0.45
compileMethod · 0.45
__setitem__Method · 0.45
_parse_template_varsMethod · 0.45
test_StatementListFunction · 0.45
test_multiprogramFunction · 0.45
test_mesh_normalsFunction · 0.45

Calls 2

_add_depMethod · 0.80
changedMethod · 0.80