UI/RNA: added pixel and percentage units to some properties

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D99
This commit is contained in:
Scott Petrovic 2013-12-13 17:03:44 +01:00 committed by Brecht Van Lommel
parent c456cd94b2
commit 105a97a7ed
3 changed files with 22 additions and 22 deletions

View File

@ -2398,7 +2398,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 50);
RNA_def_property_ui_text(prop, "Pixel", "How many pixels path has to cover to make another render segment");
prop = RNA_def_property(srna, "draw_percentage", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "draw_percentage", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "disp");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Display", "Percentage of particles to display in 3D view");

View File

@ -2021,7 +2021,7 @@ static void rna_def_unified_paint_settings(BlenderRNA *brna)
RNA_def_property_int_funcs(prop, NULL, "rna_UnifiedPaintSettings_size_set", NULL);
RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS * 10);
RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, -1);
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush");
RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_radius_update");
prop = RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
@ -3283,11 +3283,11 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
"Gravitational constant used for physics simulation in the game engine");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop = RNA_def_property(srna, "occlusion_culling_resolution", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "occlusion_culling_resolution", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "occlusionRes");
RNA_def_property_range(prop, 128.0, 1024.0);
RNA_def_property_ui_text(prop, "Occlusion Resolution",
"Size of the occlusion buffer in pixel, use higher value for better precision (slower)");
"Size of the occlusion buffer, use higher value for better precision (slower)");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
@ -4246,10 +4246,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE);
prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_PIXEL);
RNA_def_property_float_sdna(prop, NULL, "gauss");
RNA_def_property_range(prop, 0.5f, 1.5f);
RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which the reconstruction filter combines samples");
RNA_def_property_ui_text(prop, "Filter Size", "Width over which the reconstruction filter combines samples");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
@ -4570,11 +4570,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "bake_filter");
RNA_def_property_range(prop, 0, 64);
RNA_def_property_ui_text(prop, "Margin",
"Amount of pixels to extend the baked result with, as post process filter");
"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, "bake_distance", PROP_FLOAT, PROP_NONE);
@ -4825,7 +4825,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_enum_items(prop, freestyle_thickness_items);
RNA_def_property_ui_text(prop, "Line Thickness Mode", "Line thickness mode for Freestyle line drawing");
prop = RNA_def_property(srna, "line_thickness", PROP_FLOAT, PROP_NONE);
prop = RNA_def_property(srna, "line_thickness", PROP_FLOAT, PROP_PIXEL);
RNA_def_property_float_sdna(prop, NULL, "unit_line_thickness");
RNA_def_property_range(prop, 0.f, 10000.f);
RNA_def_property_ui_text(prop, "Line Thickness", "Line thickness in pixels");

View File

@ -651,9 +651,9 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for font kerning");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "shadow", PROP_INT, PROP_PIXEL);
RNA_def_property_range(prop, 0, 5);
RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0, 3 and 5 supported)");
RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size (0, 3 and 5 supported)");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "shadow_offset_x", PROP_INT, PROP_PIXEL);
@ -980,8 +980,8 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
RNA_def_property_range(prop, 0.01f, 1.0f);
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "menu_shadow_width", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Menu Shadow Width", "Width of menu shadows in standard pixels, set to zero to disable it");
prop = RNA_def_property(srna, "menu_shadow_width", PROP_INT, PROP_PIXEL);
RNA_def_property_ui_text(prop, "Menu Shadow Width", "Width of menu shadows, set to zero to disable");
RNA_def_property_range(prop, 0.0f, 24.0f);
RNA_def_property_update(prop, 0, "rna_userdef_update");
@ -3183,11 +3183,11 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
RNA_def_property_range(prop, 4, 40);
RNA_def_property_int_default(prop, 14);
RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Pixel distance around the handles to accept mouse clicks");
RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Distance around the handles to accept mouse clicks");
prop = RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
@ -3196,7 +3196,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* View2D Grid Displays */
prop = RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize");
RNA_def_property_range(prop, 1, 500); /* XXX: perhaps the lower range should only go down to 5? */
RNA_def_property_ui_text(prop, "2D View Minimum Grid Spacing",
@ -3351,17 +3351,17 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
/* grease pencil */
prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance",
"Pixels moved by mouse per axis when drawing stroke");
prop = RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance",
"Distance moved by mouse when drawing stroke (in pixels) to include");
"Distance moved by mouse when drawing stroke to include");
prop = RNA_def_property(srna, "use_grease_pencil_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH);
@ -3371,7 +3371,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke");
prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'");
@ -3916,13 +3916,13 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Walk Navigation", "Settings for walk navigation mode");
/* tweak tablet & mouse preset */
prop = RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "dragthreshold");
RNA_def_property_range(prop, 3, 40);
RNA_def_property_ui_text(prop, "Drag Threshold",
"Amount of pixels you have to drag before dragging UI items happens");
prop = RNA_def_property(srna, "tweak_threshold", PROP_INT, PROP_NONE);
prop = RNA_def_property(srna, "tweak_threshold", PROP_INT, PROP_PIXEL);
RNA_def_property_int_sdna(prop, NULL, "tweak_threshold");
RNA_def_property_range(prop, 3, 1024);
RNA_def_property_ui_text(prop, "Tweak Threshold",