Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 186 Lines • ▼ Show 20 Lines | static const EnumPropertyItem snap_uv_element_items[] = { | ||||
| {SCE_SNAP_MODE_INCREMENT, | {SCE_SNAP_MODE_INCREMENT, | ||||
| "INCREMENT", | "INCREMENT", | ||||
| ICON_SNAP_INCREMENT, | ICON_SNAP_INCREMENT, | ||||
| "Increment", | "Increment", | ||||
| "Snap to increments of grid"}, | "Snap to increments of grid"}, | ||||
| {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"}, | {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| const EnumPropertyItem rna_enum_scene_display_aa_methods[] = { | |||||
| {SCE_DISPLAY_AA_OFF, | |||||
brecht: These numbers as labels are not very clear. Can we change them to something like:
* No Anti… | |||||
| "OFF", | |||||
| 0, | |||||
| "No Anti-Aliasing", | |||||
| "Scene will be rendering without any anti-aliasing"}, | |||||
| {SCE_DISPLAY_AA_FXAA, | |||||
| "FXAA", | |||||
| 0, | |||||
| "Single Pass Anti-Aliasing", | |||||
| "Scene will be rendered using a single pass anti-aliasing method (FXAA)"}, | |||||
| {SCE_DISPLAY_AA_SAMPLES_5, | |||||
| "5", | |||||
| 0, | |||||
| "5 Samples", | |||||
| "Scene will be rendered using 5 anti-aliasing samples"}, | |||||
| {SCE_DISPLAY_AA_SAMPLES_8, | |||||
| "8", | |||||
| 0, | |||||
| "8 Samples", | |||||
| "Scene will be rendered using 8 anti-aliasing samples"}, | |||||
| {SCE_DISPLAY_AA_SAMPLES_11, | |||||
| "11", | |||||
| 0, | |||||
| "11 Samples", | |||||
| "Scene will be rendered using 11 anti-aliasing samples"}, | |||||
| {SCE_DISPLAY_AA_SAMPLES_16, | |||||
| "16", | |||||
| 0, | |||||
| "16 Samples", | |||||
| "Scene will be rendered using 16 anti-aliasing samples"}, | |||||
| {SCE_DISPLAY_AA_SAMPLES_32, | |||||
| "32", | |||||
| 0, | |||||
| "32 Samples", | |||||
| "Scene will be rendered using 32 anti-aliasing samples"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| #endif | #endif | ||||
| const EnumPropertyItem rna_enum_curve_fit_method_items[] = { | const EnumPropertyItem rna_enum_curve_fit_method_items[] = { | ||||
| {CURVE_PAINT_FIT_METHOD_REFIT, | {CURVE_PAINT_FIT_METHOD_REFIT, | ||||
| "REFIT", | "REFIT", | ||||
| 0, | 0, | ||||
| "Refit", | "Refit", | ||||
| "Incrementally re-fit the curve (high quality)"}, | "Incrementally re-fit the curve (high quality)"}, | ||||
| ▲ Show 20 Lines • Show All 5,269 Lines • ▼ Show 20 Lines | static const EnumPropertyItem pixel_size_items[] = { | ||||
| {0, "AUTO", 0, "Automatic", "Automatic pixel size, depends on the user interface scale"}, | {0, "AUTO", 0, "Automatic", "Automatic pixel size, depends on the user interface scale"}, | ||||
| {1, "1", 0, "1x", "Render at full resolution"}, | {1, "1", 0, "1x", "Render at full resolution"}, | ||||
| {2, "2", 0, "2x", "Render at 50% resolution"}, | {2, "2", 0, "2x", "Render at 50% resolution"}, | ||||
| {4, "4", 0, "4x", "Render at 25% resolution"}, | {4, "4", 0, "4x", "Render at 25% resolution"}, | ||||
| {8, "8", 0, "8x", "Render at 12.5% resolution"}, | {8, "8", 0, "8x", "Render at 12.5% resolution"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem fixed_oversample_items[] = { | |||||
| {5, "5", 0, "5", ""}, | |||||
| {8, "8", 0, "8", ""}, | |||||
| {11, "11", 0, "11", ""}, | |||||
| {16, "16", 0, "16", ""}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| static const EnumPropertyItem threads_mode_items[] = { | static const EnumPropertyItem threads_mode_items[] = { | ||||
| {0, | {0, | ||||
| "AUTO", | "AUTO", | ||||
| 0, | 0, | ||||
| "Auto-detect", | "Auto-detect", | ||||
| "Automatically determine the number of threads, based on CPUs"}, | "Automatically determine the number of threads, based on CPUs"}, | ||||
| {R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"}, | {R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| ▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | static void rna_def_scene_render_data(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "alphamode"); | RNA_def_property_enum_sdna(prop, NULL, "alphamode"); | ||||
| RNA_def_property_enum_items(prop, alpha_mode_items); | RNA_def_property_enum_items(prop, alpha_mode_items); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels"); | prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); | ||||
| prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA); | |||||
| RNA_def_property_ui_text( | |||||
| prop, | |||||
| "Anti-Aliasing", | |||||
| "Render and combine multiple samples per pixel to prevent jagged edges"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "osa"); | |||||
| RNA_def_property_enum_items(prop, fixed_oversample_items); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS); | RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS); | ||||
| RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle"); | RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update"); | ||||
| /* threads */ | /* threads */ | ||||
| prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 856 Lines • ▼ Show 20 Lines | static void rna_def_scene_display(BlenderRNA *brna) | ||||
| RNA_def_property_range(prop, 1.0f, 100000.0f); | RNA_def_property_range(prop, 1.0f, 100000.0f); | ||||
| RNA_def_property_ui_range(prop, 1.0f, 100.0f, 1, 3); | RNA_def_property_ui_range(prop, 1.0f, 100.0f, 1, 3); | ||||
| prop = RNA_def_property(srna, "matcap_ssao_samples", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "matcap_ssao_samples", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_default(prop, 16); | RNA_def_property_int_default(prop, 16); | ||||
| RNA_def_property_ui_text(prop, "Samples", "Number of samples"); | RNA_def_property_ui_text(prop, "Samples", "Number of samples"); | ||||
| RNA_def_property_range(prop, 1, 500); | RNA_def_property_range(prop, 1, 500); | ||||
| prop = RNA_def_property(srna, "render_aa", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, rna_enum_scene_display_aa_methods); | |||||
| RNA_def_property_ui_text(prop, "Render Anti-Aliasing", "Method of anti-aliasing when rendering"); | |||||
Done Inline ActionsThis label should still contain Anti-Aliasing. Just in the Python UI it can be shortened because of the context in which it is displayed. brecht: This label should still contain Anti-Aliasing. Just in the Python UI it can be shortened… | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| prop = RNA_def_property(srna, "viewport_aa", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, rna_enum_scene_display_aa_methods); | |||||
| RNA_def_property_ui_text(prop, "Viewport Anti-Aliasing", "Method of anti-aliasing in 3d viewport"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| /* OpenGL render engine settings. */ | /* OpenGL render engine settings. */ | ||||
| prop = RNA_def_property(srna, "shading", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "shading", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_ui_text(prop, "Shading Settings", "Shading settings for OpenGL render engine"); | RNA_def_property_ui_text(prop, "Shading Settings", "Shading settings for OpenGL render engine"); | ||||
| } | } | ||||
| static void rna_def_scene_eevee(BlenderRNA *brna) | static void rna_def_scene_eevee(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| ▲ Show 20 Lines • Show All 1,061 Lines • Show Last 20 Lines | |||||
These numbers as labels are not very clear. Can we change them to something like: