Separated metaball size values, and hid inapplicable values depending on metaball type.

This commit is contained in:
2009-07-30 18:32:20 +00:00
parent 1c6cb51e65
commit a39192f243
3 changed files with 52 additions and 9 deletions

View File

@@ -48,7 +48,9 @@ typedef struct MetaElem {
short type, flag, selcol1, selcol2;
float x, y, z; /* Position of center of MetaElem */
float quat[4]; /* Rotation of MetaElem */
float expx, expy, expz; /* dimension parameters, used for some types like cubes */
float expx; /* dimension parameters, used for some types like cubes */
float expy;
float expz;
float rad; /* radius of the meta element */
float rad2; /* temp field, used only while processing */
float s; /* stiffness, how much of the element to fill */

View File

@@ -99,11 +99,22 @@ void rna_def_metaelement(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Radius", "");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
prop= RNA_def_property(srna, "sizex", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "expx");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Size", "Size of element, use of components depends on element type.");
RNA_def_property_ui_text(prop, "Size X", "Size of element, use of components depends on element type.");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "sizey", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "expy");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size Y", "Size of element, use of components depends on element type.");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "sizez", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "expz");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size Z", "Size of element, use of components depends on element type.");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "stiffness", PROP_FLOAT, PROP_NONE);