Remove error condition from get_global_transform()

(cherry picked from commit 2ff676a696)
This commit is contained in:
kobewi 2022-10-21 14:20:57 +02:00 committed by Haoyu Qiu
parent 21856280fa
commit 2f13adbdb6
2 changed files with 1 additions and 4 deletions

View file

@ -301,7 +301,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 is top-level. See also [method set_as_toplevel].
</description>
</method>
<method name="get_global_transform_with_canvas" qualifiers="const">

View file

@ -475,9 +475,6 @@ Transform2D CanvasItem::get_global_transform_with_canvas() 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) {