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
path: root/rigify
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2021-12-31 13:36:53 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2021-12-31 13:36:53 +0300
commit231186d45fe8998729e594a7683fd19d30ce8a2c (patch)
tree0a401e3d1592f18096dd3f16c5a51cf7dc3782ed /rigify
parent5df5a211c5f02cead0630715b78d24549bbf9749 (diff)
Rigify: clear the script datablock when re-generating.
Diffstat (limited to 'rigify')
-rw-r--r--rigify/rig_ui_template.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rigify/rig_ui_template.py b/rigify/rig_ui_template.py
index 8780461d..06ff7faf 100644
--- a/rigify/rig_ui_template.py
+++ b/rigify/rig_ui_template.py
@@ -1168,7 +1168,10 @@ class ScriptGenerator(base_generate.GeneratorPlugin):
# Generate the UI script
script = metarig.data.rigify_rig_ui
- if not script:
+
+ if script:
+ script.clear()
+ else:
script = bpy.data.texts.new("rig_ui.py")
metarig.data.rigify_rig_ui = script