forked from bartvdbraak/blender
* removed some arbitrary range limits on property values
* turned some slider UI controls back into number fields Note: Sliders should only be used when representing a property that's conceptually a percentage or ratio. For arbitrary numbers, use a number field. For example, a lamp's energy can theoretically be anything - 0.1, 3.5, 125.0, it doesn't matter - it's just a number, not a percentage. So this should be a number field.
This commit is contained in:
parent
176a49d1ab
commit
b495e544a8
@ -69,7 +69,7 @@ class DATA_PT_geometry(DataButtonsPanel):
|
|||||||
sub.itemR(curve, "taper_object")
|
sub.itemR(curve, "taper_object")
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
sub.itemL(text="Bevel:")
|
sub.itemL(text="Bevel:")
|
||||||
sub.itemR(curve, "bevel_depth", text="Depth", slider=True)
|
sub.itemR(curve, "bevel_depth", text="Depth")
|
||||||
sub.itemR(curve, "bevel_resolution", text="Resolution")
|
sub.itemR(curve, "bevel_resolution", text="Resolution")
|
||||||
sub.itemR(curve, "bevel_object")
|
sub.itemR(curve, "bevel_object")
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class DATA_PT_lamp(DataButtonsPanel):
|
|||||||
|
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
sub.itemR(lamp, "color")
|
sub.itemR(lamp, "color")
|
||||||
sub.itemR(lamp, "energy", slider=True)
|
sub.itemR(lamp, "energy")
|
||||||
sub.itemR(lamp, "distance")
|
sub.itemR(lamp, "distance")
|
||||||
sub.itemR(lamp, "negative")
|
sub.itemR(lamp, "negative")
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
|
|||||||
flow = layout.column_flow()
|
flow = layout.column_flow()
|
||||||
flow.itemR(sss, "error_tolerance")
|
flow.itemR(sss, "error_tolerance")
|
||||||
flow.itemR(sss, "ior")
|
flow.itemR(sss, "ior")
|
||||||
flow.itemR(sss, "scale", slider=True)
|
flow.itemR(sss, "scale")
|
||||||
|
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.column().itemR(sss, "color")
|
row.column().itemR(sss, "color")
|
||||||
@ -59,8 +59,8 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
|
|||||||
flow = layout.column_flow()
|
flow = layout.column_flow()
|
||||||
flow.itemR(sss, "color_factor", slider=True)
|
flow.itemR(sss, "color_factor", slider=True)
|
||||||
flow.itemR(sss, "texture_factor", slider=True)
|
flow.itemR(sss, "texture_factor", slider=True)
|
||||||
flow.itemR(sss, "front", slider=True)
|
flow.itemR(sss, "front")
|
||||||
flow.itemR(sss, "back", slider=True)
|
flow.itemR(sss, "back")
|
||||||
|
|
||||||
class MATERIAL_PT_raymir(MaterialButtonsPanel):
|
class MATERIAL_PT_raymir(MaterialButtonsPanel):
|
||||||
__idname__= "MATERIAL_PT_raymir"
|
__idname__= "MATERIAL_PT_raymir"
|
||||||
@ -84,7 +84,7 @@ class MATERIAL_PT_raymir(MaterialButtonsPanel):
|
|||||||
|
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
sub.itemR(raym, "reflect", text="RayMir", slider=True)
|
sub.itemR(raym, "reflect", text="RayMir", slider=True)
|
||||||
sub.itemR(raym, "fresnel", slider=True)
|
sub.itemR(raym, "fresnel")
|
||||||
sub.itemR(raym, "fresnel_fac", text="Fac", slider=True)
|
sub.itemR(raym, "fresnel_fac", text="Fac", slider=True)
|
||||||
|
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
@ -120,7 +120,7 @@ class MATERIAL_PT_raytransp(MaterialButtonsPanel):
|
|||||||
|
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
sub.itemR(rayt, "ior")
|
sub.itemR(rayt, "ior")
|
||||||
sub.itemR(rayt, "fresnel", slider=True)
|
sub.itemR(rayt, "fresnel")
|
||||||
sub.itemR(rayt, "fresnel_fac", text="Fac", slider=True)
|
sub.itemR(rayt, "fresnel_fac", text="Fac", slider=True)
|
||||||
|
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
@ -131,7 +131,7 @@ class MATERIAL_PT_raytransp(MaterialButtonsPanel):
|
|||||||
flow = layout.column_flow()
|
flow = layout.column_flow()
|
||||||
flow.itemR(rayt, "filter", slider=True)
|
flow.itemR(rayt, "filter", slider=True)
|
||||||
flow.itemR(rayt, "limit")
|
flow.itemR(rayt, "limit")
|
||||||
flow.itemR(rayt, "falloff", slider=True)
|
flow.itemR(rayt, "falloff")
|
||||||
flow.itemR(rayt, "specular_opacity", slider=True)
|
flow.itemR(rayt, "specular_opacity", slider=True)
|
||||||
flow.itemR(rayt, "depth")
|
flow.itemR(rayt, "depth")
|
||||||
|
|
||||||
@ -152,8 +152,8 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
|
|||||||
|
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
sub.itemL(text="General Settings:")
|
sub.itemL(text="General Settings:")
|
||||||
sub.itemR(halo, "size", slider=True)
|
sub.itemR(halo, "size")
|
||||||
sub.itemR(halo, "hardness", slider=True)
|
sub.itemR(halo, "hardness")
|
||||||
sub.itemR(halo, "add", slider=True)
|
sub.itemR(halo, "add", slider=True)
|
||||||
|
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
@ -175,20 +175,20 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
|
|||||||
|
|
||||||
sub = row.column()
|
sub = row.column()
|
||||||
if (halo.ring):
|
if (halo.ring):
|
||||||
sub.itemR(halo, "rings", slider=True)
|
sub.itemR(halo, "rings")
|
||||||
if (halo.lines):
|
if (halo.lines):
|
||||||
sub.itemR(halo, "line_number", slider=True)
|
sub.itemR(halo, "line_number")
|
||||||
if (halo.ring or halo.lines):
|
if (halo.ring or halo.lines):
|
||||||
sub.itemR(halo, "seed")
|
sub.itemR(halo, "seed")
|
||||||
if (halo.star):
|
if (halo.star):
|
||||||
sub.itemR(halo, "star_tips", slider=True)
|
sub.itemR(halo, "star_tips")
|
||||||
if (halo.flare_mode):
|
if (halo.flare_mode):
|
||||||
sub.itemL(text="Flare:")
|
sub.itemL(text="Flare:")
|
||||||
sub.itemR(halo, "flare_size", text="Size", slider=True)
|
sub.itemR(halo, "flare_size", text="Size")
|
||||||
sub.itemR(halo, "flare_subsize", text="Subsize", slider=True)
|
sub.itemR(halo, "flare_subsize", text="Subsize")
|
||||||
sub.itemR(halo, "flare_boost", text="Boost", slider=True)
|
sub.itemR(halo, "flare_boost", text="Boost")
|
||||||
sub.itemR(halo, "flare_seed", text="Seed")
|
sub.itemR(halo, "flare_seed", text="Seed")
|
||||||
sub.itemR(halo, "flares_sub", text="Sub", slider=True)
|
sub.itemR(halo, "flares_sub", text="Sub")
|
||||||
|
|
||||||
bpy.types.register(MATERIAL_PT_material)
|
bpy.types.register(MATERIAL_PT_material)
|
||||||
bpy.types.register(MATERIAL_PT_raymir)
|
bpy.types.register(MATERIAL_PT_raymir)
|
||||||
|
@ -479,41 +479,42 @@ void rna_def_curve(BlenderRNA *brna)
|
|||||||
prop= RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE);
|
prop= RNA_def_property(srna, "bevel_resolution", PROP_INT, PROP_NONE);
|
||||||
RNA_def_property_int_sdna(prop, NULL, "bevresol");
|
RNA_def_property_int_sdna(prop, NULL, "bevresol");
|
||||||
RNA_def_property_range(prop, 0, 32);
|
RNA_def_property_range(prop, 0, 32);
|
||||||
|
RNA_def_property_ui_range(prop, 0, 32, 1.0, 0);
|
||||||
RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined.");
|
RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined.");
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "width");
|
RNA_def_property_float_sdna(prop, NULL, "width");
|
||||||
RNA_def_property_range(prop, 0.0f, 2.0f);
|
RNA_def_property_ui_range(prop, 0, 2.0, 0.1, 0);
|
||||||
RNA_def_property_ui_text(prop, "Width", "Scale the original width (1.0) based on given factor.");
|
RNA_def_property_ui_text(prop, "Width", "Scale the original width (1.0) based on given factor.");
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "ext1");
|
RNA_def_property_float_sdna(prop, NULL, "ext1");
|
||||||
RNA_def_property_range(prop, 0.0f, 100.0f);
|
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 0);
|
||||||
RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object.");
|
RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object.");
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "ext2");
|
RNA_def_property_float_sdna(prop, NULL, "ext2");
|
||||||
RNA_def_property_range(prop, 0.0f, 2.0f);
|
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 0);
|
||||||
RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object.");
|
RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object.");
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
|
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
|
||||||
RNA_def_property_int_sdna(prop, NULL, "resolu");
|
RNA_def_property_int_sdna(prop, NULL, "resolu");
|
||||||
RNA_def_property_range(prop, 1, 1024);
|
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
|
||||||
RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction.");
|
RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction.");
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
|
prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
|
||||||
RNA_def_property_int_sdna(prop, NULL, "resolv");
|
RNA_def_property_int_sdna(prop, NULL, "resolv");
|
||||||
RNA_def_property_range(prop, 1, 1024);
|
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
|
||||||
RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction.");
|
RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction.");
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
|
prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
|
||||||
RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
|
RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
|
||||||
RNA_def_property_range(prop, 0, 1024);
|
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
|
||||||
RNA_def_property_ui_text(prop, "Render Resolution U", "Surface resolution in U direction used while rendering. Zero skips this property.");
|
RNA_def_property_ui_text(prop, "Render Resolution U", "Surface resolution in U direction used while rendering. Zero skips this property.");
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE);
|
prop= RNA_def_property(srna, "render_resolution_v", PROP_INT, PROP_NONE);
|
||||||
RNA_def_property_int_sdna(prop, NULL, "resolv_ren");
|
RNA_def_property_int_sdna(prop, NULL, "resolv_ren");
|
||||||
RNA_def_property_range(prop, 0, 1024);
|
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
|
||||||
RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering. Zero skips this property.");
|
RNA_def_property_ui_text(prop, "Render Resolution V", "Surface resolution in V direction used while rendering. Zero skips this property.");
|
||||||
|
|
||||||
/* pointers */
|
/* pointers */
|
||||||
|
@ -270,12 +270,12 @@ static void rna_def_lamp(BlenderRNA *brna)
|
|||||||
|
|
||||||
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "dist");
|
RNA_def_property_float_sdna(prop, NULL, "dist");
|
||||||
RNA_def_property_range(prop, 0.01f, 5000.0f);
|
RNA_def_property_ui_range(prop, 0, 1000, 1.0, 2);
|
||||||
RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point.");
|
RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point.");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_range(prop, 0.0f, 10.0f);
|
RNA_def_property_ui_range(prop, 0, 10.0, 0.1, 2);
|
||||||
RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits.");
|
RNA_def_property_ui_text(prop, "Energy", "Amount of light that the lamp emits.");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
||||||
|
|
||||||
@ -408,14 +408,14 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
|
|||||||
|
|
||||||
prop= RNA_def_property(srna, (area)? "shadow_ray_samples_x": "shadow_ray_samples", PROP_INT, PROP_NONE);
|
prop= RNA_def_property(srna, (area)? "shadow_ray_samples_x": "shadow_ray_samples", PROP_INT, PROP_NONE);
|
||||||
RNA_def_property_int_sdna(prop, NULL, "ray_samp");
|
RNA_def_property_int_sdna(prop, NULL, "ray_samp");
|
||||||
RNA_def_property_range(prop, 1, 16);
|
RNA_def_property_range(prop, 1, 64);
|
||||||
RNA_def_property_ui_text(prop, (area)? "Shadow Ray Samples": "Shadow Ray Samples X","Amount of samples taken extra (samples x samples).");
|
RNA_def_property_ui_text(prop, (area)? "Shadow Ray Samples": "Shadow Ray Samples X","Amount of samples taken extra (samples x samples).");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
||||||
|
|
||||||
if(area) {
|
if(area) {
|
||||||
prop= RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE);
|
prop= RNA_def_property(srna, "shadow_ray_samples_y", PROP_INT, PROP_NONE);
|
||||||
RNA_def_property_int_sdna(prop, NULL, "ray_sampy");
|
RNA_def_property_int_sdna(prop, NULL, "ray_sampy");
|
||||||
RNA_def_property_range(prop, 1, 16);
|
RNA_def_property_range(prop, 1, 64);
|
||||||
RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Amount of samples taken extra (samples x samples).");
|
RNA_def_property_ui_text(prop, "Shadow Ray Samples Y", "Amount of samples taken extra (samples x samples).");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
||||||
}
|
}
|
||||||
@ -428,7 +428,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
|
|||||||
|
|
||||||
prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "soft");
|
RNA_def_property_float_sdna(prop, NULL, "soft");
|
||||||
RNA_def_property_range(prop, 0.0f, 100.0f);
|
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
|
||||||
RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows).");
|
RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows).");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
||||||
|
|
||||||
@ -489,19 +489,19 @@ static void rna_def_area_lamp(BlenderRNA *brna)
|
|||||||
|
|
||||||
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "area_size");
|
RNA_def_property_float_sdna(prop, NULL, "area_size");
|
||||||
RNA_def_property_range(prop, 0.0f, 100.0f);
|
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
|
||||||
RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes.");
|
RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes.");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "area_sizey");
|
RNA_def_property_float_sdna(prop, NULL, "area_sizey");
|
||||||
RNA_def_property_range(prop, 0.0f, 100.0f);
|
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
|
||||||
RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes.");
|
RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes.");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
|
||||||
|
|
||||||
prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "k");
|
RNA_def_property_float_sdna(prop, NULL, "k");
|
||||||
RNA_def_property_range(prop, 0.001f, 2.0f);
|
RNA_def_property_ui_range(prop, 0.001, 2.0, 0.1, 3);
|
||||||
RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value.");
|
RNA_def_property_ui_text(prop, "Gamma", "Light gamma correction value.");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
|
||||||
}
|
}
|
||||||
@ -548,7 +548,7 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
|
|||||||
|
|
||||||
prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
|
prop= RNA_def_property(srna, "halo_intensity", PROP_FLOAT, PROP_NONE);
|
||||||
RNA_def_property_float_sdna(prop, NULL, "haint");
|
RNA_def_property_float_sdna(prop, NULL, "haint");
|
||||||
RNA_def_property_range(prop, 0.0f, 5.0f);
|
RNA_def_property_ui_range(prop, 0, 5.0, 0.1, 3);
|
||||||
RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone (Buffer Shadows).");
|
RNA_def_property_ui_text(prop, "Halo Intensity", "Brightness of the spotlight's halo cone (Buffer Shadows).");
|
||||||
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user