Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-02-06 06:39:05 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-02-06 06:39:05 +0300
commit8e67bd2651cf04eee0aabdcac1836df0678a49e8 (patch)
treecc935a7a59fcf7dd58f38dd828a28a3c22a99102 /mesh_snap_utilities_line
parent6c5d43cd729298c543fd2c70d59ca634ef6c5bcf (diff)
mesh_snap_utilities_line: Fix TypeError in 'depsgraph_update_post'
```TypeError: handler() takes 2 positional arguments but 3 were given``` `depsgraph_update_post` now requires three arguments
Diffstat (limited to 'mesh_snap_utilities_line')
-rw-r--r--mesh_snap_utilities_line/__init__.py2
-rw-r--r--mesh_snap_utilities_line/widgets.py14
2 files changed, 7 insertions, 9 deletions
diff --git a/mesh_snap_utilities_line/__init__.py b/mesh_snap_utilities_line/__init__.py
index c78489d3..fcdee273 100644
--- a/mesh_snap_utilities_line/__init__.py
+++ b/mesh_snap_utilities_line/__init__.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "Snap_Utilities_Line",
"author": "Germano Cavalcante",
- "version": (5, 9, 18),
+ "version": (5, 9, 19),
"blender": (2, 80, 0),
"location": "View3D > TOOLS > Line Tool",
"description": "Extends Blender Snap controls",
diff --git a/mesh_snap_utilities_line/widgets.py b/mesh_snap_utilities_line/widgets.py
index 9173c264..9879bef7 100644
--- a/mesh_snap_utilities_line/widgets.py
+++ b/mesh_snap_utilities_line/widgets.py
@@ -31,18 +31,18 @@ from .drawing_utilities import SnapDrawn
class SnapWidgetCommon(SnapUtilities, bpy.types.Gizmo):
-# __slots__ = ('inited', 'mode', 'last_mval', 'depsgraph')
+# __slots__ = ('inited', 'mode', 'last_mval')
snap_to_update = False
- def handler(self, scene):
+ def handler(self, scene, depsgraph):
cls = SnapWidgetCommon
if cls.snap_to_update is False:
last_operator = self.wm_operators[-1] if self.wm_operators else None
if (not last_operator or
last_operator.name not in {'Select', 'Loop Select', '(De)select All'}):
- cls.snap_to_update = self.depsgraph.id_type_updated('MESH') or\
- self.depsgraph.id_type_updated('OBJECT')
+ cls.snap_to_update = depsgraph.id_type_updated('MESH') or \
+ depsgraph.id_type_updated('OBJECT')
def draw_point_and_elem(self):
if self.bm:
@@ -57,7 +57,7 @@ class SnapWidgetCommon(SnapUtilities, bpy.types.Gizmo):
def init_delayed(self):
self.inited = False
- def init_snapwidget(self, context, snap_edge_and_vert = True):
+ def init_snapwidget(self, context, snap_edge_and_vert=True):
self.inited = True
self.snap_context_init(context, snap_edge_and_vert)
@@ -66,7 +66,6 @@ class SnapWidgetCommon(SnapUtilities, bpy.types.Gizmo):
self.last_mval = None
self.wm_operators = context.window_manager.operators
- self.depsgraph = context.evaluated_depsgraph_get()
bpy.app.handlers.depsgraph_update_post.append(self.handler)
SnapWidgetCommon.snap_to_update = False
@@ -109,8 +108,7 @@ class SnapWidgetCommon(SnapUtilities, bpy.types.Gizmo):
if snap_face != self.snap_face:
self.snap_face = snap_face
- self.sctx.set_snap_mode(
- self.snap_vert, self.snap_edge, self.snap_face)
+ self.sctx.set_snap_mode(self.snap_vert, self.snap_edge, self.snap_face)
snap_utilities.cache.clear()
self.snap_obj, prev_loc, self.location, self.type, self.bm, self.geom, len = snap_utilities(