diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-09-10 13:45:59 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-09-10 13:46:18 +0300 |
commit | e347b6b86bfc62f9580a5955b1c258e30c10badc (patch) | |
tree | 86abc13efd8525231c776695b094a98f04fbf08e /release/scripts/startup | |
parent | 25faee8d07f5c358fbc9be934aaa1502622a4b9e (diff) |
Fix T80372: Mantaflow Noise Not working with Smoke/Smoke and Fire
Modular caches for noise, particles and meshes require that additional data is baked (i.e. is resumable option). With this commit users will be explicitly asked to enable this option before being able to bake noise, particles or meshes.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_fluid.py | 51 |
1 files changed, 36 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 8dd5b935922..427f8c2c85f 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -731,11 +731,18 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel): # Deactivate bake operator if data has not been baked yet. note_flag = True - if domain.use_noise and not domain.has_cache_baked_data and domain.cache_type == 'MODULAR': - note = layout.split() - note_flag = False - note.enabled = note_flag - note.label(icon='INFO', text="Unbaked Data: Bake Data first") + if domain.use_noise and domain.cache_type == 'MODULAR': + label = "" + if not domain.has_cache_baked_data: + label = "Unbaked Data: Bake Data first" + if not domain.cache_resumable: + label = "Non Resumable Cache: Enable resumable option first" + + if label: + note = layout.split() + note_flag = False + note.enabled = note_flag + note.label(icon='INFO', text=label) split = layout.split() split.enabled = domain.has_cache_baked_data and note_flag and ob.mode == 'OBJECT' @@ -817,11 +824,18 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel): # Deactivate bake operator if data has not been baked yet. note_flag = True - if domain.use_mesh and not domain.has_cache_baked_data and domain.cache_type == 'MODULAR': - note = layout.split() - note_flag = False - note.enabled = note_flag - note.label(icon='INFO', text="Unbaked Data: Bake Data first") + if domain.use_mesh and domain.cache_type == 'MODULAR': + label = "" + if not domain.has_cache_baked_data: + label = "Unbaked Data: Bake Data first" + if not domain.cache_resumable: + label = "Non Resumable Cache: Enable resumable option first" + + if label: + note = layout.split() + note_flag = False + note.enabled = note_flag + note.label(icon='INFO', text=label) split = layout.split() split.enabled = domain.has_cache_baked_data and note_flag and ob.mode == 'OBJECT' @@ -931,11 +945,18 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel): # Deactivate bake operator if data has not been baked yet. note_flag = True - if using_particles and not domain.has_cache_baked_data and domain.cache_type == 'MODULAR': - note = layout.split() - note_flag = False - note.enabled = note_flag - note.label(icon='INFO', text="Unbaked Data: Bake Data first") + if using_particles and domain.cache_type == 'MODULAR': + label = "" + if not domain.has_cache_baked_data: + label = "Unbaked Data: Bake Data first" + if not domain.cache_resumable: + label = "Non Resumable Cache: Enable resumable option first" + + if label: + note = layout.split() + note_flag = False + note.enabled = note_flag + note.label(icon='INFO', text=label) split = layout.split() split.enabled = ( |