Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getArmature(ctx: Context):
- def get(obj: Object):
- if obj is None:
- return None
- if obj.type == "ARMATURE":
- return obj
- for e in obj.modifiers:
- if isinstance(e, ArmatureModifier) and e.object is not None:
- return e.object
- return get(obj.parent)
- for obj in ctx.selected_objects:
- a=get(obj.parent)
- if a is not None:
- return a
- return None
Add Comment
Please, Sign In to add comment