Revision: 41821
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41821
Author:   campbellbarton
Date:     2011-11-14 07:07:59 +0000 (Mon, 14 Nov 2011)
Log Message:
-----------
make rna naming for dynamic paint consistent with existing names & conventions.

Modified Paths:
--------------
    
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
    trunk/blender/source/blender/makesrna/intern/rna_dynamicpaint.c

Modified: 
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
===================================================================
--- 
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py  
    2011-11-14 06:46:07 UTC (rev 41820)
+++ 
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py  
    2011-11-14 07:07:59 UTC (rev 41821)
@@ -99,8 +99,8 @@
                 split = layout.split()
 
                 col = split.column()
-                col.prop(brush, "absolute_alpha")
-                col.prop(brush, "paint_erase")
+                col.prop(brush, "use_absolute_alpha")
+                col.prop(brush, "use_paint_erase")
                 col.prop(brush, "paint_wetness", text="Wetness")
 
                 col = split.column()
@@ -168,7 +168,7 @@
                 row.prop(surface, "displace_factor")
 
         elif surface_type == 'WAVE':
-            layout.prop(surface, "wave_open_borders")
+            layout.prop(surface, "use_wave_open_border")
 
             split = layout.split()
 
@@ -250,7 +250,7 @@
             layout.prop(surface, "image_output_path", text="")
             row = layout.row()
             row.prop(surface, "image_fileformat", text="")
-            row.prop(surface, "premultiply", text="Premultiply alpha")
+            row.prop(surface, "use_premultiply", text="Premultiply alpha")
 
             if surface_type == 'PAINT':
                 split = layout.split(percentage=0.4)
@@ -367,7 +367,7 @@
                 md.ui_type == 'CANVAS' and
                 md.canvas_settings and
                 md.canvas_settings.canvas_surfaces.active and
-                md.canvas_settings.canvas_surfaces.active.uses_cache)
+                md.canvas_settings.canvas_surfaces.active.is_cache_user)
 
     def draw(self, context):
         layout = self.layout
@@ -411,21 +411,21 @@
             split = layout.row().split(percentage=0.4)
             sub = split.column()
             if brush.paint_source == 'DISTANCE':
-                sub.prop(brush, "proximity_project")
+                sub.prop(brush, "use_proximity_project")
             elif brush.paint_source == 'VOLUME_DISTANCE':
-                sub.prop(brush, "proximity_inverse")
-                sub.prop(brush, "negate_volume")
+                sub.prop(brush, "invert_proximity")
+                sub.prop(brush, "use_negative_volume")
 
             sub = split.column()
             if brush.paint_source == 'DISTANCE':
                 column = sub.column()
-                column.active = brush.proximity_project
+                column.active = brush.use_proximity_project
                 column.prop(brush, "ray_direction")
             sub.prop(brush, "proximity_falloff")
             if brush.proximity_falloff == 'RAMP':
                 col = layout.row().column()
                 col.separator()
-                col.prop(brush, "proximity_ramp_alpha", text="Only Use Alpha")
+                col.prop(brush, "use_proximity_ramp_alpha", text="Only Use 
Alpha")
                 col.template_color_ramp(brush, "paint_ramp", expand=True)
 
 
@@ -447,13 +447,13 @@
         split = layout.split()
 
         col = split.column()
-        col.prop(brush, "velocity_alpha")
-        col.prop(brush, "velocity_color")
+        col.prop(brush, "use_velocity_alpha")
+        col.prop(brush, "use_velocity_color")
 
-        split.prop(brush, "velocity_depth")
+        split.prop(brush, "use_velocity_depth")
 
         col = layout.column()
-        col.active = (brush.velocity_alpha or brush.velocity_color or 
brush.velocity_depth)
+        col.active = (brush.use_velocity_alpha or brush.use_velocity_color or 
brush.use_velocity_depth)
         col.prop(brush, "velocity_max")
         col.template_color_ramp(brush, "velocity_ramp", expand=True)
         layout.separator()

Modified: trunk/blender/source/blender/makesrna/intern/rna_dynamicpaint.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_dynamicpaint.c     
2011-11-14 06:46:07 UTC (rev 41820)
+++ trunk/blender/source/blender/makesrna/intern/rna_dynamicpaint.c     
2011-11-14 07:07:59 UTC (rev 41821)
@@ -197,17 +197,13 @@
 }
 
 /* is point cache used */
-static int rna_DynamicPaint_uses_cache_get(PointerRNA *ptr)
+static int rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr)
 {
        DynamicPaintSurface *surface= (DynamicPaintSurface*)ptr->data;
 
        return (surface->format != MOD_DPAINT_SURFACE_F_IMAGESEQ) ?  1 : 0;
 }
 
-static void rna_DynamicPaint_uses_cache_set(PointerRNA *ptr, int value)
-{
-}
-
 /* does output layer exist*/
 static int rna_DynamicPaint_is_output_exists(DynamicPaintSurface *surface, 
Object *ob, int index)
 {
@@ -543,7 +539,7 @@
        /*
        *   Output settings
        */
-       prop= RNA_def_property(srna, "premultiply", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_MULALPHA);
        RNA_def_property_ui_text(prop, "Premultiply alpha", "Multiplies color 
by alpha. (Recommended for Blender input)");
@@ -641,7 +637,7 @@
        RNA_def_property_ui_range(prop, 0.01, 1.0, 1, 2);
        RNA_def_property_ui_text(prop, "Spring", "Spring force that pulls water 
level back to zero");
 
-       prop= RNA_def_property(srna, "wave_open_borders", PROP_BOOLEAN, 
PROP_NONE);
+       prop= RNA_def_property(srna, "use_wave_open_border", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", 
MOD_DPAINT_WAVE_OPEN_BORDERS);
        RNA_def_property_ui_text(prop, "Open Borders", "Passes waves through 
mesh edges");
 
@@ -653,10 +649,10 @@
        RNA_def_property_ui_text(prop, "Point Cache", "");
 
        /* is cache used */
-       prop= RNA_def_property(srna, "uses_cache", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_funcs(prop, "rna_DynamicPaint_uses_cache_get", 
"rna_DynamicPaint_uses_cache_set");
+       prop= RNA_def_property(srna, "is_cache_user", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_funcs(prop, 
"rna_DynamicPaint_is_cache_user_get", NULL);
        RNA_def_property_ui_text(prop, "Uses Cache", "");
-       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE|PROP_EDITABLE);
 }
 
 static void rna_def_dynamic_paint_canvas_settings(BlenderRNA *brna)
@@ -743,7 +739,7 @@
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
        
-       prop= RNA_def_property(srna, "absolute_alpha", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_absolute_alpha", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", 
MOD_DPAINT_ABS_ALPHA);
        RNA_def_property_ui_text(prop, "Absolute Alpha", "Only increase alpha 
value if paint alpha is higher than existing");
        
@@ -754,7 +750,7 @@
        RNA_def_property_ui_text(prop, "Paint Wetness", "Paint wetness. Visible 
in wetmap. Some effects only affect wet paint");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
        
-       prop= RNA_def_property(srna, "paint_erase", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_paint_erase", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_ERASE);
        RNA_def_property_ui_text(prop, "Erase Paint", "Erase / remove paint 
instead of adding it");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
@@ -789,17 +785,17 @@
        RNA_def_property_ui_range(prop, 0.1, 2.0, 5, 2);
        RNA_def_property_ui_text(prop, "Max Velocity", "Velocity considered as 
maximum influence. (Blender units per frame)");
 
-       prop= RNA_def_property(srna, "velocity_alpha", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_velocity_alpha", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", 
MOD_DPAINT_VELOCITY_ALPHA);
        RNA_def_property_ui_text(prop, "Multiply Alpha", "Multiply brush 
influence by velocity color ramp alpha");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
 
-       prop= RNA_def_property(srna, "velocity_depth", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_velocity_depth", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", 
MOD_DPAINT_VELOCITY_DEPTH);
        RNA_def_property_ui_text(prop, "Multiply Depth", "Multiply brush 
intersection depth (displace, waves) by velocity ramp alpha");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
 
-       prop= RNA_def_property(srna, "velocity_color", PROP_BOOLEAN, PROP_NONE);
+       prop= RNA_def_property(srna, "use_velocity_color", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", 
MOD_DPAINT_VELOCITY_COLOR);
        RNA_def_property_ui_text(prop, "Replace Color", "Replace brush color by 
velocity color ramp");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
@@ -821,7 +817,7 @@
        RNA_def_property_ui_text(prop, "Proximity Distance", "Maximum distance 
from brush to mesh surface to affect paint");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
        
-       prop= RNA_def_property(srna, "proximity_ramp_alpha", PROP_BOOLEAN, 
PROP_NONE);
+       prop= RNA_def_property(srna, "use_proximity_ramp_alpha", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", 
MOD_DPAINT_RAMP_ALPHA);
        RNA_def_property_ui_text(prop, "Only Use Alpha", "Only reads color ramp 
alpha");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
@@ -833,7 +829,7 @@
        RNA_def_property_ui_text(prop, "Falloff", "Proximity falloff type");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
        
-       prop= RNA_def_property(srna, "proximity_project", PROP_BOOLEAN, 
PROP_NONE);
+       prop= RNA_def_property(srna, "use_proximity_project", PROP_BOOLEAN, 
PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flags", 
MOD_DPAINT_PROX_PROJECT);
        RNA_def_property_ui_text(prop, "Project", "Brush is projected to canvas 
from defined direction within brush proximity");
        RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, 
"rna_DynamicPaint_redoModifier");
@@ -844,12 +840,12 @@

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to