|
|
@@ -418,6 +418,22 @@ float EditorInterface::get_editor_scale() const {
|
|
|
return EDSCALE;
|
|
|
}
|
|
|
|
|
|
+bool EditorInterface::is_node_3d_snap_enabled() const {
|
|
|
+ return Node3DEditor::get_singleton()->is_snap_enabled();
|
|
|
+}
|
|
|
+
|
|
|
+real_t EditorInterface::get_node_3d_translate_snap() const {
|
|
|
+ return Node3DEditor::get_singleton()->get_translate_snap();
|
|
|
+}
|
|
|
+
|
|
|
+real_t EditorInterface::get_node_3d_rotate_snap() const {
|
|
|
+ return Node3DEditor::get_singleton()->get_rotate_snap();
|
|
|
+}
|
|
|
+
|
|
|
+real_t EditorInterface::get_node_3d_scale_snap() const {
|
|
|
+ return Node3DEditor::get_singleton()->get_scale_snap();
|
|
|
+}
|
|
|
+
|
|
|
void EditorInterface::popup_dialog(Window *p_dialog, const Rect2i &p_screen_rect) {
|
|
|
p_dialog->popup_exclusive(EditorNode::get_singleton(), p_screen_rect);
|
|
|
}
|
|
|
@@ -807,6 +823,11 @@ void EditorInterface::_bind_methods() {
|
|
|
|
|
|
ClassDB::bind_method(D_METHOD("get_editor_scale"), &EditorInterface::get_editor_scale);
|
|
|
|
|
|
+ ClassDB::bind_method(D_METHOD("is_node_3d_snap_enabled"), &EditorInterface::is_node_3d_snap_enabled);
|
|
|
+ ClassDB::bind_method(D_METHOD("get_node_3d_translate_snap"), &EditorInterface::get_node_3d_translate_snap);
|
|
|
+ ClassDB::bind_method(D_METHOD("get_node_3d_rotate_snap"), &EditorInterface::get_node_3d_rotate_snap);
|
|
|
+ ClassDB::bind_method(D_METHOD("get_node_3d_scale_snap"), &EditorInterface::get_node_3d_scale_snap);
|
|
|
+
|
|
|
ClassDB::bind_method(D_METHOD("popup_dialog", "dialog", "rect"), &EditorInterface::popup_dialog, DEFVAL(Rect2i()));
|
|
|
ClassDB::bind_method(D_METHOD("popup_dialog_centered", "dialog", "minsize"), &EditorInterface::popup_dialog_centered, DEFVAL(Size2i()));
|
|
|
ClassDB::bind_method(D_METHOD("popup_dialog_centered_ratio", "dialog", "ratio"), &EditorInterface::popup_dialog_centered_ratio, DEFVAL(0.8));
|