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/sculpt_paint/sculpt_undo.c
parent2df86ca9672759c8a99fa72e5e6d3d3e0c2da5c7 (diff)
parentbe2e549111b8dd47a9e468fe34dd1396f99b1cb1 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c19
1 files changed, 13 insertions, 6 deletions
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;
}