MCPcopy Create free account
hub / github.com/BerkeleyAutomation/meshrender / remove_object

Method remove_object

meshrender/scene.py:110–127  ·  view source on GitHub ↗

Removes an object from the scene. Parameters ---------- name : str An identifier for the object to be removed. Raises ------ ValueError If the given name was not assigned to an object in the scene.

(self, name)

Source from the content-addressed store, hash-verified

108 self.close_renderer()
109
110 def remove_object(self, name):
111 """Removes an object from the scene.
112
113 Parameters
114 ----------
115 name : str
116 An identifier for the object to be removed.
117
118 Raises
119 ------
120 ValueError
121 If the given name was not assigned to an object in the scene.
122 """
123 if name in self._objects:
124 del self._objects[name]
125 else:
126 raise ValueError('Object {} not in scene!'.format(name))
127 self.close_renderer()
128
129 def add_light(self, name, light):
130 """Adds a named light to the scene.

Callers

nothing calls this directly

Calls 1

close_rendererMethod · 0.95

Tested by

no test coverage detected