Sorry for the delay, but the early stage of my quick attempt is now ready, so I can share the .py file with you.
Small premise: for this very first test I used Serpens addon to speed up and have fun building and testing different UIs. Serpens is really convenient for this and allows you to build the user interface in a moment and become familiar with the properties and structure of Blender. This however generates a lot of ‘superfluous’ and ‘redundant’ code (which is added to the my own superfluous and redundant code…) not to mention that I left many meaningless names and deleted many of the comments (I’m a shy guy).
In summary: the code is not optimized/clean, let’s forget about PEP8 conventions for this very first version. If a real developer saw it, he would surely lose all his hair immediately but the purpose here is just to try it to understand if it can be useful to you and then refine it. In the meantime, I had fun and learned several very useful things.
I have temporarily named it “GSR AutoTool” (GSR stands for Grab, Scale, Rotate). Once installed, you can find it inside the 3D View > ‘N’ panel > Tool tab.
You can install the add-on the old fashioned way:
Preferences > Add-ons > Install from disk, then select the .zip file.
Once enabled, you will see this:
The tool can be ENABLED and DISABLED as needed by pressing the toggle button.
When ENABLED, a “Running” alert message will appear in the 3D view, and the Settings cannot be edited.
The Settings button opens/closes the panel where you can make core choices.
The main idea is to have 3 lists containing objects that, when selected, will automatically trigger the Grab, Scale, or Rotate operators.
When you select an object in the Grab list, the Grab operator (or the related gizmo, depending on the settings you chose) is launched on that object.
The same applies for Scale and Rotate.
All settings are quite intuitive and self-explanatory (I’ve also added some tooltips), but I’d like to describe those points in more detail:
-
Single Selection Restriction:
Currently, I have chosen not to allow more than one object to be selected at a time. However, with my initial msgbus method, it was still possible to select multiple objects using drag selection.
To address this, I added an option to restrict multi-selection using a depsgraph handler. If you disable this option, drag multi-selection will be possible, but if you select objects that are included in different lists, of course you might experience unexpected transformation behavior.
-
Refresh Button:
If you delete objects from the scene and those objects (or some of them) were present in one of the lists, this button will remove the orphaned items from the lists. Having orphaned items in a list does not cause any issues, but refreshing them doesn’t hurt either… especially in very heavy lists
Find Button:
This button checks if the currently selected object in the 3D view is already included in any of the lists.
-
For each list, you also have the following controls:
‘Eye’ button: Show/hide the list panel.
‘+’ button: Add all selected objects in the 3D view to the list (no need to worry about duplicates; there is a check that prevents adding the same object twice or to multiple lists).
‘-’ button: Remove all selected objects in the 3D view from the list they are currently in (the system automatically finds which list they belong to, so there is only one button for this action).
‘Trash’ button: Clear the entire list with a single click.
Here the .py (sorry, I haven’t any account to sharing code on proper platforms at the moment):
gsr_autotool_0.1.0.zip (78.2 KB)
You can use it and do whatever you like with it, even if it contains some icons made by me just to have fun. Of course, at your risk! No warranty at all if your house explodes or you lose all your data