Tighten editor scene mutation boundary
This commit is contained in:
@@ -282,6 +282,26 @@ public:
|
||||
return m_beforeSnapshot.IsValid();
|
||||
}
|
||||
|
||||
bool ApplyWorldTransformPreview(
|
||||
std::uint64_t entityId,
|
||||
const Vector3& position,
|
||||
const Quaternion& rotation) override {
|
||||
return m_sceneRuntime != nullptr &&
|
||||
m_sceneRuntime->ApplyTransformToolWorldPreview(
|
||||
entityId,
|
||||
position,
|
||||
rotation);
|
||||
}
|
||||
|
||||
bool ApplyLocalScalePreview(
|
||||
std::uint64_t entityId,
|
||||
const Vector3& localScale) override {
|
||||
return m_sceneRuntime != nullptr &&
|
||||
m_sceneRuntime->ApplyTransformToolLocalScalePreview(
|
||||
entityId,
|
||||
localScale);
|
||||
}
|
||||
|
||||
void FinalizeInteractiveChange() override {
|
||||
if (m_sceneRuntime == nullptr || !HasPendingInteractiveChange()) {
|
||||
return;
|
||||
@@ -536,13 +556,13 @@ bool SceneViewportTransformGizmo::UpdateDrag(EditorSceneRuntime& sceneRuntime) {
|
||||
state.rotateGizmo,
|
||||
state.scaleGizmo)) {
|
||||
case ActiveTransformGizmoKind::Move:
|
||||
state.moveGizmo.UpdateDrag(state.moveContext);
|
||||
state.moveGizmo.UpdateDrag(state.moveContext, state.undoBridge);
|
||||
return true;
|
||||
case ActiveTransformGizmoKind::Rotate:
|
||||
state.rotateGizmo.UpdateDrag(state.rotateContext);
|
||||
state.rotateGizmo.UpdateDrag(state.rotateContext, state.undoBridge);
|
||||
return true;
|
||||
case ActiveTransformGizmoKind::Scale:
|
||||
state.scaleGizmo.UpdateDrag(state.scaleContext);
|
||||
state.scaleGizmo.UpdateDrag(state.scaleContext, state.undoBridge);
|
||||
return true;
|
||||
case ActiveTransformGizmoKind::None:
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user