Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-06-26 14:28:36 +0300
committerJacques Lucke <jacques@blender.org>2020-06-26 14:29:15 +0300
commit8b119a55244560485bdcc5f4f5323ea79457a24c (patch)
treec2318fd9b6bda7ddc8e23a0317a7ea508e19c764 /release/scripts/startup/bl_ui/properties_physics_fluid.py
parentda2e71be2fc4dc5b3028ff91cc2c5c4eef341302 (diff)
Fix T76996: Don't allow baking when domain is not in object mode
This does not work, because the fluid modifier is not called when the object is e.g. in edit mode. Another possible fix would be to switch to object mode when baking starts automatically. However, I think it is reasonable to simply not allow baking while the domain is in edit mode. Reviewers: sebbas Differential Revision: https://developer.blender.org/D7848
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_fluid.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 1727771637d..0bfa70b008b 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -210,7 +210,7 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel):
note.label(icon='INFO', text="Unbaked Guides: Bake Guides or disable them")
split = layout.split()
- split.enabled = note_flag
+ split.enabled = note_flag and ob.mode == 'OBJECT'
bake_incomplete = (domain.cache_frame_pause_data < domain.cache_frame_end)
if domain.cache_resumable and domain.has_cache_baked_data and not domain.is_cache_baking_data and bake_incomplete:
@@ -705,6 +705,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel):
layout = self.layout
layout.use_property_split = True
+ ob = context.object
domain = context.fluid.domain_settings
layout.active = domain.use_noise
@@ -736,7 +737,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel):
note.label(icon='INFO', text="Unbaked Data: Bake Data first")
split = layout.split()
- split.enabled = domain.has_cache_baked_data and note_flag
+ split.enabled = domain.has_cache_baked_data and note_flag and ob.mode == 'OBJECT'
bake_incomplete = (domain.cache_frame_pause_noise < domain.cache_frame_end)
if domain.has_cache_baked_noise and not domain.is_cache_baking_noise and bake_incomplete:
@@ -777,6 +778,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel):
layout = self.layout
layout.use_property_split = True
+ ob = context.object
domain = context.fluid.domain_settings
layout.active = domain.use_mesh
@@ -821,7 +823,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel):
note.label(icon='INFO', text="Unbaked Data: Bake Data first")
split = layout.split()
- split.enabled = domain.has_cache_baked_data and note_flag
+ split.enabled = domain.has_cache_baked_data and note_flag and ob.mode == 'OBJECT'
bake_incomplete = (domain.cache_frame_pause_mesh < domain.cache_frame_end)
if domain.has_cache_baked_mesh and not domain.is_cache_baking_mesh and bake_incomplete:
@@ -855,6 +857,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel):
layout = self.layout
layout.use_property_split = True
+ ob = context.object
domain = context.fluid.domain_settings
is_baking_any = domain.is_cache_baking_any
@@ -936,6 +939,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel):
split = layout.split()
split.enabled = (
note_flag and
+ ob.mode == 'OBJECT' and
domain.has_cache_baked_data and
(domain.use_spray_particles or
domain.use_bubble_particles or
@@ -1114,6 +1118,7 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ ob = context.object
md = context.fluid
domain = context.fluid.domain_settings
@@ -1160,6 +1165,7 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
col.separator()
split = layout.split()
+ split.enabled = ob.mode == 'OBJECT'
bake_incomplete = (domain.cache_frame_pause_data < domain.cache_frame_end)
if domain.cache_resumable and domain.has_cache_baked_data and not domain.is_cache_baking_data and bake_incomplete: