From 1ff3d5bc9ab7b296b1c60038d45ef4c030403162 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Tue, 14 Feb 2017 15:46:01 +0100 Subject: Layer Macros: create the instance as part of the macro Instead of pre-initializing an instance prior to the macro, we do it as part of the macro itself now. --- 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 d296a54d5d4..1ba33970aad 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -1724,7 +1724,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops if (sce == scene && show_opened) tselem->flag &= ~TSE_CLOSED; - Object *ob; FOREACH_SCENE_OBJECT(scene, ob) { ten = outliner_add_element(soops, &te->subtree, ob, te, 0, 0); @@ -1745,7 +1744,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops outliner_add_scene_contents(soops, &soops->tree, scene, NULL); - Object *ob; FOREACH_SCENE_OBJECT(scene, ob) { ten = outliner_add_element(soops, &soops->tree, ob, NULL, 0, 0); @@ -1754,7 +1752,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops outliner_make_hierarchy(&soops->tree); } else if (soops->outlinevis == SO_VISIBLE) { - Object *ob; FOREACH_VISIBLE_OBJECT(sl, ob) { outliner_add_element(soops, &soops->tree, ob, NULL, 0, 0); @@ -1782,7 +1779,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops else if (soops->outlinevis == SO_SAME_TYPE) { Object *ob_active = OBACT_NEW; if (ob_active) { - Object *ob; FOREACH_SCENE_OBJECT(scene, ob) { if (ob->type == ob_active->type) { @@ -1794,10 +1790,9 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops } } else if (soops->outlinevis == SO_SELECTED) { - Object *ob; FOREACH_SELECTED_OBJECT(sl, ob) { - ten = outliner_add_element(soops, &soops->tree, ob, NULL, 0, 0); + ten = outliner_add_element(soops, &soops->tree, ob, NULL, 0, 0); } FOREACH_SELECTED_OBJECT_END outliner_make_hierarchy(&soops->tree); -- cgit v1.2.3