UI: Simplify Volumentric Data settings for Fluids
* Advanced was renamed to Volumetric Data * Labels shortened to Format, Compression, Precision * All Volumetric data settings are now under one category Pull Request: https://projects.blender.org/blender/blender/pulls/137490
This commit is contained in:
committed by
Brecht Van Lommel
parent
d66a132c75
commit
932fa1afb4
@@ -1261,12 +1261,10 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
|
||||
layout = self.layout
|
||||
|
||||
ob = context.object
|
||||
md = context.fluid
|
||||
domain = context.fluid.domain_settings
|
||||
|
||||
is_baking_any = domain.is_cache_baking_any
|
||||
has_baked_data = domain.has_cache_baked_data
|
||||
has_baked_mesh = domain.has_cache_baked_mesh
|
||||
|
||||
col = layout.column()
|
||||
col.prop(domain, "cache_directory", text="")
|
||||
@@ -1294,15 +1292,6 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
|
||||
row.enabled = not is_baking_any and not has_baked_data
|
||||
row.prop(domain, "cache_resumable", text="Is Resumable")
|
||||
|
||||
row = col.row()
|
||||
row.enabled = not is_baking_any and not has_baked_data
|
||||
row.prop(domain, "cache_data_format", text="Format Volumes")
|
||||
|
||||
if md.domain_settings.domain_type == 'LIQUID' and domain.use_mesh:
|
||||
row = col.row()
|
||||
row.enabled = not is_baking_any and not has_baked_mesh
|
||||
row.prop(domain, "cache_mesh_format", text="Meshes")
|
||||
|
||||
if domain.cache_type == 'ALL':
|
||||
col.separator()
|
||||
split = layout.split()
|
||||
@@ -1329,7 +1318,7 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
|
||||
|
||||
|
||||
class PHYSICS_PT_export(PhysicButtonsPanel, Panel):
|
||||
bl_label = "Advanced"
|
||||
bl_label = "Volumetric Data"
|
||||
bl_parent_id = "PHYSICS_PT_cache"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
COMPAT_ENGINES = {
|
||||
@@ -1340,11 +1329,7 @@ class PHYSICS_PT_export(PhysicButtonsPanel, Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
domain = context.fluid.domain_settings
|
||||
if (
|
||||
not PhysicButtonsPanel.poll_fluid_domain(context) or
|
||||
(domain.cache_data_format != 'OPENVDB' and bpy.app.debug_value != 3001)
|
||||
):
|
||||
if not PhysicButtonsPanel.poll_fluid_domain(context):
|
||||
return False
|
||||
|
||||
return (context.engine in cls.COMPAT_ENGINES)
|
||||
@@ -1354,22 +1339,33 @@ class PHYSICS_PT_export(PhysicButtonsPanel, Panel):
|
||||
layout.use_property_split = True
|
||||
|
||||
domain = context.fluid.domain_settings
|
||||
md = context.fluid
|
||||
|
||||
is_baking_any = domain.is_cache_baking_any
|
||||
has_baked_any = domain.has_cache_baked_any
|
||||
has_baked_data = domain.has_cache_baked_data
|
||||
has_baked_mesh = domain.has_cache_baked_mesh
|
||||
|
||||
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
||||
flow.enabled = not is_baking_any and not has_baked_any
|
||||
|
||||
col = flow.column()
|
||||
|
||||
row = col.row()
|
||||
row.enabled = not is_baking_any and not has_baked_data
|
||||
row.prop(domain, "cache_data_format", text="Format")
|
||||
|
||||
if domain.cache_data_format == 'OPENVDB':
|
||||
col.enabled = not is_baking_any and not has_baked_data
|
||||
col.prop(domain, "openvdb_cache_compress_type", text="Compression Volumes")
|
||||
col.prop(domain, "openvdb_cache_compress_type", text="Compression")
|
||||
|
||||
col = flow.column()
|
||||
col.prop(domain, "openvdb_data_depth", text="Precision Volumes")
|
||||
col.prop(domain, "openvdb_data_depth", text="Precision")
|
||||
|
||||
if md.domain_settings.domain_type == 'LIQUID' and domain.use_mesh:
|
||||
row = col.row()
|
||||
row.enabled = not is_baking_any and not has_baked_mesh
|
||||
row.prop(domain, "cache_mesh_format", text="Meshes")
|
||||
|
||||
# Only show the advanced panel to advanced users who know Mantaflow's birthday :)
|
||||
if bpy.app.debug_value == 3001:
|
||||
|
||||
Reference in New Issue
Block a user