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:
authorCampbell Barton <ideasman42@gmail.com>2019-05-31 16:21:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-31 16:22:52 +0300
commitaba4e6810f8b4d0e459137b64e061a2cadc457d1 (patch)
tree2b6159c7ba0f23c020600b71276772fa4a882b5b /source/blender/editors/space_outliner/outliner_tree.c
parent72a563cdee8fef198a200ff65b57ddb847c01795 (diff)
Cleanup: style, use braces in source/ (include disabled blocks)
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 6da2e913003..4e4f25206a5 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -376,12 +376,15 @@ static void outliner_add_object_contents(SpaceOutliner *soops,
soops, &tenla1->subtree, ob, tenla1, TSE_CONSTRAINT, const_index);
#if 0 /* disabled as it needs to be reworked for recoded constraints system */
target = get_constraint_target(con, &str);
- if (str && str[0])
+ if (str && str[0]) {
ten1->name = str;
- else if (target)
+ }
+ else if (target) {
ten1->name = target->id.name + 2;
- else
+ }
+ else {
ten1->name = con->name;
+ }
#endif
ten1->name = con->name;
ten1->directdata = con;
@@ -441,12 +444,15 @@ static void outliner_add_object_contents(SpaceOutliner *soops,
ten = outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_CONSTRAINT, a);
#if 0 /* disabled due to constraints system targets recode... code here needs review */
target = get_constraint_target(con, &str);
- if (str && str[0])
+ if (str && str[0]) {
ten->name = str;
- else if (target)
+ }
+ else if (target) {
ten->name = target->id.name + 2;
- else
+ }
+ else {
ten->name = con->name;
+ }
#endif
ten->name = con->name;
ten->directdata = con;
@@ -1678,20 +1684,25 @@ static int treesort_obtype_alpha(const void *v1, const void *v2)
else {
/* 2nd we check ob type */
if (x1->idcode == ID_OB && x2->idcode == ID_OB) {
- if (((Object *)x1->id)->type > ((Object *)x2->id)->type)
+ if (((Object *)x1->id)->type > ((Object *)x2->id)->type) {
return 1;
- else if (((Object *)x1->id)->type > ((Object *)x2->id)->type)
+ }
+ else if (((Object *)x1->id)->type > ((Object *)x2->id)->type) {
return -1;
- else
+ }
+ else {
return 0;
+ }
}
else {
int comp = strcmp(x1->name, x2->name);
- if (comp > 0)
+ if (comp > 0) {
return 1;
- else if (comp < 0)
+ }
+ else if (comp < 0) {
return -1;
+ }
return 0;
}
}