added more parent properties for grouped rna stricts

This commit is contained in:
Campbell Barton 2009-01-10 03:44:02 +00:00
parent e60be63d23
commit 9f0afbe804
3 changed files with 38 additions and 22 deletions

@ -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)
static void rna_def_fluidsim_domain(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
PropertyRNA *prop;
@ -100,6 +100,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
srna= RNA_def_struct(brna, "DomainFluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Domain Fluid Simulation Settings", "");
/* standard settings */
@ -232,13 +233,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)
static void rna_def_fluidsim_fluid(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FluidFluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Fluid Fluid Simulation Settings", "");
rna_def_fluidsim_volume(srna);
@ -250,13 +252,14 @@ static void rna_def_fluidsim_fluid(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Initial Velocity", "Initial velocity of fluid.");
}
static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
static void rna_def_fluidsim_obstacle(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ObstacleFluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Obstacle Fluid Simulation Settings", "");
rna_def_fluidsim_volume(srna);
@ -268,13 +271,14 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
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)
static void rna_def_fluidsim_inflow(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "InflowFluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Inflow Fluid Simulation Settings", "");
rna_def_fluidsim_volume(srna);
@ -290,24 +294,26 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna)
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)
static void rna_def_fluidsim_outflow(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
srna= RNA_def_struct(brna, "OutflowFluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Outflow Fluid Simulation Settings", "");
rna_def_fluidsim_volume(srna);
}
static void rna_def_fluidsim_particle(BlenderRNA *brna)
static void rna_def_fluidsim_particle(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ParticleFluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Particle Fluid Simulation Settings", "");
prop= RNA_def_property(srna, "drops", PROP_BOOLEAN, PROP_NONE);
@ -338,13 +344,14 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
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)
static void rna_def_fluidsim_control(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ControlFluidSettings", NULL);
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "");
prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_NONE);
@ -427,13 +434,13 @@ void RNA_def_fluidsim(BlenderRNA *brna)
/* types */
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);
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);
}

@ -52,7 +52,7 @@ static void *rna_Lamp_sunsky_settings_get(PointerRNA *ptr)
#else
static void rna_def_lamp_sunsky_settings(BlenderRNA *brna)
static void rna_def_lamp_sunsky_settings(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
PropertyRNA *prop;
@ -84,6 +84,7 @@ static void rna_def_lamp_sunsky_settings(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SunskySettings", NULL);
RNA_def_struct_sdna(srna, "Lamp");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Sun/Sky Settings", "Sun/Sky related settings for the lamp.");
prop= RNA_def_property(srna, "sky_colorspace", PROP_ENUM, PROP_NONE);
@ -173,7 +174,7 @@ static void rna_def_lamp_sunsky_settings(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LAMP|ND_SKY, NULL);
}
void rna_def_lamp(BlenderRNA *brna)
static StructRNA *rna_def_lamp(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@ -465,12 +466,15 @@ void rna_def_lamp(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Lamp_sunsky_settings_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Sun/Sky Settings", "Sun/Sky related settings for the lamp.");
return srna;
}
void RNA_def_lamp(BlenderRNA *brna)
{
rna_def_lamp(brna);
rna_def_lamp_sunsky_settings(brna);
StructRNA *srna;
srna= rna_def_lamp(brna);
rna_def_lamp_sunsky_settings(brna, srna);
}
#endif

@ -247,7 +247,7 @@ static void rna_def_vertex_group(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Index", "Index number of the vertex group.");
}
static void rna_def_object_game_settings(BlenderRNA *brna)
static void rna_def_object_game_settings(BlenderRNA *brna, StructRNA *parent)
{
StructRNA *srna;
PropertyRNA *prop;
@ -272,6 +272,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ObjectGameSettings", NULL);
RNA_def_struct_sdna(srna, "Object");
RNA_def_struct_parent(srna, parent);
RNA_def_struct_ui_text(srna, "Object Game Settings", "Game engine related settings for the object.");
/* logic */
@ -407,7 +408,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Debug State", "Print state debug info in the game engine.");
}
static void rna_def_object(BlenderRNA *brna)
static StructRNA *rna_def_object(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@ -912,12 +913,16 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "shapenr");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_ui_text(prop, "Active Shape Key", "Current shape key index.");
return srna;
}
void RNA_def_object(BlenderRNA *brna)
{
rna_def_object(brna);
rna_def_object_game_settings(brna);
StructRNA *srna;
srna= rna_def_object(brna);
rna_def_object_game_settings(brna, srna);
rna_def_vertex_group(brna);
}