[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38248] branches/soc-2011-salad: Merged Dynamic Paint commits from soc-2011-carrot into soc-2011-salad.
Miika Hamalainen
miika.hamalainen at kolumbus.fi
Sat Jul 9 09:12:30 CEST 2011
Revision: 38248
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38248
Author: miikah
Date: 2011-07-09 07:12:30 +0000 (Sat, 09 Jul 2011)
Log Message:
-----------
Merged Dynamic Paint commits from soc-2011-carrot into soc-2011-salad.
Modified Paths:
--------------
branches/soc-2011-salad/release/datafiles/blenderbuttons
branches/soc-2011-salad/release/scripts/startup/bl_ui/__init__.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_physics_common.py
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_time.py
branches/soc-2011-salad/source/blender/CMakeLists.txt
branches/soc-2011-salad/source/blender/blenkernel/BKE_bvhutils.h
branches/soc-2011-salad/source/blender/blenkernel/BKE_pointcache.h
branches/soc-2011-salad/source/blender/blenkernel/CMakeLists.txt
branches/soc-2011-salad/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2011-salad/source/blender/blenkernel/intern/bvhutils.c
branches/soc-2011-salad/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2011-salad/source/blender/blenkernel/intern/particle.c
branches/soc-2011-salad/source/blender/blenkernel/intern/pointcache.c
branches/soc-2011-salad/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2011-salad/source/blender/blenlib/BLI_math_geom.h
branches/soc-2011-salad/source/blender/blenlib/intern/math_geom.c
branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c
branches/soc-2011-salad/source/blender/blenloader/intern/writefile.c
branches/soc-2011-salad/source/blender/editors/datafiles/blenderbuttons.c
branches/soc-2011-salad/source/blender/editors/include/UI_icons.h
branches/soc-2011-salad/source/blender/editors/interface/interface_templates.c
branches/soc-2011-salad/source/blender/editors/physics/physics_intern.h
branches/soc-2011-salad/source/blender/editors/physics/physics_ops.c
branches/soc-2011-salad/source/blender/editors/space_buttons/buttons_context.c
branches/soc-2011-salad/source/blender/editors/space_outliner/outliner.c
branches/soc-2011-salad/source/blender/editors/space_time/space_time.c
branches/soc-2011-salad/source/blender/editors/space_view3d/drawmesh.c
branches/soc-2011-salad/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_intern.h
branches/soc-2011-salad/source/blender/makesdna/DNA_modifier_types.h
branches/soc-2011-salad/source/blender/makesdna/DNA_object_force.h
branches/soc-2011-salad/source/blender/makesdna/DNA_space_types.h
branches/soc-2011-salad/source/blender/makesdna/intern/makesdna.c
branches/soc-2011-salad/source/blender/makesrna/RNA_access.h
branches/soc-2011-salad/source/blender/makesrna/RNA_enum_types.h
branches/soc-2011-salad/source/blender/makesrna/intern/CMakeLists.txt
branches/soc-2011-salad/source/blender/makesrna/intern/makesrna.c
branches/soc-2011-salad/source/blender/makesrna/intern/rna_internal.h
branches/soc-2011-salad/source/blender/makesrna/intern/rna_modifier.c
branches/soc-2011-salad/source/blender/makesrna/intern/rna_object_force.c
branches/soc-2011-salad/source/blender/makesrna/intern/rna_space.c
branches/soc-2011-salad/source/blender/modifiers/CMakeLists.txt
branches/soc-2011-salad/source/blender/modifiers/MOD_modifiertypes.h
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_util.c
branches/soc-2011-salad/source/blender/render/extern/include/RE_shader_ext.h
branches/soc-2011-salad/source/blender/render/intern/include/voxeldata.h
branches/soc-2011-salad/source/blender/render/intern/source/render_texture.c
branches/soc-2011-salad/source/blender/render/intern/source/voxeldata.c
branches/soc-2011-salad/source/blenderplayer/bad_level_call_stubs/stubs.c
Added Paths:
-----------
branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
branches/soc-2011-salad/source/blender/blenkernel/BKE_dynamicpaint.h
branches/soc-2011-salad/source/blender/blenkernel/intern/dynamicpaint.c
branches/soc-2011-salad/source/blender/makesdna/DNA_dynamicpaint_types.h
branches/soc-2011-salad/source/blender/makesrna/intern/rna_dynamicpaint.c
branches/soc-2011-salad/source/blender/modifiers/intern/MOD_dynamicpaint.c
Property Changed:
----------------
branches/soc-2011-salad/
Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-37529
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38239
/trunk/blender:36834-38238
+ /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-37529
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38239
/trunk/blender:36834-38238
Modified: branches/soc-2011-salad/release/datafiles/blenderbuttons
===================================================================
(Binary files differ)
Modified: branches/soc-2011-salad/release/scripts/startup/bl_ui/__init__.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/__init__.py 2011-07-09 05:28:39 UTC (rev 38247)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/__init__.py 2011-07-09 07:12:30 UTC (rev 38248)
@@ -43,6 +43,7 @@
"properties_particle",
"properties_physics_cloth",
"properties_physics_common",
+ "properties_physics_dynamicpaint",
"properties_physics_field",
"properties_physics_fluid",
"properties_physics_smoke",
Modified: branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_data_modifier.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_data_modifier.py 2011-07-09 05:28:39 UTC (rev 38247)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_data_modifier.py 2011-07-09 07:12:30 UTC (rev 38248)
@@ -229,6 +229,9 @@
row.prop(md, "mid_level")
row.prop(md, "strength")
+ def DYNAMIC_PAINT(self, layout, ob, md):
+ layout.label(text="See Dynamic Paint panel.")
+
def EDGE_SPLIT(self, layout, ob, md):
split = layout.split()
Modified: branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_physics_common.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_physics_common.py 2011-07-09 05:28:39 UTC (rev 38247)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_physics_common.py 2011-07-09 07:12:30 UTC (rev 38248)
@@ -64,6 +64,7 @@
if(ob.type == 'MESH'):
physics_add(self, col, context.collision, "Collision", 'COLLISION', 'MOD_PHYSICS', False)
physics_add(self, col, context.cloth, "Cloth", 'CLOTH', 'MOD_CLOTH', True)
+ physics_add(self, col, context.dynamic_paint, "Dynamic Paint", 'DYNAMIC_PAINT', 'MOD_DYNAMICPAINT', True)
col = split.column()
@@ -105,7 +106,7 @@
layout.label(text=cache.info)
else:
- if cachetype == 'SMOKE':
+ if cachetype in {'SMOKE', 'DYNAMIC_PAINT'}:
if not bpy.data.is_saved:
layout.label(text="Cache is disabled until the file is saved")
layout.enabled = False
@@ -117,17 +118,17 @@
row = layout.row(align=True)
- if cachetype != 'PSYS':
+ if cachetype not in {'PSYS', 'DYNAMIC_PAINT'}:
row.enabled = enabled
row.prop(cache, "frame_start")
row.prop(cache, "frame_end")
- if cachetype not in {'SMOKE', 'CLOTH'}:
+ if cachetype not in {'SMOKE', 'CLOTH', 'DYNAMIC_PAINT'}:
row.prop(cache, "frame_step")
row.prop(cache, "use_quick_cache")
if cachetype != 'SMOKE':
layout.label(text=cache.info)
- if cachetype != 'SMOKE':
+ if cachetype not in {'SMOKE', 'DYNAMIC_PAINT'}:
split = layout.split()
split.enabled = enabled and bpy.data.is_saved
Copied: branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py (from rev 36854, branches/soc-2011-carrot/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py)
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py (rev 0)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py 2011-07-09 07:12:30 UTC (rev 38248)
@@ -0,0 +1,372 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+import bpy
+
+from bl_ui.properties_physics_common import (
+ point_cache_ui,
+ effector_weights_ui,
+ )
+
+class PhysicButtonsPanel():
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "physics"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ rd = context.scene.render
+ return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.dynamic_paint)
+
+
+class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, bpy.types.Panel):
+ bl_label = "Dynamic Paint"
+
+ def draw(self, context):
+ layout = self.layout
+
+ md = context.dynamic_paint
+ ob = context.object
+
+ if md:
+ layout.prop(md, "ui_type", expand=True)
+
+ if (md.ui_type == "CANVAS"):
+ canvas = md.canvas_settings
+
+ if (not canvas):
+ layout.operator("dpaint.type_toggle", text="Add Canvas").type = 'CANVAS'
+ else:
+ layout.operator("dpaint.type_toggle", text="Remove Canvas", icon='X').type = 'CANVAS'
+
+ surface = canvas.canvas_surfaces.active
+ row = layout.row()
+ row.template_list(canvas, "canvas_surfaces", canvas.canvas_surfaces, "active_index", rows=2)
+
+ col = row.column(align=True)
+ col.operator("dpaint.surface_slot_add", icon='ZOOMIN', text="")
+ col.operator("dpaint.surface_slot_remove", icon='ZOOMOUT', text="")
+
+ if surface:
+ layout.prop(surface, "name")
+ layout.prop(surface, "surface_format", expand=False)
+ col = layout.column()
+
+ if surface.surface_format != "VERTEX":
+ col.label(text="Quality:")
+ col.prop(surface, "image_resolution")
+ col.prop(surface, "use_anti_aliasing")
+
+ 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 = split.column()
+ col.prop(surface, "substeps")
+
+ elif (md.ui_type == "BRUSH"):
+ brush = md.brush_settings
+
+ if (not brush):
+ layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH'
+ else:
+ layout.operator("dpaint.type_toggle", text="Remove Brush", icon='X').type = 'BRUSH'
+
+ layout.prop(brush, "brush_settings_context", expand=True, icon_only=True)
+
+ if (brush.brush_settings_context == "GENERAL"):
+ split = layout.split()
+
+ col = split.column()
+ col.prop(brush, "absolute_alpha")
+ col.prop(brush, "paint_erase")
+ col.prop(brush, "paint_wetness", text="Wetness")
+
+ col = split.column()
+ sub = col.column()
+ sub.active = (brush.paint_source != "PSYS");
+ sub.prop(brush, "use_material")
+ if brush.use_material and brush.paint_source != "PSYS":
+ col.prop(brush, "material", text="")
+ col.prop(brush, "paint_alpha", text="Alpha Factor")
+ else:
+ col.prop(brush, "paint_color", text="")
+ col.prop(brush, "paint_alpha", text="Alpha")
+
+ elif (brush.brush_settings_context == "WAVE"):
+ layout.prop(brush, "wave_type")
+ if (brush.wave_type != "REFLECT"):
+ split = layout.split(percentage=0.6)
+ split.prop(brush, "wave_factor")
+ else:
+ layout.label(text="-WIP-")
+
+
+class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, bpy.types.Panel):
+ bl_label = "Dynamic Paint: Advanced"
+
+ @classmethod
+ def poll(cls, context):
+ md = context.dynamic_paint
+ return md and (md.ui_type == "CANVAS") and (md.canvas_settings) and (md.canvas_settings.canvas_surfaces.active)
+
+ def draw(self, context):
+ layout = self.layout
+
+ canvas = context.dynamic_paint.canvas_settings
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list