Page MenuHome

bone_rigify_type_UI_draw_patch.patch

bone_rigify_type_UI_draw_patch.patch

Index: ui.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- ui.py (revision c273e5b4d1413c3a341a06cb7a60d294d382ce7c)
+++ ui.py (revision )
@@ -567,12 +567,9 @@
@classmethod
def poll(cls, context):
- if not context.armature or not context.active_pose_bone:
- return False
- obj = context.object
- if obj:
- return obj.mode == 'POSE' and context.active_object.data.get("rig_id") is None
- return False
+
+ return context.object.type == 'ARMATURE' and context.active_pose_bone\
+ and context.active_object.data.get("rig_id") is None
def draw(self, context):
C = context
@@ -588,8 +585,7 @@
id_store.rigify_types.remove(0)
for r in rig_lists.rig_list:
- rig = get_rig_type(r)
- if hasattr(rig, 'IMPLEMENTATION') and rig.IMPLEMENTATION:
+ if r in rig_lists.implementation_rigs:
continue
# collection = r.split('.')[0] # UNUSED
if collection_name == "All":
Index: rig_lists.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- rig_lists.py (revision c273e5b4d1413c3a341a06cb7a60d294d382ce7c)
+++ rig_lists.py (revision )
@@ -24,7 +24,9 @@
def get_rig_list(path):
""" Recursively searches for rig types, and returns a list.
"""
+ rigs_dict = dict()
rigs = []
+ implementation_rigs = []
MODULE_DIR = os.path.dirname(__file__)
RIG_DIR_ABS = os.path.join(MODULE_DIR, utils.RIG_DIR)
SEARCH_DIR_ABS = os.path.join(RIG_DIR_ABS, path)
@@ -50,8 +52,9 @@
rigs += [f]
else:
# Check for sub-rigs
- ls = get_rig_list(os.path.join(path, f, "")) # "" adds a final slash
- rigs.extend(["%s.%s" % (f, l) for l in ls])
+ sub_dict = get_rig_list(os.path.join(path, f, "")) # "" adds a final slash
+ rigs.extend(["%s.%s" % (f, l) for l in sub_dict['rig_list']])
+ implementation_rigs.extend(["%s.%s" % (f, l) for l in sub_dict['implementation_rigs']])
elif f.endswith(".py"):
# Check straight-up python files
t = f[:-3]
@@ -59,8 +62,14 @@
rig = utils.get_rig_type(module_name)
if hasattr(rig, "Rig"):
rigs += [t]
+ if hasattr(rig, 'IMPLEMENTATION') and rig.IMPLEMENTATION:
+ implementation_rigs += [t]
rigs.sort()
- return rigs
+
+ rigs_dict['rig_list'] = rigs
+ rigs_dict['implementation_rigs'] = implementation_rigs
+
+ return rigs_dict
def get_collection_list(rig_list):
@@ -73,6 +82,10 @@
# Public variables
-rig_list = get_rig_list("")
+rigs_dict = get_rig_list("")
+rig_list = rigs_dict['rig_list']
+implementation_rigs = rigs_dict['implementation_rigs']
+print(rig_list)
+print(implementation_rigs)
collection_list = get_collection_list(rig_list)
col_enum_list = [("All", "All", ""), ("None", "None", "")] + [(c, c, "") for c in collection_list]

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
76/22/c8ba3a41a0ec3e59d3bb55f137ab

Event Timeline

hey, sorry but I don't know how to apply a patch, if you guide me or tell me where i can find the guidance to do it I'll be happy to.