From c05f4813b650b8b4d45c172c549947e562bf71aa Mon Sep 17 00:00:00 2001
From: Campbell Barton <ideasman42@gmail.com>
Date: Tue, 8 Feb 2011 21:36:44 +0000
Subject: [PATCH] incorrectly switched mesh.update() --> mesh.update_tag(),
 update_tag() tags for depsgraph update only, update() executes normal
 recalculation and creates edge data.

---
 add_mesh_3d_function_surface.py            |  2 +-
 add_mesh_BoltFactory/createMesh.py         |  2 +-
 add_mesh_ant_landscape.py                  |  2 +-
 add_mesh_extras.py                         |  2 +-
 add_mesh_gears.py                          |  2 +-
 add_mesh_gemstones.py                      |  2 +-
 add_mesh_pipe_joint.py                     |  2 +-
 add_mesh_solid.py                          |  2 +-
 add_mesh_twisted_torus.py                  |  2 +-
 animation_add_corrective_shape_key.py      | 10 +++++-----
 io_convert_image_to_mesh_img/import_img.py |  2 +-
 io_import_images_as_planes.py              |  2 +-
 io_import_scene_mhx.py                     |  2 +-
 io_import_scene_unreal_psk.py              |  8 ++++----
 io_mesh_ply/import_ply.py                  |  2 +-
 io_mesh_raw/import_raw.py                  |  2 +-
 io_mesh_stl/blender_utils.py               |  2 +-
 io_scene_3ds/import_3ds.py                 |  2 +-
 io_scene_x3d/import_x3d.py                 |  4 ++--
 io_shape_mdd/import_mdd.py                 |  6 +++---
 mesh_surface_sketch.py                     |  2 +-
 modules/add_utils.py                       |  2 +-
 object_cloud_gen.py                        |  4 ++--
 rigify/rigs/biped/arm/fk.py                |  2 +-
 rigify/rigs/biped/arm/ik.py                |  2 +-
 rigify/rigs/biped/leg/fk.py                |  2 +-
 rigify/rigs/biped/leg/ik.py                |  4 ++--
 rigify/rigs/finger.py                      |  2 +-
 rigify/rigs/palm.py                        |  2 +-
 rigify/utils.py                            | 12 ++++++------
 space_view3d_materials_utils.py            |  2 +-
 31 files changed, 48 insertions(+), 48 deletions(-)

diff --git a/add_mesh_3d_function_surface.py b/add_mesh_3d_function_surface.py
index 923817b8c..322ae7073 100644
--- a/add_mesh_3d_function_surface.py
+++ b/add_mesh_3d_function_surface.py
@@ -138,7 +138,7 @@ def create_mesh_object(context, verts, edges, faces, name):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     import add_object_utils
     return add_object_utils.object_data_add(context, mesh, operator=None)
diff --git a/add_mesh_BoltFactory/createMesh.py b/add_mesh_BoltFactory/createMesh.py
index 36e793b62..4cec092d5 100644
--- a/add_mesh_BoltFactory/createMesh.py
+++ b/add_mesh_BoltFactory/createMesh.py
@@ -2092,7 +2092,7 @@ def create_mesh_object(context, verts, edges, faces, name, edit, align_matrix):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     # Deselect all objects.
     bpy.ops.object.select_all(action='DESELECT')
diff --git a/add_mesh_ant_landscape.py b/add_mesh_ant_landscape.py
index d7d1e17da..f0a38b328 100644
--- a/add_mesh_ant_landscape.py
+++ b/add_mesh_ant_landscape.py
@@ -92,7 +92,7 @@ def create_mesh_object(context, verts, edges, faces, name):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     import add_object_utils
     return add_object_utils.object_data_add(context, mesh, operator=None)
diff --git a/add_mesh_extras.py b/add_mesh_extras.py
index 6cb83e10c..423677f42 100644
--- a/add_mesh_extras.py
+++ b/add_mesh_extras.py
@@ -51,7 +51,7 @@ def create_mesh_object(context, verts, edges, faces, name):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     import add_object_utils
     return add_object_utils.object_data_add(context, mesh, operator=None)
diff --git a/add_mesh_gears.py b/add_mesh_gears.py
index 8f1fa9c83..a623ce48f 100644
--- a/add_mesh_gears.py
+++ b/add_mesh_gears.py
@@ -84,7 +84,7 @@ def create_mesh_object(context, verts, edges, faces, name):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     import add_object_utils
     return add_object_utils.object_data_add(context, mesh, operator=None)
diff --git a/add_mesh_gemstones.py b/add_mesh_gemstones.py
index 187696be3..3cd37157a 100644
--- a/add_mesh_gemstones.py
+++ b/add_mesh_gemstones.py
@@ -51,7 +51,7 @@ def create_mesh_object(context, verts, edges, faces, name):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     import add_object_utils
     return add_object_utils.object_data_add(context, mesh, operator=None)
diff --git a/add_mesh_pipe_joint.py b/add_mesh_pipe_joint.py
index ce12232c5..168bd5976 100644
--- a/add_mesh_pipe_joint.py
+++ b/add_mesh_pipe_joint.py
@@ -146,7 +146,7 @@ def create_mesh_object(context, verts, edges, faces, name):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     import add_object_utils
     return add_object_utils.object_data_add(context, mesh, operator=None)
diff --git a/add_mesh_solid.py b/add_mesh_solid.py
index 8e9c35f7b..5bf081283 100644
--- a/add_mesh_solid.py
+++ b/add_mesh_solid.py
@@ -55,7 +55,7 @@ def create_mesh_object(context, verts, edges, faces, name):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     import add_object_utils
     return add_object_utils.object_data_add(context, mesh, operator=None)
diff --git a/add_mesh_twisted_torus.py b/add_mesh_twisted_torus.py
index bb6afc368..e33cf9c17 100644
--- a/add_mesh_twisted_torus.py
+++ b/add_mesh_twisted_torus.py
@@ -67,7 +67,7 @@ def create_mesh_object(context, verts, edges, faces, name):
     mesh.from_pydata(verts, edges, faces)
 
     # Update mesh geometry after adding stuff.
-    mesh.update_tag()
+    mesh.update()
 
     import add_object_utils
     return add_object_utils.object_data_add(context, mesh, operator=None)
diff --git a/animation_add_corrective_shape_key.py b/animation_add_corrective_shape_key.py
index bf07145b0..49967b103 100644
--- a/animation_add_corrective_shape_key.py
+++ b/animation_add_corrective_shape_key.py
@@ -121,7 +121,7 @@ def applyX(ob, mesh, x ):
         v = mesh[i]
         v.co = x[i]
     
-    ob.data.update_tag()
+    ob.data.update()
     
     return x
 
@@ -141,7 +141,7 @@ def func_add_corrective_pose_shape( source, target):
     except:
         basis = ob_1.shape_key_add()
         basis.name = "Basis"
-        ob_1.data.update_tag()
+        ob_1.data.update()
         
     
     key_index = ob_1.active_shape_key_index
@@ -212,7 +212,7 @@ def func_add_corrective_pose_shape( source, target):
     # set the new shape key value to 1.0, so we see the result instantly
     ob_1.active_shape_key.value = 1.0
     
-    #mesh_1.update_tag()
+    #mesh_1.update()
     ob_1.show_only_shape_key = False
     
 
@@ -387,7 +387,7 @@ def func_add_corrective_pose_shape_fast(source, target):
     except:
         basis = target.shape_key_add()
         basis.name = "Basis"
-        target.data.update_tag()
+        target.data.update()
     
     key_index = target.active_shape_key_index
 
@@ -440,7 +440,7 @@ def func_add_corrective_pose_shape_fast(source, target):
         pass
     
     target.show_only_shape_key = False
-    target.data.update_tag()
+    target.data.update()
     
 
 
diff --git a/io_convert_image_to_mesh_img/import_img.py b/io_convert_image_to_mesh_img/import_img.py
index 6810c3441..40813bf18 100644
--- a/io_convert_image_to_mesh_img/import_img.py
+++ b/io_convert_image_to_mesh_img/import_img.py
@@ -648,7 +648,7 @@ class hirise_dtm_helper(object):
       me.faces.foreach_set("vertices_raw", faces)
 
       self.dbg('running update...')
-      me.update_tag()
+      me.update()
 
       bin_desc = self.bin_mode()
       if bin_desc == 'NONE':
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index ff09085a1..3156d2939 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -138,7 +138,7 @@ def create_image_plane(self, context, material):
 
     mesh_data = bpy.data.meshes.new(img.name)
     mesh_data.from_pydata(verts, [], faces)
-    mesh_data.update_tag()
+    mesh_data.update()
     add_object_data(context, mesh_data, operator=self)
     plane = context.scene.objects.active
     plane.data.uv_textures.new()
diff --git a/io_import_scene_mhx.py b/io_import_scene_mhx.py
index 8f242a79b..3b7448463 100644
--- a/io_import_scene_mhx.py
+++ b/io_import_scene_mhx.py
@@ -1217,7 +1217,7 @@ def parseMesh (args, tokens):
         me.from_pydata(verts, [], faces)
     else:
         me.from_pydata(verts, edges, [])
-    me.update_tag()
+    me.update()
     linkObject(ob, me)
         
     mats = []
diff --git a/io_import_scene_unreal_psk.py b/io_import_scene_unreal_psk.py
index 63013ea4e..d6686fc27 100644
--- a/io_import_scene_unreal_psk.py
+++ b/io_import_scene_unreal_psk.py
@@ -396,8 +396,8 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK):
                     newbone.parent = parentbone
                     rotmatrix = bone.bindmat.to_matrix().to_4x4().to_3x3()  # XXX, redundant matrix conversion?
 					
-                    #parent_head = parentbone.head * parentbone.matrix.to_quaternion().inverse()
-                    #parent_tail = parentbone.tail * parentbone.matrix.to_quaternion().inverse()
+                    #parent_head = parentbone.head * parentbone.matrix.to_quaternion().inverted()
+                    #parent_tail = parentbone.tail * parentbone.matrix.to_quaternion().inverted()
                     #location=Vector(pos_x,pos_y,pos_z)
                     #set_position = (parent_tail - parent_head) + location
                     #print("tmp head:",set_position)
@@ -467,7 +467,7 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK):
     #RWghts fields = PntIdx|BoneIdx|Weight
     RWghts.sort()
     printlog( "len(RWghts)=" + str(len(RWghts)) + "\n")
-    #Tmsh.update_tag()
+    #Tmsh.update()
     
     #set the Vertex Colors of the faces
     #face.v[n] = RWghts[0]
@@ -503,7 +503,7 @@ def pskimport(infile,importmesh,importbone,bDebugLogPSK):
     
     me_ob.faces.foreach_set("vertices_raw", faces)
     me_ob.faces.foreach_set("use_smooth", [False] * len(me_ob.faces))
-    me_ob.update_tag()
+    me_ob.update()
     
     #===================================================================================================
     #UV Setup
diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index bc0a93ff0..1dac3a8d1 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -307,7 +307,7 @@ def load_ply(filepath):
                     for j, col in enumerate(f_col):
                         col.r, col.g, col.b = ply_col[j]
 
-    mesh.update_tag()
+    mesh.update()
 
     scn = bpy.context.scene
     #scn.objects.selected = [] # XXX25
diff --git a/io_mesh_raw/import_raw.py b/io_mesh_raw/import_raw.py
index 40c45274e..b8e96209c 100644
--- a/io_mesh_raw/import_raw.py
+++ b/io_mesh_raw/import_raw.py
@@ -106,7 +106,7 @@ def addMeshObj(mesh, objName):
     for o in scn.objects:
         o.select = False
 
-    mesh.update_tag()
+    mesh.update()
     nobj = bpy.data.objects.new(objName, mesh)
     scn.objects.link(nobj)
     nobj.select = True
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py
index f1beaa3e2..3d0ef076b 100644
--- a/io_mesh_stl/blender_utils.py
+++ b/io_mesh_stl/blender_utils.py
@@ -34,7 +34,7 @@ def create_and_link_mesh(name, faces, points):
     bpy.context.scene.objects.link(ob)
 
     # update mesh to allow proper display
-    mesh.update_tag()
+    mesh.update()
 
 
 def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
diff --git a/io_scene_3ds/import_3ds.py b/io_scene_3ds/import_3ds.py
index e3b2eb740..e53222bd5 100644
--- a/io_scene_3ds/import_3ds.py
+++ b/io_scene_3ds/import_3ds.py
@@ -338,7 +338,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
             object_matrix[ob] = contextMatrix_rot.copy()
 
         importedObjects.append(ob)
-        bmesh.update_tag()
+        bmesh.update()
 
     #a spare chunk
     new_chunk = chunk()
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index f2c86fe8b..b4b9fe09f 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -1700,7 +1700,7 @@ def importMesh_IndexedFaceSet(geom, bpyima, ancestry):
         #   bpymesh.faces.extend(faces, smooth=True)
 
     # bpymesh.calcNormals()
-    bpymesh.update_tag()
+    bpymesh.update()
 
     if len(bpymesh.faces) != len(faces):
         print('\tWarning: adding faces did not work! file is invalid, not adding UVs or vcolors')
@@ -1917,7 +1917,7 @@ def importMesh_PointSet(geom, ancestry):
     bpymesh.vertices.foreach_set("co", [a for v in points for a in v])
 
     # bpymesh.calcNormals()  # will just be dummy normals
-    bpymesh.update_tag()
+    bpymesh.update()
     return bpymesh
 
 GLOBALS['CIRCLE_DETAIL'] = 12
diff --git a/io_shape_mdd/import_mdd.py b/io_shape_mdd/import_mdd.py
index c0f1d0c3f..0fdc78cb1 100644
--- a/io_shape_mdd/import_mdd.py
+++ b/io_shape_mdd/import_mdd.py
@@ -57,7 +57,7 @@ def load(operator, context, filepath, frame_start=0, frame_step=1):
     except:
         basis = obj.shape_key_add()
         basis.name = "Basis"
-        obj.data.update_tag()
+        obj.data.update()
 
     scene.frame_current = frame_start
 
@@ -76,7 +76,7 @@ def load(operator, context, filepath, frame_start=0, frame_step=1):
 
         for v in verts:  # 12 is the size of 3 floats
             v.co[:] = unpack('>3f', file.read(12))
-        # me.update_tag()
+        # me.update()
         obj.show_only_shape_key = False
 
         # insert keyframes
@@ -94,7 +94,7 @@ def load(operator, context, filepath, frame_start=0, frame_step=1):
         obj.data.shape_keys.keys[index].value = 0.0
         shape_keys.keys[len(obj.data.shape_keys.keys) - 1].keyframe_insert("value")
 
-        obj.data.update_tag()
+        obj.data.update()
 
     for i in range(frames):
         UpdateMesh(obj, i)
diff --git a/mesh_surface_sketch.py b/mesh_surface_sketch.py
index 35a0e391e..df6f9f7fe 100644
--- a/mesh_surface_sketch.py
+++ b/mesh_surface_sketch.py
@@ -701,7 +701,7 @@ class GPENCIL_OT_surfsk_surface_add(bpy.types.Operator):
         
         me_surf.from_pydata(all_surface_verts_co, [], all_surface_faces)
         
-        me_surf.update_tag()
+        me_surf.update()
         
         ob_surface = bpy.data.objects.new(surf_me_name, me_surf)
         bpy.context.scene.objects.link(ob_surface)
diff --git a/modules/add_utils.py b/modules/add_utils.py
index 27fc9d6da..bc54abc6c 100644
--- a/modules/add_utils.py
+++ b/modules/add_utils.py
@@ -82,7 +82,7 @@ def add_object_data(context, obdata, operator=None):
         ob.select = False
 
     obj_new = bpy.data.objects.new(obdata.name, obdata)
-    obj_new.update_tag()
+    obj_new.update()
 
     base = scene.objects.link(obj_new)
     base.select = True
diff --git a/object_cloud_gen.py b/object_cloud_gen.py
index bf213b78b..2ff145226 100644
--- a/object_cloud_gen.py
+++ b/object_cloud_gen.py
@@ -163,7 +163,7 @@ def makeObjectIntoBoundBox(scene, object, sizeDifference, takeFromObject):
     mesh.from_pydata(addVerts, [], addFaces)
 
     # Update the mesh
-    mesh.update_tag()
+    mesh.update()
 
 def applyScaleRotLoc(scene, obj):
     # Deselect All
@@ -261,7 +261,7 @@ def convertParticlesToMesh(scene, particlesobj, destobj, replacemesh):
     meshPnts.from_pydata(listMeshPnts, [], [])
 
     # Update the mesh.
-    meshPnts.update_tag()
+    meshPnts.update()
 
 def combineObjects(scene, combined, listobjs):
     # scene is the current scene
diff --git a/rigify/rigs/biped/arm/fk.py b/rigify/rigs/biped/arm/fk.py
index 6cd8255fe..20ba89f27 100644
--- a/rigify/rigs/biped/arm/fk.py
+++ b/rigify/rigs/biped/arm/fk.py
@@ -199,7 +199,7 @@ class Rig:
             edges = [(1, 2), (0, 3), (0, 4), (3, 5), (4, 6), (1, 6), (5, 7), (2, 7)]
             mesh = ob.data
             mesh.from_pydata(verts, edges, [])
-            mesh.update_tag()
+            mesh.update()
 
             mod = ob.modifiers.new("subsurf", 'SUBSURF')
             mod.levels = 2
diff --git a/rigify/rigs/biped/arm/ik.py b/rigify/rigs/biped/arm/ik.py
index 0824daca9..2b941b9e6 100644
--- a/rigify/rigs/biped/arm/ik.py
+++ b/rigify/rigs/biped/arm/ik.py
@@ -298,7 +298,7 @@ class Rig:
             edges = [(1, 2), (0, 3), (0, 4), (3, 5), (4, 6), (1, 6), (5, 7), (2, 7)]
             mesh = ob.data
             mesh.from_pydata(verts, edges, [])
-            mesh.update_tag()
+            mesh.update()
 
             mod = ob.modifiers.new("subsurf", 'SUBSURF')
             mod.levels = 2
diff --git a/rigify/rigs/biped/leg/fk.py b/rigify/rigs/biped/leg/fk.py
index 8ed7e435a..a212d4458 100644
--- a/rigify/rigs/biped/leg/fk.py
+++ b/rigify/rigs/biped/leg/fk.py
@@ -237,7 +237,7 @@ class Rig:
             edges = [(1, 2), (0, 3), (0, 4), (3, 5), (4, 6), (1, 6), (5, 7), (2, 7)]
             mesh = ob.data
             mesh.from_pydata(verts, edges, [])
-            mesh.update_tag()
+            mesh.update()
 
             mod = ob.modifiers.new("subsurf", 'SUBSURF')
             mod.levels = 2
diff --git a/rigify/rigs/biped/leg/ik.py b/rigify/rigs/biped/leg/ik.py
index 0505c2dc8..a04b57dc5 100644
--- a/rigify/rigs/biped/leg/ik.py
+++ b/rigify/rigs/biped/leg/ik.py
@@ -500,7 +500,7 @@ class Rig:
             edges = [(1, 2), (0, 3), (0, 4), (3, 5), (4, 6), (1, 6), (5, 7), (2, 7)]
             mesh = ob.data
             mesh.from_pydata(verts, edges, [])
-            mesh.update_tag()
+            mesh.update()
 
             mod = ob.modifiers.new("subsurf", 'SUBSURF')
             mod.levels = 2
@@ -511,7 +511,7 @@ class Rig:
             edges = [(1, 2), (0, 3), (0, 4), (3, 5), (1, 6), (4, 6), (2, 7), (5, 7)]
             mesh = ob.data
             mesh.from_pydata(verts, edges, [])
-            mesh.update_tag()
+            mesh.update()
 
             mod = ob.modifiers.new("subsurf", 'SUBSURF')
             mod.levels = 2
diff --git a/rigify/rigs/finger.py b/rigify/rigs/finger.py
index 298e94313..f5788d023 100644
--- a/rigify/rigs/finger.py
+++ b/rigify/rigs/finger.py
@@ -261,7 +261,7 @@ class Rig:
                 verts = temp
             edges = [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 1)]
             mesh.from_pydata(verts, edges, [])
-            mesh.update_tag()
+            mesh.update()
 
         for bone in bones:
             create_limb_widget(self.obj, bone)
diff --git a/rigify/rigs/palm.py b/rigify/rigs/palm.py
index cec4bde02..5a0fa7737 100644
--- a/rigify/rigs/palm.py
+++ b/rigify/rigs/palm.py
@@ -153,7 +153,7 @@ class Rig:
                 verts = temp
             edges = [(1, 2), (0, 3), (4, 7), (5, 6), (8, 0), (9, 3), (10, 1), (11, 2), (12, 6), (13, 7), (4, 14), (15, 5), (10, 8), (11, 9), (15, 14), (12, 13)]
             mesh.from_pydata(verts, edges, [])
-            mesh.update_tag()
+            mesh.update()
 
             mod = w.modifiers.new("subsurf", 'SUBSURF')
             mod.levels = 2
diff --git a/rigify/utils.py b/rigify/utils.py
index 87aaf31e6..f0a19aac6 100644
--- a/rigify/utils.py
+++ b/rigify/utils.py
@@ -275,7 +275,7 @@ def create_line_widget(rig, bone_name):
     if obj != None:
         mesh = obj.data
         mesh.from_pydata([(0, 0, 0), (0, 1, 0)], [(0, 1)], [])
-        mesh.update_tag()
+        mesh.update()
 
 
 def create_circle_widget(rig, bone_name, radius=1.0, head_tail=0.0):
@@ -290,7 +290,7 @@ def create_circle_widget(rig, bone_name, radius=1.0, head_tail=0.0):
         edges = [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9), (9, 10), (10, 11), (11, 12), (12, 13), (13, 14), (14, 15), (15, 16), (16, 17), (17, 18), (18, 19), (19, 20), (20, 21), (21, 22), (22, 23), (23, 24), (24, 25), (25, 26), (26, 27), (27, 28), (28, 29), (29, 30), (30, 31), (0, 31)]
         mesh = obj.data
         mesh.from_pydata(verts, edges, [])
-        mesh.update_tag()
+        mesh.update()
         return obj
     else:
         return None
@@ -305,7 +305,7 @@ def create_sphere_widget(rig, bone_name):
         edges = [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9), (9, 10), (10, 11), (11, 12), (12, 13), (13, 14), (14, 15), (0, 15), (16, 31), (16, 17), (17, 18), (18, 19), (19, 20), (20, 21), (21, 22), (22, 23), (23, 24), (24, 25), (25, 26), (26, 27), (27, 28), (28, 29), (29, 30), (30, 31), (32, 33), (33, 34), (34, 35), (35, 36), (36, 37), (37, 38), (38, 39), (39, 40), (40, 41), (41, 42), (42, 43), (43, 44), (44, 45), (45, 46), (46, 47), (32, 47)]
         mesh = obj.data
         mesh.from_pydata(verts, edges, [])
-        mesh.update_tag()
+        mesh.update()
 
 
 def create_limb_widget(rig, bone_name):
@@ -318,7 +318,7 @@ def create_limb_widget(rig, bone_name):
         edges = [(0, 1), (2, 3), (4, 3), (5, 4), (5, 6), (6, 7), (8, 7), (8, 9), (10, 9), (10, 11), (11, 12), (13, 12), (14, 13), (14, 15), (16, 15), (16, 17), (17, 18), (19, 18), (19, 20), (21, 20), (21, 22), (22, 23), (24, 23), (25, 24), (25, 26), (27, 26), (27, 28), (29, 28), (29, 30), (30, 31), (32, 31), (32, 33), (2, 33)]
         mesh = obj.data
         mesh.from_pydata(verts, edges, [])
-        mesh.update_tag()
+        mesh.update()
 
 
 def create_bone_widget(rig, bone_name):
@@ -330,7 +330,7 @@ def create_bone_widget(rig, bone_name):
         edges = [(1, 2), (0, 1), (0, 3), (2, 3), (4, 5), (5, 6), (6, 7), (4, 7), (1, 5), (0, 4), (2, 6), (3, 7)]
         mesh = obj.data
         mesh.from_pydata(verts, edges, [])
-        mesh.update_tag()
+        mesh.update()
 
 
 def create_root_widget(rig, bone_name):
@@ -342,7 +342,7 @@ def create_root_widget(rig, bone_name):
         edges = [(0, 4), (1, 5), (2, 6), (3, 7), (4, 8), (5, 9), (6, 10), (7, 11), (8, 12), (9, 13), (10, 14), (11, 15), (16, 20), (17, 21), (18, 22), (19, 23), (20, 24), (21, 25), (22, 26), (23, 27), (0, 24), (1, 25), (2, 26), (3, 27), (16, 28), (17, 29), (18, 30), (19, 31), (12, 32), (13, 33), (14, 34), (15, 35), (28, 36), (29, 37), (30, 38), (31, 39), (32, 40), (33, 41), (34, 42), (35, 43), (36, 44), (37, 45), (38, 44), (39, 45), (40, 46), (41, 46), (42, 47), (43, 47)]
         mesh = obj.data
         mesh.from_pydata(verts, edges, [])
-        mesh.update_tag()
+        mesh.update()
 
 
 #=============================================
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py
index 925b57f2c..7923a4213 100644
--- a/space_view3d_materials_utils.py
+++ b/space_view3d_materials_utils.py
@@ -220,7 +220,7 @@ def mat_to_texface():
                     else:
                         uvtex[f.index].use_image = False
 
-        me.update_tag()
+        me.update()
         
     
     if editmode:
-- 
GitLab