You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Update transform property in the inspector when changing translation/rotation/scale
This commit is contained in:
@@ -322,6 +322,7 @@ Transform Spatial::get_relative_transform(const Node *p_parent) const {
|
|||||||
void Spatial::set_translation(const Vector3 &p_translation) {
|
void Spatial::set_translation(const Vector3 &p_translation) {
|
||||||
|
|
||||||
data.local_transform.origin = p_translation;
|
data.local_transform.origin = p_translation;
|
||||||
|
_change_notify("transform");
|
||||||
_propagate_transform_changed(this);
|
_propagate_transform_changed(this);
|
||||||
if (data.notify_local_transform) {
|
if (data.notify_local_transform) {
|
||||||
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
|
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
|
||||||
@@ -337,6 +338,7 @@ void Spatial::set_rotation(const Vector3 &p_euler_rad) {
|
|||||||
|
|
||||||
data.rotation = p_euler_rad;
|
data.rotation = p_euler_rad;
|
||||||
data.dirty |= DIRTY_LOCAL;
|
data.dirty |= DIRTY_LOCAL;
|
||||||
|
_change_notify("transform");
|
||||||
_propagate_transform_changed(this);
|
_propagate_transform_changed(this);
|
||||||
if (data.notify_local_transform) {
|
if (data.notify_local_transform) {
|
||||||
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
|
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
|
||||||
@@ -357,6 +359,7 @@ void Spatial::set_scale(const Vector3 &p_scale) {
|
|||||||
|
|
||||||
data.scale = p_scale;
|
data.scale = p_scale;
|
||||||
data.dirty |= DIRTY_LOCAL;
|
data.dirty |= DIRTY_LOCAL;
|
||||||
|
_change_notify("transform");
|
||||||
_propagate_transform_changed(this);
|
_propagate_transform_changed(this);
|
||||||
if (data.notify_local_transform) {
|
if (data.notify_local_transform) {
|
||||||
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
|
notification(NOTIFICATION_LOCAL_TRANSFORM_CHANGED);
|
||||||
|
|||||||
Reference in New Issue
Block a user