From a2a03252c6cf44f6c42ef474cd5d164d3ca3af4a Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 21 Feb 2024 10:18:47 +0100 Subject: [PATCH] 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 4235fe37d6aa 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 --- .../startup/bl_ui/properties_physics_common.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/startup/bl_ui/properties_physics_common.py b/scripts/startup/bl_ui/properties_physics_common.py index 20fa1507f6d..b666e7fba86 100644 --- a/scripts/startup/bl_ui/properties_physics_common.py +++ b/scripts/startup/bl_ui/properties_physics_common.py @@ -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'