diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 11:59:08 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 11:59:08 +0100 |
commit | 71a6aba3d77cd6f400135082264513f08581bd4c (patch) | |
tree | 8445d2770a7909278b0932985037fdc373270e3c | |
parent | 1211f9d9b67621ee8cfa1b9f70308c97087507ab (diff) | |
parent | 2ff676a696a9cc1d77c0a8f4d5f31de8c7b5bc1a (diff) |
Merge pull request #67710 from KoBeWi/a_bit_local_global_transform
Remove error condition from get_global_transform()
-rw-r--r-- | doc/classes/CanvasItem.xml | 2 | ||||
-rw-r--r-- | scene/main/canvas_item.cpp | 3 |
2 files changed, 1 insertions, 4 deletions
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index b2d3e5cfdb..34837478f4 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -416,7 +416,7 @@ <method name="get_global_transform" qualifiers="const"> <return type="Transform2D" /> <description> - Returns the global transform matrix of this item. + Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it has [member top_level] enabled. </description> </method> <method name="get_global_transform_with_canvas" qualifiers="const"> diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp index 840913d466..0d3389c13d 100644 --- a/scene/main/canvas_item.cpp +++ b/scene/main/canvas_item.cpp @@ -168,9 +168,6 @@ Transform2D CanvasItem::get_screen_transform() const { } Transform2D CanvasItem::get_global_transform() const { -#ifdef DEBUG_ENABLED - ERR_FAIL_COND_V(!is_inside_tree(), get_transform()); -#endif if (global_invalid) { const CanvasItem *pi = get_parent_item(); if (pi) { |