Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_fluid.c
| Show First 20 Lines • Show All 1,236 Lines • ▼ Show 20 Lines | if (value != settings->type) { | ||||
| if (prev_value == FLUID_FLOW_TYPE_LIQUID) { | if (prev_value == FLUID_FLOW_TYPE_LIQUID) { | ||||
| settings->surface_distance = 1.5f; | settings->surface_distance = 1.5f; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| #else | #else | ||||
| static void rna_def_fluid_mesh_vertices(BlenderRNA *brna) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| srna = RNA_def_struct(brna, "FluidDomainVertexVelocity", NULL); | |||||
| RNA_def_struct_ui_text(srna, "Fluid Mesh Velocity", "Velocity of a simulated fluid mesh"); | |||||
| RNA_def_struct_ui_icon(srna, ICON_VERTEXSEL); | |||||
| prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY); | |||||
| RNA_def_property_array(prop, 3); | |||||
| RNA_def_property_float_sdna(prop, NULL, "vel"); | |||||
| RNA_def_property_ui_text(prop, "Velocity", ""); | |||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| } | |||||
| static void rna_def_fluid_domain_settings(BlenderRNA *brna) | static void rna_def_fluid_domain_settings(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static EnumPropertyItem domain_types[] = { | static EnumPropertyItem domain_types[] = { | ||||
| {FLUID_DOMAIN_TYPE_GAS, "GAS", 0, "Gas", "Create domain for gases"}, | {FLUID_DOMAIN_TYPE_GAS, "GAS", 0, "Gas", "Create domain for gases"}, | ||||
| {FLUID_DOMAIN_TYPE_LIQUID, "LIQUID", 0, "Liquid", "Create domain for liquids"}, | {FLUID_DOMAIN_TYPE_LIQUID, "LIQUID", 0, "Liquid", "Create domain for liquids"}, | ||||
| ▲ Show 20 Lines • Show All 745 Lines • ▼ Show 20 Lines | # endif /* WITH_FLUID */ | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_mesh_reset"); | RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_mesh_reset"); | ||||
| prop = RNA_def_property(srna, "mesh_generator", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "mesh_generator", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "mesh_generator"); | RNA_def_property_enum_sdna(prop, NULL, "mesh_generator"); | ||||
| RNA_def_property_enum_items(prop, fluid_mesh_quality_items); | RNA_def_property_enum_items(prop, fluid_mesh_quality_items); | ||||
| RNA_def_property_ui_text(prop, "Mesh generator", "Which particle level set generator to use"); | RNA_def_property_ui_text(prop, "Mesh generator", "Which particle level set generator to use"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Fluid_update"); | ||||
| prop = RNA_def_property(srna, "mesh_vertices", PROP_COLLECTION, PROP_NONE); | |||||
| RNA_def_property_collection_sdna(prop, NULL, "mesh_velocities", "totvert"); | |||||
| RNA_def_property_struct_type(prop, "FluidDomainVertexVelocity"); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Fluid Mesh Vertices", "Vertices of the fluid mesh generated by simulation"); | |||||
| rna_def_fluid_mesh_vertices(brna); | |||||
| prop = RNA_def_property(srna, "use_mesh", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_mesh", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_MESH); | RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_MESH); | ||||
| RNA_def_property_ui_text(prop, "Use Mesh", "Enable fluid mesh (using amplification)"); | RNA_def_property_ui_text(prop, "Use Mesh", "Enable fluid mesh (using amplification)"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_update"); | ||||
| prop = RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_SPEED_VECTORS); | RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_SPEED_VECTORS); | ||||
| ▲ Show 20 Lines • Show All 985 Lines • Show Last 20 Lines | |||||