mesh_snap_utilities_line: Fix ghost objects
This commit is contained in:
parent
f0e2d0e6a2
commit
00e74bb22d
|
@ -22,7 +22,7 @@
|
|||
bl_info = {
|
||||
"name": "Snap_Utilities_Line",
|
||||
"author": "Germano Cavalcante",
|
||||
"version": (5, 9, 4),
|
||||
"version": (5, 9, 5),
|
||||
"blender": (2, 80, 0),
|
||||
"location": "View3D > TOOLS > Line Tool",
|
||||
"description": "Extends Blender Snap controls",
|
||||
|
|
|
@ -262,7 +262,7 @@ class SnapUtilities:
|
|||
|
||||
moving_objects.difference_update(children)
|
||||
|
||||
self.sctx.clear_snap_objects()
|
||||
self.sctx.clear_snap_objects(True)
|
||||
|
||||
for obj in context.visible_objects:
|
||||
is_moving = obj in moving_objects or obj in children
|
||||
|
@ -295,7 +295,8 @@ class SnapUtilities:
|
|||
for obj in context.objects_in_mode_unique_data:
|
||||
yield (obj, obj.matrix_world)
|
||||
|
||||
self.sctx.clear_snap_objects()
|
||||
self.sctx.clear_snap_objects(True)
|
||||
|
||||
for obj, matrix in visible_objects_and_duplis():
|
||||
self.sctx.add_obj(obj, matrix)
|
||||
|
||||
|
|
|
@ -371,13 +371,13 @@ class SnapContext():
|
|||
self.winsize = winsize
|
||||
self._offscreen.resize(*self.winsize)
|
||||
|
||||
def clear_snap_objects(self):
|
||||
def clear_snap_objects(self, clear_offscreen = False):
|
||||
for snap_obj in self.snap_objects:
|
||||
if len(snap_obj.data) == 2:
|
||||
snap_obj.data[1].free()
|
||||
del snap_obj.data[1:]
|
||||
|
||||
self.update_drawing(False)
|
||||
self.update_drawing(clear_offscreen)
|
||||
|
||||
self.snap_objects.clear()
|
||||
_Internal.gpu_Indices_mesh_cache_clear()
|
||||
|
|
Loading…
Reference in New Issue