Commit 0e6495d3 authored by Jan Möbius's avatar Jan Möbius

Fixed Move Plugin for unifying bounding box, Fixed bug with bad normals after scaling object

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6643 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1175e3e1
......@@ -1166,12 +1166,12 @@ void MovePlugin::slotMoveToOrigin() {
*/
void MovePlugin::slotUnifyBoundingBoxDiagonal()
{
if ( allTargets_ ) {
if ( tool_->targetObjects->isChecked() ) {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
if ( o_it->dataType( DATA_TRIANGLE_MESH ) )
unifyBBDiag(*PluginFunctions::triMesh(*o_it));
else if ( o_it->dataType( DATA_POLY_MESH ) )
unifyBBDiag(*PluginFunctions::polyMesh(*o_it));
unifyBBDiag(*PluginFunctions::polyMesh(*o_it));
emit updatedObject( o_it->id() );
......@@ -1425,6 +1425,8 @@ void MovePlugin::unifyBBDiag(MeshT& _mesh )
_mesh.point(v_it) = (_mesh.point(v_it) - bb_center) * scale + bb_center;
}
_mesh.update_normals();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment