From 4403ca80bda690c0ac44e4a6db0cddf4b2428006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Thu, 22 Feb 2018 16:26:50 +0100 Subject: Smoke: expose empty space clipping property to the UI. This is used to determine which voxels are to be considered empty space. Previously it was hardcoded for converting dense grids to OpenVDB grids to reduce disk space usage. This value is also useful for rendering engines to know, i.e. to optimize ray marching. --- source/blender/makesrna/intern/rna_smoke.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/makesrna/intern/rna_smoke.c') diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 1db64100d94..54daba706c7 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -898,6 +898,14 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ColorRamp"); RNA_def_property_ui_text(prop, "Color Ramp", ""); RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + + prop = RNA_def_property(srna, "clipping", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "clipping"); + RNA_def_property_range(prop, 0.0, 1.0); + RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 3); + RNA_def_property_ui_text(prop, "Clipping", + "Value under which voxels are considered empty space to optimize caching or rendering"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, NULL); } static void rna_def_smoke_flow_settings(BlenderRNA *brna) -- cgit v1.2.3