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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2016-09-24 22:41:16 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-09-24 23:21:02 +0300
commit4446acbf17748f30b163016cfc4b88bba8653517 (patch)
tree95529532e9be510c3eb6605aac0d5876239ac490 /release
parenta070a5befa1110120547333d84c6e67cae53d648 (diff)
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
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py35
1 files changed, 35 insertions, 0 deletions
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__)