Cleanup: remove references to FLUID from point_cache_ui

Fluid (Smoke/Liquid) has its own UI (uses `PHYSICS_PT_cache` in
`properties_physics_fluid.py`), does not use `point_cache_ui` at all.

It seems 4235fe37d6 should have done this already.

Afaict, this is also not relevant for loading old (e.g. 2.79) files with
the old smoke system (since their caches wont be read anyways).

Pull Request: https://projects.blender.org/blender/blender/pulls/117404
This commit is contained in:
Philipp Oeser 2024-02-21 10:18:47 +01:00 committed by Philipp Oeser
parent 543194db70
commit a2a03252c6
1 changed files with 7 additions and 11 deletions

View File

@ -106,7 +106,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
)
# cache-type can be 'PSYS' 'HAIR' 'FLUID' etc.
# cache-type can be 'PSYS' 'HAIR' etc. ('FLUID' uses its own cache)
def point_cache_ui(self, cache, enabled, cachetype):
layout = self.layout
@ -130,12 +130,8 @@ def point_cache_ui(self, cache, enabled, cachetype):
col.operator("ptcache.add", icon='ADD', text="")
col.operator("ptcache.remove", icon='REMOVE', text="")
if cachetype in {'PSYS', 'HAIR', 'FLUID'}:
if cachetype in {'PSYS', 'HAIR'}:
col = layout.column()
if cachetype == 'FLUID':
col.prop(cache, "use_library_path", text="Use Library Path")
col.prop(cache, "use_external")
if cache.use_external:
@ -149,14 +145,14 @@ def point_cache_ui(self, cache, enabled, cachetype):
col.alignment = 'RIGHT'
col.label(text=cache_info)
else:
if cachetype in {'FLUID', 'DYNAMIC_PAINT'}:
if cachetype == 'DYNAMIC_PAINT':
if not is_saved:
col = layout.column(align=True)
col.alignment = 'RIGHT'
col.label(text="Cache is disabled until the file is saved")
layout.enabled = False
if not cache.use_external or cachetype == 'FLUID':
if not cache.use_external:
col = layout.column(align=True)
if cachetype not in {'PSYS', 'DYNAMIC_PAINT'}:
@ -164,18 +160,18 @@ def point_cache_ui(self, cache, enabled, cachetype):
col.prop(cache, "frame_start", text="Simulation Start")
col.prop(cache, "frame_end")
if cachetype not in {'FLUID', 'CLOTH', 'DYNAMIC_PAINT', 'RIGID_BODY'}:
if cachetype not in {'CLOTH', 'DYNAMIC_PAINT', 'RIGID_BODY'}:
col.prop(cache, "frame_step")
cache_info = cache.info
if cachetype != 'FLUID' and cache_info: # avoid empty space.
if cache_info: # avoid empty space.
col = layout.column(align=True)
col.alignment = 'RIGHT'
col.label(text=cache_info)
can_bake = True
if cachetype not in {'FLUID', 'DYNAMIC_PAINT', 'RIGID_BODY'}:
if cachetype not in {'DYNAMIC_PAINT', 'RIGID_BODY'}:
if not is_saved:
col = layout.column(align=True)
col.alignment = 'RIGHT'