[Bf-blender-cvs] [04f969627dc] soc-2020-outliner: Outliner: Sort bones alphabetically

Nathan Craddock noreply at git.blender.org
Wed Jul 22 22:52:57 CEST 2020


Commit: 04f969627dc7816ff03b8c71ea59fdb9bfb0ff37
Author: Nathan Craddock
Date:   Wed Jul 22 14:48:17 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB04f969627dc7816ff03b8c71ea59fdb9bfb0ff37

Outliner: Sort bones alphabetically

===================================================================

M	source/blender/editors/space_outliner/outliner_tree.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 90ad8b95273..e5e90ac3d21 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1957,7 +1957,8 @@ static void outliner_collections_children_sort(ListBase *lb)
 static bool outliner_is_sort_item(TreeElement *te)
 {
   TreeStoreElem *tselem = TREESTORE(te);
-  return (tselem->type == 0 && te->idcode == ID_OB) || outliner_is_collection_tree_element(te);
+  return (tselem->type == 0 && te->idcode == ID_OB) || outliner_is_collection_tree_element(te) ||
+         (ELEM(tselem->type, TSE_BONE, TSE_EBONE, TSE_POSE_CHANNEL));
 }
 
 /* Sort collections and objects separately on each outliner subtree. */
@@ -1968,7 +1969,7 @@ static void outliner_tree_sort(SpaceOutliner *soops, ListBase *tree)
   }
 
   TreeElement *te_last = tree->last;
-  TreeStoreElem *tselem = TREESTORE(te_last);
+  TreeStoreElem *tselem;
 
   /* Only sort collections and objects */
   if (outliner_is_sort_item(te_last)) {



More information about the Bf-blender-cvs mailing list