mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 00:09:18 +02:00
do not edit root node
This commit is contained in:
@@ -42,7 +42,7 @@ basic_editor::translate( scene::basic_node *Node, glm::dvec3 const &Location, bo
|
|||||||
auto const translation { targetlocation - initiallocation };
|
auto const translation { targetlocation - initiallocation };
|
||||||
|
|
||||||
Node->mark_dirty();
|
Node->mark_dirty();
|
||||||
if( Node->group() == null_handle ) {
|
if( Node->group() <= 1 ) {
|
||||||
translate_node( Node, Node->location() + translation );
|
translate_node( Node, Node->location() + translation );
|
||||||
}
|
}
|
||||||
else {
|
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 distance { glm::length( location - glm::dvec3{ Global.pCamera.Pos } ) };
|
||||||
auto const offset { static_cast<float>( Offset * std::max( 1.0, distance * 0.01 ) ) };
|
auto const offset { static_cast<float>( Offset * std::max( 1.0, distance * 0.01 ) ) };
|
||||||
|
|
||||||
if( Node->group() == null_handle ) {
|
if( Node->group() <= 1 ) {
|
||||||
translate_node( Node, offset );
|
translate_node( Node, offset );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -153,7 +153,7 @@ basic_editor::rotate( scene::basic_node *Node, glm::vec3 const &Angle, float con
|
|||||||
rotation -= initialangle;
|
rotation -= initialangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( Node->group() == null_handle ) {
|
if( Node->group() <= 1 ) {
|
||||||
rotate_node( Node, rotation );
|
rotate_node( Node, rotation );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user