Paste P559

Workspace mode design task description

Authored by Julian Eisel (Severin) on Nov 18 2017, 5:38 AM.
1​= Workspaces: Integrating Interaction Modes
3​== Motivation
5​Workspaces are introduced as a key factor for optimizing workflows in 2.8. With them, it should be possible to change tasks requiring different UI setups easly. Thereby, the interaction mode plays a huge role. It defines the toolset and options available. That means it has to work well together with the workspace.
6​As an example, when a user enters a workspace for animation, the pose mode should be enabled.
8​Right now the interaction mode is stored per object.
9​It also affects the UI of multiple editors (3D View, Properties Editor, UV/Image Editor), so it can't be just a 3D View option.
11​== Requirements
13​We need a design that meets the following requirements:
14​# Workspaces shall be able to affect the interaction mode, so that users don't need to switch it manually when switching workspaces.
15​# When switching workspaces, the newly activated workspace may be in a mode that the active object does not support. This should be handled nicely.
16​# It must be possible to switch interaction mode without switching workspace.
17​# While in weight paint mode, it must be possible to select the bones to paint weights for.
19​ For reference, the current (ugly) workflow is:
20​ * Enter pose mode for armature to draw weights for
21​ * Select object to draw weights on (Blender switches to object mode)
22​ * Switch to Weight Paint Mode
23​ * Now bones from the armature(s) in pose mode can be selected with {key Selectmouse}, painting happens with {key Actionmouse} (may fail if object doesn't have an active vertex group)
24​# Setting bones as parents for objects should be possible from within the 3D View.
26​ For reference, the current (again ugly) workflow is:
27​ * Select bone in pose mode
28​ * Select object (Blender switches to object mode)
29​ * Select bone again (Blender switches back to pose mode)
30​ * Call operator "Make Parent" ({key Ctrl P})
31​ * Select "Bone"
32​# Multiple workspaces can be active in parallel by opening multiple windows. That means multiple interaction modes may be active in parallel too which shall work nicely.
33​# The interaction mode needs to be changeable easily and swiftly.
34​# Button for the interaction mode needs to be easy to reach in a place that communicates its scope well.
36​== Proposed Solution
38​A proposed solution was to make the interaction mode a per workspace option. This is probably the most obvious one and doesn't require major overhauls.
39​It resolves requirements #1 and #3. For further requirements, we need additional solutions.
41​** Re Requirement #2
42​We could store the active object per workspace, meaning changing workspace would also change the active object (and go back to the mode it was before). In the following cases this wouldn't work:
43​* Opening workspace for the first time after adding/appending. It doesn't have an active object from the current scene then.
44​* Activating a workspace whose active object has been deleted meanwhile.
45​We can fall back to object mode then.
48​** Re Requirement #4
49​The painting itself can mostly happen like now (paint with {key Actionmouse}, select bones with {key Selectmouse}. We still need a way to decide which armatures can be painted weights for. Some options:
50​* Bones from all (visible, selectable) armatures can be selected.
51​* Check Armature Modifiers of an object and only allow selecting bones from armatures set in these.
52​* Only allow entering Weight Paint Mode with some armature(s) selected.
53​* Have some UI to enable/disable armatures for weight painting.
54​* More drastic changes, like redesigning how armatures and mesh-objects work together.
55​We may have to test some of these options in practice to see which works best.
57​** Re Requirement #5
60​** Re Requirement #6
61​Should work mostly fine, issues only arise when different modes display the same data but with different internal storage techniques. For example, sculpt mode stores the sculpted mesh in a different structure than other modes. Converting it for other modes may be a heavy operation.
62​Some options:
63​* Don't allow having such conflicting modes active in parallel.
64​* Allow modes to display data from other modes (e.g. edit mode can display sculpt mesh structure) and convert meshes only when needed (e.g. user executes tool in edit mode after having worked in sculpt mode.)
66​** Re Requirements #7 and #8
67​Interaction mode of a workspace would be switched either using a hotkey, or using a button in the top-bar. The top-bar clearly indicates that this is an option affecting multiple editors.