diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-11 01:57:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-11 01:57:33 +0300 |
commit | 7cd4e2781afcc164232ef7b9ea5cd3fc20165dea (patch) | |
tree | e729a87c98127a12b7f58810e00324f95e1cae1f /source/blender/makesrna/intern/rna_fluidsim.c | |
parent | 6ab86a7572435c3df0a3c613bca8a3d0566e39e7 (diff) |
RNA
* Finished DNA_lamp_types.h, DNA_world_types.h and DNA_sound_types.h.
* Renamed "parent" struct property to "nested", and also remaining "from"
usage to "base".
* Added a NEVER_NULL subtype for pointers and use it for all properties
that apply.
* Make sure all structs have a description, and fix any other DOC_BROKEN
descriptions, also many other naming consistency improvements.
Diffstat (limited to 'source/blender/makesrna/intern/rna_fluidsim.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_fluidsim.c | 69 |
1 files changed, 31 insertions, 38 deletions
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c index c986fed93f1..fe5ad51d06f 100644 --- a/source/blender/makesrna/intern/rna_fluidsim.c +++ b/source/blender/makesrna/intern/rna_fluidsim.c @@ -80,7 +80,7 @@ static void rna_def_fluidsim_slip(StructRNA *srna) RNA_def_property_ui_text(prop, "Partial Slip Amount", "Amount of mixing between no- and free-slip, 0 is no slip and 1 is free slip."); } -static void rna_def_fluidsim_domain(BlenderRNA *brna, StructRNA *parent) +static void rna_def_fluidsim_domain(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; @@ -98,10 +98,9 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna, StructRNA *parent) {4, "HONEY", "Honey", "Viscosity of 2.0 * 10^-3."}, {0, NULL, NULL, NULL}}; - srna= RNA_def_struct(brna, "DomainFluidSettings", NULL); + srna= RNA_def_struct(brna, "DomainFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); - RNA_def_struct_parent(srna, parent); - RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", ""); + RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", "Fluid simulation settings for the domain of a fluid simulation."); /* standard settings */ @@ -233,15 +232,14 @@ static void rna_def_fluidsim_volume(StructRNA *srna) RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it."); } -static void rna_def_fluidsim_fluid(BlenderRNA *brna, StructRNA *parent) +static void rna_def_fluidsim_fluid(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "FluidFluidSettings", NULL); + srna= RNA_def_struct(brna, "FluidFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); - RNA_def_struct_parent(srna, parent); - RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", ""); + RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "Fluid simulation settings for the fluid in the simulation."); rna_def_fluidsim_volume(srna); @@ -252,15 +250,14 @@ static void rna_def_fluidsim_fluid(BlenderRNA *brna, StructRNA *parent) RNA_def_property_ui_text(prop, "Initial Velocity", "Initial velocity of fluid."); } -static void rna_def_fluidsim_obstacle(BlenderRNA *brna, StructRNA *parent) +static void rna_def_fluidsim_obstacle(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "ObstacleFluidSettings", NULL); + srna= RNA_def_struct(brna, "ObstacleFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); - RNA_def_struct_parent(srna, parent); - RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", ""); + RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "Fluid simulation settings for obstacles in the simulation."); rna_def_fluidsim_volume(srna); rna_def_fluidsim_slip(srna); @@ -271,15 +268,14 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna, StructRNA *parent) 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_inflow(BlenderRNA *brna, StructRNA *parent) +static void rna_def_fluidsim_inflow(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "InflowFluidSettings", NULL); + srna= RNA_def_struct(brna, "InflowFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); - RNA_def_struct_parent(srna, parent); - RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", ""); + RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "Fluid simulation settings for objects adding fluids in the simulation."); rna_def_fluidsim_volume(srna); @@ -294,27 +290,25 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna, StructRNA *parent) RNA_def_property_ui_text(prop, "Local Coordinates", "Use local coordinates for inflow (e.g. for rotating objects)."); } -static void rna_def_fluidsim_outflow(BlenderRNA *brna, StructRNA *parent) +static void rna_def_fluidsim_outflow(BlenderRNA *brna) { StructRNA *srna; - srna= RNA_def_struct(brna, "OutflowFluidSettings", NULL); + srna= RNA_def_struct(brna, "OutflowFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); - RNA_def_struct_parent(srna, parent); - RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", ""); + 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); } -static void rna_def_fluidsim_particle(BlenderRNA *brna, StructRNA *parent) +static void rna_def_fluidsim_particle(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "ParticleFluidSettings", NULL); + srna= RNA_def_struct(brna, "ParticleFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); - RNA_def_struct_parent(srna, parent); - RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", ""); + RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", "Fluid simulation settings for objects storing fluid particles generated by the simulation."); prop= RNA_def_property(srna, "drops", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSPART_DROP); @@ -344,15 +338,14 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna, StructRNA *parent) RNA_def_property_ui_text(prop, "Path", "Directory (and/or filename prefix) to store and load particles from."); } -static void rna_def_fluidsim_control(BlenderRNA *brna, StructRNA *parent) +static void rna_def_fluidsim_control(BlenderRNA *brna) { StructRNA *srna; PropertyRNA *prop; - srna= RNA_def_struct(brna, "ControlFluidSettings", NULL); + srna= RNA_def_struct(brna, "ControlFluidSettings", "FluidSettings"); RNA_def_struct_sdna(srna, "FluidsimSettings"); - RNA_def_struct_parent(srna, parent); - RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", ""); + RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "Fluid simulation settings for objects controlling the motion of fluid in the simulation."); prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart"); @@ -414,14 +407,14 @@ void RNA_def_fluidsim(BlenderRNA *brna) srna= RNA_def_struct(brna, "FluidSettings", NULL); RNA_def_struct_sdna(srna, "FluidsimSettings"); RNA_def_struct_refine_func(srna, "rna_FluidSettings_refine"); - RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", ""); + RNA_def_struct_ui_text(srna, "Fluid Simulation Settings", "Fluid simulation settings for an object taking part in the simulation."); /* enable and type */ - prop= RNA_def_property(srna, "enable", PROP_BOOLEAN, PROP_NONE); + prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "type", OB_FLUIDSIM_ENABLE); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); // needs to create modifier - RNA_def_property_ui_text(prop, "Enable", "Sets object to participate in fluid simulation."); + RNA_def_property_ui_text(prop, "Enabled", "Sets object to participate in fluid simulation."); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "type"); @@ -434,13 +427,13 @@ void RNA_def_fluidsim(BlenderRNA *brna) /* types */ - rna_def_fluidsim_domain(brna, srna); - rna_def_fluidsim_fluid(brna, srna); - rna_def_fluidsim_obstacle(brna, srna); - rna_def_fluidsim_inflow(brna, srna); - rna_def_fluidsim_outflow(brna, srna); - rna_def_fluidsim_particle(brna, srna); - rna_def_fluidsim_control(brna, srna); + rna_def_fluidsim_domain(brna); + rna_def_fluidsim_fluid(brna); + rna_def_fluidsim_obstacle(brna); + rna_def_fluidsim_inflow(brna); + rna_def_fluidsim_outflow(brna); + rna_def_fluidsim_particle(brna); + rna_def_fluidsim_control(brna); } |