Make custom types more subtle and more useful
Implements #6067 (aaronfranke's idea) Fixes #26980
This commit is contained in:
@@ -499,7 +499,6 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i
|
||||
|
||||
for (int i = 0; i < get_custom_types()[p_inherits].size(); i++) {
|
||||
if (get_custom_types()[p_inherits][i].name == p_type) {
|
||||
Ref<Texture> icon = get_custom_types()[p_inherits][i].icon;
|
||||
Ref<Script> script = get_custom_types()[p_inherits][i].script;
|
||||
|
||||
Object *ob = ClassDB::instance(p_inherits);
|
||||
@@ -508,8 +507,6 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i
|
||||
ob->call("set_name", p_type);
|
||||
}
|
||||
ob->set_script(script.get_ref_ptr());
|
||||
if (icon.is_valid())
|
||||
ob->set_meta("_editor_icon", icon);
|
||||
return ob;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user