Fluid: Cleaned up some parts of the fluid modifier UI

Especially when expanding the UI panel horizontally, there were some problems with empty space.
This commit is contained in:
Sebastián Barschkis
2020-03-19 13:15:25 +01:00
parent cc516b82ef
commit 91c1759956

View File

@@ -173,7 +173,6 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel):
col = flow.column() col = flow.column()
col.enabled = not domain.has_cache_baked_guide col.enabled = not domain.has_cache_baked_guide
col.prop(domain, "resolution_max", text="Resolution Divisions") col.prop(domain, "resolution_max", text="Resolution Divisions")
col = flow.column()
col.prop(domain, "time_scale", text="Time Scale") col.prop(domain, "time_scale", text="Time Scale")
col.prop(domain, "cfl_condition", text="CFL Number") col.prop(domain, "cfl_condition", text="CFL Number")
@@ -192,6 +191,8 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel):
sub.prop(domain, "gravity", text="Using Scene Gravity", icon='SCENE_DATA') sub.prop(domain, "gravity", text="Using Scene Gravity", icon='SCENE_DATA')
else: else:
col.prop(domain, "gravity", text="Gravity") col.prop(domain, "gravity", text="Gravity")
col = flow.column()
col.prop(domain, "clipping", text="Empty Space") col.prop(domain, "clipping", text="Empty Space")
if domain.cache_type == 'MODULAR': if domain.cache_type == 'MODULAR':
@@ -421,14 +422,16 @@ class PHYSICS_PT_fire(PhysicButtonsPanel, Panel):
col = flow.column() col = flow.column()
col.prop(domain, "burning_rate", text="Reaction Speed") col.prop(domain, "burning_rate", text="Reaction Speed")
col = flow.column(align=True) row = col.row()
col.prop(domain, "flame_smoke", text="Flame Smoke") sub = row.column(align=True)
col.prop(domain, "flame_vorticity", text="Vorticity") sub.prop(domain, "flame_smoke", text="Flame Smoke")
sub.prop(domain, "flame_vorticity", text="Vorticity")
col = flow.column(align=True) col = flow.column(align=True)
col.prop(domain, "flame_max_temp", text="Temperature Maximum") col.prop(domain, "flame_max_temp", text="Temperature Maximum")
col.prop(domain, "flame_ignition", text="Minimum") col.prop(domain, "flame_ignition", text="Minimum")
col = flow.column() row = col.row()
col.prop(domain, "flame_smoke_color", text="Flame Color") row.prop(domain, "flame_smoke_color", text="Flame Color")
class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel): class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel):
@@ -468,21 +471,23 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel):
col = flow.column() col = flow.column()
col.prop(domain, "simulation_method", expand=False) col.prop(domain, "simulation_method", expand=False)
col.prop(domain, "flip_ratio", text="FLIP Ratio") col.prop(domain, "flip_ratio", text="FLIP Ratio")
col.prop(domain, "particle_radius", text="Particle Radius") row = col.row()
sub = row.column(align=True)
sub.prop(domain, "particle_radius", text="Particle Radius")
sub.prop(domain, "particle_number", text="Sampling")
sub.prop(domain, "particle_randomness", text="Randomness")
col = flow.column() col = flow.column()
col.prop(domain, "particle_max", text="Particles Maximum") row = col.row()
col.prop(domain, "particle_min", text="Minimum") sub = row.column(align=True)
sub.prop(domain, "particle_max", text="Particles Maximum")
col = flow.column() sub.prop(domain, "particle_min", text="Minimum")
col.prop(domain, "particle_number", text="Particle Sampling")
col.prop(domain, "particle_band_width", text="Narrow Band Width") col.prop(domain, "particle_band_width", text="Narrow Band Width")
col.prop(domain, "particle_randomness", text="Particle Randomness") row = col.row()
sub = row.column(align=True)
col = flow.column() sub.prop(domain, "use_fractions", text="Fractional Obstacles")
col.prop(domain, "use_fractions", text="Fractional Obstacles") sub.active = domain.use_fractions
col.active = domain.use_fractions sub.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold")
col.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold")
class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel): class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel):
@@ -1123,35 +1128,37 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
col.prop(domain, "cache_type", expand=False) col.prop(domain, "cache_type", expand=False)
col.enabled = not is_baking_any col.enabled = not is_baking_any
col = flow.column(align=True)
col.separator() col.separator()
row = col.row()
col = row.column(align=True)
col.prop(domain, "cache_frame_start", text="Frame Start") col.prop(domain, "cache_frame_start", text="Frame Start")
col.prop(domain, "cache_frame_end", text="End") col.prop(domain, "cache_frame_end", text="End")
col.enabled = not is_baking_any row.enabled = not is_baking_any
col.separator() col.separator()
col = flow.column() col = flow.column()
col.enabled = not is_baking_any and not has_baked_data row = col.row()
col.prop(domain, "cache_data_format", text="Data File Format") row.enabled = not is_baking_any and not has_baked_data
row.prop(domain, "cache_data_format", text="Data File Format")
if md.domain_settings.domain_type in {'GAS'}: if md.domain_settings.domain_type in {'GAS'}:
if domain.use_noise: if domain.use_noise:
col = flow.column() row = col.row()
col.enabled = not is_baking_any and not has_baked_noise row.enabled = not is_baking_any and not has_baked_noise
col.prop(domain, "cache_noise_format", text="Noise File Format") row.prop(domain, "cache_noise_format", text="Noise File Format")
if md.domain_settings.domain_type in {'LIQUID'}: if md.domain_settings.domain_type in {'LIQUID'}:
# File format for all particle systemes (FLIP and secondary) # File format for all particle systemes (FLIP and secondary)
col = flow.column() row = col.row()
col.enabled = not is_baking_any and not has_baked_particles and not has_baked_data row.enabled = not is_baking_any and not has_baked_particles and not has_baked_data
col.prop(domain, "cache_particle_format", text="Particle File Format") row.prop(domain, "cache_particle_format", text="Particle File Format")
if domain.use_mesh: if domain.use_mesh:
col = flow.column() row = col.row()
col.enabled = not is_baking_any and not has_baked_mesh row.enabled = not is_baking_any and not has_baked_mesh
col.prop(domain, "cache_mesh_format", text="Mesh File Format") row.prop(domain, "cache_mesh_format", text="Mesh File Format")
if domain.cache_type == 'FINAL': if domain.cache_type == 'FINAL':