Cleanup some new gpencil rna functions names.
authorBastien Montagne <montagne29@wanadoo.fr>
Sat, 6 Aug 2016 09:22:34 +0000 (11:22 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Sat, 6 Aug 2016 09:22:34 +0000 (11:22 +0200)
Convention for properties callback names is to prefix them with a version of the RNA struct name.

source/blender/makesrna/intern/rna_scene.c

index b6abe983060b264d04fd4f3221c0d887275161ca..47998e09bb90b78783ec084abd4d19f9429a25c5 100644 (file)
@@ -475,7 +475,7 @@ static void rna_GPencil_brush_remove(ToolSettings *ts, ReportList *reports, Poin
        WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 }
 
        WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 }
 
-static PointerRNA rna_GPencil_active_brush_get(PointerRNA *ptr)
+static PointerRNA rna_GPencilBrushes_active_get(PointerRNA *ptr)
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
 
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
 
@@ -494,7 +494,7 @@ static PointerRNA rna_GPencil_active_brush_get(PointerRNA *ptr)
        return rna_pointer_inherit_refine(ptr, NULL, NULL);
 }
 
        return rna_pointer_inherit_refine(ptr, NULL, NULL);
 }
 
-static void rna_GPencil_active_brush_set(PointerRNA *ptr, PointerRNA value)
+static void rna_GPencilBrushes_active_set(PointerRNA *ptr, PointerRNA value)
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
 
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
 
@@ -511,7 +511,7 @@ static void rna_GPencil_active_brush_set(PointerRNA *ptr, PointerRNA value)
        WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
 }
 
        WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
 }
 
-static int rna_GPencilBrush_index_get(PointerRNA *ptr)
+static int rna_GPencilBrushes_index_get(PointerRNA *ptr)
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
        bGPDbrush *brush = BKE_gpencil_brush_getactive(ts);
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
        bGPDbrush *brush = BKE_gpencil_brush_getactive(ts);
@@ -519,7 +519,7 @@ static int rna_GPencilBrush_index_get(PointerRNA *ptr)
        return BLI_findindex(&ts->gp_brushes, brush);
 }
 
        return BLI_findindex(&ts->gp_brushes, brush);
 }
 
-static void rna_GPencilBrush_index_set(PointerRNA *ptr, int value)
+static void rna_GPencilBrushes_index_set(PointerRNA *ptr, int value)
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
 
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
 
@@ -529,7 +529,7 @@ static void rna_GPencilBrush_index_set(PointerRNA *ptr, int value)
        WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 }
 
        WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 }
 
-static void rna_GPencilBrush_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
+static void rna_GPencilBrushes_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
 
 {
        ToolSettings *ts = (ToolSettings *) ptr->data;
 
@@ -2249,7 +2249,7 @@ static void rna_def_gpencil_brush(BlenderRNA *brna)
 }
 
 /* Grease Pencil Drawing Brushes API */
 }
 
 /* Grease Pencil Drawing Brushes API */
-static void rna_def_gpencil_brushes_api(BlenderRNA *brna, PropertyRNA *cprop)
+static void rna_def_gpencil_brushes(BlenderRNA *brna, PropertyRNA *cprop)
 {
        StructRNA *srna;
        PropertyRNA *prop;
 {
        StructRNA *srna;
        PropertyRNA *prop;
@@ -2279,15 +2279,15 @@ static void rna_def_gpencil_brushes_api(BlenderRNA *brna, PropertyRNA *cprop)
 
        prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(prop, "GPencilBrush");
 
        prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(prop, "GPencilBrush");
-       RNA_def_property_pointer_funcs(prop, "rna_GPencil_active_brush_get", "rna_GPencil_active_brush_set", NULL, NULL);
+       RNA_def_property_pointer_funcs(prop, "rna_GPencilBrushes_active_get", "rna_GPencilBrushes_active_set", NULL, NULL);
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Active Brush", "Current active brush");
 
        prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
        RNA_def_property_int_funcs(prop,
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Active Brush", "Current active brush");
 
        prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
        RNA_def_property_int_funcs(prop,
-               "rna_GPencilBrush_index_get",
-               "rna_GPencilBrush_index_set",
-               "rna_GPencilBrush_index_range");
+               "rna_GPencilBrushes_index_get",
+               "rna_GPencilBrushes_index_set",
+               "rna_GPencilBrushes_index_range");
        RNA_def_property_ui_text(prop, "Active brush Index", "Index of active brush");
 }
 
        RNA_def_property_ui_text(prop, "Active brush Index", "Index of active brush");
 }
 
@@ -2628,7 +2628,7 @@ static void rna_def_tool_settings(BlenderRNA  *brna)
        RNA_def_property_collection_sdna(prop, NULL, "gp_brushes", NULL);
        RNA_def_property_struct_type(prop, "GPencilBrush");
        RNA_def_property_ui_text(prop, "Grease Pencil Brushes", "Grease Pencil drawing brushes");
        RNA_def_property_collection_sdna(prop, NULL, "gp_brushes", NULL);
        RNA_def_property_struct_type(prop, "GPencilBrush");
        RNA_def_property_ui_text(prop, "Grease Pencil Brushes", "Grease Pencil drawing brushes");
-       rna_def_gpencil_brushes_api(brna, prop);
+       rna_def_gpencil_brushes(brna, prop);
 
        /* Grease Pencil - 3D View Stroke Placement */
        prop = RNA_def_property(srna, "gpencil_stroke_placement_view3d", PROP_ENUM, PROP_NONE);
 
        /* Grease Pencil - 3D View Stroke Placement */
        prop = RNA_def_property(srna, "gpencil_stroke_placement_view3d", PROP_ENUM, PROP_NONE);