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:
authorJulian Eisel <julian@blender.org>2021-06-23 13:09:02 +0300
committerJulian Eisel <julian@blender.org>2021-06-23 13:09:02 +0300
commit323d2345701a02ab6ee183e112dc9a3cbff249b7 (patch)
tree370e9ab88a0db0bf7c462954f88af838fca33f51
parent5bffbeaaa7905b27eecf9ac298475ebaca39943a (diff)
Fix pose creation failure after recent changes in master
682a74e0909ba renamed properties and replaced existing float properties with float-vector properties. This updates the Pose Libraries add-on to these changes.
-rw-r--r--pose_library/pose_creation.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/pose_library/pose_creation.py b/pose_library/pose_creation.py
index 3119d34c..246784ea 100644
--- a/pose_library/pose_creation.py
+++ b/pose_library/pose_creation.py
@@ -73,19 +73,18 @@ class PoseActionCreator:
params: PoseCreationParams
# These were taken from Blender's Action baking code in `anim_utils.py`.
- _bbone_prop_names = [
- "bbone_curveinx",
- "bbone_curveoutx",
- "bbone_curveiny",
- "bbone_curveouty",
- "bbone_rollin",
- "bbone_rollout",
- "bbone_scaleinx",
- "bbone_scaleoutx",
- "bbone_scaleiny",
- "bbone_scaleouty",
- "bbone_easein",
- "bbone_easeout",
+ # Items are (name, array_length) tuples.
+ _bbone_props = [
+ ("bbone_curveinx", None),
+ ("bbone_curveoutx", None),
+ ("bbone_curveinz", None),
+ ("bbone_curveoutz", None),
+ ("bbone_rollin", None),
+ ("bbone_rollout", None),
+ ("bbone_scalein", 3),
+ ("bbone_scaleout", 3),
+ ("bbone_easein", None),
+ ("bbone_easeout", None),
]
def create(self) -> Optional[Action]:
@@ -191,7 +190,10 @@ class PoseActionCreator:
def _store_bbone(self, dst_action: Action, bone_name: str) -> None:
"""Store bendy-bone parameters."""
- for prop_name in self._bbone_prop_names:
+ for prop_name, array_length in self._bbone_props:
+ if array_length:
+ self._store_bone_array(dst_action, bone_name, prop_name, array_length)
+ else:
self._store_bone_property(dst_action, bone_name, prop_name)
def _store_bone_array(