mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Import/export GLTF extras to node->meta
This is useful for custom tagging of objects with properties (for example in Blender) and having this available in the editor for scripting. - Adds import logic to propagate the parsed GLTF extras all the way to the resulting Node->meta - Adds export logic to save Godot Object meta into GLTF extras - Supports `nodes`, `meshes` and `materials` (in GLTF sense of the words)
This commit is contained in:
@@ -1023,6 +1023,14 @@ void Object::remove_meta(const StringName &p_name) {
|
||||
set_meta(p_name, Variant());
|
||||
}
|
||||
|
||||
void Object::merge_meta_from(const Object *p_src) {
|
||||
List<StringName> meta_keys;
|
||||
p_src->get_meta_list(&meta_keys);
|
||||
for (const StringName &key : meta_keys) {
|
||||
set_meta(key, p_src->get_meta(key));
|
||||
}
|
||||
}
|
||||
|
||||
TypedArray<Dictionary> Object::_get_property_list_bind() const {
|
||||
List<PropertyInfo> lpi;
|
||||
get_property_list(&lpi);
|
||||
|
||||
Reference in New Issue
Block a user