Revision: 20931
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20931
Author:   kazanbas
Date:     2009-06-16 15:57:28 +0200 (Tue, 16 Jun 2009)

Log Message:
-----------
Just added another param to RNA_def_property_collection_funcs 
and zeroed it in each call.

Modified Paths:
--------------
    branches/soc-2009-kazanbas/source/blender/makesrna/RNA_define.h
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_color.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_define.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_group.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_internal.h
    
branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_internal_types.h
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_key.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_lattice.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_main.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_material.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_mesh.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_object.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_rna.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_sequence.c

Modified: branches/soc-2009-kazanbas/source/blender/makesrna/RNA_define.h
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/RNA_define.h     
2009-06-16 13:27:12 UTC (rev 20930)
+++ branches/soc-2009-kazanbas/source/blender/makesrna/RNA_define.h     
2009-06-16 13:57:28 UTC (rev 20931)
@@ -146,7 +146,7 @@
 void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const 
char *set, const char *item);
 void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const 
char *length, const char *set);
 void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const 
char *set, const char *typef);
-void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, 
const char *next, const char *end, const char *get, const char *length, const 
char *lookupint, const char *lookupstring);
+void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, 
const char *next, const char *end, const char *get, const char *length, const 
char *lookupint, const char *lookupstring, const char *add);
 
 /* Function */
 

Modified: branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_color.c
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_color.c       
2009-06-16 13:27:12 UTC (rev 20930)
+++ branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_color.c       
2009-06-16 13:57:28 UTC (rev 20931)
@@ -212,7 +212,7 @@
        RNA_def_property_float_funcs(prop, NULL, NULL, 
"rna_CurveMapping_clipmaxy_range");
 
        prop= RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
-       RNA_def_property_collection_funcs(prop, 
"rna_CurveMapping_curves_begin", "rna_iterator_array_next", 
"rna_iterator_array_end", "rna_iterator_array_get", 
"rna_CurveMapping_curves_length", 0, 0);
+       RNA_def_property_collection_funcs(prop, 
"rna_CurveMapping_curves_begin", "rna_iterator_array_next", 
"rna_iterator_array_end", "rna_iterator_array_get", 
"rna_CurveMapping_curves_length", 0, 0, 0);
        RNA_def_property_struct_type(prop, "CurveMap");
        RNA_def_property_ui_text(prop, "Curves", "");
 

Modified: branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_curve.c
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_curve.c       
2009-06-16 13:27:12 UTC (rev 20930)
+++ branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_curve.c       
2009-06-16 13:57:28 UTC (rev 20931)
@@ -605,7 +605,7 @@
        prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_collection_sdna(prop, NULL, "bp", NULL);
        RNA_def_property_struct_type(prop, "CurvePoint");
-       RNA_def_property_collection_funcs(prop, "rna_BPoint_array_begin", 
"rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 
"rna_Nurb_length", 0, 0);
+       RNA_def_property_collection_funcs(prop, "rna_BPoint_array_begin", 
"rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 
"rna_Nurb_length", 0, 0, 0);
        RNA_def_property_ui_text(prop, "Points", "Collection of points for Poly 
and Nurbs curves.");
 
        prop= RNA_def_property(srna, "bezier_points", PROP_COLLECTION, 
PROP_NONE);

Modified: branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_define.c
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_define.c      
2009-06-16 13:27:12 UTC (rev 20930)
+++ branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_define.c      
2009-06-16 13:57:28 UTC (rev 20931)
@@ -604,7 +604,7 @@
 
                if(DefRNA.preprocess) {
                        RNA_def_property_struct_type(prop, "Property");
-                       RNA_def_property_collection_funcs(prop, 
"rna_builtin_properties_begin", "rna_builtin_properties_next", 
"rna_iterator_listbase_end", "rna_builtin_properties_get", 0, 0, 0);
+                       RNA_def_property_collection_funcs(prop, 
"rna_builtin_properties_begin", "rna_builtin_properties_next", 
"rna_iterator_listbase_end", "rna_builtin_properties_get", 0, 0, 0, 0);
                }
                else {
 #ifdef RNA_RUNTIME
@@ -1769,7 +1769,7 @@
        }
 }
 
-void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, 
const char *next, const char *end, const char *get, const char *length, const 
char *lookupint, const char *lookupstring)
+void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, 
const char *next, const char *end, const char *get, const char *length, const 
char *lookupint, const char *lookupstring, const char *add)
 {
        StructRNA *srna= DefRNA.laststruct;
 
@@ -1789,6 +1789,7 @@
                        if(length) cprop->length= 
(PropCollectionLengthFunc)length;
                        if(lookupint) cprop->lookupint= 
(PropCollectionLookupIntFunc)lookupint;
                        if(lookupstring) cprop->lookupstring= 
(PropCollectionLookupStringFunc)lookupstring;
+                       if(add) cprop->add= (PropCollectionAddFunc)add;
                        break;
                }
                default:

Modified: branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_group.c
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_group.c       
2009-06-16 13:27:12 UTC (rev 20930)
+++ branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_group.c       
2009-06-16 13:57:28 UTC (rev 20931)
@@ -61,7 +61,7 @@
        RNA_def_property_collection_sdna(prop, NULL, "gobject", NULL);
        RNA_def_property_struct_type(prop, "Object");
        RNA_def_property_ui_text(prop, "Objects", "A collection of this groups 
objects.");
-       RNA_def_property_collection_funcs(prop, 0, 0, 0, 
"rna_Group_objects_get", 0, 0, 0);
+       RNA_def_property_collection_funcs(prop, 0, 0, 0, 
"rna_Group_objects_get", 0, 0, 0, 0);
        
        prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);

Modified: 
branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_internal.h
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_internal.h    
2009-06-16 13:27:12 UTC (rev 20930)
+++ branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_internal.h    
2009-06-16 13:57:28 UTC (rev 20931)
@@ -254,7 +254,7 @@
 void rna_iterator_array_end(struct CollectionPropertyIterator *iter);
 
 /* experimental */
-void *rna_iterator_array_add(void *ptr, void *data);
+void *rna_iterator_array_add(void *ptr, int itemsize, int length, void *item);
 
 /* Duplicated code since we can't link in blenlib */
 

Modified: 
branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_internal_types.h
===================================================================
--- 
branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_internal_types.h  
    2009-06-16 13:27:12 UTC (rev 20930)
+++ 
branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_internal_types.h  
    2009-06-16 13:57:28 UTC (rev 20931)
@@ -78,6 +78,7 @@
 typedef int (*PropCollectionLengthFunc)(struct PointerRNA *ptr);
 typedef PointerRNA (*PropCollectionLookupIntFunc)(struct PointerRNA *ptr, int 
key);
 typedef PointerRNA (*PropCollectionLookupStringFunc)(struct PointerRNA *ptr, 
const char *key);
+typedef void (*PropCollectionAddFunc)(PointerRNA *ptr, PointerRNA *item);
 
 /* Container - generic abstracted container of RNA properties */
 typedef struct ContainerRNA {
@@ -243,6 +244,7 @@
        PropCollectionLengthFunc length;                                /* 
optional */
        PropCollectionLookupIntFunc lookupint;                  /* optional */
        PropCollectionLookupStringFunc lookupstring;    /* optional */
+       PropCollectionAddFunc add;
 
        struct StructRNA *type;
 } CollectionPropertyRNA;

Modified: branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_key.c
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_key.c 
2009-06-16 13:27:12 UTC (rev 20930)
+++ branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_key.c 
2009-06-16 13:57:28 UTC (rev 20931)
@@ -335,7 +335,7 @@
        RNA_def_property_collection_sdna(prop, NULL, "data", "totelem");
        RNA_def_property_struct_type(prop, "UnknownType");
        RNA_def_property_ui_text(prop, "Data", "");
-       RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", 0, 
0, "rna_ShapeKey_data_get", "rna_ShapeKey_data_length", 0, 0);
+       RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", 0, 
0, "rna_ShapeKey_data_get", "rna_ShapeKey_data_length", 0, 0, 0);
 }
 
 static void rna_def_key(BlenderRNA *brna)

Modified: 
branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_lattice.c
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_lattice.c     
2009-06-16 13:27:12 UTC (rev 20930)
+++ branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_lattice.c     
2009-06-16 13:57:28 UTC (rev 20931)
@@ -99,7 +99,7 @@
        RNA_def_property_ui_text(prop, "Deformed Location", "");
 
        prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
-       RNA_def_property_collection_funcs(prop, 
"rna_LatticePoint_groups_begin", "rna_iterator_array_next", 
"rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+       RNA_def_property_collection_funcs(prop, 
"rna_LatticePoint_groups_begin", "rna_iterator_array_next", 
"rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0, 0);
        RNA_def_property_struct_type(prop, "VertexGroupElement");
        RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups 
this point is member of.");
 }
@@ -159,7 +159,7 @@
 
        prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "LatticePoint");
-       RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", 
"rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 
0, 0, 0);
+       RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", 
"rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 
0, 0, 0, 0);
        RNA_def_property_ui_text(prop, "Points", "Points of the lattice.");
 }
 

Modified: branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_main.c
===================================================================
--- branches/soc-2009-kazanbas/source/blender/makesrna/intern/rna_main.c        
2009-06-16 13:27:12 UTC (rev 20930)

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to