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)
| 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. |
nothing calls this directly
no test coverage detected