static void rna_def_fluidsim_inflow(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; srna = RNA_def_struct(brna, "InflowFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "Fluid simulation settings for objects adding fluids in the simulation"); rna_def_fluidsim_active(srna); rna_def_fluidsim_volume(srna); prop = RNA_def_property(srna, "inflow_velocity", PROP_FLOAT, PROP_VELOCITY); RNA_def_property_float_sdna(prop, NULL, "iniVelx"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -1000.1, 1000.1); RNA_def_property_ui_text(prop, "Inflow Velocity", "Initial velocity of fluid"); prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSINFLOW_LOCALCOORD); RNA_def_property_ui_text(prop, "Local Coordinates", "Use local coordinates for inflow (e.g. for rotating objects)"); }
static void rna_def_fluidsim_obstacle(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; srna = RNA_def_struct(brna, "ObstacleFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "Fluid simulation settings for obstacles in the simulation"); rna_def_fluidsim_active(srna); rna_def_fluidsim_volume(srna); rna_def_fluidsim_slip(srna); prop = RNA_def_property(srna, "impact_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, -2.0, 10.0); RNA_def_property_ui_text( prop, "Impact Factor", "This is an unphysical value for moving objects - it controls the impact an obstacle " "has on the fluid, =0 behaves a bit like outflow (deleting fluid), =1 is default, " "while >1 results in high forces (can be used to tweak total mass)"); }
static void rna_def_fluidsim_control(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; srna = RNA_def_struct(brna, "ControlFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "Fluid simulation settings for objects controlling the motion of fluid in the simulation"); rna_def_fluidsim_active(srna); prop = RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart"); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_text(prop, "Start Time", "Time when the control particles are activated"); prop = RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME); RNA_def_property_float_sdna(prop, NULL, "cpsTimeEnd"); RNA_def_property_range(prop, 0.0, 100.0); RNA_def_property_ui_text(prop, "End Time", "Time when the control particles are deactivated"); prop = RNA_def_property(srna, "attraction_strength", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "attractforceStrength"); RNA_def_property_range(prop, -10.0, 10.0); RNA_def_property_ui_text(prop, "Attraction Strength", "Force strength for directional attraction towards the control object"); prop = RNA_def_property(srna, "attraction_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "attractforceRadius"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text(prop, "Attraction Radius", "Force field radius around the control object"); prop = RNA_def_property(srna, "velocity_strength", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "velocityforceStrength"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text(prop, "Velocity Strength", "Force strength of how much of the control object's velocity is influencing the " "fluid velocity"); prop = RNA_def_property(srna, "velocity_radius", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "velocityforceRadius"); RNA_def_property_range(prop, 0.0, 10.0); RNA_def_property_ui_text(prop, "Velocity Radius", "Force field radius around the control object"); prop = RNA_def_property(srna, "quality", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cpsQuality"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 5.0, 100.0); RNA_def_property_ui_text(prop, "Quality", "Quality which is used for object sampling (higher = better but slower)"); prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse control object movement"); RNA_def_property_update(prop, 0, "rna_fluid_find_enframe"); }
static void rna_def_fluidsim_outflow(BlenderRNA *brna) { StructRNA *srna; srna= RNA_def_struct(brna, "OutflowFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", "Fluid simulation settings for objects removing fluids from the simulation"); rna_def_fluidsim_active(srna); rna_def_fluidsim_volume(srna); }
static void rna_def_fluidsim_fluid(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; srna= RNA_def_struct(brna, "FluidFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "Fluid simulation settings for the fluid in the simulation"); rna_def_fluidsim_active(srna); rna_def_fluidsim_volume(srna); prop= RNA_def_property(srna, "initial_velocity", PROP_FLOAT, PROP_VELOCITY); RNA_def_property_float_sdna(prop, NULL, "iniVelx"); RNA_def_property_array(prop, 3); RNA_def_property_range(prop, -1000.1, 1000.1); RNA_def_property_ui_text(prop, "Initial Velocity", "Initial velocity of fluid"); }