Пример #1
0
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)");
}
Пример #2
0
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)");
}
Пример #3
0
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_volume(srna);
}
Пример #4
0
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_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.");
}