From 09e4672f0d1e56b7cbd70c479192a1d5a5c1a6de Mon Sep 17 00:00:00 2001 From: Jason Knight Date: Sun, 20 Mar 2022 07:57:31 -0600 Subject: [PATCH] Bind NOTIFICATION_LOCAL_TRANFORM_CHANGED --- doc/classes/CanvasItem.xml | 9 ++++++--- scene/2d/canvas_item.cpp | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 290be894541..728e2142f6b 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -384,14 +384,14 @@ - If [code]enable[/code] is [code]true[/code], children will be updated with local transform data. + If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes. - If [code]enable[/code] is [code]true[/code], children will be updated with global transform data. + If [code]enable[/code] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes. @@ -476,7 +476,10 @@ Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied. - The [CanvasItem]'s transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform]. + The [CanvasItem]'s global transform has changed. This notification is only received if enabled by [method set_notify_transform]. + + + The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform]. The [CanvasItem] is requested to draw. diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 936ec558d1b..658861e9c10 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1199,6 +1199,7 @@ void CanvasItem::_bind_methods() { BIND_ENUM_CONSTANT(BLEND_MODE_DISABLED); BIND_CONSTANT(NOTIFICATION_TRANSFORM_CHANGED); + BIND_CONSTANT(NOTIFICATION_LOCAL_TRANSFORM_CHANGED); BIND_CONSTANT(NOTIFICATION_DRAW); BIND_CONSTANT(NOTIFICATION_VISIBILITY_CHANGED); BIND_CONSTANT(NOTIFICATION_ENTER_CANVAS);