diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_smoke.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_smoke.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index dad5577dc12..22c1a115a15 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -443,6 +443,26 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) {0, NULL, 0, NULL, NULL} }; + static EnumPropertyItem smoke_view_items[] = { + {MOD_SMOKE_SLICE_VIEW_ALIGNED, "VIEW_ALIGNED", 0, "View", "Slice volume parallel to the view plane"}, + {MOD_SMOKE_SLICE_AXIS_ALIGNED, "AXIS_ALIGNED", 0, "Axis", "Slice volume parallel to the major axis"}, + {0, NULL, 0, NULL, NULL} + }; + + static EnumPropertyItem axis_slice_method_items[] = { + {AXIS_SLICE_FULL, "FULL", 0, "Full", "Slice the whole domain object"}, + {AXIS_SLICE_SINGLE, "SINGLE", 0, "Single", "Perform a single slice of the domain object"}, + {0, NULL, 0, NULL, NULL} + }; + + static EnumPropertyItem axis_slice_position_items[] = { + {SLICE_AXIS_AUTO, "AUTO", 0, "Auto", "Adjust slice direction according to the view direction"}, + {SLICE_AXIS_X, "X", 0, "X", "Slice along the X axis"}, + {SLICE_AXIS_Y, "Y", 0, "Y", "Slice along the Y axis"}, + {SLICE_AXIS_Z, "Z", 0, "Z", "Slice along the Z axis"}, + {0, NULL, 0, NULL, NULL} + }; + srna = RNA_def_struct(brna, "SmokeDomainSettings", NULL); RNA_def_struct_ui_text(srna, "Domain Settings", "Smoke domain settings"); RNA_def_struct_sdna(srna, "SmokeDomainSettings"); @@ -719,6 +739,48 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) RNA_def_property_enum_funcs(prop, NULL, "rna_Smoke_cachetype_set", NULL); RNA_def_property_ui_text(prop, "File Format", "Select the file format to be used for caching"); RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache"); + + /* display settings */ + + prop = RNA_def_property(srna, "slice_method", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "slice_method"); + RNA_def_property_enum_items(prop, smoke_view_items); + RNA_def_property_ui_text(prop, "View Method", "How to slice the volume for viewport rendering"); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + + prop = RNA_def_property(srna, "axis_slice_method", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "axis_slice_method"); + RNA_def_property_enum_items(prop, axis_slice_method_items); + RNA_def_property_ui_text(prop, "Method", ""); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + + prop = RNA_def_property(srna, "slice_axis", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "slice_axis"); + RNA_def_property_enum_items(prop, axis_slice_position_items); + RNA_def_property_ui_text(prop, "Axis", ""); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + + prop = RNA_def_property(srna, "slice_per_voxel", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "slice_per_voxel"); + RNA_def_property_range(prop, 0.0, 100.0); + RNA_def_property_ui_range(prop, 0.0, 5.0, 0.1, 1); + RNA_def_property_ui_text(prop, "Slice Per Voxel", + "How many slices per voxel should be generated"); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + + prop = RNA_def_property(srna, "slice_depth", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "slice_depth"); + 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, "Position", "Position of the slice"); + RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL); + + prop = RNA_def_property(srna, "display_thickness", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "display_thickness"); + RNA_def_property_range(prop, 0.001, 1000.0); + RNA_def_property_ui_range(prop, 0.1, 100.0, 0.1, 3); + RNA_def_property_ui_text(prop, "Thickness", "Thickness of smoke drawing in the viewport"); + RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, NULL); } static void rna_def_smoke_flow_settings(BlenderRNA *brna) |