Fix missing clip planes update in Snap Utilities Line

Make sure you always check for state change.
This commit is contained in:
Germano Cavalcante 2022-04-13 02:57:47 -03:00
parent 209ee28877
commit bffb84a052
3 changed files with 3 additions and 5 deletions

View File

@ -6,7 +6,7 @@
bl_info = {
"name": "Snap_Utilities_Line",
"author": "Germano Cavalcante",
"version": (6, 9, 6),
"version": (6, 9, 7),
"blender": (3, 2, 0),
"location": "View3D > TOOLS > Line Tool",
"description": "Extends Blender Snap controls",

View File

@ -432,7 +432,6 @@ class SnapUtilities:
#Create Snap Context
self.sctx = global_snap_context_get(context.evaluated_depsgraph_get(), context.region, context.space_data)
self.sctx.set_pixel_dist(12)
self.sctx.use_clip_planes(True)
if SnapUtilities.snapwidgets:
widget = SnapUtilities.snapwidgets[-1]

View File

@ -335,6 +335,8 @@ class SnapContext():
if clear_offscreen:
self._offscreen.clear()
_Internal.gpu_Indices_use_clip_planes(self.rv3d, True)
def tag_update_drawn_snap_object(self, snap_obj):
if len(snap_obj.data) > 1:
snap_obj.data[1].free()
@ -360,9 +362,6 @@ class SnapContext():
_Internal.gpu_Indices_restore_state()
def use_clip_planes(self, value):
_Internal.gpu_Indices_use_clip_planes(self.rv3d, value)
def set_pixel_dist(self, dist_px):
self._dist_px = int(dist_px)
self._dist_px_sq = self._dist_px ** 2