diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 18:33:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-05 18:33:36 +0400 |
commit | 299ff91ea1fe5623bea1c6775cb8250d5e4ec3a0 (patch) | |
tree | f7a61065a76b683ea18caf77475f993486dfa14d /source/blender/editors/space_outliner | |
parent | a731e130432a98ab8228112027cd3eaa8ed700b1 (diff) |
code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
Diffstat (limited to 'source/blender/editors/space_outliner')
4 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 042b668c9cc..a32923f17c9 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -136,7 +136,7 @@ static void restrictbutton_view_cb(bContext *C, void *poin, void *poin2) if (ob->restrictflag & OB_RESTRICT_VIEW) { /* Ouch! There is no backwards pointer from Object to Base, * so have to do loop to find it. */ - ED_base_object_select(object_in_scene(ob, scene), BA_DESELECT); + ED_base_object_select(BKE_scene_base_find(scene, ob), BA_DESELECT); } WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene); @@ -153,7 +153,7 @@ static void restrictbutton_sel_cb(bContext *C, void *poin, void *poin2) if (ob->restrictflag & OB_RESTRICT_SELECT) { /* Ouch! There is no backwards pointer from Object to Base, * so have to do loop to find it. */ - ED_base_object_select(object_in_scene(ob, scene), BA_DESELECT); + ED_base_object_select(BKE_scene_base_find(scene, ob), BA_DESELECT); } WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene); @@ -230,7 +230,7 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag) if (flag==OB_RESTRICT_VIEW) if (gob->ob->flag & SELECT) - ED_base_object_select(object_in_scene(gob->ob, scene), BA_DESELECT); + ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_DESELECT); } } else { @@ -241,7 +241,7 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag) if (flag==OB_RESTRICT_VIEW) if ((gob->ob->flag & SELECT) == 0) - ED_base_object_select(object_in_scene(gob->ob, scene), BA_SELECT); + ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_SELECT); } } } diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 7b200e9593d..9bc87a27ba3 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -348,7 +348,7 @@ void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, Tre /* add check for edit mode */ if (!common_restrict_check(C, ob)) return; - if (base || (base= object_in_scene(ob, scene))) { + if (base || (base= BKE_scene_base_find(scene, ob))) { if ((base->object->restrictflag ^= OB_RESTRICT_VIEW)) { ED_base_object_select(base, BA_DESELECT); } @@ -395,7 +395,7 @@ void object_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeEleme { Base *base= (Base *)te->directdata; - if (base==NULL) base= object_in_scene((Object *)tselem->id, scene); + if (base==NULL) base= BKE_scene_base_find(scene, (Object *)tselem->id); if (base) { base->object->restrictflag^=OB_RESTRICT_SELECT; } @@ -441,7 +441,7 @@ void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeEleme { Base *base= (Base *)te->directdata; - if (base==NULL) base= object_in_scene((Object *)tselem->id, scene); + if (base==NULL) base= BKE_scene_base_find(scene, (Object *)tselem->id); if (base) { base->object->restrictflag^=OB_RESTRICT_RENDER; } @@ -1487,7 +1487,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event) /* check dragged object (child) is active */ if (ob != CTX_data_active_object(C)) - ED_base_object_select(object_in_scene(ob, scene), BA_SELECT); + ED_base_object_select(BKE_scene_base_find(scene, ob), BA_SELECT); if ((par->type != OB_ARMATURE) && (par->type != OB_CURVE) && (par->type != OB_LATTICE)) { if (ED_object_parent_set(op->reports, bmain, scene, ob, par, partype)) { @@ -1663,7 +1663,7 @@ static int parent_clear_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even /* check dragged object (child) is active */ if (ob != CTX_data_active_object(C)) - ED_base_object_select(object_in_scene(ob, scene), BA_SELECT); + ED_base_object_select(BKE_scene_base_find(scene, ob), BA_SELECT); ED_object_parent_clear(C, RNA_enum_get(op->ptr, "type")); diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 00b3979b074..800953c1a62 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -159,7 +159,7 @@ static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops } /* find associated base in current scene */ - base= object_in_scene(ob, scene); + base= BKE_scene_base_find(scene, ob); if (base) { if (set==2) { @@ -171,7 +171,7 @@ static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops } else { /* deleselect all */ - scene_deselect_all(scene); + BKE_scene_base_deselect_all(scene); ED_base_object_select(base, BA_SELECT); } if (C) { @@ -551,7 +551,7 @@ static int tree_element_active_text(bContext *UNUSED(C), Scene *UNUSED(scene), S static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set) { Object *ob= (Object *)tselem->id; - Base *base= object_in_scene(ob, scene); + Base *base= BKE_scene_base_find(scene, ob); if (set) { if (scene->obedit) @@ -745,15 +745,15 @@ static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Spa } for (gob= gr->gobject.first; gob; gob= gob->next) { - ED_base_object_select(object_in_scene(gob->ob, scene), sel); + ED_base_object_select(BKE_scene_base_find(scene, gob->ob), sel); } } else { - scene_deselect_all(scene); + BKE_scene_base_deselect_all(scene); for (gob= gr->gobject.first; gob; gob= gob->next) { if ((gob->ob->flag & SELECT) == 0) - ED_base_object_select(object_in_scene(gob->ob, scene), BA_SELECT); + ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_SELECT); } } diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 12575e0a151..c22ed22ff92 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -242,7 +242,7 @@ static void object_select_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, { Base *base= (Base *)te->directdata; - if (base==NULL) base= object_in_scene((Object *)tselem->id, scene); + if (base==NULL) base= BKE_scene_base_find(scene, (Object *)tselem->id); if (base && ((base->object->restrictflag & OB_RESTRICT_VIEW)==0)) { base->flag |= SELECT; base->object->flag |= SELECT; @@ -253,7 +253,7 @@ static void object_deselect_cb(bContext *UNUSED(C), Scene *scene, TreeElement *t { Base *base= (Base *)te->directdata; - if (base==NULL) base= object_in_scene((Object *)tselem->id, scene); + if (base==NULL) base= BKE_scene_base_find(scene, (Object *)tselem->id); if (base) { base->flag &= ~SELECT; base->object->flag &= ~SELECT; @@ -265,7 +265,7 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto Base *base= (Base *)te->directdata; if (base==NULL) - base= object_in_scene((Object *)tselem->id, scene); + base= BKE_scene_base_find(scene, (Object *)tselem->id); if (base) { // check also library later if (scene->obedit==base->object) @@ -349,7 +349,7 @@ static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElemen Base *base; for (gob=group->gobject.first; gob; gob=gob->next) { - base= object_in_scene(gob->ob, scene); + base= BKE_scene_base_find(scene, gob->ob); if (base) { base->object->flag |= SELECT; base->flag |= SELECT; |