Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Craddock <nzcraddock@gmail.com>2020-08-07 20:47:23 +0300
committerNathan Craddock <nzcraddock@gmail.com>2020-08-07 20:49:58 +0300
commit915cc956baff85d47387736ab367ab3774ee3353 (patch)
tree13b33fe57adc9f2818d19fd18595aac9f805c572 /source/blender/editors/space_outliner/outliner_utils.c
parent2597c12b0c103ec922d1ec5ff912dbd9d691f1b3 (diff)
Cleanup: Rename soops to space_outliner
No functional changes. Rename soops, soutliner, and so to space_outliner.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_utils.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_utils.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c
index 9accf35784a..1da44b5e51e 100644
--- a/source/blender/editors/space_outliner/outliner_utils.c
+++ b/source/blender/editors/space_outliner/outliner_utils.c
@@ -74,7 +74,7 @@ void outliner_viewcontext_init(const bContext *C, TreeViewContext *tvc)
* Try to find an item under y-coordinate \a view_co_y (view-space).
* \note Recursive
*/
-TreeElement *outliner_find_item_at_y(const SpaceOutliner *soops,
+TreeElement *outliner_find_item_at_y(const SpaceOutliner *space_outliner,
const ListBase *tree,
float view_co_y)
{
@@ -85,7 +85,8 @@ TreeElement *outliner_find_item_at_y(const SpaceOutliner *soops,
return te_iter;
}
- if (BLI_listbase_is_empty(&te_iter->subtree) || !TSELEM_OPEN(TREESTORE(te_iter), soops)) {
+ if (BLI_listbase_is_empty(&te_iter->subtree) ||
+ !TSELEM_OPEN(TREESTORE(te_iter), space_outliner)) {
/* No need for recursion. */
continue;
}
@@ -99,7 +100,7 @@ TreeElement *outliner_find_item_at_y(const SpaceOutliner *soops,
/* co_y is lower than current element (but not lower than the next one), possibly inside
* children */
- TreeElement *te_sub = outliner_find_item_at_y(soops, &te_iter->subtree, view_co_y);
+ TreeElement *te_sub = outliner_find_item_at_y(space_outliner, &te_iter->subtree, view_co_y);
if (te_sub) {
return te_sub;
}
@@ -147,13 +148,13 @@ static TreeElement *outliner_find_item_at_x_in_row_recursive(const TreeElement *
*
* \return a hovered child item or \a parent_te (if no hovered child found).
*/
-TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *soops,
+TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner,
const TreeElement *parent_te,
float view_co_x,
bool *r_merged)
{
/* if parent_te is opened, it doesn't show children in row */
- if (!TSELEM_OPEN(TREESTORE(parent_te), soops)) {
+ if (!TSELEM_OPEN(TREESTORE(parent_te), space_outliner)) {
return outliner_find_item_at_x_in_row_recursive(parent_te, view_co_x, r_merged);
}
@@ -196,7 +197,7 @@ TreeElement *outliner_find_parent_element(ListBase *lb,
}
/* tse is not in the treestore, we use its contents to find a match */
-TreeElement *outliner_find_tse(SpaceOutliner *soops, const TreeStoreElem *tse)
+TreeElement *outliner_find_tse(SpaceOutliner *space_outliner, const TreeStoreElem *tse)
{
TreeStoreElem *tselem;
@@ -205,16 +206,16 @@ TreeElement *outliner_find_tse(SpaceOutliner *soops, const TreeStoreElem *tse)
}
/* check if 'tse' is in treestore */
- tselem = BKE_outliner_treehash_lookup_any(soops->treehash, tse->type, tse->nr, tse->id);
+ tselem = BKE_outliner_treehash_lookup_any(space_outliner->treehash, tse->type, tse->nr, tse->id);
if (tselem) {
- return outliner_find_tree_element(&soops->tree, tselem);
+ return outliner_find_tree_element(&space_outliner->tree, tselem);
}
return NULL;
}
/* Find treestore that refers to given ID */
-TreeElement *outliner_find_id(SpaceOutliner *soops, ListBase *lb, const ID *id)
+TreeElement *outliner_find_id(SpaceOutliner *space_outliner, ListBase *lb, const ID *id)
{
LISTBASE_FOREACH (TreeElement *, te, lb) {
TreeStoreElem *tselem = TREESTORE(te);
@@ -224,7 +225,7 @@ TreeElement *outliner_find_id(SpaceOutliner *soops, ListBase *lb, const ID *id)
}
}
- TreeElement *tes = outliner_find_id(soops, &te->subtree, id);
+ TreeElement *tes = outliner_find_id(space_outliner, &te->subtree, id);
if (tes) {
return tes;
}
@@ -304,7 +305,7 @@ ID *outliner_search_back(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 SpaceOutliner *soops,
+bool outliner_tree_traverse(const SpaceOutliner *space_outliner,
ListBase *tree,
int filter_te_flag,
int filter_tselem_flag,
@@ -337,7 +338,7 @@ bool outliner_tree_traverse(const SpaceOutliner *soops,
/* skip */
}
else if (!outliner_tree_traverse(
- soops, &subtree, filter_te_flag, filter_tselem_flag, func, customdata)) {
+ space_outliner, &subtree, filter_te_flag, filter_tselem_flag, func, customdata)) {
return false;
}
}
@@ -345,11 +346,11 @@ bool outliner_tree_traverse(const SpaceOutliner *soops,
return true;
}
-float outliner_restrict_columns_width(const SpaceOutliner *soops)
+float outliner_restrict_columns_width(const SpaceOutliner *space_outliner)
{
int num_columns = 0;
- switch (soops->outlinevis) {
+ switch (space_outliner->outlinevis) {
case SO_DATA_API:
case SO_SEQUENCE:
case SO_LIBRARIES:
@@ -358,24 +359,24 @@ float outliner_restrict_columns_width(const SpaceOutliner *soops)
num_columns = 3;
break;
case SO_VIEW_LAYER:
- if (soops->show_restrict_flags & SO_RESTRICT_HOLDOUT) {
+ if (space_outliner->show_restrict_flags & SO_RESTRICT_HOLDOUT) {
num_columns++;
}
- if (soops->show_restrict_flags & SO_RESTRICT_INDIRECT_ONLY) {
+ if (space_outliner->show_restrict_flags & SO_RESTRICT_INDIRECT_ONLY) {
num_columns++;
}
ATTR_FALLTHROUGH;
case SO_SCENES:
- if (soops->show_restrict_flags & SO_RESTRICT_SELECT) {
+ if (space_outliner->show_restrict_flags & SO_RESTRICT_SELECT) {
num_columns++;
}
- if (soops->show_restrict_flags & SO_RESTRICT_HIDE) {
+ if (space_outliner->show_restrict_flags & SO_RESTRICT_HIDE) {
num_columns++;
}
- if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) {
+ if (space_outliner->show_restrict_flags & SO_RESTRICT_VIEWPORT) {
num_columns++;
}
- if (soops->show_restrict_flags & SO_RESTRICT_RENDER) {
+ if (space_outliner->show_restrict_flags & SO_RESTRICT_RENDER) {
num_columns++;
}
break;
@@ -459,14 +460,14 @@ Base *ED_outliner_give_base_under_cursor(bContext *C, const int mval[2])
{
ARegion *region = CTX_wm_region(C);
ViewLayer *view_layer = CTX_data_view_layer(C);
- SpaceOutliner *soops = CTX_wm_space_outliner(C);
+ SpaceOutliner *space_outliner = CTX_wm_space_outliner(C);
TreeElement *te;
Base *base = NULL;
float view_mval[2];
UI_view2d_region_to_view(&region->v2d, mval[0], mval[1], &view_mval[0], &view_mval[1]);
- te = outliner_find_item_at_y(soops, &soops->tree, view_mval[1]);
+ te = outliner_find_item_at_y(space_outliner, &space_outliner->tree, view_mval[1]);
if (te) {
TreeStoreElem *tselem = TREESTORE(te);
if (tselem->type == 0) {