From 11c83d843206648a33bcc8b4d754577ec0a51d2a Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Sun, 13 Nov 2011 12:17:27 +0000 Subject: Ocean Sim modifier patch by Matt Ebb, Hamed Zaghaghi This adds a new Modifier "Ocean" to simulate large-scale wave motion. Details can be found in the wiki documentation [1], the project homepage [2] and the patch tracker [3] The modifier is disabled by default for now. To enable it, the WITH_OCEANSIM (cmake) / WITH_BF_OCEANSIM (scons) flags have to be set. The code depends on fftw3, so this also has to be enabled. [1] http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Simulation/Ocean [2] http://www.savetheoceansim.com [3] http://projects.blender.org/tracker/?group_id=9&atid=127&func=detail&aid=28338 --- .../startup/bl_ui/properties_data_modifier.py | 68 ++++++++++++++++++++++ .../scripts/startup/bl_ui/properties_texture.py | 16 +++++ 2 files changed, 84 insertions(+) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index e1b08d1ff8e..0340c933cdd 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -414,6 +414,74 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): row.operator("object.multires_external_save", text="Save External...") row.label() + def OCEAN(self, layout, ob, md): + col = layout.column() + + if not md.build_enabled: + col.label("Built without OceanSim modifier") + return + + col.prop(md, "geometry_mode") + + if md.geometry_mode == 'GENERATE': + row = col.row() + row.prop(md, "repeat_x") + row.prop(md, "repeat_y") + + col.separator() + + col.prop(md, "time") + col.prop(md, "resolution") + colflow = col.column_flow() + colflow.prop(md, "spatial_size") + colflow.prop(md, "depth") + + + col.label("Waves:") + col.prop(md, "choppiness") + col.prop(md, "wave_scale", text="Scale") + + col.prop(md, "wave_alignment", text="Alignment") + row = col.row() + row.active = md.wave_alignment > 0 + row.prop(md, "wave_direction", text="Direction") + row.prop(md, "damp") + + col.prop(md, "smallest_wave") + col.prop(md, "wind_velocity") + + + col = layout.column() + col.separator() + + col.prop(md, "generate_normals") + + split = col.split() + split.column().prop(md, "generate_foam") + + col = split.column() + col.active = md.generate_foam + col.prop(md, "foam_coverage", text="Coverage") + + + col = layout.column() + col.separator() + + if md.is_cached: + col.operator("object.ocean_bake", text="Free Bake").free=True + else: + col.operator("object.ocean_bake") + row = col.row() + row.enabled = not md.is_cached + row.prop(md, "bake_start", text="Start") + row.prop(md, "bake_end", text="End") + col.prop(md, "cachepath") + + #col.prop(md, "bake_foam_fade") + + + + def PARTICLE_INSTANCE(self, layout, ob, md): layout.prop(md, "object") layout.prop(md, "particle_system_index", text="Particle System") diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 9ba0309aacd..70c231b11bf 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -774,6 +774,22 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, Panel): col.prop(pd, "turbulence_strength") +class TEXTURE_PT_ocean(TextureTypePanel, Panel): + bl_label = "Ocean" + tex_type = 'OCEAN' + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + + def draw(self, context): + layout = self.layout + + tex = context.texture + ot = tex.ocean + + col = layout.column() + col.prop(ot, "ocean_object") + col.prop(ot, "output") + + class TEXTURE_PT_mapping(TextureSlotPanel, Panel): bl_label = "Mapping" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} -- cgit v1.2.3