Interactive workspace buttons that react to active object
Could it be possible to consider adding the possibility to make workspace buttons interactive? Workspace association by evaluating bpy.context of object.
If no object is selected, work spaces are greyed out giving message like "No object/object with bones selected" and they can´t be accessed.
Otherwise objects selected for editing release local space workspace to work in. If the object has bones available, it will release work spaces for those also.
Currently workspace operators support:
add()
append_activate()
delete()
duplicate()
reorder_to_back()
reorder_to_front()
scene_pin_toggle()
4 Comments
Workspaces are UI layouts. By nature, they have nothing to do with the data you have selected. What is the meaning of limiting what UI you can access based on your selection?
What would you benefit from this?
I would say that this would be intuitive user interface experience.
Every beginner is overwhelmed by the choices you have when using Blender. This would work well for beginners.
You could also confirm if the object you have selected has all the necessary things set through workspaces lighted or grayed out when it comes to your table. Instead you would have to go through tree view and check from there.
Two problems with this:
To no.2:
obj = bpy.context.active_object if obj.type == 'ARMATURE' toggle()
I think we would just have the possibility to select workspace association based on ID(bpy_struct) (Armature, Mesh, Material, GreasePencil, Node tree...). If the active object has the ID, it will just toggle it by TRUE and FALSE.
This requires access layout to have enum like toggle list that you can just click on to select which IDs it should toggle on and off on.