The BoneEyedropper add-on allows users to easily select bones in an armature using a eyedropper tool. This tool is especially useful for selecting bones directly in the 3D view and setting up property for the constraint.
This extension requests the following permissions:
Import .blend from disk
Copy property paths to clipboard
I am super impressed that you managed to implement this through Python, and it looks really sick, and I hate to say this, but it's also inches away from being implemented in core Blender.
Although your version has some nice preview drawing, which I think is freaking cool, but I don't think that would be enough to justify having it as an extension.
Unless that PR never lands. Then having this add-on will be great! But hopefully it does land, soon. And isn't it the best outcome when an add-on's functionality makes it into core? :)
I agree that this feature should be implemented as a core feature, not an add-on. I have tested that PR. To select the bones of another armature using eyedropper from 3D View, the target armature must be in Pose/Edit mode. Is this a limitation in the implementation...? I wish I could do something for that PR since the purpose seems to be the same, but I know nothing about Blender C... sorry 😔
Yeah, that's currently a limitation, IIRC Christoph said he can't access the pose bones of an object mode armature because he's using the selection buffer for the eyedropper, and ofc if you try to select an armature in object mode, it just selects the object itself. So the pose bones aren't available in whatever function he's using.
But if your add-on can do that,maybe you could suggest to him how your implementation is doing it, and ask if it would make sense to change his implementation to that, to avoid this limitation!
Addon just converts the 3D coords of the pose bones of the constraint target armature to the 2D coords of the region and then searches for the closest one to the mouse cursor... so as he said, it cannot take into account the shape of the bones.
My implementation won't help him as it doesn't work the same as the standard eyedropper as one would expect.
From automatic code review
policy_for_sys_modules:
Use of sys
module that may violate policies.
Warn about access to sys
which may manipulate module loading for all extensions.
output\bone_eyedropper\source\__init__.py:11:22:
for k, v in list(sys.modules.items()):
error_prone_builtins:
Calls to potentially insecure functions exec()
& eval()
.
Besides security implications if this comes from an untrusted source. This often hints at poor code.
getattr(data, attr)
& setattr(data, attr, value)
can be an alternative.ast.parse(...)
then ast.literal_eval(node)
.output\bone_eyedropper\source\bone_eyedropper.py:425:12:
return eval(tuple_data_path[0]), tuple_data_path[1]
It was pointed out to me that visualization doesn't work on custom shapes, and makes it very difficult to use or useless for any practical rig that uses shapes. It works fine on default armatures with default bone shapes, but anything else, including B-bone shapes looks wrong, limiting scope of the add-on by a lot.
Do you want to accept that as limitation and note that visualization is wrong for non-octohedral bones, you maybe take a shot at better way of visualizing? (part of the problem also is that in cases where custom shape and bone are misaligned, its difficult to find where you have to hover to get that bone. For example on default rigify human rig (generated), hovering over circle at the bottom to get the root doesn't work, because root is located at the behind of the character).
output\bone_eyedropper\source\__init__.py:11:22:
for k, v in list(sys.modules.items()):
OK, this is my oversight (unnecessary code). I will remove it immediately.
output\bone_eyedropper\source\bone_eyedropper.py:425:12:
return eval(tuple_data_path[0]), tuple_data_path[1]
This code snippet has already been removed in v1.1.0.
Bones with custom shapes are already supported in v1.1.0. If a custom shape has been set, it can be retrieved by placing the cursor near the vertex of the custom shape instead of the actual bone position. B-bone shapes are a little more difficult, but not impossible. I'll try to implement it anyway.
Thanks. I advise you note known issues in the description, so that users know what to expect and you also don't get bug reports for them.
Sign in to comment.
Ready for review