|
@@ -34,12 +34,10 @@
|
|
#include "editor_node.h"
|
|
#include "editor_node.h"
|
|
|
|
|
|
bool MultiNodeEdit::_set(const StringName &p_name, const Variant &p_value) {
|
|
bool MultiNodeEdit::_set(const StringName &p_name, const Variant &p_value) {
|
|
-
|
|
|
|
return _set_impl(p_name, p_value, "");
|
|
return _set_impl(p_name, p_value, "");
|
|
}
|
|
}
|
|
|
|
|
|
bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value, const String &p_field) {
|
|
bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value, const String &p_field) {
|
|
-
|
|
|
|
Node *es = EditorNode::get_singleton()->get_edited_scene();
|
|
Node *es = EditorNode::get_singleton()->get_edited_scene();
|
|
if (!es)
|
|
if (!es)
|
|
return false;
|
|
return false;
|
|
@@ -88,7 +86,6 @@ bool MultiNodeEdit::_set_impl(const StringName &p_name, const Variant &p_value,
|
|
}
|
|
}
|
|
|
|
|
|
bool MultiNodeEdit::_get(const StringName &p_name, Variant &r_ret) const {
|
|
bool MultiNodeEdit::_get(const StringName &p_name, Variant &r_ret) const {
|
|
-
|
|
|
|
Node *es = EditorNode::get_singleton()->get_edited_scene();
|
|
Node *es = EditorNode::get_singleton()->get_edited_scene();
|
|
if (!es)
|
|
if (!es)
|
|
return false;
|
|
return false;
|
|
@@ -117,7 +114,6 @@ bool MultiNodeEdit::_get(const StringName &p_name, Variant &r_ret) const {
|
|
}
|
|
}
|
|
|
|
|
|
void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
-
|
|
|
|
HashMap<String, PLData> usage;
|
|
HashMap<String, PLData> usage;
|
|
|
|
|
|
Node *es = EditorNode::get_singleton()->get_edited_scene();
|
|
Node *es = EditorNode::get_singleton()->get_edited_scene();
|
|
@@ -171,17 +167,23 @@ void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {
|
|
}
|
|
}
|
|
|
|
|
|
void MultiNodeEdit::clear_nodes() {
|
|
void MultiNodeEdit::clear_nodes() {
|
|
-
|
|
|
|
nodes.clear();
|
|
nodes.clear();
|
|
}
|
|
}
|
|
|
|
|
|
void MultiNodeEdit::add_node(const NodePath &p_node) {
|
|
void MultiNodeEdit::add_node(const NodePath &p_node) {
|
|
-
|
|
|
|
nodes.push_back(p_node);
|
|
nodes.push_back(p_node);
|
|
}
|
|
}
|
|
|
|
|
|
-void MultiNodeEdit::set_property_field(const StringName &p_property, const Variant &p_value, const String &p_field) {
|
|
|
|
|
|
+int MultiNodeEdit::get_node_count() const {
|
|
|
|
+ return nodes.size();
|
|
|
|
+}
|
|
|
|
|
|
|
|
+NodePath MultiNodeEdit::get_node(int p_index) const {
|
|
|
|
+ ERR_FAIL_INDEX_V(p_index, nodes.size(), NodePath());
|
|
|
|
+ return nodes[p_index];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void MultiNodeEdit::set_property_field(const StringName &p_property, const Variant &p_value, const String &p_field) {
|
|
_set_impl(p_property, p_value, p_field);
|
|
_set_impl(p_property, p_value, p_field);
|
|
}
|
|
}
|
|
|
|
|