Merge pull request #10206 from endragor/show-base-nativescript-props
Allow to edit base type NativeScript properties
This commit is contained in:
commit
e93ce339dc
1 changed files with 5 additions and 7 deletions
|
@ -77,14 +77,12 @@ void NativeScript::_update_placeholder(PlaceHolderScriptInstance *p_placeholder)
|
||||||
ERR_FAIL_COND(!script_data);
|
ERR_FAIL_COND(!script_data);
|
||||||
|
|
||||||
List<PropertyInfo> info;
|
List<PropertyInfo> info;
|
||||||
|
get_script_property_list(&info);
|
||||||
Map<StringName, Variant> values;
|
Map<StringName, Variant> values;
|
||||||
|
for (List<PropertyInfo>::Element *E = info.front(); E; E = E->next()) {
|
||||||
for (Map<StringName, NativeScriptDesc::Property>::Element *E = script_data->properties.front(); E; E = E->next()) {
|
Variant value;
|
||||||
PropertyInfo p = E->get().info;
|
get_property_default_value(E->get().name, value);
|
||||||
p.name = String(E->key());
|
values[E->get().name] = value;
|
||||||
|
|
||||||
info.push_back(p);
|
|
||||||
values[p.name] = E->get().default_value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p_placeholder->update(info, values);
|
p_placeholder->update(info, values);
|
||||||
|
|
Loading…
Reference in a new issue