|
@@ -1169,6 +1169,7 @@ void CanvasItem::_bind_methods() {
|
|
|
ClassDB::bind_method(D_METHOD("get_local_mouse_position"), &CanvasItem::get_local_mouse_position);
|
|
|
ClassDB::bind_method(D_METHOD("get_global_mouse_position"), &CanvasItem::get_global_mouse_position);
|
|
|
ClassDB::bind_method(D_METHOD("get_canvas"), &CanvasItem::get_canvas);
|
|
|
+ ClassDB::bind_method(D_METHOD("get_canvas_layer_node"), &CanvasItem::get_canvas_layer_node);
|
|
|
ClassDB::bind_method(D_METHOD("get_world_2d"), &CanvasItem::get_world_2d);
|
|
|
//ClassDB::bind_method(D_METHOD("get_viewport"),&CanvasItem::get_viewport);
|
|
|
|
|
@@ -1325,6 +1326,11 @@ int CanvasItem::get_canvas_layer() const {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+CanvasLayer *CanvasItem::get_canvas_layer_node() const {
|
|
|
+ ERR_READ_THREAD_GUARD_V(nullptr);
|
|
|
+ return canvas_layer;
|
|
|
+}
|
|
|
+
|
|
|
void CanvasItem::set_visibility_layer(uint32_t p_visibility_layer) {
|
|
|
ERR_THREAD_GUARD;
|
|
|
visibility_layer = p_visibility_layer;
|