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-12-03 10:01:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-12-03 10:07:50 +0300
commit599f6c791af723894c995850e4590ecf6a23f6ab (patch)
tree77e005ff6ffe4bfebb1532ff9863888f41819212 /source/blender/editors
parent2df86ca9672759c8a99fa72e5e6d3d3e0c2da5c7 (diff)
parentbe2e549111b8dd47a9e468fe34dd1396f99b1cb1 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_modes.c3
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c9
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c19
3 files changed, 21 insertions, 10 deletions
diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c
index 10c7fcfeba1..4c625a4d33c 100644
--- a/source/blender/editors/object/object_modes.c
+++ b/source/blender/editors/object/object_modes.c
@@ -215,7 +215,8 @@ void ED_object_mode_exit(bContext *C)
bool ED_object_mode_generic_enter(
struct bContext *C, eObjectMode object_mode)
{
- Object *ob = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
if (ob == NULL) {
return (object_mode == OB_MODE_OBJECT);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index ef4f9a9c7bf..d1232fca976 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5753,7 +5753,8 @@ void ED_object_sculptmode_enter(struct bContext *C, ReportList *reports)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- Object *ob = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
ED_object_sculptmode_enter_ex(bmain, depsgraph, scene, ob, reports);
}
@@ -5810,7 +5811,8 @@ void ED_object_sculptmode_exit(bContext *C)
{
Depsgraph *depsgraph = CTX_data_depsgraph(C);
Scene *scene = CTX_data_scene(C);
- Object *ob = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
ED_object_sculptmode_exit_ex(depsgraph, scene, ob);
}
@@ -5821,7 +5823,8 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op)
Depsgraph *depsgraph = CTX_data_depsgraph_on_load(C);
Scene *scene = CTX_data_scene(C);
ToolSettings *ts = scene->toolsettings;
- Object *ob = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
const int mode_flag = OB_MODE_SCULPT;
const bool is_mode_set = (ob->mode & mode_flag) != 0;
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index d79c6b81fd7..92b4613bcea 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -141,7 +141,8 @@ static bool sculpt_undo_restore_coords(bContext *C, SculptUndoNode *unode)
{
Scene *scene = CTX_data_scene(C);
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
- Object *ob = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
SculptSession *ss = ob->sculpt;
SubdivCCG *subdiv_ccg = ss->subdiv_ccg;
@@ -258,7 +259,8 @@ static bool sculpt_undo_restore_hidden(
bContext *C,
SculptUndoNode *unode)
{
- Object *ob = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
SculptSession *ss = ob->sculpt;
SubdivCCG *subdiv_ccg = ss->subdiv_ccg;
int i;
@@ -291,7 +293,8 @@ static bool sculpt_undo_restore_hidden(
static bool sculpt_undo_restore_mask(bContext *C, SculptUndoNode *unode)
{
- Object *ob = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
SculptSession *ss = ob->sculpt;
SubdivCCG *subdiv_ccg = ss->subdiv_ccg;
MVert *mvert;
@@ -477,7 +480,8 @@ static void sculpt_undo_restore_list(bContext *C, ListBase *lb)
{
Scene *scene = CTX_data_scene(C);
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
- Object *ob = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
Depsgraph *depsgraph = CTX_data_depsgraph(C);
SculptSession *ss = ob->sculpt;
SubdivCCG *subdiv_ccg = ss->subdiv_ccg;
@@ -640,7 +644,9 @@ static void sculpt_undo_free_list(ListBase *lb)
#if 0
static bool sculpt_undo_cleanup(bContext *C, ListBase *lb)
{
- Object *ob = CTX_data_active_object(C);
+ Scene *scene = CTX_data_scene(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *ob = OBACT(view_layer);
SculptUndoNode *unode;
unode = lb->first;
@@ -1021,7 +1027,8 @@ static bool sculpt_undosys_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
if (sa && (sa->spacetype == SPACE_VIEW3D)) {
- Object *obact = CTX_data_active_object(C);
+ ViewLayer *view_layer = CTX_data_view_layer(C);
+ Object *obact = OBACT(view_layer);
if (obact && (obact->mode & OB_MODE_SCULPT)) {
return true;
}