You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
More improvements to visual script..
fixed a bug of not saving when sub-nodes changed.
This commit is contained in:
@@ -907,6 +907,9 @@ void VisualScript::_update_placeholders() {
|
||||
|
||||
for (Map<StringName,Variable>::Element *E=variables.front();E;E=E->next()) {
|
||||
|
||||
if (!E->get()._export)
|
||||
continue;
|
||||
|
||||
PropertyInfo p = E->get().info;
|
||||
p.name=SCRIPT_VARIABLES_PREFIX+String(E->key());
|
||||
pinfo.push_back(p);
|
||||
@@ -940,6 +943,9 @@ ScriptInstance* VisualScript::instance_create(Object *p_this) {
|
||||
|
||||
for (Map<StringName,Variable>::Element *E=variables.front();E;E=E->next()) {
|
||||
|
||||
if (!E->get()._export)
|
||||
continue;
|
||||
|
||||
PropertyInfo p = E->get().info;
|
||||
p.name=SCRIPT_VARIABLES_PREFIX+String(E->key());
|
||||
pinfo.push_back(p);
|
||||
@@ -1110,6 +1116,20 @@ void VisualScript::get_script_property_list(List<PropertyInfo> *p_list) const {
|
||||
}
|
||||
}
|
||||
|
||||
bool VisualScript::are_subnodes_edited() const {
|
||||
|
||||
for(const Map<StringName,Function>::Element *E=functions.front();E;E=E->next()) {
|
||||
|
||||
for (const Map<int,Function::NodeData>::Element *F=E->get().nodes.front();F;F=F->next()) {
|
||||
if (F->get().node->is_edited()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void VisualScript::_set_data(const Dictionary& p_data) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user