romanvolodin / dynamic_parent

Dynamic Parent addon for Blender
192 stars 28 forks source link

QOL Suggestion: When attempting to parent armature to child in Object mode, show user a warning with the solution #9

Closed HeyItsLollie closed 1 year ago

HeyItsLollie commented 1 year ago

I was in Object Mode, and attempted to parent an armature to an empty. This threw the error below:

  File "C:\Users\Zenuel\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\dynamic_parent.py", line 251, in execute
    const = get_last_dymanic_parent_constraint(obj)
  File "C:\Users\Zenuel\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\dynamic_parent.py", line 58, in get_last_dymanic_parent_constraint
    if not obj.constraints:
AttributeError: 'NoneType' object has no attribute 'constraints'

I was able to find the solution via #4: Create the dynamic parent for the armature in Pose Mode instead of Object Mode.

The issue is that the plug-in should catch this, and throw a warning with solution - for example, like how it warns the user when only a single object is selected: blender - 2022-12-08 - 13-15-42

romanvolodin commented 1 year ago

Thanks for suggestion! I've added the message "Armature objects must be in Pose mode" in v1.0.1

romanvolodin commented 1 year ago

Reopened the issue in case you have something to add.

HeyItsLollie commented 1 year ago

Nothing else to add, thank you for adding it so quickly!