diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-09 18:23:01 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-09 18:35:46 +0300 |
commit | cec7f1215acffcd31e591fce83d78268aff6e72a (patch) | |
tree | feb2b640e627b0f74cc57d6639f505e90889a383 /source/blender/editors/object | |
parent | c35f1d05eaa13348d4f33cdb44f6fb62f68e1ba3 (diff) |
Rename Scene macros back to their original _NEW less names
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 10 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 26 | ||||
-rw-r--r-- | source/blender/editors/object/object_group.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 8 |
7 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 2f9dbb657c4..18b3023e06d 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2031,11 +2031,11 @@ static int convert_exec(bContext *C, wmOperator *op) if (basact) { /* active base was changed */ ED_object_base_activate(C, basact); - BASACT_NEW(sl) = basact; + BASACT(sl) = basact; } - else if (BASACT_NEW(sl)->object->flag & OB_DONE) { - WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, BASACT_NEW(sl)->object); - WM_event_add_notifier(C, NC_OBJECT | ND_DATA, BASACT_NEW(sl)->object); + else if (BASACT(sl)->object->flag & OB_DONE) { + WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, BASACT(sl)->object); + WM_event_add_notifier(C, NC_OBJECT | ND_DATA, BASACT(sl)->object); } DEG_relations_tag_update(bmain); @@ -2373,7 +2373,7 @@ static int duplicate_exec(bContext *C, wmOperator *op) } /* new object becomes active */ - if (BASACT_NEW(sl) == base) + if (BASACT(sl) == base) ED_object_base_activate(C, basen); if (basen->object->data) { diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index b02cb3e02a8..0fd1d32c8b8 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -625,7 +625,7 @@ static void init_bake_internal(BakeRender *bkr, bContext *C) bkr->sa = sc ? BKE_screen_find_big_area(sc, SPACE_IMAGE, 10) : NULL; /* can be NULL */ bkr->main = CTX_data_main(C); bkr->scene = scene; - bkr->actob = (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT_NEW(sl) : NULL; + bkr->actob = (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT(sl) : NULL; bkr->re = RE_NewRender("_Bake View_"); if (scene->r.bake_mode == RE_BAKE_AO) { @@ -858,7 +858,7 @@ static int bake_image_exec(bContext *C, wmOperator *op) RE_test_break_cb(bkr.re, NULL, thread_break); G.is_break = false; /* BKE_blender_test_break uses this global */ - RE_Database_Baking(bkr.re, bmain, scene, scene->lay, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT_NEW(sl) : NULL); + RE_Database_Baking(bkr.re, bmain, scene, scene->lay, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE) ? OBACT(sl) : NULL); /* baking itself is threaded, cannot use test_break in threads */ BLI_init_threads(&threads, do_bake_render, 1); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 33ce7b4937a..80fd44be364 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1689,14 +1689,14 @@ static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); SceneLayer *sl = CTX_data_scene_layer(C); - Base *base = BASACT_NEW(sl), *newbase = NULL; + Base *base = BASACT(sl), *newbase = NULL; Object *obt; /* add new target object */ obt = BKE_object_add(bmain, scene, sl, OB_EMPTY, NULL); /* set layers OK */ - newbase = BASACT_NEW(sl); + newbase = BASACT(sl); newbase->lay = base->lay; obt->lay = newbase->lay; @@ -1715,7 +1715,7 @@ static bool get_new_constraint_target(bContext *C, int con_type, Object **tar_ob } /* restore, BKE_object_add sets active */ - BASACT_NEW(sl) = base; + BASACT(sl) = base; base->flag |= BASE_SELECTED; /* make our new target the new object */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index bbe5c274537..207535dd1d0 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -545,8 +545,8 @@ static void copymenu_properties(SceneLayer *sl, Object *ob) nr = pupmenu(str); if (nr == 1 || nr == 2) { - for (base = FIRSTBASE_NEW(sl); base; base = base->next) { - if ((base != BASACT_NEW(sl)) && (TESTBASELIB_NEW(base))) { + for (base = FIRSTBASE(sl); base; base = base->next) { + if ((base != BASACT(sl)) && (TESTBASELIB(base))) { if (nr == 1) { /* replace */ BKE_bproperty_copy_list(&base->object->prop, &ob->prop); } @@ -562,8 +562,8 @@ static void copymenu_properties(SceneLayer *sl, Object *ob) prop = BLI_findlink(&ob->prop, nr - 4); /* account for first 3 menu items & menu index starting at 1*/ if (prop) { - for (base = FIRSTBASE_NEW(sl); base; base = base->next) { - if ((base != BASACT_NEW(sl)) && (TESTBASELIB_NEW(base))) { + for (base = FIRSTBASE(sl); base; base = base->next) { + if ((base != BASACT(sl)) && (TESTBASELIB(base))) { BKE_bproperty_object_set(base->object, prop); } } @@ -578,9 +578,9 @@ static void copymenu_logicbricks(SceneLayer *sl, Object *ob) //XXX no longer used - to be removed - replaced by logicbricks_copy_exec Base *base; - for (base = FIRSTBASE_NEW(sl); base; base = base->next) { + for (base = FIRSTBASE(sl); base; base = base->next) { if (base->object != ob) { - if (TESTBASELIB_NEW(base)) { + if (TESTBASELIB(base)) { /* first: free all logic */ free_sensors(&base->object->sensors); @@ -669,7 +669,7 @@ static void copy_attr(Main *bmain, Scene *scene, SceneLayer *sl, short event) if (ID_IS_LINKED(scene)) return; - if (!(ob = OBACT_NEW(sl))) return; + if (!(ob = OBACT(sl))) return; if (scene->obedit) { // XXX get from context /* obedit_copymenu(); */ @@ -689,9 +689,9 @@ static void copy_attr(Main *bmain, Scene *scene, SceneLayer *sl, short event) return; } - for (base = FIRSTBASE_NEW(sl); base; base = base->next) { - if (base != BASACT_NEW(sl)) { - if (TESTBASELIB_NEW(base)) { + for (base = FIRSTBASE(sl); base; base = base->next) { + if (base != BASACT(sl)) { + if (TESTBASELIB(base)) { DEG_id_tag_update(&base->object->id, OB_RECALC_DATA); if (event == 1) { /* loc */ @@ -916,7 +916,7 @@ static void UNUSED_FUNCTION(copy_attr_menu) (Main *bmain, Scene *scene, SceneLay short event; char str[512]; - if (!(ob = OBACT_NEW(sl))) return; + if (!(ob = OBACT(sl))) return; if (scene->obedit) { /* XXX get from context */ /* if (ob->type == OB_MESH) */ @@ -1344,8 +1344,8 @@ static void UNUSED_FUNCTION(image_aspect) (Scene *scene, SceneLayer *sl) if (scene->obedit) return; // XXX get from context if (ID_IS_LINKED(scene)) return; - for (base = FIRSTBASE_NEW(sl); base; base = base->next) { - if (TESTBASELIB_NEW(base)) { + for (base = FIRSTBASE(sl); base; base = base->next) { + if (TESTBASELIB(base)) { ob = base->object; done = false; diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c index ef7e48f2d1a..27c1a03190a 100644 --- a/source/blender/editors/object/object_group.c +++ b/source/blender/editors/object/object_group.c @@ -201,7 +201,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); SceneLayer *sl = CTX_data_scene_layer(C); - Object *ob = OBACT_NEW(sl); + Object *ob = OBACT(sl); int single_group_index = RNA_enum_get(op->ptr, "group"); Group *single_group = group_object_active_find_index(ob, single_group_index); Group *group; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index e2815bf2282..b1f06831554 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -247,7 +247,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) else { Object workob; - ob->parent = BASACT_NEW(sl)->object; + ob->parent = BASACT(sl)->object; if (v3) { ob->partype = PARVERT3; ob->par1 = v1 - 1; diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index b87c8500de0..8ba86b5cb04 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -404,7 +404,7 @@ static int object_select_linked_exec(bContext *C, wmOperator *op) CTX_DATA_END; } - ob = OBACT_NEW(sl); + ob = OBACT(sl); if (ob == NULL) { BKE_report(op->reports, RPT_ERROR, "No active object"); return OPERATOR_CANCELLED; @@ -559,7 +559,7 @@ static bool select_grouped_parent(bContext *C) /* Makes parent active and de-sel baspar = BKE_scene_layer_base_find(sl, basact->object->parent); /* can be NULL if parent in other scene */ - if (baspar && BASE_SELECTABLE_NEW(baspar)) { + if (baspar && BASE_SELECTABLE(baspar)) { ED_object_base_select(baspar, BA_SELECT); ED_object_base_activate(C, baspar); changed = true; @@ -628,7 +628,7 @@ static bool select_grouped_object_hooks(bContext *C, Object *ob) hmd = (HookModifierData *) md; if (hmd->object && !(hmd->object->flag & SELECT)) { base = BKE_scene_layer_base_find(sl, hmd->object); - if (base && (BASE_SELECTABLE_NEW(base))) { + if (base && (BASE_SELECTABLE(base))) { ED_object_base_select(base, BA_SELECT); changed = true; } @@ -815,7 +815,7 @@ static int object_select_grouped_exec(bContext *C, wmOperator *op) CTX_DATA_END; } - ob = OBACT_NEW(sl); + ob = OBACT(sl); if (ob == NULL) { BKE_report(op->reports, RPT_ERROR, "No active object"); return OPERATOR_CANCELLED; |