From 95734e32bfb9d4309e05a69e41aa1b1676d42447 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 7 Dec 2020 14:06:40 +0100 Subject: 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. --- source/blender/editors/space_outliner/outliner_tree.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to '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 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; - } } } } -- cgit v1.2.3