소스 검색

Fixing morph shape display in animation field selector

BearishSun 9 년 전
부모
커밋
e1d6a55d7a
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      Source/MBansheeEditor/Windows/Animation/GUIFieldSelector.cs

+ 4 - 1
Source/MBansheeEditor/Windows/Animation/GUIFieldSelector.cs

@@ -139,7 +139,7 @@ namespace BansheeEditor
                 Action<Element, bool> toggleCallback = 
                     (toggleParent, expand) =>
                 {
-                    SerializableObject componentObject = new SerializableObject(childComponent.GetType(), null);
+                    SerializableObject componentObject = new SerializableObject(childComponent.GetType(), childComponent);
                     ToggleObjectFoldout(toggleParent, componentObject, expand);
                 };
                 
@@ -248,11 +248,14 @@ namespace BansheeEditor
             }
 
             // Handle special fields
+            Debug.Log("Type: " + serializableObject.Type);
             if (serializableObject.Type == typeof(Animation))
             {
                 Animation anim = serializableObject.Object as Animation;
+                Debug.Log("Anim: " + (anim != null));
                 MorphShapes morphShapes = anim?.SceneObject.GetComponent<Renderable>()?.Mesh?.MorphShapes;
 
+                Debug.Log("Shapes: " + (morphShapes != null));
                 if (morphShapes != null)
                 {
                     string propertyPath = parent.path + "/MorphShapes";