diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-29 12:10:01 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-29 17:48:59 +0300 |
commit | 704ace1b48181180b70a5b4ed0039420c4acb4db (patch) | |
tree | 134f9f39da2b1df29ab4f691ef8fb16df7ef9157 /rigify/base_generate.py | |
parent | 6bb8ab3ad7b8131ffa9ed3261b6da8627903f3b1 (diff) |
Rigify: implement priorities to add toes to the FK bone group.
Toes behave as FK, but are needed both in IK and FK mode.
Diffstat (limited to 'rigify/base_generate.py')
-rw-r--r-- | rigify/base_generate.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rigify/base_generate.py b/rigify/base_generate.py index 790a0e1e..8cf04ade 100644 --- a/rigify/base_generate.py +++ b/rigify/base_generate.py @@ -21,6 +21,7 @@ import bpy import sys import traceback +import collections from .utils.errors import MetarigError, RaiseErrorMixin from .utils.naming import random_id @@ -210,6 +211,9 @@ class BaseGenerator: # Set of bones that should be left without parent self.noparent_bones = set() + # Table of layer priorities for defining bone groups + self.layer_group_priorities = collections.defaultdict(dict) + # Random string with time appended so that # different rigs don't collide id's self.rig_id = random_id(16) @@ -220,6 +224,12 @@ class BaseGenerator: self.noparent_bones.add(bone_name) + def set_layer_group_priority(self, bone_name, layers, priority): + for i, val in enumerate(layers): + if val: + self.layer_group_priorities[bone_name][i] = priority + + def __run_object_stage(self, method_name): assert(self.context.active_object == self.obj) assert(self.obj.mode == 'OBJECT') |