mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
More improvements to visual script..
fixed a bug of not saving when sub-nodes changed.
This commit is contained in:
parent
5567350e1b
commit
fc70824f7c
17 changed files with 171 additions and 29 deletions
|
@ -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) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue