diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-22 15:52:39 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-23 12:48:23 +0300 |
commit | 3abe8b3292cf7a50a9200b95401993384df24d9a (patch) | |
tree | 6c7a853710f1a4264dd1bb4d7b9bf14f44b75f33 /source/blender/editors/util | |
parent | fb7d23bdb2a5c0ed00067045e4acdf6593258b52 (diff) |
Rename any instance of scene layer or render layer in code with view layer
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.
* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started
Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.
Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.
Reviewers: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D2927
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/ed_util.c | 2 | ||||
-rw-r--r-- | source/blender/editors/util/undo.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index d0f29abc62f..e74c909e36e 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -88,7 +88,7 @@ void ED_editors_init(bContext *C) wmWindowManager *wm = CTX_wm_manager(C); Main *bmain = CTX_data_main(C); Scene *sce = CTX_data_scene(C); - SceneLayer *sl = CTX_data_scene_layer(C); + ViewLayer *sl = CTX_data_view_layer(C); Object *ob, *obact = (sl && sl->basact) ? sl->basact->object : NULL; ID *data; diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 5b91ee4fc29..aa636699679 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -101,7 +101,7 @@ void ED_undo_push(bContext *C, const char *str) else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) { if (U.undosteps == 0) return; - PE_undo_push(CTX_data_scene(C), CTX_data_scene_layer(C), str); + PE_undo_push(CTX_data_scene(C), CTX_data_view_layer(C), str); } else if (obact && obact->mode & OB_MODE_SCULPT) { /* do nothing for now */ @@ -120,7 +120,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) wmWindow *win = CTX_wm_window(C); Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); - SceneLayer *sl = CTX_data_scene_layer(C); + ViewLayer *sl = CTX_data_view_layer(C); Object *obedit = CTX_data_edit_object(C); Object *obact = CTX_data_active_object(C); ScrArea *sa = CTX_wm_area(C); @@ -298,7 +298,7 @@ bool ED_undo_is_valid(const bContext *C, const char *undoname) return 1; } else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) { - return PE_undo_is_valid(CTX_data_scene(C), CTX_data_scene_layer(C)); + return PE_undo_is_valid(CTX_data_scene(C), CTX_data_view_layer(C)); } if (U.uiflag & USER_GLOBALUNDO) { @@ -543,7 +543,7 @@ static const EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *tot const char *name = NULL; if (undosys == UNDOSYSTEM_PARTICLE) { - name = PE_undo_get_name(CTX_data_scene(C), CTX_data_scene_layer(C), i, &active); + name = PE_undo_get_name(CTX_data_scene(C), CTX_data_view_layer(C), i, &active); } else if (undosys == UNDOSYSTEM_EDITMODE) { name = undo_editmode_get_name(C, i, &active); @@ -626,7 +626,7 @@ static int undo_history_exec(bContext *C, wmOperator *op) int item = RNA_int_get(op->ptr, "item"); if (undosys == UNDOSYSTEM_PARTICLE) { - PE_undo_number(CTX_data_scene(C), CTX_data_scene_layer(C), item); + PE_undo_number(CTX_data_scene(C), CTX_data_view_layer(C), item); } else if (undosys == UNDOSYSTEM_EDITMODE) { undo_editmode_number(C, item + 1); |