RNA: use distance units
This commit is contained in:
@@ -1145,28 +1145,28 @@ static void rna_def_textbox(BlenderRNA *brna)
|
||||
RNA_def_struct_ui_text(srna, "Text Box", "Text bounding box for layout");
|
||||
|
||||
/* number values */
|
||||
prop = RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "x", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "x");
|
||||
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, -50.0f, 50.0f, 10, 3);
|
||||
RNA_def_property_ui_text(prop, "Textbox X Offset", "");
|
||||
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
||||
|
||||
prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "y", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "y");
|
||||
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, -50.0f, 50.0f, 10, 3);
|
||||
RNA_def_property_ui_text(prop, "Textbox Y Offset", "");
|
||||
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
||||
|
||||
prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "w");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 50.0f, 10, 3);
|
||||
RNA_def_property_ui_text(prop, "Textbox Width", "");
|
||||
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
|
||||
|
||||
prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "h");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 50.0f, 10, 3);
|
||||
|
||||
@@ -4592,7 +4592,7 @@ static void rna_def_modifier_wireframe(BlenderRNA *brna)
|
||||
RNA_def_struct_ui_icon(srna, ICON_MOD_WIREFRAME);
|
||||
|
||||
|
||||
prop = RNA_def_property(srna, "thickness", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "thickness", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "offset");
|
||||
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 4);
|
||||
|
||||
@@ -1264,13 +1264,13 @@ static void rna_def_field(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Falloff Power", "How quickly strength falls off with distance from the force field");
|
||||
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
|
||||
|
||||
prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "mindist");
|
||||
RNA_def_property_range(prop, 0.0f, 1000.0f);
|
||||
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance for the field's fall-off");
|
||||
RNA_def_property_update(prop, 0, "rna_FieldSettings_update");
|
||||
|
||||
prop = RNA_def_property(srna, "distance_max", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "distance_max", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "maxdist");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 1000.0f, 1.0f, 3);
|
||||
@@ -1639,7 +1639,7 @@ static void rna_def_softbody(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Collision Type", "Choose Collision Type");
|
||||
RNA_def_property_update(prop, 0, "rna_softbody_update");
|
||||
|
||||
prop = RNA_def_property(srna, "ball_size", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "ball_size", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "colball");
|
||||
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* code is not ready for that yet */
|
||||
RNA_def_property_range(prop, -10.0f, 10.0f);
|
||||
|
||||
@@ -2391,7 +2391,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Draw Color", "Draw additional particle data as a color");
|
||||
RNA_def_property_update(prop, 0, "rna_Particle_redo");
|
||||
|
||||
prop = RNA_def_property(srna, "display_size", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "display_size", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "draw_size");
|
||||
RNA_def_property_range(prop, 0, 1000);
|
||||
RNA_def_property_ui_range(prop, 0, 100, 1, -1);
|
||||
@@ -2847,7 +2847,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles");
|
||||
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
||||
|
||||
prop = RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "childrad");
|
||||
RNA_def_property_range(prop, 0.0f, 10.0f);
|
||||
RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent");
|
||||
@@ -2897,7 +2897,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
|
||||
RNA_def_property_update(prop, 0, "rna_Particle_redo_child");
|
||||
|
||||
/* kink */
|
||||
prop = RNA_def_property(srna, "kink_amplitude", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "kink_amplitude", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "kink_amp");
|
||||
RNA_def_property_range(prop, -100000.0f, 100000.0f);
|
||||
RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3);
|
||||
@@ -3193,14 +3193,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Shape", "Strand shape parameter");
|
||||
RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */
|
||||
|
||||
prop = RNA_def_property(srna, "root_radius", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "root_radius", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "rad_root");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2);
|
||||
RNA_def_property_ui_text(prop, "Root", "Strand width at the root");
|
||||
RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */
|
||||
|
||||
prop = RNA_def_property(srna, "tip_radius", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "tip_radius", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "rad_tip");
|
||||
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2);
|
||||
|
||||
@@ -3945,7 +3945,7 @@ static void rna_def_bake_data(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Margin", "Extends the baked result as a post process filter");
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "cage_extrusion", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "cage_extrusion", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_range(prop, 0.0, FLT_MAX);
|
||||
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 3);
|
||||
RNA_def_property_ui_text(prop, "Cage Extrusion",
|
||||
@@ -5911,13 +5911,13 @@ static void rna_def_scene_eevee(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Show Cubemap Cache", "Display captured cubemaps in the viewport");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
|
||||
|
||||
prop = RNA_def_property(srna, "gi_irradiance_display_size", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "gi_irradiance_display_size", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "gi_irradiance_draw_size");
|
||||
RNA_def_property_range(prop, 0.05f, 10.0f);
|
||||
RNA_def_property_float_default(prop, 0.1f);
|
||||
RNA_def_property_ui_text(prop, "Irradiance Display Size", "Size of the irradiance sample spheres to debug captured light");
|
||||
|
||||
prop = RNA_def_property(srna, "gi_cubemap_display_size", PROP_FLOAT, PROP_NONE);
|
||||
prop = RNA_def_property(srna, "gi_cubemap_display_size", PROP_FLOAT, PROP_DISTANCE);
|
||||
RNA_def_property_float_sdna(prop, NULL, "gi_cubemap_draw_size");
|
||||
RNA_def_property_range(prop, 0.05f, 10.0f);
|
||||
RNA_def_property_float_default(prop, 0.3f);
|
||||
|
||||
Reference in New Issue
Block a user