From 7761813253555426ad8dff0752034044b94bba81 Mon Sep 17 00:00:00 2001 From: Turanszki Janos Date: Sun, 19 Jan 2020 15:02:31 +0000 Subject: [PATCH] editor fix: selectall caused animated model to blow up #76 --- Editor/Editor.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Editor/Editor.cpp b/Editor/Editor.cpp index aa6cefca3..449694e73 100644 --- a/Editor/Editor.cpp +++ b/Editor/Editor.cpp @@ -1175,9 +1175,15 @@ void EditorComponent::Update(float dt) selectAll = false; EndTranslate(); - for (size_t i = 0; i < scene.names.GetCount(); ++i) + for (size_t i = 0; i < scene.transforms.GetCount(); ++i) { - Entity entity = scene.names.GetEntity(i); + Entity entity = scene.transforms.GetEntity(i); + + if (scene.hierarchy.Contains(entity)) + { + // Parented animated objects don't work properly when attached to translator in bulk + continue; + } wiScene::PickResult picked; picked.entity = entity;