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:
authorAlexander Gavrilov <angavrilov@gmail.com>2020-11-25 14:31:01 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2020-11-25 14:42:56 +0300
commitb757daf681b0c39c67b3ed2391ff8437a46e237e (patch)
tree30ffd358c720e1e0aebf6f2204c8385dcc10c13c /rigify/rigs/basic/raw_copy.py
parent292b5975d6d4d470f51ff683d5b5a5d979e887a4 (diff)
Rigify: Fix T80764: handling of bones with ORG prefix in raw_copy.
Originally the raw_copy rig used a standard API of rigify to rename the bone after generate already added an ORG prefix. However, if the bone already had that prefix, generate didn't add the second one to avoid 'ORG-ORG', and thus raw_copy removed the only remaining prefix. As the simplest solution, hard-code handling of this rig in generate. This isn't that bad, because this rig is special by definition, and the special handling consists in doing nothing. The original API based code is kept commented out as an example.
Diffstat (limited to 'rigify/rigs/basic/raw_copy.py')
-rw-r--r--rigify/rigs/basic/raw_copy.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/rigify/rigs/basic/raw_copy.py b/rigify/rigs/basic/raw_copy.py
index 7d6d693e..077deaa6 100644
--- a/rigify/rigs/basic/raw_copy.py
+++ b/rigify/rigs/basic/raw_copy.py
@@ -27,6 +27,8 @@ from ...base_generate import SubstitutionRig
from itertools import repeat
+'''
+Due to T80764, bone name handling for 'limbs.raw_copy' was hard-coded in generate.py
class Rig(SubstitutionRig):
""" A raw copy rig, preserving the metarig bone as is, without the ORG prefix. """
@@ -37,7 +39,7 @@ class Rig(SubstitutionRig):
new_name = self.generator.rename_org_bone(self.base_bone, new_name)
return [ self.instantiate_rig(InstanceRig, new_name) ]
-
+'''
class RelinkConstraintsMixin:
""" Utilities for constraint relinking. """
@@ -122,7 +124,7 @@ class RelinkConstraintsMixin:
layout.label(text="Constraint names have special meanings.", icon='ERROR')
-class InstanceRig(BaseRig, RelinkConstraintsMixin):
+class Rig(BaseRig, RelinkConstraintsMixin):
def find_org_bones(self, pose_bone):
return pose_bone.name
@@ -148,8 +150,8 @@ class InstanceRig(BaseRig, RelinkConstraintsMixin):
self.add_relink_constraints_ui(layout, params)
-add_parameters = InstanceRig.add_parameters
-parameters_ui = InstanceRig.parameters_ui
+#add_parameters = InstanceRig.add_parameters
+#parameters_ui = InstanceRig.parameters_ui
def create_sample(obj):