diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-07-03 17:50:10 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-07-07 16:49:23 +0300 |
commit | 92c9bdbbb9d506e5f8a3d8877fbe018ff8a7b599 (patch) | |
tree | 03b3873c52855673dc08247cd6fb3e335a9d256e /source/blender/makesrna/intern/rna_action.c | |
parent | 2910e288ab920446e7caebb0f56caea6d17d6d47 (diff) |
Animation Editors: Object datablocks are now sorted alphabetically by default
A long requested feature has been to have objects appear in alphabetical order
in the animation editors, so that it is easier to find where they occur. This
commit implements support for this.
The main sticking point has been the performance impact of having this sorting
happening all the time (as the actual list of "bases" cannot be modified, as the
old depsgraph still needs random-looking unsorted order of objects for scheduling
updates). However, it recently occurred to me that perhaps by restricting it to
the one case where the ordering actually matters (i.e. when we're getting the channel
list for drawing all channels, vs operating on them), and adding a toggle to turn the
sorting off in heavy scenes when it might bog down things, that it will probably
be acceptable enough in general. Furthermore, if things get really bad, we can investigate
putting in place some sort of caching scheme for this too - though hopefully the
new depsgraph will make that unnecessary (i.e. it doesn't sort the bases directly anymore).
Diffstat (limited to 'source/blender/makesrna/intern/rna_action.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_action.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index 7c21ce95a1d..907ee8ba1c7 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -308,6 +308,13 @@ static void rna_def_dopesheet(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_GHOST_ENABLED, 0); RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); + prop = RNA_def_property(srna, "use_datablock_sorting", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", ADS_FLAG_NO_DB_SORT); + RNA_def_property_ui_text(prop, "Sort Datablocks", + "Alphabetically sorts datablocks - mainly objects in the scene (disable to increase viewport speed)"); + RNA_def_property_ui_icon(prop, ICON_SORTALPHA, 0); + RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); + /* Debug Filtering Settings */ prop = RNA_def_property(srna, "show_only_errors", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "filterflag", ADS_FILTER_ONLY_ERRORS); |