[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41343] branches/soc-2011-carrot: Dynamic Paint:

Miika Hamalainen miika.hamalainen at kolumbus.fi
Fri Oct 28 16:46:09 CEST 2011


Revision: 41343
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41343
Author:   miikah
Date:     2011-10-28 14:46:09 +0000 (Fri, 28 Oct 2011)
Log Message:
-----------
Dynamic Paint:
* More code changes pointed by Brecht in codereview.
* Some user interface improvements.
* Updating brush settings now also updates canvas preview.

Modified Paths:
--------------
    branches/soc-2011-carrot/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
    branches/soc-2011-carrot/source/blender/blenkernel/BKE_bvhutils.h
    branches/soc-2011-carrot/source/blender/blenkernel/BKE_dynamicpaint.h
    branches/soc-2011-carrot/source/blender/blenkernel/intern/bvhutils.c
    branches/soc-2011-carrot/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2011-carrot/source/blender/blenlib/BLI_math_geom.h
    branches/soc-2011-carrot/source/blender/blenlib/intern/math_geom.c
    branches/soc-2011-carrot/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-carrot/source/blender/editors/physics/dynamicpaint_ops.c
    branches/soc-2011-carrot/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-carrot/source/blender/makesdna/DNA_dynamicpaint_types.h
    branches/soc-2011-carrot/source/blender/makesrna/intern/rna_dynamicpaint.c
    branches/soc-2011-carrot/source/blender/modifiers/intern/MOD_dynamicpaint.c
    branches/soc-2011-carrot/source/blenderplayer/bad_level_call_stubs/stubs.c

Modified: branches/soc-2011-carrot/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
===================================================================
--- branches/soc-2011-carrot/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py	2011-10-28 14:31:15 UTC (rev 41342)
+++ branches/soc-2011-carrot/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py	2011-10-28 14:46:09 UTC (rev 41343)
@@ -72,18 +72,18 @@
                         if surface.surface_format != "VERTEX":
                             col.label(text="Quality:")
                             col.prop(surface, "image_resolution")
-                        col.prop(surface, "use_anti_aliasing")
+                        col.prop(surface, "use_antialiasing")
                     
                         col = layout.column()
                         col.label(text="Frames:")
                         split = col.split()
                     
                         col = split.column(align=True)
-                        col.prop(surface, "start_frame", text="Start")
-                        col.prop(surface, "end_frame", text="End")
+                        col.prop(surface, "frame_start", text="Start")
+                        col.prop(surface, "frame_end", text="End")
                     
                         col = split.column()
-                        col.prop(surface, "substeps")
+                        col.prop(surface, "frame_substeps")
 
             elif (md.ui_type == "BRUSH"):
                 brush = md.brush_settings
@@ -102,9 +102,9 @@
                 
                     col = split.column()
                     sub = col.column()
-                    sub.active = (brush.paint_source != "PSYS");
+                    sub.active = (brush.paint_source != "PARTICLE_SYSTEM");
                     sub.prop(brush, "use_material")
-                    if brush.use_material and brush.paint_source != "PSYS":
+                    if brush.use_material and brush.paint_source != "PARTICLE_SYSTEM":
                         col.prop(brush, "material", text="")
                         col.prop(brush, "paint_alpha", text="Alpha Factor")
                     else:
@@ -132,33 +132,42 @@
 
         # dissolve
         if (surface.surface_type == "PAINT"):
-            layout.label(text="Wetmap drying:")
-            split = layout.split(percentage=0.8)
-            split.prop(surface, "dry_speed", text="Dry Time")
-            split.prop(surface, "use_dry_log", text="Slow")
+            split = layout.split(percentage=0.35)
+            col = split.column()
+            col.label(text="Wetmap drying:")
+            col = split.column()
+            split = col.split(percentage=0.7)
+            col = split.column()
+            col.prop(surface, "dry_speed", text="Time")
+            col = split.column()
+            col.prop(surface, "use_dry_log", text="Slow")
             
         if (surface.surface_type != "WAVE"):
+            split = layout.split(percentage=0.35)
+            col = split.column()
             if (surface.surface_type == "DISPLACE"):
-                layout.prop(surface, "use_dissolve", text="Dissolve:")
+                col.prop(surface, "use_dissolve", text="Dissolve:")
             elif (surface.surface_type == "WEIGHT"):
-                layout.prop(surface, "use_dissolve", text="Fade:")
+                col.prop(surface, "use_dissolve", text="Fade:")
             else:
-                layout.prop(surface, "use_dissolve", text="Dissolve:")
-            sub = layout.column()
-            sub.active = surface.use_dissolve
-            split = sub.split(percentage=0.8)
-            split.prop(surface, "dissolve_speed", text="Time")
-            split.prop(surface, "use_dissolve_log", text="Slow")
+                col.prop(surface, "use_dissolve", text="Dissolve:")
+            col = split.column()
+            col.active = surface.use_dissolve
+            split = col.split(percentage=0.7)
+            col = split.column()
+            col.prop(surface, "dissolve_speed", text="Time")
+            col = split.column()
+            col.prop(surface, "use_dissolve_log", text="Slow")
         
         # per type settings
         if (surface.surface_type == "DISPLACE"):
-            layout.prop(surface, "incremental_disp")
+            layout.prop(surface, "use_incremental_displace")
             if (surface.surface_format == "VERTEX"):
                 split = layout.split()
                 col = split.column()
                 col.prop(surface, "depth_clamp")
                 col = split.column()
-                col.prop(surface, "disp_factor")
+                col.prop(surface, "displace_factor")
             
         if (surface.surface_type == "WAVE"):
             layout.prop(surface, "wave_open_borders")
@@ -173,8 +182,8 @@
             col.prop(surface, "wave_damping")
             col.prop(surface, "wave_spring")
             
-        layout.label(text="Brush Group:")
-        layout.prop(surface, "brush_group", text="")
+        layout.separator()
+        layout.prop(surface, "brush_group", text="Brush Group")
 
 class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Dynamic Paint Output"
@@ -230,42 +239,42 @@
         # image format outputs
         if (surface.surface_format == "IMAGE"):
             col = layout.column()
-            col.label(text="UV layer:")
-            col.prop_search(surface, "uv_layer", ob.data, "uv_textures", text="")
+            col.operator("dpaint.bake", text="Bake Image Sequence", icon='MOD_DYNAMICPAINT')
+            col.prop_search(surface, "uv_layer", ob.data, "uv_textures", text="UV layer:")
+            layout.separator()
             
             col.separator()
             col = layout.column()
-            col.prop(surface, "image_output_path", text="Output directory")
-            col.prop(surface, "image_fileformat", text="Image Format")
+            col.prop(surface, "image_output_path", text="")
+            split = layout.split()
+            col = split.column()
+            col.prop(surface, "image_fileformat", text="")
+            col = split.column()
+            col.prop(surface, "premultiply", text="Premultiply alpha")
             col.separator()
+            
             if (surface.surface_type == "PAINT"):
-                split = col.split()
+                split = layout.split(percentage=0.4)
                 col = split.column()
-                col.prop(surface, "do_output1", text="Output Paintmaps:")
+                col.prop(surface, "do_output1", text="Paintmaps:")
                 sub = split.column()
-                sub.prop(surface, "premultiply", text="Premultiply alpha")
                 sub.active = surface.do_output1
-                sub = layout.column()
-                sub.active = surface.do_output1
-                sub.prop(surface, "output_name", text="Filename: ")
+                sub.prop(surface, "output_name", text="")
                 
-                col = layout.column()
-                col.prop(surface, "do_output2", text="Output Wetmaps:")
-                sub = col.column()
+                split = layout.split(percentage=0.4)
+                col = split.column()
+                col.prop(surface, "do_output2", text="Wetmaps:")
+                sub = split.column()
                 sub.active = surface.do_output2
-                sub.prop(surface, "output_name2", text="Filename: ")
+                sub.prop(surface, "output_name2", text="")
             else:
+                col = layout.column()
                 col.prop(surface, "output_name", text="Filename: ")
                 if (surface.surface_type == "DISPLACE"):
-                    col.prop(surface, "disp_type", text="Displace Type")
+                    col.prop(surface, "displace_type", text="Displace Type")
                     col.prop(surface, "depth_clamp")
                 if (surface.surface_type == "WAVE"):
                     col.prop(surface, "depth_clamp", text="Wave Clamp")
-            
-            layout.separator()
-            layout.operator("dpaint.bake", text="Bake Image Sequence", icon='MOD_DYNAMICPAINT')
-            if len(canvas.ui_info) != 0:
-                layout.label(text=canvas.ui_info)
 
 class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Dynamic Paint Initial Color"
@@ -297,7 +306,7 @@
             layout.prop(surface, "init_texture")
             layout.prop_search(surface, "init_layername", ob.data, "uv_textures", text="UV Layer:")
         
-        if (surface.init_color_type == "VERTEXCOLOR"):
+        if (surface.init_color_type == "VERTEX_COLOR"):
             layout.prop_search(surface, "init_layername", ob.data, "vertex_colors", text="Color Layer: ")
 
 class PHYSICS_PT_dp_effects(PhysicButtonsPanel, bpy.types.Panel):
@@ -388,35 +397,35 @@
         col = split.column()
         col.prop(brush, "paint_source")
 
-        if brush.paint_source == "PSYS":
-            col.prop_search(brush, "psys", ob, "particle_systems", text="")
-            if brush.psys:
+        if brush.paint_source == "PARTICLE_SYSTEM":
+            col.prop_search(brush, "particle_system", ob, "particle_systems", text="")
+            if brush.particle_system:
                 col.label(text="Particle effect:")
                 sub = col.column()
                 sub.active = not brush.use_part_radius
                 sub.prop(brush, "solid_radius", text="Solid Radius")
-                col.prop(brush, "use_part_radius", text="Use Particle's Radius")
+                col.prop(brush, "use_particle_radius", text="Use Particle's Radius")
                 col.prop(brush, "smooth_radius", text="Smooth radius")
                 
-        if brush.paint_source in {'DISTANCE', 'VOLDIST', 'POINT'}:
+        if brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE', 'POINT'}:
             col.prop(brush, "paint_distance", text="Paint Distance")
             split = layout.row().split(percentage=0.4)
             sub = split.column()
             if brush.paint_source == 'DISTANCE':
-                sub.prop(brush, "prox_project")
-            if brush.paint_source == "VOLDIST":
-                sub.prop(brush, "prox_inverse")
+                sub.prop(brush, "proximity_project")
+            if brush.paint_source == "VOLUME_DISTANCE":

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list