diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/connections_dialog.cpp | 19 | ||||
-rw-r--r-- | editor/import/collada.cpp | 2 | ||||
-rw-r--r-- | editor/import/collada.h | 2 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_gizmos.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_gizmos.h | 2 |
5 files changed, 23 insertions, 4 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 0f8667f81a..c9d612d4dd 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -365,6 +365,24 @@ void ConnectDialog::init(ConnectionData p_cd, bool p_edit) { deferred->set_pressed(b_deferred); oneshot->set_pressed(b_oneshot); + + MethodInfo r_signal; + Ref<Script> source_script = source->get_script(); + if (source_script.is_valid() && source_script->has_script_signal(signal)) { + List<MethodInfo> signals; + source_script->get_script_signal_list(&signals); + for (MethodInfo &mi : signals) { + if (mi.name == signal) { + r_signal = mi; + break; + } + } + } else { + ClassDB::get_signal(source->get_class(), signal, &r_signal); + } + + unbind_count->set_max(r_signal.arguments.size()); + unbind_count->set_value(p_cd.unbinds); _unbind_count_changed(p_cd.unbinds); @@ -619,6 +637,7 @@ void ConnectionsDock::_make_or_edit_connection() { if (add_script_function) { // Pick up args here before "it" is deleted by update_tree. script_function_args = it->get_metadata(0).operator Dictionary()["args"]; + script_function_args.resize(script_function_args.size() - cd.unbinds); for (int i = 0; i < cd.binds.size(); i++) { script_function_args.push_back("extra_arg_" + itos(i) + ":" + Variant::get_type_name(cd.binds[i].get_type())); } diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp index f8c99ff7d4..af91ced570 100644 --- a/editor/import/collada.cpp +++ b/editor/import/collada.cpp @@ -122,7 +122,7 @@ static Transform3D _read_transform_from_array(const Vector<float> &array, int of /* STRUCTURES */ -Transform3D Collada::Node::compute_transform(Collada &state) const { +Transform3D Collada::Node::compute_transform(const Collada &state) const { Transform3D xform; for (int i = 0; i < xform_list.size(); i++) { diff --git a/editor/import/collada.h b/editor/import/collada.h index 85735e93ac..df2b789081 100644 --- a/editor/import/collada.h +++ b/editor/import/collada.h @@ -348,7 +348,7 @@ public: Node *parent = nullptr; - Transform3D compute_transform(Collada &state) const; + Transform3D compute_transform(const Collada &state) const; Transform3D get_global_transform() const; Transform3D get_transform() const; diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp index 179f78325c..47c8c66c57 100644 --- a/editor/plugins/node_3d_editor_gizmos.cpp +++ b/editor/plugins/node_3d_editor_gizmos.cpp @@ -476,7 +476,7 @@ void EditorNode3DGizmo::add_handles(const Vector<Vector3> &p_handles, const Ref< } } -void EditorNode3DGizmo::add_solid_box(Ref<Material> &p_material, Vector3 p_size, Vector3 p_position, const Transform3D &p_xform) { +void EditorNode3DGizmo::add_solid_box(const Ref<Material> &p_material, Vector3 p_size, Vector3 p_position, const Transform3D &p_xform) { ERR_FAIL_COND(!spatial_node); BoxMesh box_mesh; diff --git a/editor/plugins/node_3d_editor_gizmos.h b/editor/plugins/node_3d_editor_gizmos.h index 8adb753a51..f859ceda3b 100644 --- a/editor/plugins/node_3d_editor_gizmos.h +++ b/editor/plugins/node_3d_editor_gizmos.h @@ -99,7 +99,7 @@ public: void add_collision_triangles(const Ref<TriangleMesh> &p_tmesh); void add_unscaled_billboard(const Ref<Material> &p_material, real_t p_scale = 1, const Color &p_modulate = Color(1, 1, 1)); void add_handles(const Vector<Vector3> &p_handles, const Ref<Material> &p_material, const Vector<int> &p_ids = Vector<int>(), bool p_billboard = false, bool p_secondary = false); - void add_solid_box(Ref<Material> &p_material, Vector3 p_size, Vector3 p_position = Vector3(), const Transform3D &p_xform = Transform3D()); + void add_solid_box(const Ref<Material> &p_material, Vector3 p_size, Vector3 p_position = Vector3(), const Transform3D &p_xform = Transform3D()); virtual bool is_handle_highlighted(int p_id, bool p_secondary) const; virtual String get_handle_name(int p_id, bool p_secondary) const; |