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.
This commit is contained in:
Sebastián Barschkis 2020-09-10 12:45:59 +02:00
parent 25faee8d07
commit e347b6b86b
Notes: blender-bot 2023-02-14 07:40:56 +01:00
Referenced by issue #80433, Incomplete liqud mesh using modular cache type
Referenced by issue #80396, Potential candidates for corrective releases
Referenced by issue #80372, Mantaflow Noise Not working with Smoke/Smoke and Fire
1 changed files with 36 additions and 15 deletions

View File

@ -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 = (