瀏覽代碼

Use a type-hinted dictionary for AnimationLibrary's `libraries` property

This is done at a editor property hint level so that it doesn't break compatibility.
In other words, the actual `libraries` property exposed to the scripting API
remains an untyped Dictionary.
Hugo Locurcio 5 月之前
父節點
當前提交
006c9bb39a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/animation/animation_mixer.cpp

+ 1 - 1
scene/animation/animation_mixer.cpp

@@ -108,7 +108,7 @@ bool AnimationMixer::_get(const StringName &p_name, Variant &r_ret) const {
 
 
 void AnimationMixer::_get_property_list(List<PropertyInfo> *p_list) const {
 void AnimationMixer::_get_property_list(List<PropertyInfo> *p_list) const {
 	List<PropertyInfo> anim_names;
 	List<PropertyInfo> anim_names;
-	anim_names.push_back(PropertyInfo(Variant::DICTIONARY, PNAME("libraries")));
+	anim_names.push_back(PropertyInfo(Variant::DICTIONARY, PNAME("libraries"), PROPERTY_HINT_DICTIONARY_TYPE, "StringName;AnimationLibrary"));
 	for (const PropertyInfo &E : anim_names) {
 	for (const PropertyInfo &E : anim_names) {
 		p_list->push_back(E);
 		p_list->push_back(E);
 	}
 	}