From 4446acbf17748f30b163016cfc4b88bba8653517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Sat, 24 Sep 2016 21:41:16 +0200 Subject: Viewport smoke: add support for axis aligned slicing. Current approach uses view aligned slicing to generate polygons for GL texturing such that the generated polygons are always facing the view plane. Now it is also possible to use object aligned slicing, which creates polygons by slicing the object perpendicular to whichever axis is facing the most the view plane. It is also possible to create a single slice for inspecting the volume, or for 2D rendering effects. Settings for this, along with a density multiplier setting, are to be found in a newly added "Smoke Display Settings" panel in the smoke domain properties tab. Reviewers: plasmasolutions, gottfried Differential Revision: https://developer.blender.org/D1733 --- .../startup/bl_ui/properties_physics_smoke.py | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'release/scripts/startup/bl_ui/properties_physics_smoke.py') diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index 99aa54a958a..829850e4f2f 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -349,5 +349,40 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel): domain = context.smoke.domain_settings effector_weights_ui(self, context, domain.effector_weights, 'SMOKE') + +class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel): + bl_label = "Smoke Display Settings" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + md = context.smoke + rd = context.scene.render + return md and (md.smoke_type == 'DOMAIN') and (not rd.use_game_engine) + + def draw(self, context): + domain = context.smoke.domain_settings + layout = self.layout + + layout.prop(domain, "display_thickness") + + layout.separator() + layout.label(text="Slicing:") + layout.prop(domain, "slice_method") + + slice_method = domain.slice_method + axis_slice_method = domain.axis_slice_method + + if slice_method == 'AXIS_ALIGNED': + layout.prop(domain, "axis_slice_method") + + if axis_slice_method == 'SINGLE': + layout.prop(domain, "slice_axis") + layout.prop(domain, "slice_depth") + + if axis_slice_method == 'FULL': + layout.prop(domain, "slice_per_voxel") + + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) -- cgit v1.2.3