[Bf-extensions-cvs] [dacee3a0] master: Rigify: replace the use of the now removed scene.update()

Alexander Gavrilov noreply at git.blender.org
Thu May 16 17:20:29 CEST 2019


Commit: dacee3a047b6a7eb8b6cdbb0f4689500e97e6f18
Author: Alexander Gavrilov
Date:   Thu May 16 18:20:14 2019 +0300
Branches: master
https://developer.blender.org/rBAdacee3a047b6a7eb8b6cdbb0f4689500e97e6f18

Rigify: replace the use of the now removed scene.update()

===================================================================

M	rigify/legacy/rig_ui_pitchipoy_template.py
M	rigify/rig_ui_template.py

===================================================================

diff --git a/rigify/legacy/rig_ui_pitchipoy_template.py b/rigify/legacy/rig_ui_pitchipoy_template.py
index 4f71de06..2e64b743 100644
--- a/rigify/legacy/rig_ui_pitchipoy_template.py
+++ b/rigify/legacy/rig_ui_pitchipoy_template.py
@@ -67,7 +67,7 @@ def tail_distance(angle,bone_ik,bone_fk):
     if rot_mod != 'AXIS_ANGLE':
         bone_ik.rotation_mode = 'AXIS_ANGLE'
     bone_ik.rotation_axis_angle[0] = angle
-    bpy.context.scene.update()
+    bpy.context.view_layer.update()
 
     dv = (bone_fk.tail - bone_ik.tail).length
 
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index e2070857..6cd46f6a 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -71,7 +71,7 @@ def tail_distance(angle,bone_ik,bone_fk):
     if rot_mod != 'AXIS_ANGLE':
         bone_ik.rotation_mode = 'AXIS_ANGLE'
     bone_ik.rotation_axis_angle[0] = angle
-    bpy.context.scene.update()
+    bpy.context.view_layer.update()
 
     dv = (bone_fk.tail - bone_ik.tail).length



More information about the Bf-extensions-cvs mailing list