diff options
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tree.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tree.c | 33 |
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 a03d9b6fb6d..6b24e83e8ee 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -372,9 +372,12 @@ 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]) ten1->name = str; - else if (target) ten1->name = target->id.name + 2; - else ten1->name = con->name; + if (str && str[0]) + ten1->name = str; + else if (target) + ten1->name = target->id.name + 2; + else + ten1->name = con->name; #endif ten1->name = con->name; ten1->directdata = con; @@ -434,9 +437,12 @@ 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]) ten->name = str; - else if (target) ten->name = target->id.name + 2; - else ten->name = con->name; + if (str && str[0]) + ten->name = str; + else if (target) + ten->name = target->id.name + 2; + else + ten->name = con->name; #endif ten->name = con->name; ten->directdata = con; @@ -1548,15 +1554,20 @@ 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) return 1; - else if (((Object *)x1->id)->type > ((Object *)x2->id)->type) return -1; - else return 0; + if (((Object *)x1->id)->type > ((Object *)x2->id)->type) + return 1; + else if (((Object *)x1->id)->type > ((Object *)x2->id)->type) + return -1; + else + return 0; } else { int comp = strcmp(x1->name, x2->name); - if (comp > 0) return 1; - else if (comp < 0) return -1; + if (comp > 0) + return 1; + else if (comp < 0) + return -1; return 0; } } |