Quick effects: avoid error in builds without OpenVDB

Differential Revision: https://developer.blender.org/D8626
This commit is contained in:
Philipp Oeser 2020-08-19 14:29:06 +02:00
parent a04ac5b52d
commit 930021129a
Notes: blender-bot 2024-03-22 15:57:27 +01:00
Referenced by issue #80333, Cursor not reset properly (disappears after rotating navigation gizmo, stuck after importing)
1 changed files with 4 additions and 2 deletions

View File

@ -400,7 +400,8 @@ class QuickSmoke(ObjectModeOperator, Operator):
obj.modifiers[-1].domain_settings.use_noise = True
# ensure correct cache file format for smoke
obj.modifiers[-1].domain_settings.cache_data_format = 'OPENVDB'
if bpy.app.build_options.openvdb:
obj.modifiers[-1].domain_settings.cache_data_format = 'OPENVDB'
# Setup material
@ -515,7 +516,8 @@ class QuickLiquid(Operator):
obj.modifiers[-1].domain_settings.use_collision_border_bottom = True
# ensure correct cache file formats for liquid
obj.modifiers[-1].domain_settings.cache_data_format = 'OPENVDB'
if bpy.app.build_options.openvdb:
obj.modifiers[-1].domain_settings.cache_data_format = 'OPENVDB'
obj.modifiers[-1].domain_settings.cache_mesh_format = 'BOBJECT'
# change domain type, will also allocate and show particle system for FLIP