Browse Source

Fixing morph shape display in animation field selector

BearishSun 9 years ago
parent
commit
e1d6a55d7a
1 changed files with 4 additions and 1 deletions
  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 = 
                 Action<Element, bool> toggleCallback = 
                     (toggleParent, expand) =>
                     (toggleParent, expand) =>
                 {
                 {
-                    SerializableObject componentObject = new SerializableObject(childComponent.GetType(), null);
+                    SerializableObject componentObject = new SerializableObject(childComponent.GetType(), childComponent);
                     ToggleObjectFoldout(toggleParent, componentObject, expand);
                     ToggleObjectFoldout(toggleParent, componentObject, expand);
                 };
                 };
                 
                 
@@ -248,11 +248,14 @@ namespace BansheeEditor
             }
             }
 
 
             // Handle special fields
             // Handle special fields
+            Debug.Log("Type: " + serializableObject.Type);
             if (serializableObject.Type == typeof(Animation))
             if (serializableObject.Type == typeof(Animation))
             {
             {
                 Animation anim = serializableObject.Object as Animation;
                 Animation anim = serializableObject.Object as Animation;
+                Debug.Log("Anim: " + (anim != null));
                 MorphShapes morphShapes = anim?.SceneObject.GetComponent<Renderable>()?.Mesh?.MorphShapes;
                 MorphShapes morphShapes = anim?.SceneObject.GetComponent<Renderable>()?.Mesh?.MorphShapes;
 
 
+                Debug.Log("Shapes: " + (morphShapes != null));
                 if (morphShapes != null)
                 if (morphShapes != null)
                 {
                 {
                     string propertyPath = parent.path + "/MorphShapes";
                     string propertyPath = parent.path + "/MorphShapes";