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:
authorDamien Picard <dam.pic@free.fr>2019-09-03 15:47:18 +0300
committerDamien Picard <dam.pic@free.fr>2019-09-03 15:52:39 +0300
commit0a6d3d725f0b6edc99198f6afa91138968580caf (patch)
tree0faf4b8555608581830366b294818b0366a28665 /animation_animall.py
parent7e92cba70c11910363872d20af6afd5b47616264 (diff)
animation_animall: workaround for data refresh: T68332 T68666
Diffstat (limited to 'animation_animall.py')
-rw-r--r--animation_animall.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/animation_animall.py b/animation_animall.py
index df658ff3..f919bbb9 100644
--- a/animation_animall.py
+++ b/animation_animall.py
@@ -44,6 +44,7 @@ from bpy.props import (
BoolProperty,
StringProperty,
)
+from bpy.app.handlers import persistent
# Property Definitions
@@ -563,6 +564,15 @@ class AnimallAddonPreferences(AddonPreferences):
col.prop(self, "category", text="")
+@persistent
+def animall_update_handler(scene):
+ '''Force data refresh on frame change.
+ To be removed when T68666 is fixed, probably.'''
+ for obj in scene.objects:
+ if obj.data is not None:
+ obj.update_tag(refresh={'DATA'})
+
+
def register():
bpy.utils.register_class(AnimallProperties)
bpy.types.WindowManager.animall_properties = bpy.props.PointerProperty(type=AnimallProperties)
@@ -572,6 +582,7 @@ def register():
bpy.utils.register_class(ANIM_OT_clear_animation_animall)
bpy.utils.register_class(AnimallAddonPreferences)
update_panel(None, bpy.context)
+ bpy.app.handlers.frame_change_post.append(animall_update_handler)
def unregister():
@@ -582,6 +593,7 @@ def unregister():
bpy.utils.unregister_class(ANIM_OT_delete_keyframe_animall)
bpy.utils.unregister_class(ANIM_OT_clear_animation_animall)
bpy.utils.unregister_class(AnimallAddonPreferences)
+ bpy.app.handlers.frame_change_post.remove(animall_update_handler)
if __name__ == "__main__":
register()