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:
-rw-r--r--release/ui/buttons_physic_cloth.py55
-rw-r--r--release/ui/buttons_physics_fluid.py161
-rw-r--r--source/blender/blenkernel/intern/fluidsim.c14
3 files changed, 137 insertions, 93 deletions
diff --git a/release/ui/buttons_physic_cloth.py b/release/ui/buttons_physic_cloth.py
index 277a6dfe760..a49513a60c2 100644
--- a/release/ui/buttons_physic_cloth.py
+++ b/release/ui/buttons_physic_cloth.py
@@ -40,25 +40,28 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
split = layout.split()
- col = split.column(align=True)
+ col = split.column()
col.itemR(cloth, "quality", slider=True)
- col.itemR(cloth, "gravity")
+ col.itemL(text="Gravity:")
+ col.itemR(cloth, "gravity", text="")
col.itemR(cloth, "pin_cloth", text="Pin")
- col = col.column(align=True)
- col.active = cloth.pin_cloth
- col.itemR(cloth, "pin_stiffness", text="Stiffness")
- col.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
+ colsub = col.column(align=True)
+ colsub.active = cloth.pin_cloth
+ colsub.itemR(cloth, "pin_stiffness", text="Stiffness")
+ colsub.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
- col = split.column(align=True)
+ col = split.column()
col.itemL(text="Presets...")
- col.itemL(text="")
- col.itemR(cloth, "mass")
- col.itemR(cloth, "structural_stiffness", text="Structural")
- col.itemR(cloth, "bending_stiffness", text="Bending")
- col.itemL(text="Damping")
- col.itemR(cloth, "spring_damping", text="Spring")
- col.itemR(cloth, "air_damping", text="Air")
+ col.itemL(text="Material:")
+ colsub = col.column(align=True)
+ colsub.itemR(cloth, "mass")
+ colsub.itemR(cloth, "structural_stiffness", text="Structural")
+ colsub.itemR(cloth, "bending_stiffness", text="Bending")
+ col.itemL(text="Damping:")
+ colsub = col.column(align=True)
+ colsub.itemR(cloth, "spring_damping", text="Spring")
+ colsub.itemR(cloth, "air_damping", text="Air")
# Disabled for now
"""
@@ -124,6 +127,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_clothcollision"
__label__ = "Cloth Collision"
+ __default_closed__ = True
def poll(self, context):
return (context.cloth != None)
@@ -146,7 +150,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
col.itemR(cloth, "min_distance", text="Distance")
col.itemR(cloth, "friction")
- col = split.column(align="True")
+ col = split.column(align=True)
col.itemR(cloth, "enable_self_collision", text="Self Collision")
col = col.column(align=True)
col.active = cloth.enable_self_collision
@@ -156,6 +160,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_stiffness"
__label__ = "Cloth Stiffness Scaling"
+ __default_closed__ = True
def poll(self, context):
return (context.cloth != None)
@@ -175,17 +180,19 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
split = layout.split()
- sub = split.column(align=True)
- sub.itemL(text="Structural Stiffness:")
- sub.itemR(cloth, "structural_stiffness_max", text="Max")
- sub.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="")
+ col = split.column()
+ col.itemL(text="Structural Stiffness:")
+ colsub = col.column(align=True)
+ colsub.itemR(cloth, "structural_stiffness_max", text="Max")
+ colsub.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="")
- sub = split.column(align=True)
- sub.itemL(text="Bending Stiffness:")
- sub.itemR(cloth, "bending_stiffness_max", text="Max")
- sub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
+ col = split.column()
+ col.itemL(text="Bending Stiffness:")
+ colsub = col.column(align=True)
+ colsub.itemR(cloth, "bending_stiffness_max", text="Max")
+ colsub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
bpy.types.register(PHYSICS_PT_cloth)
bpy.types.register(PHYSICS_PT_cloth_cache)
bpy.types.register(PHYSICS_PT_cloth_collision)
-bpy.types.register(PHYSICS_PT_cloth_stiffness)
+bpy.types.register(PHYSICS_PT_cloth_stiffness) \ No newline at end of file
diff --git a/release/ui/buttons_physics_fluid.py b/release/ui/buttons_physics_fluid.py
index 2ab33b4a416..482dd231f14 100644
--- a/release/ui/buttons_physics_fluid.py
+++ b/release/ui/buttons_physics_fluid.py
@@ -51,102 +51,127 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
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)
+ col.itemL(text="Resolution:")
+ colsub = col.column()
colsub.itemR(fluid, "resolution", text="Final")
+ colsub.itemL(text="Render Display:")
colsub.itemR(fluid, "render_display_mode", text="")
+ col.itemL(text="Time:")
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 = col.column()
+ colsub.itemL(text="Required Memory: " + fluid.memory_estimate)
+ colsub.itemR(fluid, "preview_resolution", text="Preview")
+ colsub.itemL(text="Viewport Display:")
colsub.itemR(fluid, "viewport_display_mode", text="")
colsub = col.column()
+ colsub.itemL(text="")
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")
+ layout.itemL(text="Path:")
+ layout.itemR(fluid, "path", text="")
if fluid.type == 'FLUID':
- row = layout.row()
- row.column().itemR(fluid, "initial_velocity")
- row.itemR(fluid, "export_animated_mesh")
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Volume Initialization:")
+ col.itemR(fluid, "volume_initialization", text="")
+ col.itemR(fluid, "export_animated_mesh")
+ col = split.column()
+ col.itemL(text="Initial Velocity:")
+ col.itemR(fluid, "initial_velocity", text="")
if fluid.type == 'OBSTACLE':
- row = layout.row()
- row.itemL()
- row.itemR(fluid, "export_animated_mesh")
- layout.itemR(fluid, "slip_type", expand=True)
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Volume Initialization:")
+ col.itemR(fluid, "volume_initialization", text="")
+ col.itemR(fluid, "export_animated_mesh")
+ col = split.column()
+ col.itemL(text="Slip Type:")
+ colsub=col.column(align=True)
+ colsub.itemR(fluid, "slip_type", text="")
if fluid.slip_type == 'PARTIALSLIP':
- layout.itemR(fluid, "partial_slip_amount", text="Amount")
+ colsub.itemR(fluid, "partial_slip_amount", text="Amount")
- layout.itemR(fluid, "impact_factor")
+ col.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")
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Volume Initialization:")
+ col.itemR(fluid, "volume_initialization", text="")
+ col.itemR(fluid, "export_animated_mesh")
+ col.itemR(fluid, "local_coordinates")
+
+ col = split.column()
+ col.itemL(text="Inflow Velocity:")
+ col.itemR(fluid, "inflow_velocity", text="")
if fluid.type == 'OUTFLOW':
- row = layout.row()
- row.itemL()
- row.itemR(fluid, "export_animated_mesh")
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Volume Initialization:")
+ col.itemR(fluid, "volume_initialization", text="")
+ col.itemR(fluid, "export_animated_mesh")
+ col = split.column()
if fluid.type == 'PARTICLE':
split = layout.split()
col = split.column()
+ col.itemL(text="Influence:")
+ colsub = col.column(align=True)
+ colsub.itemR(fluid, "particle_influence", text="Size")
+ colsub.itemR(fluid, "alpha_influence", text="Alpha")
+ col.itemL(text="Path:")
+
+ layout.itemR(fluid, "path", text="")
+
+ 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="")
+ col.itemR(fluid, "quality", slider=True)
+ col.itemR(fluid, "reverse_frames")
+
+ col = split.column()
col.itemL(text="Time:")
+ col=col.column(align=True)
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.itemL(text="Attraction Force:")
+ col=col.column(align=True)
col.itemR(fluid, "attraction_strength", text="Strength")
col.itemR(fluid, "attraction_radius", text="Radius")
col = split.column()
- col.itemL(text="Velocity:")
+ col.itemL(text="Velocity Force:")
+ col=col.column(align=True)
col.itemR(fluid, "velocity_strength", text="Strength")
col.itemR(fluid, "velocity_radius", text="Radius")
class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_domain_gravity"
- __label__ = "Domain World/Gravity"
+ __label__ = "Domain World"
__default_closed__ = True
def poll(self, context):
@@ -161,18 +186,27 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
split = layout.split()
col = split.column()
- col.itemR(fluid, "gravity")
+ col.itemL(text="Gravity:")
+ col.itemR(fluid, "gravity", text="")
+
+ col.itemL(text="Size:")
+ col.itemR(fluid, "real_world_size", text="Real World Size")
+
+ col = split.column()
+ col.itemL(text="Viscosity Presets:")
+ colsub=col.column(align=True)
+ colsub.itemR(fluid, "viscosity_preset", text="")
- 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")
+ colsub.itemR(fluid, "viscosity_base", text="Base")
+ colsub.itemR(fluid, "viscosity_exponent", text="Exponent", slider=True)
+ else:
+ colsub.itemL(text="")
+ colsub.itemL(text="")
- col = layout.column_flow()
- col.itemR(fluid, "real_world_size")
- col.itemR(fluid, "grid_levels")
+ col.itemL(text="Optimization:")
+ col=col.column(align=True)
+ col.itemR(fluid, "grid_levels", slider=True)
col.itemR(fluid, "compressibility")
class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
@@ -189,16 +223,18 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
layout = self.layout
fluid = context.fluid.settings
- layout.itemL(text="Slip:")
-
- layout.itemR(fluid, "slip_type", expand=True)
+ split = layout.split()
+ col = split.column()
+ col.itemL(text="Slip Type:")
+ col=col.column(align=True)
+ col.itemR(fluid, "slip_type", text="")
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")
+ col.itemR(fluid, "partial_slip_amount", text="Amount")
+ col = split.column()
+ col.itemL(text="Surface:")
+ col=col.column(align=True)
+ col.itemR(fluid, "surface_smoothing", text="Smoothing")
+ col.itemR(fluid, "surface_subdivisions", text="Subdivisions")
class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
__idname__ = "PHYSICS_PT_domain_particles"
@@ -214,10 +250,11 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
layout = self.layout
fluid = context.fluid.settings
- layout.itemR(fluid, "tracer_particles")
- layout.itemR(fluid, "generate_particles")
+ col=layout.column(align=True)
+ col.itemR(fluid, "tracer_particles")
+ col.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)
+bpy.types.register(PHYSICS_PT_domain_particles) \ No newline at end of file
diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c
index 2b4032af503..6cf916c4038 100644
--- a/source/blender/blenkernel/intern/fluidsim.c
+++ b/source/blender/blenkernel/intern/fluidsim.c
@@ -83,9 +83,9 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
fss->type = OB_FLUIDSIM_ENABLE;
fss->show_advancedoptions = 0;
- fss->resolutionxyz = 50;
- fss->previewresxyz = 25;
- fss->realsize = 0.03;
+ fss->resolutionxyz = 65;
+ fss->previewresxyz = 45;
+ fss->realsize = 0.5;
fss->guiDisplayMode = 2; // preview
fss->renderDisplayMode = 3; // render
@@ -98,7 +98,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
fss->gravy = 0.0;
fss->gravz = -9.81;
fss->animStart = 0.0;
- fss->animEnd = 0.30;
+ fss->animEnd = 4.0;
fss->gstar = 0.005; // used as normgstar
fss->maxRefine = -1;
// maxRefine is set according to resolutionxyz during bake
@@ -114,15 +114,15 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
// no bounding box needed
// todo - reuse default init from elbeem!
- fss->typeFlags = OB_FSBND_NOSLIP;
+ fss->typeFlags = OB_FSBND_PARTSLIP;
fss->domainNovecgen = 0;
fss->volumeInitType = 1; // volume
- fss->partSlipValue = 0.0;
+ fss->partSlipValue = 0.5;
fss->generateTracers = 0;
fss->generateParticles = 0.0;
fss->surfaceSmoothing = 1.0;
- fss->surfaceSubdivs = 1.0;
+ fss->surfaceSubdivs = 0.0;
fss->particleInfSize = 0.0;
fss->particleInfAlpha = 0.0;