瀏覽代碼

AnimationMultiTrackKeyEdit Allow editing easing if it's possible for all edited tracks

(cherry picked from commit 1d890e16f754a8cd245879faca2f0c3cf57c6138)
kleonc 4 年之前
父節點
當前提交
5c36619bdd
共有 1 個文件被更改,包括 20 次插入24 次删除
  1. 20 24
      editor/animation_track_editor.cpp

+ 20 - 24
editor/animation_track_editor.cpp

@@ -1262,34 +1262,30 @@ public:
 					p_list->push_back(PropertyInfo(Variant::VECTOR3, "scale"));
 				} break;
 				case Animation::TYPE_VALUE: {
+					if (same_key_type) {
+						Variant v = animation->track_get_key_value(first_track, first_key);
 
-					if (!same_key_type)
-						break;
-
-					Variant v = animation->track_get_key_value(first_track, first_key);
-
-					if (hint.type != Variant::NIL) {
-
-						PropertyInfo pi = hint;
-						pi.name = "value";
-						p_list->push_back(pi);
-					} else {
-
-						PropertyHint hint = PROPERTY_HINT_NONE;
-						String hint_string;
-
-						if (v.get_type() == Variant::OBJECT) {
-							//could actually check the object property if exists..? yes i will!
-							Ref<Resource> res = v;
-							if (res.is_valid()) {
+						if (hint.type != Variant::NIL) {
+							PropertyInfo pi = hint;
+							pi.name = "value";
+							p_list->push_back(pi);
+						} else {
+							PropertyHint hint = PROPERTY_HINT_NONE;
+							String hint_string;
+
+							if (v.get_type() == Variant::OBJECT) {
+								//could actually check the object property if exists..? yes i will!
+								Ref<Resource> res = v;
+								if (res.is_valid()) {
+									hint = PROPERTY_HINT_RESOURCE_TYPE;
+									hint_string = res->get_class();
+								}
+							}
 
-								hint = PROPERTY_HINT_RESOURCE_TYPE;
-								hint_string = res->get_class();
+							if (v.get_type() != Variant::NIL) {
+								p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string));
 							}
 						}
-
-						if (v.get_type() != Variant::NIL)
-							p_list->push_back(PropertyInfo(v.get_type(), "value", hint, hint_string));
 					}
 
 					p_list->push_back(PropertyInfo(Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING));