Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-04-05 19:20:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-05 19:21:14 +0300
commit1c24c04e6023f2d2a328dfcdc9f86cd381d029a3 (patch)
tree7a5af59ce078cb66fb17ec33cf111ffc8d5fb328 /source/blender/editors/space_view3d/view3d_header.c
parent57329304b061efe756e3a4ce1b828e9a7c7f7030 (diff)
Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes with multiple objects/windows/workspaces, see: D3130 for details.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_header.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 35a37590642..3ed6c87b750 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -276,7 +276,6 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
{
- const WorkSpace *workspace = CTX_wm_workspace(C);
bScreen *screen = CTX_wm_screen(C);
ScrArea *sa = CTX_wm_area(C);
View3D *v3d = sa->spacedata.first;
@@ -291,7 +290,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiLayout *row;
bool is_paint = (
ob && !(gpd && (gpd->flag & GP_DATA_STROKE_EDITMODE)) &&
- ELEM(workspace->object_mode,
+ ELEM(ob->mode,
OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT));
RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr);
@@ -306,18 +305,18 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
row = uiLayoutRow(layout, true);
uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
- if (!ob || ELEM(workspace->object_mode, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_WEIGHT_PAINT)) {
+ if (!ob || ELEM(ob->mode, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_WEIGHT_PAINT)) {
uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
if (obedit == NULL && is_paint) {
/* Manipulators aren't used in paint modes */
- if (!ELEM(workspace->object_mode, OB_MODE_SCULPT, OB_MODE_PARTICLE_EDIT)) {
+ if (!ELEM(ob->mode, OB_MODE_SCULPT, OB_MODE_PARTICLE_EDIT)) {
/* masks aren't used for sculpt and particle painting */
PointerRNA meshptr;
RNA_pointer_create(ob->data, &RNA_Mesh, ob->data, &meshptr);
- if (workspace->object_mode & (OB_MODE_TEXTURE_PAINT)) {
+ if (ob->mode & (OB_MODE_TEXTURE_PAINT)) {
uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
}
else {