DNA: rename SpaceOops -> SpaceOutliner
This commit is contained in:
parent
51c034686a
commit
374cbdc63b
Notes:
blender-bot
2023-02-14 11:01:33 +01:00
Referenced by issue #61500, DNA renaming proposal
|
@ -164,7 +164,7 @@ struct SpaceConsole *CTX_wm_space_console(const bContext *C);
|
|||
struct SpaceButs *CTX_wm_space_buts(const bContext *C);
|
||||
struct SpaceFile *CTX_wm_space_file(const bContext *C);
|
||||
struct SpaceSeq *CTX_wm_space_seq(const bContext *C);
|
||||
struct SpaceOops *CTX_wm_space_outliner(const bContext *C);
|
||||
struct SpaceOutliner *CTX_wm_space_outliner(const bContext *C);
|
||||
struct SpaceNla *CTX_wm_space_nla(const bContext *C);
|
||||
struct SpaceNode *CTX_wm_space_node(const bContext *C);
|
||||
struct SpaceIpo *CTX_wm_space_graph(const bContext *C);
|
||||
|
|
|
@ -750,7 +750,7 @@ struct SpaceSeq *CTX_wm_space_seq(const bContext *C)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
struct SpaceOops *CTX_wm_space_outliner(const bContext *C)
|
||||
struct SpaceOutliner *CTX_wm_space_outliner(const bContext *C)
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
if (sa && sa->spacetype == SPACE_OUTLINER)
|
||||
|
|
|
@ -6803,7 +6803,7 @@ static void direct_link_area(FileData *fd, ScrArea *area)
|
|||
snla->ads = newdataadr(fd, snla->ads);
|
||||
}
|
||||
else if (sl->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOops *soops = (SpaceOops *)sl;
|
||||
SpaceOutliner *soops = (SpaceOutliner *)sl;
|
||||
|
||||
/* use newdataadr_no_us and do not free old memory avoiding double
|
||||
* frees and use of freed memory. this could happen because of a
|
||||
|
@ -7067,7 +7067,7 @@ static void lib_link_area(FileData *fd, ID *parent_id, ScrArea *area)
|
|||
}
|
||||
case SPACE_OUTLINER:
|
||||
{
|
||||
SpaceOops *so = (SpaceOops *)sl;
|
||||
SpaceOutliner *so = (SpaceOutliner *)sl;
|
||||
so->search_tse.id = newlibadr(fd, NULL, so->search_tse.id);
|
||||
|
||||
if (so->treestore) {
|
||||
|
@ -7571,7 +7571,7 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map, Main
|
|||
}
|
||||
}
|
||||
else if (sl->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOops *so = (SpaceOops *)sl;
|
||||
SpaceOutliner *so = (SpaceOutliner *)sl;
|
||||
|
||||
so->search_tse.id = restore_pointer_by_name(id_map, so->search_tse.id, USER_IGNORE);
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ static void area_add_window_regions(ScrArea *sa, SpaceLink *sl, ListBase *lb)
|
|||
|
||||
case SPACE_OUTLINER:
|
||||
{
|
||||
SpaceOops *soops = (SpaceOops *)sl;
|
||||
SpaceOutliner *soops = (SpaceOutliner *)sl;
|
||||
|
||||
memcpy(&ar->v2d, &soops->v2d, sizeof(View2D));
|
||||
|
||||
|
|
|
@ -2237,7 +2237,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
for (sa = sc->areabase.first; sa; sa = sa->next) {
|
||||
for (sl = sa->spacedata.first; sl; sl = sl->next) {
|
||||
if (sl->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOops *so = (SpaceOops *)sl;
|
||||
SpaceOutliner *so = (SpaceOutliner *)sl;
|
||||
|
||||
if (!ELEM(so->outlinevis,
|
||||
SO_SCENES,
|
||||
|
|
|
@ -629,7 +629,7 @@ void do_versions_after_linking_280(Main *bmain)
|
|||
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
|
||||
for (SpaceLink *space = sa->spacedata.first; space; space = space->next) {
|
||||
if (space->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOops *soutliner = (SpaceOops *)space;
|
||||
SpaceOutliner *soutliner = (SpaceOutliner *)space;
|
||||
|
||||
soutliner->outlinevis = SO_VIEW_LAYER;
|
||||
|
||||
|
@ -1147,7 +1147,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
}
|
||||
|
||||
if (!MAIN_VERSION_ATLEAST(bmain, 280, 6)) {
|
||||
if (DNA_struct_elem_find(fd->filesdna, "SpaceOops", "int", "filter") == false) {
|
||||
if (DNA_struct_elem_find(fd->filesdna, "SpaceOutliner", "int", "filter") == false) {
|
||||
bScreen *sc;
|
||||
ScrArea *sa;
|
||||
SpaceLink *sl;
|
||||
|
@ -1157,7 +1157,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
for (sa = sc->areabase.first; sa; sa = sa->next) {
|
||||
for (sl = sa->spacedata.first; sl; sl = sl->next) {
|
||||
if (sl->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOops *so = (SpaceOops *)sl;
|
||||
SpaceOutliner *so = (SpaceOutliner *)sl;
|
||||
|
||||
if (!ELEM(so->outlinevis,
|
||||
SO_SCENES,
|
||||
|
@ -1554,7 +1554,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
|
||||
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
|
||||
if (sl->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOops *soops = (SpaceOops *)sl;
|
||||
SpaceOutliner *soops = (SpaceOutliner *)sl;
|
||||
soops->filter_id_type = ID_GR;
|
||||
soops->outlinevis = SO_VIEW_LAYER;
|
||||
}
|
||||
|
@ -2521,7 +2521,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
|||
}
|
||||
case SPACE_OUTLINER:
|
||||
{
|
||||
SpaceOops *so = (SpaceOops *)sl;
|
||||
SpaceOutliner *so = (SpaceOutliner *)sl;
|
||||
so->filter &= ~(
|
||||
SO_FILTER_DEPRECATED_1 |
|
||||
SO_FILTER_DEPRECATED_5 |
|
||||
|
|
|
@ -2780,12 +2780,12 @@ static void write_uilist(WriteData *wd, uiList *ui_list)
|
|||
}
|
||||
}
|
||||
|
||||
static void write_soops(WriteData *wd, SpaceOops *so)
|
||||
static void write_soops(WriteData *wd, SpaceOutliner *so)
|
||||
{
|
||||
BLI_mempool *ts = so->treestore;
|
||||
|
||||
if (ts) {
|
||||
SpaceOops so_flat = *so;
|
||||
SpaceOutliner so_flat = *so;
|
||||
|
||||
int elems = BLI_mempool_len(ts);
|
||||
/* linearize mempool to array */
|
||||
|
@ -2806,7 +2806,7 @@ static void write_soops(WriteData *wd, SpaceOops *so)
|
|||
ts_flat.totelem = elems;
|
||||
ts_flat.data = data_addr;
|
||||
|
||||
writestruct(wd, DATA, SpaceOops, 1, so);
|
||||
writestruct(wd, DATA, SpaceOutliner, 1, so);
|
||||
|
||||
writestruct_at_address(wd, DATA, TreeStore, 1, ts, &ts_flat);
|
||||
writestruct_at_address(wd, DATA, TreeStoreElem, elems, data_addr, data);
|
||||
|
@ -2815,11 +2815,11 @@ static void write_soops(WriteData *wd, SpaceOops *so)
|
|||
}
|
||||
else {
|
||||
so_flat.treestore = NULL;
|
||||
writestruct_at_address(wd, DATA, SpaceOops, 1, so, &so_flat);
|
||||
writestruct_at_address(wd, DATA, SpaceOutliner, 1, so, &so_flat);
|
||||
}
|
||||
}
|
||||
else {
|
||||
writestruct(wd, DATA, SpaceOops, 1, so);
|
||||
writestruct(wd, DATA, SpaceOutliner, 1, so);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2900,7 +2900,7 @@ static void write_area_regions(WriteData *wd, ScrArea *area)
|
|||
writestruct(wd, DATA, SpaceSeq, 1, sl);
|
||||
}
|
||||
else if (sl->spacetype == SPACE_OUTLINER) {
|
||||
SpaceOops *so = (SpaceOops *)sl;
|
||||
SpaceOutliner *so = (SpaceOutliner *)sl;
|
||||
write_soops(wd, so);
|
||||
}
|
||||
else if (sl->spacetype == SPACE_IMAGE) {
|
||||
|
|
|
@ -133,13 +133,13 @@ TreeTraversalAction outliner_find_selected_objects(TreeElement *te, void *custom
|
|||
|
||||
bool ED_outliner_collections_editor_poll(bContext *C)
|
||||
{
|
||||
SpaceOops *so = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *so = CTX_wm_space_outliner(C);
|
||||
return (so != NULL) && ELEM(so->outlinevis, SO_VIEW_LAYER, SO_SCENES, SO_LIBRARIES);
|
||||
}
|
||||
|
||||
static bool outliner_view_layer_collections_editor_poll(bContext *C)
|
||||
{
|
||||
SpaceOops *so = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *so = CTX_wm_space_outliner(C);
|
||||
return (so != NULL) && (so->outlinevis == SO_VIEW_LAYER);
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,7 @@ static TreeTraversalAction collection_find_selected_to_add(TreeElement *te, void
|
|||
|
||||
static int collection_new_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
|
@ -233,7 +233,7 @@ void OUTLINER_OT_collection_new(wmOperatorType *ot)
|
|||
|
||||
struct CollectionEditData {
|
||||
Scene *scene;
|
||||
SpaceOops *soops;
|
||||
SpaceOutliner *soops;
|
||||
GSet *collections_to_edit;
|
||||
};
|
||||
|
||||
|
@ -264,7 +264,7 @@ static int collection_delete_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||
bool hierarchy = RNA_boolean_get(op->ptr, "hierarchy");
|
||||
|
||||
|
@ -340,7 +340,7 @@ static TreeTraversalAction outliner_find_first_selected_layer_collection(TreeEle
|
|||
|
||||
static LayerCollection *outliner_active_layer_collection(bContext *C)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
|
||||
struct CollectionObjectsSelectData data = {
|
||||
.layer_collection = NULL,
|
||||
|
@ -424,7 +424,7 @@ static TreeTraversalAction outliner_find_first_selected_collection(TreeElement *
|
|||
|
||||
static TreeElement *outliner_active_collection(bContext *C)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
|
||||
struct CollectionDuplicateData data = {
|
||||
.te = NULL,
|
||||
|
@ -437,7 +437,7 @@ static TreeElement *outliner_active_collection(bContext *C)
|
|||
static int collection_duplicate_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te = outliner_active_collection(C);
|
||||
|
||||
/* Can happen when calling from a key binding. */
|
||||
|
@ -490,7 +490,7 @@ static int collection_link_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
Collection *active_collection = CTX_data_layer_collection(C)->collection;
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||
|
||||
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
||||
|
@ -538,7 +538,7 @@ static int collection_instance_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||
|
||||
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
||||
|
@ -620,7 +620,7 @@ static TreeTraversalAction layer_collection_find_data_to_edit(TreeElement *te, v
|
|||
static bool collections_view_layer_poll(bContext *C, bool clear, int flag)
|
||||
{
|
||||
/* Poll function so the right click menu show current state of selected collections. */
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
if (!(soops && soops->outlinevis == SO_VIEW_LAYER)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -697,7 +697,7 @@ static int collection_view_layer_exec(bContext *C, wmOperator *op)
|
|||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||
bool clear = strstr(op->idname, "clear") != NULL;
|
||||
int flag = strstr(op->idname, "holdout") ? LAYER_COLLECTION_HOLDOUT :
|
||||
|
@ -828,7 +828,7 @@ static int collection_isolate_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
const bool extend = RNA_boolean_get(op->ptr, "extend");
|
||||
bool depsgraph_changed = false;
|
||||
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||
|
@ -914,7 +914,7 @@ static int collection_visibility_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
const bool is_inside = strstr(op->idname, "inside") != NULL;
|
||||
const bool show = strstr(op->idname, "show") != NULL;
|
||||
bool depsgraph_changed = false;
|
||||
|
@ -1051,7 +1051,7 @@ static int collection_flag_exec(bContext *C, wmOperator *op)
|
|||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
const bool is_render = strstr(op->idname, "render");
|
||||
const bool clear = strstr(op->idname, "show") || strstr(op->idname, "enable");
|
||||
int flag = is_render ? COLLECTION_RESTRICT_RENDER : COLLECTION_RESTRICT_VIEW;
|
||||
|
@ -1172,7 +1172,7 @@ void OUTLINER_OT_collection_disable_render(wmOperatorType *ot)
|
|||
struct OutlinerHideEditData {
|
||||
Scene *scene;
|
||||
ViewLayer *view_layer;
|
||||
SpaceOops *soops;
|
||||
SpaceOutliner *soops;
|
||||
GSet *collections_to_edit;
|
||||
GSet *bases_to_edit;
|
||||
};
|
||||
|
@ -1212,7 +1212,7 @@ static int outliner_hide_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
struct OutlinerHideEditData data = {.scene = scene, .view_layer = view_layer, .soops = soops,};
|
||||
data.collections_to_edit = BLI_gset_ptr_new("outliner_hide_exec__collections_to_edit");
|
||||
data.bases_to_edit = BLI_gset_ptr_new("outliner_hide_exec__bases_to_edit");
|
||||
|
@ -1301,7 +1301,7 @@ void OUTLINER_OT_unhide_all(wmOperatorType *ot)
|
|||
*/
|
||||
void ED_outliner_selected_objects_get(const bContext *C, ListBase *objects)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
struct IDsSelectedData data = {{NULL}};
|
||||
outliner_tree_traverse(soops, &soops->tree, 0, TSE_SELECTED, outliner_find_selected_objects, &data);
|
||||
LISTBASE_FOREACH (LinkData *, link, &data.selected_array) {
|
||||
|
|
|
@ -87,7 +87,7 @@ static TreeElement *outliner_dropzone_element(TreeElement *te, const float fmval
|
|||
}
|
||||
|
||||
/* Find tree element to drop into. */
|
||||
static TreeElement *outliner_dropzone_find(const SpaceOops *soops, const float fmval[2], const bool children)
|
||||
static TreeElement *outliner_dropzone_find(const SpaceOutliner *soops, const float fmval[2], const bool children)
|
||||
{
|
||||
TreeElement *te;
|
||||
|
||||
|
@ -102,7 +102,7 @@ static TreeElement *outliner_dropzone_find(const SpaceOops *soops, const float f
|
|||
static TreeElement *outliner_drop_find(bContext *C, const wmEvent *event)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
float fmval[2];
|
||||
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fmval[0], &fmval[1]);
|
||||
|
||||
|
@ -127,7 +127,7 @@ static TreeElement *outliner_drop_insert_find(
|
|||
bContext *C, const wmEvent *event,
|
||||
TreeElementInsertType *r_insert_type)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
TreeElement *te_hovered;
|
||||
float view_mval[2];
|
||||
|
@ -223,7 +223,7 @@ static TreeElement *outliner_drop_insert_collection_find(
|
|||
|
||||
/* ******************** Parent Drop Operator *********************** */
|
||||
|
||||
static bool parent_drop_allowed(SpaceOops *soops, TreeElement *te, Object *potential_child)
|
||||
static bool parent_drop_allowed(SpaceOutliner *soops, TreeElement *te, Object *potential_child)
|
||||
{
|
||||
TreeStoreElem *tselem = TREESTORE(te);
|
||||
if (te->idcode != ID_OB || tselem->type != 0) {
|
||||
|
@ -258,7 +258,7 @@ static bool parent_drop_allowed(SpaceOops *soops, TreeElement *te, Object *poten
|
|||
}
|
||||
}
|
||||
|
||||
static bool allow_parenting_without_modifier_key(SpaceOops *soops)
|
||||
static bool allow_parenting_without_modifier_key(SpaceOutliner *soops)
|
||||
{
|
||||
switch (soops->outlinevis) {
|
||||
case SO_VIEW_LAYER:
|
||||
|
@ -272,7 +272,7 @@ static bool allow_parenting_without_modifier_key(SpaceOops *soops)
|
|||
|
||||
static bool parent_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event, const char **UNUSED(tooltip))
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
|
||||
bool changed = outliner_flag_set(&soops->tree, TSE_DRAG_ANY, false);
|
||||
if (changed) ED_region_tag_redraw_no_rebuild(CTX_wm_region(C));
|
||||
|
@ -327,7 +327,7 @@ static int parent_drop_exec(bContext *C, wmOperator *op)
|
|||
static int parent_drop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te = outliner_drop_find(C, event);
|
||||
TreeStoreElem *tselem = te ? TREESTORE(te) : NULL;
|
||||
|
||||
|
@ -472,7 +472,7 @@ void OUTLINER_OT_parent_drop(wmOperatorType *ot)
|
|||
|
||||
static bool parent_clear_poll(bContext *C, wmDrag *drag, const wmEvent *event, const char **UNUSED(tooltip))
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
|
||||
if (!allow_parenting_without_modifier_key(soops)) {
|
||||
if (!event->shift) return false;
|
||||
|
@ -673,7 +673,7 @@ static Collection *collection_parent_from_ID(ID *id)
|
|||
|
||||
static bool collection_drop_init(bContext *C, wmDrag *drag, const wmEvent *event, CollectionDrop *data)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
|
||||
/* Get collection to drop into. */
|
||||
TreeElementInsertType insert_type;
|
||||
|
@ -729,7 +729,7 @@ static bool collection_drop_init(bContext *C, wmDrag *drag, const wmEvent *event
|
|||
|
||||
static bool collection_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event, const char **tooltip)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
bool changed = outliner_flag_set(&soops->tree, TSE_HIGHLIGHTED | TSE_DRAG_ANY, false);
|
||||
|
||||
|
@ -802,7 +802,7 @@ static int collection_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmE
|
|||
bool relative_after = false;
|
||||
|
||||
if (ELEM(data.insert_type, TE_INSERT_BEFORE, TE_INSERT_AFTER)) {
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
|
||||
relative = data.to;
|
||||
relative_after = (data.insert_type == TE_INSERT_AFTER);
|
||||
|
@ -873,7 +873,7 @@ void OUTLINER_OT_collection_drop(wmOperatorType *ot)
|
|||
|
||||
/* ********************* Outliner Drag Operator ******************** */
|
||||
|
||||
static TreeElement *outliner_item_drag_element_find(SpaceOops *soops, ARegion *ar, const wmEvent *event)
|
||||
static TreeElement *outliner_item_drag_element_find(SpaceOutliner *soops, ARegion *ar, const wmEvent *event)
|
||||
{
|
||||
/* note: using EVT_TWEAK_ events to trigger dragging is fine,
|
||||
* it sends coordinates from where dragging was started */
|
||||
|
@ -884,7 +884,7 @@ static TreeElement *outliner_item_drag_element_find(SpaceOops *soops, ARegion *a
|
|||
static int outliner_item_drag_drop_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te = outliner_item_drag_element_find(soops, ar, event);
|
||||
|
||||
if (!te) {
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
/* ****************************************************** */
|
||||
/* Tree Size Functions */
|
||||
|
||||
static void outliner_height(SpaceOops *soops, ListBase *lb, int *h)
|
||||
static void outliner_height(SpaceOutliner *soops, ListBase *lb, int *h)
|
||||
{
|
||||
TreeElement *te = lb->first;
|
||||
while (te) {
|
||||
|
@ -95,7 +95,7 @@ static void outliner_height(SpaceOops *soops, ListBase *lb, int *h)
|
|||
}
|
||||
|
||||
#if 0 // XXX this is currently disabled until te->xend is set correctly
|
||||
static void outliner_width(SpaceOops *soops, ListBase *lb, int *w)
|
||||
static void outliner_width(SpaceOutliner *soops, ListBase *lb, int *w)
|
||||
{
|
||||
TreeElement *te = lb->first;
|
||||
while (te) {
|
||||
|
@ -112,7 +112,7 @@ static void outliner_width(SpaceOops *soops, ListBase *lb, int *w)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void outliner_rna_width(SpaceOops *soops, ListBase *lb, int *w, int startx)
|
||||
static void outliner_rna_width(SpaceOutliner *soops, ListBase *lb, int *w, int startx)
|
||||
{
|
||||
TreeElement *te = lb->first;
|
||||
while (te) {
|
||||
|
@ -371,7 +371,7 @@ static void hidebutton_layer_collection_flag_cb(bContext *C, void *poin, void *p
|
|||
static void namebutton_cb(bContext *C, void *tsep, char *oldname)
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
BLI_mempool *ts = soops->treestore;
|
||||
TreeStoreElem *tselem = tsep;
|
||||
|
@ -538,7 +538,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
|
|||
}
|
||||
|
||||
static void outliner_draw_restrictbuts(
|
||||
uiBlock *block, Scene *scene, ViewLayer *view_layer, ARegion *ar, SpaceOops *soops, ListBase *lb)
|
||||
uiBlock *block, Scene *scene, ViewLayer *view_layer, ARegion *ar, SpaceOutliner *soops, ListBase *lb)
|
||||
{
|
||||
/* Get RNA properties (once for speed). */
|
||||
static struct RestrictProperties {
|
||||
|
@ -761,7 +761,7 @@ static void outliner_draw_restrictbuts(
|
|||
}
|
||||
}
|
||||
|
||||
static void outliner_draw_userbuts(uiBlock *block, ARegion *ar, SpaceOops *soops, ListBase *lb)
|
||||
static void outliner_draw_userbuts(uiBlock *block, ARegion *ar, SpaceOutliner *soops, ListBase *lb)
|
||||
{
|
||||
|
||||
for (TreeElement *te = lb->first; te; te = te->next) {
|
||||
|
@ -846,7 +846,7 @@ static void outliner_draw_rnacols(ARegion *ar, int sizex)
|
|||
immUnbindProgram();
|
||||
}
|
||||
|
||||
static void outliner_draw_rnabuts(uiBlock *block, ARegion *ar, SpaceOops *soops, int sizex, ListBase *lb)
|
||||
static void outliner_draw_rnabuts(uiBlock *block, ARegion *ar, SpaceOutliner *soops, int sizex, ListBase *lb)
|
||||
{
|
||||
PointerRNA *ptr;
|
||||
PropertyRNA *prop;
|
||||
|
@ -1566,7 +1566,7 @@ typedef struct MergedIconRow {
|
|||
} MergedIconRow;
|
||||
|
||||
static void outliner_draw_iconrow(
|
||||
bContext *C, uiBlock *block, const uiFontStyle *fstyle, Scene *scene, ViewLayer *view_layer, SpaceOops *soops,
|
||||
bContext *C, uiBlock *block, const uiFontStyle *fstyle, Scene *scene, ViewLayer *view_layer, SpaceOutliner *soops,
|
||||
ListBase *lb, int level, int xmax, int *offsx, int ys, float alpha_fac, MergedIconRow *merged)
|
||||
{
|
||||
eOLDrawState active;
|
||||
|
@ -1663,7 +1663,7 @@ static void outliner_set_coord_tree_element(TreeElement *te, int startx, int sta
|
|||
|
||||
static void outliner_draw_tree_element(
|
||||
bContext *C, uiBlock *block, const uiFontStyle *fstyle, Scene *scene, ViewLayer *view_layer,
|
||||
ARegion *ar, SpaceOops *soops, TreeElement *te, bool draw_grayed_out,
|
||||
ARegion *ar, SpaceOutliner *soops, TreeElement *te, bool draw_grayed_out,
|
||||
int startx, int *starty, TreeElement **te_edit)
|
||||
{
|
||||
TreeStoreElem *tselem;
|
||||
|
@ -1899,7 +1899,7 @@ static void outliner_draw_tree_element(
|
|||
}
|
||||
|
||||
static void outliner_draw_hierarchy_lines_recursive(
|
||||
unsigned pos, SpaceOops *soops, ListBase *lb, int startx,
|
||||
unsigned pos, SpaceOutliner *soops, ListBase *lb, int startx,
|
||||
const unsigned char col[4], bool draw_grayed_out,
|
||||
int *starty)
|
||||
{
|
||||
|
@ -1958,7 +1958,7 @@ static void outliner_draw_hierarchy_lines_recursive(
|
|||
}
|
||||
}
|
||||
|
||||
static void outliner_draw_hierarchy_lines(SpaceOops *soops, ListBase *lb, int startx, int *starty)
|
||||
static void outliner_draw_hierarchy_lines(SpaceOutliner *soops, ListBase *lb, int startx, int *starty)
|
||||
{
|
||||
GPUVertFormat *format = immVertexFormat();
|
||||
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT);
|
||||
|
@ -1975,7 +1975,7 @@ static void outliner_draw_hierarchy_lines(SpaceOops *soops, ListBase *lb, int st
|
|||
immUnbindProgram();
|
||||
}
|
||||
|
||||
static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase *lb, int *starty)
|
||||
static void outliner_draw_struct_marks(ARegion *ar, SpaceOutliner *soops, ListBase *lb, int *starty)
|
||||
{
|
||||
for (TreeElement *te = lb->first; te; te = te->next) {
|
||||
TreeStoreElem *tselem = TREESTORE(te);
|
||||
|
@ -2013,7 +2013,7 @@ static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase *
|
|||
}
|
||||
|
||||
static void outliner_draw_highlights_recursive(
|
||||
unsigned pos, const ARegion *ar, const SpaceOops *soops, const ListBase *lb,
|
||||
unsigned pos, const ARegion *ar, const SpaceOutliner *soops, const ListBase *lb,
|
||||
const float col_selection[4], const float col_highlight[4], const float col_searchmatch[4],
|
||||
int start_x, int *io_start_y)
|
||||
{
|
||||
|
@ -2079,7 +2079,7 @@ static void outliner_draw_highlights_recursive(
|
|||
}
|
||||
}
|
||||
|
||||
static void outliner_draw_highlights(ARegion *ar, SpaceOops *soops, int startx, int *starty)
|
||||
static void outliner_draw_highlights(ARegion *ar, SpaceOutliner *soops, int startx, int *starty)
|
||||
{
|
||||
const float col_highlight[4] = {1.0f, 1.0f, 1.0f, 0.13f};
|
||||
float col_selection[4], col_searchmatch[4];
|
||||
|
@ -2102,7 +2102,7 @@ static void outliner_draw_highlights(ARegion *ar, SpaceOops *soops, int startx,
|
|||
|
||||
static void outliner_draw_tree(
|
||||
bContext *C, uiBlock *block, Scene *scene, ViewLayer *view_layer,
|
||||
ARegion *ar, SpaceOops *soops, const bool has_restrict_icons,
|
||||
ARegion *ar, SpaceOutliner *soops, const bool has_restrict_icons,
|
||||
TreeElement **te_edit)
|
||||
{
|
||||
const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
|
||||
|
@ -2221,7 +2221,7 @@ void draw_outliner(const bContext *C)
|
|||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
View2D *v2d = &ar->v2d;
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
uiBlock *block;
|
||||
int sizey = 0, sizex = 0, sizex_rna = 0;
|
||||
TreeElement *te_edit = NULL;
|
||||
|
|
|
@ -92,7 +92,7 @@ static int outliner_highlight_update(bContext *C, wmOperator *UNUSED(op), const
|
|||
}
|
||||
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
const float my = UI_view2d_region_to_view_y(&ar->v2d, event->mval[1]);
|
||||
|
||||
TreeElement *hovered_te = outliner_find_item_at_y(soops, &soops->tree, my);
|
||||
|
@ -126,7 +126,7 @@ void OUTLINER_OT_highlight_update(wmOperatorType *ot)
|
|||
|
||||
/* Toggle Open/Closed ------------------------------------------- */
|
||||
|
||||
static int do_outliner_item_openclose(bContext *C, SpaceOops *soops, TreeElement *te, const bool all, const float mval[2])
|
||||
static int do_outliner_item_openclose(bContext *C, SpaceOutliner *soops, TreeElement *te, const bool all, const float mval[2])
|
||||
{
|
||||
|
||||
if (mval[1] > te->ys && mval[1] < te->ys + UI_UNIT_Y) {
|
||||
|
@ -157,7 +157,7 @@ static int do_outliner_item_openclose(bContext *C, SpaceOops *soops, TreeElement
|
|||
static int outliner_item_openclose(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te;
|
||||
float fmval[2];
|
||||
const bool all = RNA_boolean_get(op->ptr, "all");
|
||||
|
@ -313,7 +313,7 @@ static int do_outliner_item_rename(ReportList *reports, ARegion *ar, TreeElement
|
|||
static int outliner_item_rename(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te;
|
||||
float fmval[2];
|
||||
bool changed = false;
|
||||
|
@ -410,7 +410,7 @@ static int outliner_id_delete_invoke_do(bContext *C, ReportList *reports, TreeEl
|
|||
static int outliner_id_delete_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te;
|
||||
float fmval[2];
|
||||
|
||||
|
@ -444,7 +444,7 @@ void OUTLINER_OT_id_delete(wmOperatorType *ot)
|
|||
static int outliner_id_remap_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
|
||||
const short id_type = (short)RNA_enum_get(op->ptr, "id_type");
|
||||
ID *old_id = BLI_findlink(which_libbase(CTX_data_main(C), id_type), RNA_enum_get(op->ptr, "old_id"));
|
||||
|
@ -510,7 +510,7 @@ static bool outliner_id_remap_find_tree_element(bContext *C, wmOperator *op, Lis
|
|||
|
||||
static int outliner_id_remap_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
float fmval[2];
|
||||
|
||||
|
@ -665,7 +665,7 @@ static int outliner_lib_relocate_invoke_do(
|
|||
static int outliner_lib_relocate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te;
|
||||
float fmval[2];
|
||||
|
||||
|
@ -710,7 +710,7 @@ void lib_relocate_cb(
|
|||
static int outliner_lib_reload_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te;
|
||||
float fmval[2];
|
||||
|
||||
|
@ -861,7 +861,7 @@ int common_restrict_check(bContext *C, Object *ob)
|
|||
|
||||
static int outliner_toggle_expanded_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
|
||||
if (outliner_flag_is_any_test(&soops->tree, TSE_CLOSED, 1))
|
||||
|
@ -892,7 +892,7 @@ void OUTLINER_OT_expanded_toggle(wmOperatorType *ot)
|
|||
|
||||
static int outliner_select_all_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
int action = RNA_enum_get(op->ptr, "action");
|
||||
|
@ -941,7 +941,7 @@ void OUTLINER_OT_select_all(wmOperatorType *ot)
|
|||
|
||||
/* Show Active --------------------------------------------------- */
|
||||
|
||||
static void outliner_set_coordinates_element_recursive(SpaceOops *soops, TreeElement *te, int startx, int *starty)
|
||||
static void outliner_set_coordinates_element_recursive(SpaceOutliner *soops, TreeElement *te, int startx, int *starty)
|
||||
{
|
||||
TreeStoreElem *tselem = TREESTORE(te);
|
||||
|
||||
|
@ -959,7 +959,7 @@ static void outliner_set_coordinates_element_recursive(SpaceOops *soops, TreeEle
|
|||
}
|
||||
|
||||
/* to retrieve coordinates with redrawing the entire tree */
|
||||
void outliner_set_coordinates(ARegion *ar, SpaceOops *soops)
|
||||
void outliner_set_coordinates(ARegion *ar, SpaceOutliner *soops)
|
||||
{
|
||||
TreeElement *te;
|
||||
int starty = (int)(ar->v2d.tot.ymax) - UI_UNIT_Y;
|
||||
|
@ -987,7 +987,7 @@ static int outliner_open_back(TreeElement *te)
|
|||
|
||||
static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
SpaceOops *so = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *so = CTX_wm_space_outliner(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
View2D *v2d = &ar->v2d;
|
||||
|
@ -1102,7 +1102,7 @@ void OUTLINER_OT_scroll_page(wmOperatorType *ot)
|
|||
#if 0
|
||||
|
||||
/* find next element that has this name */
|
||||
static TreeElement *outliner_find_name(SpaceOops *soops, ListBase *lb, char *name, int flags,
|
||||
static TreeElement *outliner_find_name(SpaceOutliner *soops, ListBase *lb, char *name, int flags,
|
||||
TreeElement *prev, int *prevFound)
|
||||
{
|
||||
TreeElement *te, *tes;
|
||||
|
@ -1131,7 +1131,7 @@ static TreeElement *outliner_find_name(SpaceOops *soops, ListBase *lb, char *nam
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *soops, int again, int flags)
|
||||
static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOutliner *soops, int again, int flags)
|
||||
{
|
||||
ReportList *reports = NULL; // CTX_wm_reports(C);
|
||||
TreeElement *te = NULL;
|
||||
|
@ -1230,7 +1230,7 @@ static void outliner_openclose_level(ListBase *lb, int curlevel, int level, int
|
|||
|
||||
static int outliner_one_level_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
const bool add = RNA_boolean_get(op->ptr, "open");
|
||||
int level;
|
||||
|
@ -1286,7 +1286,7 @@ static int subtree_has_objects(ListBase *lb)
|
|||
}
|
||||
|
||||
/* recursive helper function for Show Hierarchy operator */
|
||||
static void tree_element_show_hierarchy(Scene *scene, SpaceOops *soops, ListBase *lb)
|
||||
static void tree_element_show_hierarchy(Scene *scene, SpaceOutliner *soops, ListBase *lb)
|
||||
{
|
||||
TreeElement *te;
|
||||
TreeStoreElem *tselem;
|
||||
|
@ -1318,7 +1318,7 @@ static void tree_element_show_hierarchy(Scene *scene, SpaceOops *soops, ListBase
|
|||
/* show entire object level hierarchy */
|
||||
static int outliner_show_hierarchy_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
|
||||
|
@ -1353,7 +1353,7 @@ static bool ed_operator_outliner_datablocks_active(bContext *C)
|
|||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
if ((sa) && (sa->spacetype == SPACE_OUTLINER)) {
|
||||
SpaceOops *so = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *so = CTX_wm_space_outliner(C);
|
||||
return (so->outlinevis == SO_DATA_API);
|
||||
}
|
||||
return 0;
|
||||
|
@ -1511,7 +1511,7 @@ enum {
|
|||
/* Utilities ---------------------------------- */
|
||||
|
||||
/* Recursively iterate over tree, finding and working on selected items */
|
||||
static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportList *reports, short mode)
|
||||
static void do_outliner_drivers_editop(SpaceOutliner *soops, ListBase *tree, ReportList *reports, short mode)
|
||||
{
|
||||
TreeElement *te;
|
||||
TreeStoreElem *tselem;
|
||||
|
@ -1589,7 +1589,7 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL
|
|||
|
||||
static int outliner_drivers_addsel_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soutliner = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soutliner = CTX_wm_space_outliner(C);
|
||||
|
||||
/* check for invalid states */
|
||||
if (soutliner == NULL)
|
||||
|
@ -1624,7 +1624,7 @@ void OUTLINER_OT_drivers_add_selected(wmOperatorType *ot)
|
|||
|
||||
static int outliner_drivers_deletesel_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soutliner = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soutliner = CTX_wm_space_outliner(C);
|
||||
|
||||
/* check for invalid states */
|
||||
if (soutliner == NULL)
|
||||
|
@ -1692,7 +1692,7 @@ static KeyingSet *verify_active_keyingset(Scene *scene, short add)
|
|||
}
|
||||
|
||||
/* Recursively iterate over tree, finding and working on selected items */
|
||||
static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBase *tree, short mode)
|
||||
static void do_outliner_keyingset_editop(SpaceOutliner *soops, KeyingSet *ks, ListBase *tree, short mode)
|
||||
{
|
||||
TreeElement *te;
|
||||
TreeStoreElem *tselem;
|
||||
|
@ -1760,7 +1760,7 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
|
|||
|
||||
static int outliner_keyingset_additems_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soutliner = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soutliner = CTX_wm_space_outliner(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
KeyingSet *ks = verify_active_keyingset(scene, 1);
|
||||
|
||||
|
@ -1801,7 +1801,7 @@ void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot)
|
|||
|
||||
static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
SpaceOops *soutliner = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soutliner = CTX_wm_space_outliner(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
KeyingSet *ks = verify_active_keyingset(scene, 1);
|
||||
|
||||
|
@ -1841,7 +1841,7 @@ static bool ed_operator_outliner_id_orphans_active(bContext *C)
|
|||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
if ((sa) && (sa->spacetype == SPACE_OUTLINER)) {
|
||||
SpaceOops *so = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *so = CTX_wm_space_outliner(C);
|
||||
return (so->outlinevis == SO_ID_ORPHANS);
|
||||
}
|
||||
return 0;
|
||||
|
@ -1909,7 +1909,7 @@ static int outliner_orphans_purge_invoke(bContext *C, wmOperator *op, const wmEv
|
|||
static int outliner_orphans_purge_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int num_tagged[INDEX_ID_MAX] = {0};
|
||||
|
||||
if ((num_tagged[INDEX_ID_NULL] = RNA_int_get(op->ptr, "num_deleted")) == 0) {
|
||||
|
|
|
@ -160,13 +160,13 @@ typedef enum {
|
|||
/* outliner_tree.c ----------------------------------------------- */
|
||||
|
||||
void outliner_free_tree(ListBase *tree);
|
||||
void outliner_cleanup_tree(struct SpaceOops *soops);
|
||||
void outliner_cleanup_tree(struct SpaceOutliner *soops);
|
||||
void outliner_free_tree_element(TreeElement *element, ListBase *parent_subtree);
|
||||
|
||||
void outliner_build_tree(
|
||||
struct Main *mainvar,
|
||||
struct Scene *scene, struct ViewLayer *view_layer,
|
||||
struct SpaceOops *soops, struct ARegion *ar);
|
||||
struct SpaceOutliner *soops, struct ARegion *ar);
|
||||
|
||||
typedef struct IDsSelectedData {
|
||||
struct ListBase selected_array;
|
||||
|
@ -183,9 +183,9 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te);
|
|||
|
||||
/* outliner_select.c -------------------------------------------- */
|
||||
eOLDrawState tree_element_type_active(
|
||||
struct bContext *C, struct Scene *scene, struct ViewLayer *view_layer, struct SpaceOops *soops,
|
||||
struct bContext *C, struct Scene *scene, struct ViewLayer *view_layer, struct SpaceOutliner *soops,
|
||||
TreeElement *te, TreeStoreElem *tselem, const eOLSetState set, bool recursive);
|
||||
eOLDrawState tree_element_active(struct bContext *C, struct Scene *scene, struct ViewLayer *view_layer, SpaceOops *soops,
|
||||
eOLDrawState tree_element_active(struct bContext *C, struct Scene *scene, struct ViewLayer *view_layer, SpaceOutliner *soops,
|
||||
TreeElement *te, const eOLSetState set, const bool handle_all_types);
|
||||
|
||||
void outliner_item_do_activate_from_tree_element(
|
||||
|
@ -196,7 +196,7 @@ int outliner_item_do_activate_from_cursor(
|
|||
bool extend, bool recursive);
|
||||
|
||||
void outliner_item_select(
|
||||
struct SpaceOops *soops, const struct TreeElement *te,
|
||||
struct SpaceOutliner *soops, const struct TreeElement *te,
|
||||
const bool extend, const bool toggle);
|
||||
|
||||
void outliner_object_mode_toggle(
|
||||
|
@ -209,10 +209,10 @@ typedef void (*outliner_operation_cb)(
|
|||
struct TreeElement *, struct TreeStoreElem *, TreeStoreElem *, void *);
|
||||
|
||||
void outliner_do_object_operation_ex(
|
||||
struct bContext *C, struct ReportList *reports, struct Scene *scene, struct SpaceOops *soops,
|
||||
struct bContext *C, struct ReportList *reports, struct Scene *scene, struct SpaceOutliner *soops,
|
||||
struct ListBase *lb, outliner_operation_cb operation_cb, void *user_data, bool recurse_selected);
|
||||
void outliner_do_object_operation(
|
||||
struct bContext *C, struct ReportList *reports, struct Scene *scene, struct SpaceOops *soops,
|
||||
struct bContext *C, struct ReportList *reports, struct Scene *scene, struct SpaceOutliner *soops,
|
||||
struct ListBase *lb, outliner_operation_cb operation_cb);
|
||||
|
||||
int common_restrict_check(struct bContext *C, struct Object *ob);
|
||||
|
@ -245,7 +245,7 @@ void item_object_mode_exit_cb(
|
|||
struct bContext *C, struct ReportList *reports, struct Scene *scene,
|
||||
TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data);
|
||||
|
||||
void outliner_set_coordinates(struct ARegion *ar, struct SpaceOops *soops);
|
||||
void outliner_set_coordinates(struct ARegion *ar, struct SpaceOutliner *soops);
|
||||
|
||||
/* outliner_dragdrop.c */
|
||||
void outliner_dropboxes(void);
|
||||
|
@ -341,16 +341,16 @@ void OUTLINER_OT_unhide_all(struct wmOperatorType *ot);
|
|||
|
||||
/* outliner_utils.c ---------------------------------------------- */
|
||||
|
||||
TreeElement *outliner_find_item_at_y(const SpaceOops *soops, const ListBase *tree, float view_co_y);
|
||||
TreeElement *outliner_find_item_at_x_in_row(const SpaceOops *soops, const TreeElement *parent_te, float view_co_x);
|
||||
TreeElement *outliner_find_tse(struct SpaceOops *soops, const TreeStoreElem *tse);
|
||||
TreeElement *outliner_find_item_at_y(const SpaceOutliner *soops, const ListBase *tree, float view_co_y);
|
||||
TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *soops, const TreeElement *parent_te, float view_co_x);
|
||||
TreeElement *outliner_find_tse(struct SpaceOutliner *soops, const TreeStoreElem *tse);
|
||||
TreeElement *outliner_find_tree_element(ListBase *lb, const TreeStoreElem *store_elem);
|
||||
TreeElement *outliner_find_parent_element(ListBase *lb, TreeElement *parent_te, const TreeElement *child_te);
|
||||
TreeElement *outliner_find_id(struct SpaceOops *soops, ListBase *lb, const struct ID *id);
|
||||
TreeElement *outliner_find_id(struct SpaceOutliner *soops, ListBase *lb, const struct ID *id);
|
||||
TreeElement *outliner_find_posechannel(ListBase *lb, const struct bPoseChannel *pchan);
|
||||
TreeElement *outliner_find_editbone(ListBase *lb, const struct EditBone *ebone);
|
||||
struct ID *outliner_search_back(SpaceOops *soops, TreeElement *te, short idcode);
|
||||
bool outliner_tree_traverse(const SpaceOops *soops, ListBase *tree, int filter_te_flag, int filter_tselem_flag,
|
||||
struct ID *outliner_search_back(SpaceOutliner *soops, TreeElement *te, short idcode);
|
||||
bool outliner_tree_traverse(const SpaceOutliner *soops, ListBase *tree, int filter_te_flag, int filter_tselem_flag,
|
||||
TreeTraversalFunc func, void *customdata);
|
||||
|
||||
|
||||
|
|
|
@ -289,7 +289,7 @@ static void do_outliner_ebone_select_recursive(bArmature *arm, EditBone *ebone_p
|
|||
}
|
||||
|
||||
static eOLDrawState tree_element_set_active_object(
|
||||
bContext *C, Scene *scene, ViewLayer *view_layer, SpaceOops *soops,
|
||||
bContext *C, Scene *scene, ViewLayer *view_layer, SpaceOutliner *soops,
|
||||
TreeElement *te, const eOLSetState set, bool recursive)
|
||||
{
|
||||
TreeStoreElem *tselem = TREESTORE(te);
|
||||
|
@ -377,7 +377,7 @@ static eOLDrawState tree_element_set_active_object(
|
|||
}
|
||||
|
||||
static eOLDrawState tree_element_active_material(
|
||||
bContext *C, Scene *UNUSED(scene), ViewLayer *view_layer, SpaceOops *soops,
|
||||
bContext *C, Scene *UNUSED(scene), ViewLayer *view_layer, SpaceOutliner *soops,
|
||||
TreeElement *te, const eOLSetState set)
|
||||
{
|
||||
TreeElement *tes;
|
||||
|
@ -430,7 +430,7 @@ static eOLDrawState tree_element_active_material(
|
|||
}
|
||||
|
||||
static eOLDrawState tree_element_active_lamp(
|
||||
bContext *UNUSED(C), Scene *UNUSED(scene), ViewLayer *view_layer, SpaceOops *soops,
|
||||
bContext *UNUSED(C), Scene *UNUSED(scene), ViewLayer *view_layer, SpaceOutliner *soops,
|
||||
TreeElement *te, const eOLSetState set)
|
||||
{
|
||||
Object *ob;
|
||||
|
@ -453,7 +453,7 @@ static eOLDrawState tree_element_active_lamp(
|
|||
}
|
||||
|
||||
static eOLDrawState tree_element_active_camera(
|
||||
bContext *UNUSED(C), Scene *scene, ViewLayer *UNUSED(sl), SpaceOops *soops,
|
||||
bContext *UNUSED(C), Scene *scene, ViewLayer *UNUSED(sl), SpaceOutliner *soops,
|
||||
TreeElement *te, const eOLSetState set)
|
||||
{
|
||||
Object *ob = (Object *)outliner_search_back(soops, te, ID_OB);
|
||||
|
@ -466,7 +466,7 @@ static eOLDrawState tree_element_active_camera(
|
|||
}
|
||||
|
||||
static eOLDrawState tree_element_active_world(
|
||||
bContext *C, Scene *scene, ViewLayer *UNUSED(sl), SpaceOops *UNUSED(soops),
|
||||
bContext *C, Scene *scene, ViewLayer *UNUSED(sl), SpaceOutliner *UNUSED(soops),
|
||||
TreeElement *te, const eOLSetState set)
|
||||
{
|
||||
TreeElement *tep;
|
||||
|
@ -759,7 +759,7 @@ static int tree_element_active_constraint(
|
|||
}
|
||||
|
||||
static eOLDrawState tree_element_active_text(
|
||||
bContext *UNUSED(C), Scene *UNUSED(scene), ViewLayer *UNUSED(sl), SpaceOops *UNUSED(soops),
|
||||
bContext *UNUSED(C), Scene *UNUSED(scene), ViewLayer *UNUSED(sl), SpaceOutliner *UNUSED(soops),
|
||||
TreeElement *UNUSED(te), int UNUSED(set))
|
||||
{
|
||||
// XXX removed
|
||||
|
@ -911,7 +911,7 @@ static eOLDrawState tree_element_active_layer_collection(
|
|||
/* ---------------------------------------------- */
|
||||
|
||||
/* generic call for ID data check or make/check active in UI */
|
||||
eOLDrawState tree_element_active(bContext *C, Scene *scene, ViewLayer *view_layer, SpaceOops *soops, TreeElement *te,
|
||||
eOLDrawState tree_element_active(bContext *C, Scene *scene, ViewLayer *view_layer, SpaceOutliner *soops, TreeElement *te,
|
||||
const eOLSetState set, const bool handle_all_types)
|
||||
{
|
||||
switch (te->idcode) {
|
||||
|
@ -940,7 +940,7 @@ eOLDrawState tree_element_active(bContext *C, Scene *scene, ViewLayer *view_laye
|
|||
* Generic call for non-id data to make/check active in UI
|
||||
*/
|
||||
eOLDrawState tree_element_type_active(
|
||||
bContext *C, Scene *scene, ViewLayer *view_layer, SpaceOops *soops,
|
||||
bContext *C, Scene *scene, ViewLayer *view_layer, SpaceOutliner *soops,
|
||||
TreeElement *te, TreeStoreElem *tselem, const eOLSetState set, bool recursive)
|
||||
{
|
||||
switch (tselem->type) {
|
||||
|
@ -998,7 +998,7 @@ eOLDrawState tree_element_type_active(
|
|||
* Needed to run from operators accessed from a menu.
|
||||
*/
|
||||
static void do_outliner_item_activate_tree_element(
|
||||
bContext *C, Scene *scene, ViewLayer *view_layer, SpaceOops *soops,
|
||||
bContext *C, Scene *scene, ViewLayer *view_layer, SpaceOutliner *soops,
|
||||
TreeElement *te, TreeStoreElem *tselem,
|
||||
const bool extend, const bool recursive)
|
||||
{
|
||||
|
@ -1099,7 +1099,7 @@ static void do_outliner_item_activate_tree_element(
|
|||
* \param extend: Don't deselect other items, only modify \a te.
|
||||
* \param toggle: Select \a te when not selected, deselect when selected.
|
||||
*/
|
||||
void outliner_item_select(SpaceOops *soops, const TreeElement *te, const bool extend, const bool toggle)
|
||||
void outliner_item_select(SpaceOutliner *soops, const TreeElement *te, const bool extend, const bool toggle)
|
||||
{
|
||||
TreeStoreElem *tselem = TREESTORE(te);
|
||||
const short new_flag = toggle ? (tselem->flag ^ TSE_SELECTED) : (tselem->flag | TSE_SELECTED);
|
||||
|
@ -1129,7 +1129,7 @@ static bool outliner_item_is_co_within_close_toggle(TreeElement *te, float view_
|
|||
return ((te->flag & TE_ICONROW) == 0) && (view_co_x > te->xs) && (view_co_x < te->xs + UI_UNIT_X);
|
||||
}
|
||||
|
||||
static bool outliner_is_co_within_restrict_columns(const SpaceOops *soops, const ARegion *ar, float view_co_x)
|
||||
static bool outliner_is_co_within_restrict_columns(const SpaceOutliner *soops, const ARegion *ar, float view_co_x)
|
||||
{
|
||||
return ((soops->outlinevis != SO_DATA_API) &&
|
||||
!(soops->flag & SO_HIDE_RESTRICTCOLS) &&
|
||||
|
@ -1148,7 +1148,7 @@ void outliner_item_do_activate_from_tree_element(
|
|||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
|
||||
do_outliner_item_activate_tree_element(
|
||||
C, scene, view_layer, soops,
|
||||
|
@ -1166,7 +1166,7 @@ int outliner_item_do_activate_from_cursor(
|
|||
bool extend, bool recursive)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
TreeElement *te;
|
||||
float view_mval[2];
|
||||
bool changed = false, rebuild_tree = false;
|
||||
|
@ -1235,7 +1235,7 @@ void OUTLINER_OT_item_activate(wmOperatorType *ot)
|
|||
/* ****************************************************** */
|
||||
|
||||
/* **************** Box Select Tool ****************** */
|
||||
static void outliner_item_box_select(SpaceOops *soops, Scene *scene, rctf *rectf, TreeElement *te, bool select)
|
||||
static void outliner_item_box_select(SpaceOutliner *soops, Scene *scene, rctf *rectf, TreeElement *te, bool select)
|
||||
{
|
||||
TreeStoreElem *tselem = TREESTORE(te);
|
||||
|
||||
|
@ -1259,7 +1259,7 @@ static void outliner_item_box_select(SpaceOops *soops, Scene *scene, rctf *rectf
|
|||
static int outliner_box_select_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
TreeElement *te;
|
||||
rctf rectf;
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
|
||||
/* ************ SELECTION OPERATIONS ********* */
|
||||
|
||||
static void set_operation_types(SpaceOops *soops, ListBase *lb,
|
||||
static void set_operation_types(SpaceOutliner *soops, ListBase *lb,
|
||||
int *scenelevel,
|
||||
int *objectlevel,
|
||||
int *idlevel,
|
||||
|
@ -279,7 +279,7 @@ static void unlink_world_cb(
|
|||
}
|
||||
|
||||
static void outliner_do_libdata_operation(
|
||||
bContext *C, ReportList *reports, Scene *scene, SpaceOops *soops, ListBase *lb,
|
||||
bContext *C, ReportList *reports, Scene *scene, SpaceOutliner *soops, ListBase *lb,
|
||||
outliner_operation_cb operation_cb,
|
||||
void *user_data)
|
||||
{
|
||||
|
@ -348,7 +348,7 @@ static bool scene_cb(bContext *C, eOutliner_PropSceneOps event, TreeElement *UNU
|
|||
|
||||
static int outliner_scene_operation_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
const eOutliner_PropSceneOps event = RNA_enum_get(op->ptr, "type");
|
||||
|
||||
if (outliner_do_scene_operation(C, event, &soops->tree, scene_cb) == false) {
|
||||
|
@ -551,7 +551,7 @@ static void singleuser_world_cb(
|
|||
* \param select_recurse: Set to false for operations which are already recursively operating on their children.
|
||||
*/
|
||||
void outliner_do_object_operation_ex(
|
||||
bContext *C, ReportList *reports, Scene *scene_act, SpaceOops *soops, ListBase *lb,
|
||||
bContext *C, ReportList *reports, Scene *scene_act, SpaceOutliner *soops, ListBase *lb,
|
||||
outliner_operation_cb operation_cb, void *user_data, bool select_recurse)
|
||||
{
|
||||
TreeElement *te;
|
||||
|
@ -583,7 +583,7 @@ void outliner_do_object_operation_ex(
|
|||
}
|
||||
|
||||
void outliner_do_object_operation(
|
||||
bContext *C, ReportList *reports, Scene *scene_act, SpaceOops *soops, ListBase *lb,
|
||||
bContext *C, ReportList *reports, Scene *scene_act, SpaceOutliner *soops, ListBase *lb,
|
||||
outliner_operation_cb operation_cb)
|
||||
{
|
||||
outliner_do_object_operation_ex(C, reports, scene_act, soops, lb, operation_cb, NULL, true);
|
||||
|
@ -743,7 +743,7 @@ static void constraint_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tsel
|
|||
{
|
||||
bContext *C = C_v;
|
||||
Main *bmain = CTX_data_main(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
bConstraint *constraint = (bConstraint *)te->directdata;
|
||||
Object *ob = (Object *)outliner_search_back(soops, te, ID_OB);
|
||||
|
||||
|
@ -784,7 +784,7 @@ static void modifier_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem
|
|||
{
|
||||
bContext *C = (bContext *)Carg;
|
||||
Main *bmain = CTX_data_main(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
ModifierData *md = (ModifierData *)te->directdata;
|
||||
Object *ob = (Object *)outliner_search_back(soops, te, ID_OB);
|
||||
|
||||
|
@ -805,7 +805,7 @@ static void modifier_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem
|
|||
}
|
||||
}
|
||||
|
||||
static void outliner_do_data_operation(SpaceOops *soops, int type, int event, ListBase *lb,
|
||||
static void outliner_do_data_operation(SpaceOutliner *soops, int type, int event, ListBase *lb,
|
||||
void (*operation_cb)(int, TreeElement *, TreeStoreElem *, void *),
|
||||
void *arg)
|
||||
{
|
||||
|
@ -1003,7 +1003,7 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
|
|||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int event;
|
||||
const char *str = NULL;
|
||||
|
||||
|
@ -1189,7 +1189,7 @@ static const EnumPropertyItem *outliner_id_operation_itemf(
|
|||
static int outliner_id_operation_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
|
||||
eOutlinerIdOpTypes event;
|
||||
|
||||
|
@ -1392,7 +1392,7 @@ static const EnumPropertyItem outliner_lib_op_type_items[] = {
|
|||
static int outliner_lib_operation_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
|
||||
eOutlinerLibOpTypes event;
|
||||
|
||||
|
@ -1464,7 +1464,7 @@ void OUTLINER_OT_lib_operation(wmOperatorType *ot)
|
|||
|
||||
/* **************************************** */
|
||||
|
||||
static void outliner_do_id_set_operation(SpaceOops *soops, int type, ListBase *lb, ID *newid,
|
||||
static void outliner_do_id_set_operation(SpaceOutliner *soops, int type, ListBase *lb, ID *newid,
|
||||
void (*operation_cb)(TreeElement *, TreeStoreElem *, TreeStoreElem *, ID *))
|
||||
{
|
||||
TreeElement *te;
|
||||
|
@ -1506,7 +1506,7 @@ static void actionset_id_cb(TreeElement *UNUSED(te), TreeStoreElem *tselem, Tree
|
|||
|
||||
static int outliner_action_set_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
|
||||
|
||||
bAction *act;
|
||||
|
@ -1603,7 +1603,7 @@ static const EnumPropertyItem prop_animdata_op_types[] = {
|
|||
|
||||
static int outliner_animdata_operation_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
|
||||
eOutliner_AnimDataOps event;
|
||||
short updateDeps = 0;
|
||||
|
@ -1698,7 +1698,7 @@ static const EnumPropertyItem prop_constraint_op_types[] = {
|
|||
|
||||
static int outliner_constraint_operation_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
|
||||
eOutliner_PropConstraintOps event;
|
||||
|
||||
|
@ -1743,7 +1743,7 @@ static const EnumPropertyItem prop_modifier_op_types[] = {
|
|||
|
||||
static int outliner_modifier_operation_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
|
||||
eOutliner_PropModifierOps event;
|
||||
|
||||
|
@ -1791,7 +1791,7 @@ static const EnumPropertyItem prop_data_op_types[] = {
|
|||
|
||||
static int outliner_data_operation_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
|
||||
eOutliner_PropDataOps event;
|
||||
|
||||
|
@ -1898,7 +1898,7 @@ static int outliner_operator_menu(bContext *C, const char *opname)
|
|||
return OPERATOR_INTERFACE;
|
||||
}
|
||||
|
||||
static int do_outliner_operation_event(bContext *C, ARegion *ar, SpaceOops *soops,
|
||||
static int do_outliner_operation_event(bContext *C, ARegion *ar, SpaceOutliner *soops,
|
||||
TreeElement *te, const float mval[2])
|
||||
{
|
||||
ReportList *reports = CTX_wm_reports(C); // XXX...
|
||||
|
@ -2008,7 +2008,7 @@ static int do_outliner_operation_event(bContext *C, ARegion *ar, SpaceOops *soop
|
|||
static int outliner_operation(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
|
||||
{
|
||||
ARegion *ar = CTX_wm_region(C);
|
||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||
SpaceOutliner *soops = CTX_wm_space_outliner(C);
|
||||
uiBut *but = UI_context_active_but_get(C);
|
||||
TreeElement *te;
|
||||
float fmval[2];
|
||||
|
|
|
@ -83,13 +83,13 @@
|
|||
|
||||
/* prototypes */
|
||||
static TreeElement *outliner_add_collection_recursive(
|
||||
SpaceOops *soops, Collection *collection, TreeElement *ten);
|
||||
SpaceOutliner *soops, Collection *collection, TreeElement *ten);
|
||||
static void outliner_make_object_parent_hierarchy(ListBase *lb);
|
||||
|
||||
/* ********************************************************* */
|
||||
/* Persistent Data */
|
||||
|
||||
static void outliner_storage_cleanup(SpaceOops *soops)
|
||||
static void outliner_storage_cleanup(SpaceOutliner *soops)
|
||||
{
|
||||
BLI_mempool *ts = soops->treestore;
|
||||
|
||||
|
@ -150,7 +150,7 @@ static void outliner_storage_cleanup(SpaceOops *soops)
|
|||
}
|
||||
}
|
||||
|
||||
static void check_persistent(SpaceOops *soops, TreeElement *te, ID *id, short type, short nr)
|
||||
static void check_persistent(SpaceOutliner *soops, TreeElement *te, ID *id, short type, short nr)
|
||||
{
|
||||
TreeStoreElem *tselem;
|
||||
|
||||
|
@ -194,7 +194,7 @@ void outliner_free_tree(ListBase *tree)
|
|||
}
|
||||
}
|
||||
|
||||
void outliner_cleanup_tree(SpaceOops *soops)
|
||||
void outliner_cleanup_tree(SpaceOutliner *soops)
|
||||
{
|
||||
outliner_free_tree(&soops->tree);
|
||||
outliner_storage_cleanup(soops);
|
||||
|
@ -223,13 +223,13 @@ void outliner_free_tree_element(TreeElement *element, ListBase *parent_subtree)
|
|||
/* ********************************************************* */
|
||||
|
||||
/* Prototype, see functions below */
|
||||
static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *idv,
|
||||
static TreeElement *outliner_add_element(SpaceOutliner *soops, ListBase *lb, void *idv,
|
||||
TreeElement *parent, short type, short index);
|
||||
|
||||
/* -------------------------------------------------------- */
|
||||
|
||||
/* special handling of hierarchical non-lib data */
|
||||
static void outliner_add_bone(SpaceOops *soops, ListBase *lb, ID *id, Bone *curBone,
|
||||
static void outliner_add_bone(SpaceOutliner *soops, ListBase *lb, ID *id, Bone *curBone,
|
||||
TreeElement *parent, int *a)
|
||||
{
|
||||
TreeElement *te = outliner_add_element(soops, lb, id, parent, TSE_BONE, *a);
|
||||
|
@ -251,7 +251,7 @@ static bool outliner_animdata_test(AnimData *adt)
|
|||
}
|
||||
|
||||
#ifdef WITH_FREESTYLE
|
||||
static void outliner_add_line_styles(SpaceOops *soops, ListBase *lb, Scene *sce, TreeElement *te)
|
||||
static void outliner_add_line_styles(SpaceOutliner *soops, ListBase *lb, Scene *sce, TreeElement *te)
|
||||
{
|
||||
ViewLayer *view_layer;
|
||||
FreestyleLineSet *lineset;
|
||||
|
@ -278,7 +278,7 @@ static void outliner_add_line_styles(SpaceOops *soops, ListBase *lb, Scene *sce,
|
|||
}
|
||||
#endif
|
||||
|
||||
static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *sce, TreeElement *te)
|
||||
static void outliner_add_scene_contents(SpaceOutliner *soops, ListBase *lb, Scene *sce, TreeElement *te)
|
||||
{
|
||||
/* View layers */
|
||||
TreeElement *ten = outliner_add_element(soops, lb, sce, te, TSE_R_LAYER_BASE, 0);
|
||||
|
@ -313,7 +313,7 @@ static void outliner_add_scene_contents(SpaceOops *soops, ListBase *lb, Scene *s
|
|||
}
|
||||
|
||||
// can be inlined if necessary
|
||||
static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, Object *ob)
|
||||
static void outliner_add_object_contents(SpaceOutliner *soops, TreeElement *te, TreeStoreElem *tselem, Object *ob)
|
||||
{
|
||||
if (outliner_animdata_test(ob->adt))
|
||||
outliner_add_element(soops, &te->subtree, ob, te, TSE_ANIM_DATA, 0);
|
||||
|
@ -484,7 +484,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
|
|||
|
||||
|
||||
// can be inlined if necessary
|
||||
static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, ID *id)
|
||||
static void outliner_add_id_contents(SpaceOutliner *soops, TreeElement *te, TreeStoreElem *tselem, ID *id)
|
||||
{
|
||||
/* tuck pointer back in object, to construct hierarchy */
|
||||
if (GS(id->name) == ID_OB) id->newid = (ID *)te;
|
||||
|
@ -719,7 +719,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
|
|||
|
||||
// TODO: this function needs to be split up! It's getting a bit too large...
|
||||
// Note: "ID" is not always a real ID
|
||||
static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *idv,
|
||||
static TreeElement *outliner_add_element(SpaceOutliner *soops, ListBase *lb, void *idv,
|
||||
TreeElement *parent, short type, short index)
|
||||
{
|
||||
TreeElement *te;
|
||||
|
@ -1119,7 +1119,7 @@ static int need_add_seq_dup(Sequence *seq)
|
|||
return(1);
|
||||
}
|
||||
|
||||
static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *te, short index)
|
||||
static void outliner_add_seq_dup(SpaceOutliner *soops, Sequence *seq, TreeElement *te, short index)
|
||||
{
|
||||
/* TreeElement *ch; */ /* UNUSED */
|
||||
Sequence *p;
|
||||
|
@ -1173,7 +1173,7 @@ static bool outliner_library_id_show(Library *lib, ID *id, short filter_id_type)
|
|||
return true;
|
||||
}
|
||||
|
||||
static TreeElement *outliner_add_library_contents(Main *mainvar, SpaceOops *soops, ListBase *lb, Library *lib)
|
||||
static TreeElement *outliner_add_library_contents(Main *mainvar, SpaceOutliner *soops, ListBase *lb, Library *lib)
|
||||
{
|
||||
TreeElement *ten, *tenlib = NULL;
|
||||
ListBase *lbarray[MAX_LIBARRAY];
|
||||
|
@ -1231,7 +1231,7 @@ static TreeElement *outliner_add_library_contents(Main *mainvar, SpaceOops *soop
|
|||
return tenlib;
|
||||
}
|
||||
|
||||
static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOops *soops)
|
||||
static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOutliner *soops)
|
||||
{
|
||||
TreeElement *ten;
|
||||
ListBase *lbarray[MAX_LIBARRAY];
|
||||
|
@ -1278,7 +1278,7 @@ static void outliner_add_orphaned_datablocks(Main *mainvar, SpaceOops *soops)
|
|||
}
|
||||
|
||||
static void outliner_add_layer_collection_objects(
|
||||
SpaceOops *soops, ListBase *tree, ViewLayer *layer,
|
||||
SpaceOutliner *soops, ListBase *tree, ViewLayer *layer,
|
||||
LayerCollection *lc, TreeElement *ten)
|
||||
{
|
||||
for (CollectionObject *cob = lc->collection->gobject.first; cob; cob = cob->next) {
|
||||
|
@ -1293,7 +1293,7 @@ static void outliner_add_layer_collection_objects(
|
|||
}
|
||||
|
||||
static void outliner_add_layer_collections_recursive(
|
||||
SpaceOops *soops, ListBase *tree, ViewLayer *layer,
|
||||
SpaceOutliner *soops, ListBase *tree, ViewLayer *layer,
|
||||
ListBase *layer_collections, TreeElement *parent_ten,
|
||||
const bool show_objects)
|
||||
{
|
||||
|
@ -1324,7 +1324,7 @@ static void outliner_add_layer_collections_recursive(
|
|||
}
|
||||
}
|
||||
|
||||
static void outliner_add_view_layer(SpaceOops *soops, ListBase *tree, TreeElement *parent,
|
||||
static void outliner_add_view_layer(SpaceOutliner *soops, ListBase *tree, TreeElement *parent,
|
||||
ViewLayer *layer, const bool show_objects)
|
||||
{
|
||||
/* First layer collection is for master collection, don't show it. */
|
||||
|
@ -1346,7 +1346,7 @@ BLI_INLINE void outliner_add_collection_init(TreeElement *te, Collection *collec
|
|||
}
|
||||
|
||||
BLI_INLINE void outliner_add_collection_objects(
|
||||
SpaceOops *soops, ListBase *tree, Collection *collection, TreeElement *parent)
|
||||
SpaceOutliner *soops, ListBase *tree, Collection *collection, TreeElement *parent)
|
||||
{
|
||||
for (CollectionObject *cob = collection->gobject.first; cob; cob = cob->next) {
|
||||
outliner_add_element(soops, tree, cob->ob, parent, 0, 0);
|
||||
|
@ -1354,7 +1354,7 @@ BLI_INLINE void outliner_add_collection_objects(
|
|||
}
|
||||
|
||||
static TreeElement *outliner_add_collection_recursive(
|
||||
SpaceOops *soops, Collection *collection, TreeElement *ten)
|
||||
SpaceOutliner *soops, Collection *collection, TreeElement *ten)
|
||||
{
|
||||
outliner_add_collection_init(ten, collection);
|
||||
|
||||
|
@ -1549,7 +1549,7 @@ typedef struct OutlinerTreeElementFocus {
|
|||
* Bring the outliner scrolling back to where it was in relation to the original focus element
|
||||
* Caller is expected to handle redrawing of ARegion.
|
||||
*/
|
||||
static void outliner_restore_scrolling_position(SpaceOops *soops, ARegion *ar, OutlinerTreeElementFocus *focus)
|
||||
static void outliner_restore_scrolling_position(SpaceOutliner *soops, ARegion *ar, OutlinerTreeElementFocus *focus)
|
||||
{
|
||||
View2D *v2d = &ar->v2d;
|
||||
int ytop;
|
||||
|
@ -1592,7 +1592,7 @@ static bool test_object_callback(TreeElement *te)
|
|||
* See if TreeElement or any of its children pass the callback_test.
|
||||
*/
|
||||
static TreeElement *outliner_find_first_desired_element_at_y_recursive(
|
||||
const SpaceOops *soops,
|
||||
const SpaceOutliner *soops,
|
||||
TreeElement *te,
|
||||
const float limit,
|
||||
bool (*callback_test)(TreeElement *))
|
||||
|
@ -1625,7 +1625,7 @@ static TreeElement *outliner_find_first_desired_element_at_y_recursive(
|
|||
* we return NULL.
|
||||
*/
|
||||
static TreeElement *outliner_find_first_desired_element_at_y(
|
||||
const SpaceOops *soops,
|
||||
const SpaceOutliner *soops,
|
||||
const float view_co,
|
||||
const float view_co_limit)
|
||||
{
|
||||
|
@ -1681,7 +1681,7 @@ static TreeElement *outliner_find_first_desired_element_at_y(
|
|||
* Finds the top-most collection visible in the outliner and populates the OutlinerTreeElementFocus
|
||||
* struct to retrieve this element later to make sure it is in the same original position as before filtering
|
||||
*/
|
||||
static void outliner_store_scrolling_position(SpaceOops *soops, ARegion *ar, OutlinerTreeElementFocus *focus)
|
||||
static void outliner_store_scrolling_position(SpaceOutliner *soops, ARegion *ar, OutlinerTreeElementFocus *focus)
|
||||
{
|
||||
TreeElement *te;
|
||||
float limit = ar->v2d.cur.ymin;
|
||||
|
@ -1699,7 +1699,7 @@ static void outliner_store_scrolling_position(SpaceOops *soops, ARegion *ar, Out
|
|||
}
|
||||
}
|
||||
|
||||
static int outliner_exclude_filter_get(SpaceOops *soops)
|
||||
static int outliner_exclude_filter_get(SpaceOutliner *soops)
|
||||
{
|
||||
int exclude_filter = soops->filter & ~SO_FILTER_OB_STATE;
|
||||
|
||||
|
@ -1842,7 +1842,7 @@ static bool outliner_filter_has_name(TreeElement *te, const char *name, int flag
|
|||
}
|
||||
|
||||
static int outliner_filter_subtree(
|
||||
SpaceOops *soops, ViewLayer *view_layer, ListBase *lb, const char *search_string, const int exclude_filter)
|
||||
SpaceOutliner *soops, ViewLayer *view_layer, ListBase *lb, const char *search_string, const int exclude_filter)
|
||||
{
|
||||
TreeElement *te, *te_next;
|
||||
TreeStoreElem *tselem;
|
||||
|
@ -1893,9 +1893,9 @@ static int outliner_filter_subtree(
|
|||
return (BLI_listbase_is_empty(lb) == false);
|
||||
}
|
||||
|
||||
static void outliner_filter_tree(SpaceOops *soops, ViewLayer *view_layer)
|
||||
static void outliner_filter_tree(SpaceOutliner *soops, ViewLayer *view_layer)
|
||||
{
|
||||
char search_buff[sizeof(((struct SpaceOops *)NULL)->search_string) + 2];
|
||||
char search_buff[sizeof(((struct SpaceOutliner *)NULL)->search_string) + 2];
|
||||
char *search_string;
|
||||
|
||||
const int exclude_filter = outliner_exclude_filter_get(soops);
|
||||
|
@ -1921,7 +1921,7 @@ static void outliner_filter_tree(SpaceOops *soops, ViewLayer *view_layer)
|
|||
|
||||
/* Main entry point for building the tree data-structure that the outliner represents */
|
||||
// TODO: split each mode into its own function?
|
||||
void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, SpaceOops *soops, ARegion *ar)
|
||||
void outliner_build_tree(Main *mainvar, Scene *scene, ViewLayer *view_layer, SpaceOutliner *soops, ARegion *ar)
|
||||
{
|
||||
TreeElement *te = NULL, *ten;
|
||||
TreeStoreElem *tselem;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* Try to find an item under y-coordinate \a view_co_y (view-space).
|
||||
* \note Recursive
|
||||
*/
|
||||
TreeElement *outliner_find_item_at_y(const SpaceOops *soops, const ListBase *tree, float view_co_y)
|
||||
TreeElement *outliner_find_item_at_y(const SpaceOutliner *soops, const ListBase *tree, float view_co_y)
|
||||
{
|
||||
for (TreeElement *te_iter = tree->first; te_iter; te_iter = te_iter->next) {
|
||||
if (view_co_y < (te_iter->ys + UI_UNIT_Y)) {
|
||||
|
@ -64,7 +64,7 @@ TreeElement *outliner_find_item_at_y(const SpaceOops *soops, const ListBase *tre
|
|||
*
|
||||
* \return a hovered child item or \a parent_te (if no hovered child found).
|
||||
*/
|
||||
TreeElement *outliner_find_item_at_x_in_row(const SpaceOops *soops, const TreeElement *parent_te, float view_co_x)
|
||||
TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *soops, const TreeElement *parent_te, float view_co_x)
|
||||
{
|
||||
/* if parent_te is opened, it doesn't show childs in row */
|
||||
if (!TSELEM_OPEN(TREESTORE(parent_te), soops)) {
|
||||
|
@ -115,7 +115,7 @@ TreeElement *outliner_find_parent_element(ListBase *lb, TreeElement *parent_te,
|
|||
}
|
||||
|
||||
/* tse is not in the treestore, we use its contents to find a match */
|
||||
TreeElement *outliner_find_tse(SpaceOops *soops, const TreeStoreElem *tse)
|
||||
TreeElement *outliner_find_tse(SpaceOutliner *soops, const TreeStoreElem *tse)
|
||||
{
|
||||
TreeStoreElem *tselem;
|
||||
|
||||
|
@ -130,7 +130,7 @@ TreeElement *outliner_find_tse(SpaceOops *soops, const TreeStoreElem *tse)
|
|||
}
|
||||
|
||||
/* Find treestore that refers to given ID */
|
||||
TreeElement *outliner_find_id(SpaceOops *soops, ListBase *lb, const ID *id)
|
||||
TreeElement *outliner_find_id(SpaceOutliner *soops, ListBase *lb, const ID *id)
|
||||
{
|
||||
for (TreeElement *te = lb->first; te; te = te->next) {
|
||||
TreeStoreElem *tselem = TREESTORE(te);
|
||||
|
@ -184,7 +184,7 @@ TreeElement *outliner_find_editbone(ListBase *lb, const EditBone *ebone)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
ID *outliner_search_back(SpaceOops *UNUSED(soops), TreeElement *te, short idcode)
|
||||
ID *outliner_search_back(SpaceOutliner *UNUSED(soops), TreeElement *te, short idcode)
|
||||
{
|
||||
TreeStoreElem *tselem;
|
||||
te = te->parent;
|
||||
|
@ -205,7 +205,7 @@ ID *outliner_search_back(SpaceOops *UNUSED(soops), TreeElement *te, short idcode
|
|||
* \param filter_tselem_flag: Same as \a filter_te_flag, but for the TreeStoreElem.
|
||||
* \param func: Custom callback to execute for each visited item.
|
||||
*/
|
||||
bool outliner_tree_traverse(const SpaceOops *soops, ListBase *tree, int filter_te_flag, int filter_tselem_flag,
|
||||
bool outliner_tree_traverse(const SpaceOutliner *soops, ListBase *tree, int filter_te_flag, int filter_tselem_flag,
|
||||
TreeTraversalFunc func, void *customdata)
|
||||
{
|
||||
for (TreeElement *te = tree->first, *te_next; te; te = te_next) {
|
||||
|
|
|
@ -233,7 +233,7 @@ static void outliner_main_region_message_subscribe(
|
|||
struct bScreen *UNUSED(screen), struct ScrArea *sa, struct ARegion *ar,
|
||||
struct wmMsgBus *mbus)
|
||||
{
|
||||
SpaceOops *soops = sa->spacedata.first;
|
||||
SpaceOutliner *soops = sa->spacedata.first;
|
||||
wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
|
||||
.owner = ar,
|
||||
.user_data = ar,
|
||||
|
@ -285,9 +285,9 @@ static void outliner_header_region_listener(
|
|||
static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
|
||||
{
|
||||
ARegion *ar;
|
||||
SpaceOops *soutliner;
|
||||
SpaceOutliner *soutliner;
|
||||
|
||||
soutliner = MEM_callocN(sizeof(SpaceOops), "initoutliner");
|
||||
soutliner = MEM_callocN(sizeof(SpaceOutliner), "initoutliner");
|
||||
soutliner->spacetype = SPACE_OUTLINER;
|
||||
soutliner->filter_id_type = ID_GR;
|
||||
|
||||
|
@ -310,7 +310,7 @@ static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED(
|
|||
/* not spacelink itself */
|
||||
static void outliner_free(SpaceLink *sl)
|
||||
{
|
||||
SpaceOops *soutliner = (SpaceOops *)sl;
|
||||
SpaceOutliner *soutliner = (SpaceOutliner *)sl;
|
||||
|
||||
outliner_free_tree(&soutliner->tree);
|
||||
if (soutliner->treestore) {
|
||||
|
@ -329,8 +329,8 @@ static void outliner_init(wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa))
|
|||
|
||||
static SpaceLink *outliner_duplicate(SpaceLink *sl)
|
||||
{
|
||||
SpaceOops *soutliner = (SpaceOops *)sl;
|
||||
SpaceOops *soutlinern = MEM_dupallocN(soutliner);
|
||||
SpaceOutliner *soutliner = (SpaceOutliner *)sl;
|
||||
SpaceOutliner *soutlinern = MEM_dupallocN(soutliner);
|
||||
|
||||
BLI_listbase_clear(&soutlinern->tree);
|
||||
soutlinern->treestore = NULL;
|
||||
|
@ -341,7 +341,7 @@ static SpaceLink *outliner_duplicate(SpaceLink *sl)
|
|||
|
||||
static void outliner_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *new_id)
|
||||
{
|
||||
SpaceOops *so = (SpaceOops *)slink;
|
||||
SpaceOutliner *so = (SpaceOutliner *)slink;
|
||||
|
||||
/* Some early out checks. */
|
||||
if (!TREESTORE_ID_TYPE(old_id)) {
|
||||
|
|
|
@ -218,7 +218,7 @@ typedef enum eSpaceButtons_Flag {
|
|||
* \{ */
|
||||
|
||||
/* Outliner */
|
||||
typedef struct SpaceOops {
|
||||
typedef struct SpaceOutliner {
|
||||
SpaceLink *next, *prev;
|
||||
/** Storage of regions for inactive spaces. */
|
||||
ListBase regionbase;
|
||||
|
@ -254,10 +254,10 @@ typedef struct SpaceOops {
|
|||
* Pointers to treestore elements, grouped by (id, type, nr)
|
||||
* in hashtable for faster searching */
|
||||
void *treehash;
|
||||
} SpaceOops;
|
||||
} SpaceOutliner;
|
||||
|
||||
|
||||
/* SpaceOops.flag */
|
||||
/* SpaceOutliner.flag */
|
||||
typedef enum eSpaceOutliner_Flag {
|
||||
SO_TESTBLOCKS = (1 << 0),
|
||||
SO_NEWSELECTED = (1 << 1),
|
||||
|
@ -266,7 +266,7 @@ typedef enum eSpaceOutliner_Flag {
|
|||
SO_SKIP_SORT_ALPHA = (1 << 4),
|
||||
} eSpaceOutliner_Flag;
|
||||
|
||||
/* SpaceOops.filter */
|
||||
/* SpaceOutliner.filter */
|
||||
typedef enum eSpaceOutliner_Filter {
|
||||
SO_FILTER_SEARCH = (1 << 0), /* Run-time flag. */
|
||||
SO_FILTER_DEPRECATED_1 = (1 << 1), /* cleared */
|
||||
|
@ -308,7 +308,7 @@ typedef enum eSpaceOutliner_Filter {
|
|||
SO_FILTER_OB_STATE | \
|
||||
SO_FILTER_NO_COLLECTION)
|
||||
|
||||
/* SpaceOops.filter_state */
|
||||
/* SpaceOutliner.filter_state */
|
||||
typedef enum eSpaceOutliner_StateFilter {
|
||||
SO_FILTER_OB_ALL = 0,
|
||||
SO_FILTER_OB_VISIBLE = 1,
|
||||
|
@ -316,7 +316,7 @@ typedef enum eSpaceOutliner_StateFilter {
|
|||
SO_FILTER_OB_ACTIVE = 3,
|
||||
} eSpaceOutliner_StateFilter;
|
||||
|
||||
/* SpaceOops.outlinevis */
|
||||
/* SpaceOutliner.outlinevis */
|
||||
typedef enum eSpaceOutliner_Mode {
|
||||
SO_SCENES = 0,
|
||||
/* SO_CUR_SCENE = 1, */ /* deprecated! */
|
||||
|
@ -336,7 +336,7 @@ typedef enum eSpaceOutliner_Mode {
|
|||
SO_VIEW_LAYER = 15,
|
||||
} eSpaceOutliner_Mode;
|
||||
|
||||
/* SpaceOops.storeflag */
|
||||
/* SpaceOutliner.storeflag */
|
||||
typedef enum eSpaceOutliner_StoreFlag {
|
||||
/* cleanup tree */
|
||||
SO_TREESTORE_CLEANUP = (1 << 0),
|
||||
|
@ -346,7 +346,7 @@ typedef enum eSpaceOutliner_StoreFlag {
|
|||
SO_TREESTORE_REBUILD = (1 << 2),
|
||||
} eSpaceOutliner_StoreFlag;
|
||||
|
||||
/* outliner search flags (SpaceOops.search_flags) */
|
||||
/* outliner search flags (SpaceOutliner.search_flags) */
|
||||
typedef enum eSpaceOutliner_Search_Flags {
|
||||
SO_FIND_CASE_SENSITIVE = (1 << 0),
|
||||
SO_FIND_COMPLETE = (1 << 1),
|
||||
|
|
|
@ -40,10 +40,10 @@
|
|||
|
||||
/* Match RNA names where possible, keep sorted. */
|
||||
|
||||
DNA_STRUCT_RENAME(SpaceOops, SpaceOutliner)
|
||||
DNA_STRUCT_RENAME_ELEM(Camera, YF_dofdist, dof_distance)
|
||||
|
||||
#if 0
|
||||
DNA_STRUCT_RENAME(Lamp, Light)
|
||||
DNA_STRUCT_RENAME(SpaceOops, SpaceOutliner)
|
||||
DNA_STRUCT_RENAME_ELEM(Object, dup_group, instance_collection)
|
||||
#endif
|
||||
|
|
|
@ -2292,7 +2292,7 @@ static void rna_def_space_outliner(BlenderRNA *brna)
|
|||
};
|
||||
|
||||
srna = RNA_def_struct(brna, "SpaceOutliner", "Space");
|
||||
RNA_def_struct_sdna(srna, "SpaceOops");
|
||||
RNA_def_struct_sdna(srna, "SpaceOutliner");
|
||||
RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data");
|
||||
|
||||
prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
|
||||
|
|
Loading…
Reference in New Issue