Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2009-07-03 23:12:59 +0400
committerThomas Dinges <blender@dingto.org>2009-07-03 23:12:59 +0400
commit83c0fd65faa69491454c1eabd87bcf4c2c4b1237 (patch)
tree09e1f9be78e4f7a9d4fee5e6703279690fbe28bc /release
parent815fef5e7e4f0cd018193f6ee13292d6c4e1f2b0 (diff)
2.5 Physic Buttons:
* Added Fluid Buttons.
Diffstat (limited to 'release')
-rw-r--r--release/ui/buttons_physics_fluid.py173
1 files changed, 167 insertions, 6 deletions
diff --git a/release/ui/buttons_physics_fluid.py b/release/ui/buttons_physics_fluid.py
index 57e3d910f30..2ab33b4a416 100644
--- a/release/ui/buttons_physics_fluid.py
+++ b/release/ui/buttons_physics_fluid.py
@@ -49,14 +49,175 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
row.item_enumR(fluid, "type", "PARTICLE")
row.item_enumR(fluid, "type", "CONTROL")
- if fluid.type == "DOMAIN":
+ if fluid.type == 'DOMAIN':
layout.itemO("FLUID_OT_bake", text="BAKE")
+ layout.itemL(text="Required Memory: " + fluid.memory_estimate)
+
+ layout.itemL(text="Resolution:")
+
+ split = layout.split()
+
+ col = split.column()
+ colsub = col.column(align=True)
+ colsub.itemR(fluid, "resolution", text="Final")
+ colsub.itemR(fluid, "render_display_mode", text="")
+ colsub = col.column(align=True)
+ colsub.itemL(text="Time:")
+ colsub.itemR(fluid, "start_time", text="Start")
+ colsub.itemR(fluid, "end_time", text="End")
+
+ col = split.column()
+ colsub = col.column(align=True)
+ colsub.itemR(fluid, "preview_resolution", text="Preview", slider=True)
+ colsub.itemR(fluid, "viewport_display_mode", text="")
+ colsub = col.column()
+ colsub.itemR(fluid, "reverse_frames")
+ colsub.itemR(fluid, "generate_speed_vectors")
+ colsub.itemR(fluid, "path", text="")
+
+ if fluid.type in ('FLUID', 'OBSTACLE', 'INFLOW', 'OUTFLOW'):
+ layout.itemR(fluid, "volume_initialization")
+
+ if fluid.type == 'FLUID':
+ row = layout.row()
+ row.column().itemR(fluid, "initial_velocity")
+ row.itemR(fluid, "export_animated_mesh")
+
+ if fluid.type == 'OBSTACLE':
+ row = layout.row()
+ row.itemL()
+ row.itemR(fluid, "export_animated_mesh")
+ layout.itemR(fluid, "slip_type", expand=True)
+ if fluid.slip_type == 'PARTIALSLIP':
+ layout.itemR(fluid, "partial_slip_amount", text="Amount")
+
+ layout.itemR(fluid, "impact_factor")
+
+ if fluid.type == 'INFLOW':
+ row = layout.row()
+ row.column().itemR(fluid, "inflow_velocity")
+ row.itemR(fluid, "export_animated_mesh")
+ layout.itemR(fluid, "local_coordinates")
+
+ if fluid.type == 'OUTFLOW':
+ row = layout.row()
+ row.itemL()
+ row.itemR(fluid, "export_animated_mesh")
+
+ if fluid.type == 'PARTICLE':
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Type:")
+ col.itemR(fluid, "drops")
+ col.itemR(fluid, "floats")
+ col.itemR(fluid, "tracer")
+
+ col = split.column()
+ col.itemL(text="Influence:")
+ col.itemR(fluid, "particle_influence", text="Particle")
+ col.itemR(fluid, "alpha_influence", text="Alpha")
+
+ layout.itemR(fluid, "path")
+
+ if fluid.type == 'CONTROL':
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Time:")
+ col.itemR(fluid, "start_time", text="Start")
+ col.itemR(fluid, "end_time", text="End")
+
+ col = split.column()
+ col.itemR(fluid, "quality", slider=True)
+ col.itemR(fluid, "reverse_frames")
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemL(text="Attraction:")
+ col.itemR(fluid, "attraction_strength", text="Strength")
+ col.itemR(fluid, "attraction_radius", text="Radius")
+
+ col = split.column()
+ col.itemL(text="Velocity:")
+ col.itemR(fluid, "velocity_strength", text="Strength")
+ col.itemR(fluid, "velocity_radius", text="Radius")
- col = layout.column(align=True)
+class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
+ __idname__ = "PHYSICS_PT_domain_gravity"
+ __label__ = "Domain World/Gravity"
+ __default_closed__ = True
+
+ def poll(self, context):
+ md = context.fluid
+ if md:
+ return (md.settings.type == 'DOMAIN')
- col.itemL(text="Req. Mem.: " + fluid.memory_estimate)
- col.itemR(fluid, "resolution")
- col.itemR(fluid, "preview_resolution")
+ def draw(self, context):
+ layout = self.layout
+ fluid = context.fluid.settings
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(fluid, "gravity")
+
+ col = split.column(align=True)
+ col.itemL(text="Viscosity:")
+ col.itemR(fluid, "viscosity_preset", text="")
+ if fluid.viscosity_preset == 'MANUAL':
+ col.itemR(fluid, "viscosity_base", text="Base")
+ col.itemR(fluid, "viscosity_exponent", text="Exponent")
-bpy.types.register(PHYSICS_PT_fluid)
+ col = layout.column_flow()
+ col.itemR(fluid, "real_world_size")
+ col.itemR(fluid, "grid_levels")
+ col.itemR(fluid, "compressibility")
+
+class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
+ __idname__ = "PHYSICS_PT_domain_boundary"
+ __label__ = "Domain Boundary"
+ __default_closed__ = True
+
+ def poll(self, context):
+ md = context.fluid
+ if md:
+ return (md.settings.type == 'DOMAIN')
+
+ def draw(self, context):
+ layout = self.layout
+ fluid = context.fluid.settings
+
+ layout.itemL(text="Slip:")
+
+ layout.itemR(fluid, "slip_type", expand=True)
+ if fluid.slip_type == 'PARTIALSLIP':
+ layout.itemR(fluid, "partial_slip_amount", text="Amount")
+
+ layout.itemL(text="Surface:")
+ row = layout.row()
+ row.itemR(fluid, "surface_smoothing", text="Smoothing")
+ row.itemR(fluid, "surface_subdivisions", text="Subdivisions")
+
+class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
+ __idname__ = "PHYSICS_PT_domain_particles"
+ __label__ = "Domain Particles"
+ __default_closed__ = True
+
+ def poll(self, context):
+ md = context.fluid
+ if md:
+ return (md.settings.type == 'DOMAIN')
+ def draw(self, context):
+ layout = self.layout
+ fluid = context.fluid.settings
+
+ layout.itemR(fluid, "tracer_particles")
+ layout.itemR(fluid, "generate_particles")
+
+bpy.types.register(PHYSICS_PT_fluid)
+bpy.types.register(PHYSICS_PT_domain_gravity)
+bpy.types.register(PHYSICS_PT_domain_boundary)
+bpy.types.register(PHYSICS_PT_domain_particles)