diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-12-06 01:33:21 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-12-06 01:33:21 +0300 |
commit | fe0520e2c841569712e14446f4afbb4036daae3a (patch) | |
tree | ff76d76a68a0709341de9969a9d11872fa6c4eab /release/scripts/startup/bl_operators | |
parent | 7471f09f2bb20fed33c57ca0ad53990be3eb48fd (diff) |
UI: add a message to indicate when using a modifier that wasn't
compiled.
This adds a short message to the smoke, remesh and boolean modifiers' UI
when trying to use them when their compilation was turned off. This was
already implemented for the fluid and ocean simulation modifiers.
This also makes the 'quick fluid' and 'quick smoke' operator abort and
report when trying to use them when unavailable.
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r-- | release/scripts/startup/bl_operators/object_quick_effects.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py index 414855c7e35..cdab380bb9c 100644 --- a/release/scripts/startup/bl_operators/object_quick_effects.py +++ b/release/scripts/startup/bl_operators/object_quick_effects.py @@ -317,6 +317,10 @@ class QuickSmoke(Operator): ) def execute(self, context): + if not bpy.app.build_options.mod_smoke: + self.report({'ERROR'}, "Build without Smoke modifier support") + return {'CANCELLED'} + fake_context = context.copy() mesh_objects = [obj for obj in context.selected_objects if obj.type == 'MESH'] @@ -562,6 +566,10 @@ class QuickFluid(Operator): ) def execute(self, context): + if not bpy.app.build_options.mod_fluid: + self.report({'ERROR'}, "Build without Fluid modifier support") + return {'CANCELLED'} + fake_context = context.copy() mesh_objects = [obj for obj in context.selected_objects if (obj.type == 'MESH' and 0.0 not in obj.dimensions)] |