From f042eaf6b403d86ea19fee58319bf4d1ce80c8e2 Mon Sep 17 00:00:00 2001 From: milek7 Date: Wed, 28 Oct 2020 02:33:50 +0100 Subject: [PATCH] do not edit root node --- sceneeditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sceneeditor.cpp b/sceneeditor.cpp index 82fd6150..2f88b63f 100644 --- a/sceneeditor.cpp +++ b/sceneeditor.cpp @@ -42,7 +42,7 @@ basic_editor::translate( scene::basic_node *Node, glm::dvec3 const &Location, bo auto const translation { targetlocation - initiallocation }; Node->mark_dirty(); - if( Node->group() == null_handle ) { + if( Node->group() <= 1 ) { translate_node( Node, Node->location() + translation ); } else { @@ -65,7 +65,7 @@ basic_editor::translate( scene::basic_node *Node, float const Offset ) { auto const distance { glm::length( location - glm::dvec3{ Global.pCamera.Pos } ) }; auto const offset { static_cast( Offset * std::max( 1.0, distance * 0.01 ) ) }; - if( Node->group() == null_handle ) { + if( Node->group() <= 1 ) { translate_node( Node, offset ); } else { @@ -153,7 +153,7 @@ basic_editor::rotate( scene::basic_node *Node, glm::vec3 const &Angle, float con rotation -= initialangle; } - if( Node->group() == null_handle ) { + if( Node->group() <= 1 ) { rotate_node( Node, rotation ); } else {