diff options
author | fieldOfView <aldo@fieldofview.com> | 2018-03-13 22:40:41 +0300 |
---|---|---|
committer | fieldOfView <aldo@fieldofview.com> | 2018-03-13 22:40:41 +0300 |
commit | a536da503bf374f5db0fec5180e9989294f77c22 (patch) | |
tree | 48fae0ad211ed0c9cef33ea08231e56df6c4d7d6 /plugins/SupportEraser | |
parent | d88724aff539748dbdb0001bacbe6785cae68ba1 (diff) |
Rename DepthPass to PickingPass
The map created by the shader is not strictly a depth map; not only is the "depth" encoded in the rgb channels, but it is also a distance to the camera instead of a "scene depth".
Diffstat (limited to 'plugins/SupportEraser')
-rw-r--r-- | plugins/SupportEraser/SupportEraser.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/SupportEraser/SupportEraser.py b/plugins/SupportEraser/SupportEraser.py index 0ddfed0cf1..35713805bc 100644 --- a/plugins/SupportEraser/SupportEraser.py +++ b/plugins/SupportEraser/SupportEraser.py @@ -13,7 +13,7 @@ from cura.Scene.SliceableObjectDecorator import SliceableObjectDecorator from cura.Scene.BuildPlateDecorator import BuildPlateDecorator from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator -from cura.DepthPass import DepthPass +from cura.PickingPass import PickingPass import os import os.path @@ -30,13 +30,13 @@ class SupportEraser(Tool): if event.type == Event.MousePressEvent and self._controller.getToolsEnabled(): active_camera = self._controller.getScene().getActiveCamera() - # Create depth pass for picking - depth_pass = DepthPass(active_camera.getViewportWidth(), active_camera.getViewportHeight()) - depth_pass.render() + # Create a pass for picking a world-space location from the mouse location + picking_pass = PickingPass(active_camera.getViewportWidth(), active_camera.getViewportHeight()) + picking_pass.render() - picked_position = depth_pass.getPickedPosition(event.x, event.y) + picked_position = picking_pass.getPickedPosition(event.x, event.y) - # Add the anto_overhang_mesh cube: + # Add the anti_overhang_mesh cube at the picked location self._createEraserMesh(picked_position) def _createEraserMesh(self, position: Vector): |