MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / instantiate_object_properties

Method instantiate_object_properties

editor/editor_data.cpp:603–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601}
602
603void EditorData::instantiate_object_properties(Object *p_object) {
604 ERR_FAIL_NULL(p_object);
605 // Check if any Object-type property should be instantiated.
606 List<PropertyInfo> pinfo;
607 p_object->get_property_list(&pinfo);
608
609 for (const PropertyInfo &pi : pinfo) {
610 if (pi.type == Variant::OBJECT && pi.usage & PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT) {
611 Object *prop = ClassDB::instantiate(pi.class_name);
612 p_object->set(pi.name, prop);
613 }
614 }
615}
616
617int EditorData::add_edited_scene(int p_at_pos) {
618 if (p_at_pos < 0) {

Callers 3

_edit_menu_cbkMethod · 0.80
_replace_nodeMethod · 0.80
instantiate_selectedMethod · 0.80

Calls 2

get_property_listMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected