Skip to content

Commit

Permalink
Show message 'Armature objects must be in Pose mode'
Browse files Browse the repository at this point in the history
  • Loading branch information
romanvolodin committed Dec 8, 2022
1 parent 820a695 commit 746103d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dynamic_parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
bl_info = {
"name": "Dynamic Parent",
"author": "Roman Volodin, [email protected]",
"version": (1, 0, 0),
"version": (1, 0, 1),
"blender": (2, 83, 0),
"location": "View3D > Tool Panel",
"description": "Allows to create and disable an animated ChildOf constraint",
Expand Down Expand Up @@ -247,6 +247,9 @@ def execute(self, context):
frame = context.scene.frame_current

if obj.type == 'ARMATURE':
if obj.mode != 'POSE':
self.report({'ERROR'}, "Armature objects must be in Pose mode.")
return {'CANCELLED'}
obj = bpy.context.active_pose_bone
const = get_last_dymanic_parent_constraint(obj)
if const:
Expand Down

0 comments on commit 746103d

Please sign in to comment.