When you have multiple objects in hierarchies while modeling a huge scene, it becomes hard for you to select, duplicate or delete entire hierarchy fastly enough.
For example, when you have a plate on a table, an apple on the plate, a worm on the apple while all of those are connected through parent-child relationships, how would you select, duplicate or delete all of them?
Normally you will have to perform select similar
(Shift+G), check extend
option, and after that you can perform any operation you intend to do on the hierarchy.
This plugin allows this complicated procedure to happen with just a single click.
In object mode of 3D view...
This extension does not require special permissions.
Please remove extra files that are not required for add-on to run inside Blender: poetry, gitignore, pyproject.
As personal comment, I don't know how useful Alt-F is if it only selects downstream family (recursive children) when that shortcut already exists in Blender on [ or ]. And pressing both will select entire hierarchy. Seems like you're reinventing wheel a little bit.
I will approve this add-on as is, but I want to give you chance to take in final feedback if you want, because it will be difficult to change once people are using the add-on.
Duplicate Hierarchy operator also only works on recursive children and ignores parent objects. If I parent Cube > Sphere > Monkey and duplicate Sphere only Sphere and Monkey are duplicated, not Cube. Maybe this is intentional? If it is, please include that in descriptions and in operator name too.
But I think you didn't intend that. In that case I would look into getting recursive parents as well for object and including in that operator.
Mark is as Awaiting Review when you either changed the behavior or changed the operator name and description
After testing, it was found that when some subsets are within another collection and the collection is closed, using the plugin's duplicate parent object function will result in an error.
Python: Traceback (most recent call last): File "D:\blender-4.2.0-windows-x64\portable\extensions\user_default\family\operators.py", line 55, in invoke target.select_set(True) RuntimeError: Error: Object 'Cube.002' can't be selected because it is not in View Layer 'ViewLayer'!
I will mark this as awaiting changes until bug above is fixed.
It is some weird code you have there, for example:
family_settings: FamilySettings = getattr(context.scene, "family_settings")
why not
family_settings = context.scene.family_settings
?
Why are you specifying object type in this set
targets = set[bpy.types.Object]()
You seem to be complicating things for yourself
To resolve the bug above make sure that you filter out objects that are not in context.view_layer.objects
Sign in to comment.
Ready for review