2.5
authorJoshua Leung <aligorith@gmail.com>
Mon, 11 May 2009 02:26:18 +0000 (02:26 +0000)
committerJoshua Leung <aligorith@gmail.com>
Mon, 11 May 2009 02:26:18 +0000 (02:26 +0000)
* Broke compiling on previous fix...
* Starting fix for nestled structs...

source/blender/editors/animation/keyframing.c
source/blender/makesrna/intern/rna_access.c

index f7a16f63691163ae957831ab7581ba059e6d09d4..fb85099bf587573fe0ff424efcaf0ad3267e06e2 100644 (file)
@@ -29,6 +29,7 @@
 #include "BKE_action.h"
 #include "BKE_constraint.h"
 #include "BKE_fcurve.h"
+#include "BKE_global.h"
 #include "BKE_utildefines.h"
 #include "BKE_context.h"
 #include "BKE_report.h"
index 4d2302f1c067d3da9388a46e292039923a76f93b..fe6f4c13d9b63d31d77f299ba4ac234b218ff1a6 100644 (file)
@@ -1718,10 +1718,18 @@ char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
                return NULL;
        
        if(!RNA_struct_is_ID(ptr->type)) {
-               if(ptr->type->path)
-                       ptrpath= ptr->type->path(ptr);
-               else
-                       return NULL;
+               if(ptr->type && ptr->type->nested) {
+                       //StructRNA *nestedType= ptr->type->nested;
+                       
+                       printf("RNA - struct is nested \n");
+                       // TODO: how do we get the identifier of the way this is nested into the main?
+               }
+               else {
+                       if(ptr->type->path)
+                               ptrpath= ptr->type->path(ptr);
+                       else
+                               return NULL;
+               }
        }
 
        propname= RNA_property_identifier(prop);