I’ve noticed that it’s possible in Blender to select objects but not have an active object. For example, box selecting, or using select all merely adds objects to the selection, but without an active object many group operations (join, for example) cannot be performed because they require an object to join to. I realise that it’s trivial to just click on an object, but is there a reason that box select or select all do not assign an active object if there is not one already, and also, is there a reason the active object can be active, but not selected (possible if you manually deselect the active object with shift+click)? You also cannot easily clear the active object when there is one other than by deleting it.
This doesn’t cause me a lot of trouble, but occasionally I’ll notice Blender failed to perform an operation because I didn’t have an active object. It seems like it’s either a weird design choice, or a bug, and I’m not sure whether I should report it as a bug or ask for a feature on right click select.
Anyone know why it’s this way? Personally I prefer the active object to just be the last object in the selection, and if it is deselected, just make the active object the next last selected, or just another object in the selection. At the very least, setting the active object on box select/select all when there isn’t one would be an improvement.
Thanks, I’ve noticed this behaviour, but I was just wondering what the reason for being able to have a selection with no active object is. Maybe it’s not a big deal, but as I said, I do find it a bit strange that you can box select a bunch of objects and upon trying to group them it will fail because box select doesn’t assign an active object.
There are ways to clear the active object, but it’s not something you can do easily; You could delete the object, or remove the active object in python.
When I import xfrog trees into Blender as objs they generally come in as separate objects - trunk, branch, etc, and all are selected but none is active. I can transform (usually scale and maybe apply transorms) but to join into a single object I have to shift-click on one component and Ctrl-J
That would be normal behaviour. Blender needs to know which object to join to.
for example when joining blender needs to know:
where will the new objects centre be,
what is the scale and rotation,
what to do with modifiers,
so it needs an active object to take this info and more from when joining meshes.
I agree with this. I was actually writing a python add-on to implement this sort of behavior (always having an active object, and basing it on selection order including box select, copy/paste, and duplicate) and I even had some pretty nice logic for persistently tracking object order, but then I ran into problems with Blender’s… “special”… undo system that breaks object memory references whenever you undo/redo.
I abandoned it because without being able to keep a persistent history of selection and deselection that survives through undo and redo it’s not worth anything. Maybe I’ll try going back to the add-on at a later time; I haven’t tried using pointer properties yet which I’ve heard might survive through undo/redo.
I see what you mean, and perhaps it is not an easy thing to find a very clean solution to, but typically that would be handled by using the object that appears first in the scene hierarchy, although this may not be apparent to the user. The active object can then be changed manually by clicking on other objects in the selection, but at least there is an active object so that if the user quickly selects some objects using box select and tries to join them, it will always work.
You can also make the same thing happen by hiding the active object and then using select all or box select. In this case, if you try to join the objects you don’t even get an error because the hidden object is still the active object. Even if the user clicks on empty space and makes another selection box, the issue will persist until they actually click on a single object.
Personally I don’t mind an error message. But there have been some cases where nothing happens.
If an error message appeared saying something like “please define a visible active object”. If you check the link I posted earlier there is still some work being done regarding the underlying way blender deals with active objects. so it is a known issue that is being looked at.
I was planning on using the last object in the hierarchy (from the set of items added in the box selection), but yes using the object hierarchy order is how you’d do it. I believe this is how Maya chooses which object to set as the active object when you box select, for example.