More minor bugfixes (clear tint color before drawing gizmo, update camera orbit after moving selection)
This commit is contained in:
parent
566ad89d38
commit
aebb97c0f1
|
@ -85,6 +85,10 @@ void CGizmo::DrawAsset(ERenderOptions /*options*/, u32 asset, const SViewInfo& /
|
||||||
|
|
||||||
CGraphics::UpdateMVPBlock();
|
CGraphics::UpdateMVPBlock();
|
||||||
|
|
||||||
|
// Clear tint color
|
||||||
|
CGraphics::sPixelBlock.TintColor = CColor::skWhite.ToVector4f();
|
||||||
|
CGraphics::UpdatePixelBlock();
|
||||||
|
|
||||||
// Choose material set
|
// Choose material set
|
||||||
EGizmoAxes partAxes = pPart[asset].modelAxes;
|
EGizmoAxes partAxes = pPart[asset].modelAxes;
|
||||||
bool isHighlighted = (partAxes != eNone) && ((mSelectedAxes & partAxes) == pPart[asset].modelAxes);
|
bool isHighlighted = (partAxes != eNone) && ((mSelectedAxes & partAxes) == pPart[asset].modelAxes);
|
||||||
|
|
|
@ -113,7 +113,7 @@ void CSceneViewport::keyPressEvent(QKeyEvent* pEvent)
|
||||||
{
|
{
|
||||||
CBasicViewport::keyPressEvent(pEvent);
|
CBasicViewport::keyPressEvent(pEvent);
|
||||||
|
|
||||||
if (pEvent->key() == Qt::Key_Z)
|
if (!pEvent->modifiers() && pEvent->key() == Qt::Key_Z)
|
||||||
{
|
{
|
||||||
mCamera.SetMoveMode(eOrbitCamera);
|
mCamera.SetMoveMode(eOrbitCamera);
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,6 +198,9 @@ void CWorldEditor::UpdateGizmoUI()
|
||||||
mGizmo.SetLocalRotation(mSelection.front()->AbsoluteRotation());
|
mGizmo.SetLocalRotation(mSelection.front()->AbsoluteRotation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update camera orbit
|
||||||
|
UpdateCameraOrbit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWorldEditor::UpdateSelectionUI()
|
void CWorldEditor::UpdateSelectionUI()
|
||||||
|
@ -272,7 +275,7 @@ void CWorldEditor::UpdateCameraOrbit()
|
||||||
|
|
||||||
if (!mSelection.isEmpty())
|
if (!mSelection.isEmpty())
|
||||||
pCamera->SetOrbit(mSelectionBounds);
|
pCamera->SetOrbit(mSelectionBounds);
|
||||||
else
|
else if (mpArea)
|
||||||
pCamera->SetOrbit(mpArea->AABox(), 0.8f);
|
pCamera->SetOrbit(mpArea->AABox(), 0.8f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue