active property for collections for things like scene.objects.active
[blender.git] / source / blender / makesrna / intern / makesrna.c
index b16a0f00fd27b18dd643163bb1153dff10b23cd4..6689cda3f2b954d7b19b4dcaf16a6ddccaef1f3c 100644 (file)
@@ -1834,6 +1834,9 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                                else fprintf(f, "NULL, ");
                                if(cprop->remove) fprintf(f, "&rna_%s_%s_func, ", srna->identifier, (char*)cprop->remove);
                                else fprintf(f, "NULL, ");
+
+                               if(cprop->active) fprintf(f, "(PropertyRNA*)&rna_%s%s_%s, ", srna->identifier, strnest, cprop->active->identifier);
+
                                if(cprop->type) fprintf(f, "&RNA_%s\n", (char*)cprop->type);
                                else fprintf(f, "NULL\n");
                                break;