-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show message 'Armature objects must be in Pose mode'
- Loading branch information
1 parent
820a695
commit 746103d
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
@@ -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: | ||
|