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:
authorJulian Eisel <julian@blender.org>2020-12-07 16:06:40 +0300
committerJulian Eisel <julian@blender.org>2020-12-07 16:35:54 +0300
commit95734e32bfb9d4309e05a69e41aa1b1676d42447 (patch)
tree6ca39f01d8917012191352f03c4684b4a71a4c8d
parent0c0bc619181419a3005faf034706d77ef24457e6 (diff)
Cleanup: Avoid setting (unsafe) Outliner tree element data that won't be used
I carefully checked and am quite sure for `TSE_ANIMATION_DATA` and `TSE_NLA_ACTION` the direct-data isn't used at all. This data is stored and accessed in unsafe ways based on conventions anyway (`void *`). We should aim for a safer design but it will be difficult to get there. Any removed complexity will help.
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 811aaa1ba2e..a02a8441620 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1008,7 +1008,6 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
/* this element's info */
te->name = IFACE_("Animation");
- te->directdata = adt;
/* Action */
outliner_add_element(space_outliner, &te->subtree, adt->action, te, 0, 0);
@@ -1055,17 +1054,13 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner,
TreeElement *tenlt = outliner_add_element(
space_outliner, &tenla->subtree, nlt, tenla, TSE_NLA_TRACK, a);
NlaStrip *strip;
- TreeElement *ten;
int b = 0;
tenlt->name = nlt->name;
for (strip = nlt->strips.first; strip; strip = strip->next, b++) {
- ten = outliner_add_element(
+ outliner_add_element(
space_outliner, &tenlt->subtree, strip->act, tenlt, TSE_NLA_ACTION, b);
- if (ten) {
- ten->directdata = strip;
- }
}
}
}