Blender Git Commits

Blender Git "temp-workspace_mode" branch commits.

December 23, 2017, 00:53 (GMT)
Fix possible issues when changing active object

It may make more sense to do this via notifier, but I'm afraid this
would be a bit of a can of worms.
December 22, 2017, 20:06 (GMT)
Fix workspace mode changes to edit-mode when adding objects

Steps to reproduce were:
* Change default cube to sculpt-mode
* Tab back into object-mode
* Add new mesh object
* Tab now enters edit-mode, should enter sculpt mode instead
December 22, 2017, 17:55 (GMT)
Merge branch 'blender2.8' into temp-workspace_mode
December 22, 2017, 17:38 (GMT)
Merge branch 'blender2.8' into temp-workspace_mode
December 15, 2017, 15:40 (GMT)
Possible solution for workspace mode

Basically implements the proposal made in [[|this comment]].
Important to note: This implementation keeps the mode stored in the object, the workspace takes care for setting it though.
Even if we decide to move the mode out of the object, most code here would still be valid. This is just a much more feasible approach that may suit our needs already.

The basic rule for setting the workspace mode is: The last active mode that is not object-mode (`OB_MODE_OBJECT`) becomes the workspace mode. Therefore the workspace mode must never be `OB_MODE_OBJECT`
By default new workspace use edit-mode as workspace mode.

Now, some parts of the design I'm not sure yet. Mainly:
* The implementation makes the workspace remember if the workspace mode or `OB_MODE_OBJECT` is active. Pressing TAB toggles between them. However the workspace doesn't try to keep the workspace mode active while only using `OB_MODE_OBJECT` as fall-back or when the user explicitly sets it. This differes from what I wrote in [[|mentioned comment]]. Maybe that's better maybe not.
* If the workspace mode isn't compatible with the currently active object, pressing TAB does nothing. In theory this may make sense, in practice it might be quite annoying though.

I'm not submitting that for code review really. Just for feedback on the general design approach and the discussion points mentioned above.

Subscribers: sergey, dfelinto

Differential Revision:
December 15, 2017, 03:26 (GMT)
Initial implementation of the workspace mode for TAB toggling
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021