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 427 Lines • ▼ Show 20 Lines | const EnumPropertyItem rna_enum_normal_swizzle_items[] = { | ||||
| {R_BAKE_POSY, "POS_Y", 0, "+Y", ""}, | {R_BAKE_POSY, "POS_Y", 0, "+Y", ""}, | ||||
| {R_BAKE_POSZ, "POS_Z", 0, "+Z", ""}, | {R_BAKE_POSZ, "POS_Z", 0, "+Z", ""}, | ||||
| {R_BAKE_NEGX, "NEG_X", 0, "-X", ""}, | {R_BAKE_NEGX, "NEG_X", 0, "-X", ""}, | ||||
| {R_BAKE_NEGY, "NEG_Y", 0, "-Y", ""}, | {R_BAKE_NEGY, "NEG_Y", 0, "-Y", ""}, | ||||
| {R_BAKE_NEGZ, "NEG_Z", 0, "-Z", ""}, | {R_BAKE_NEGZ, "NEG_Z", 0, "-Z", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| const EnumPropertyItem rna_enum_bake_margin_type_items[] = { | |||||
| {R_BAKE_EXTEND, "EXTEND", 0, "Extend", "Extend by averaging"}, | |||||
| {R_BAKE_COPYPIXELS, | |||||
| "COPYPIXELS", | |||||
| 0, | |||||
| "CopyPixels", | |||||
| "Extend by copying pixels from neighbouring polygons"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| const EnumPropertyItem rna_enum_bake_target_items[] = { | const EnumPropertyItem rna_enum_bake_target_items[] = { | ||||
| {R_BAKE_TARGET_IMAGE_TEXTURES, | {R_BAKE_TARGET_IMAGE_TEXTURES, | ||||
| "IMAGE_TEXTURES", | "IMAGE_TEXTURES", | ||||
| 0, | 0, | ||||
| "Image Textures", | "Image Textures", | ||||
| "Bake to image data-blocks associated with active image texture nodes in materials"}, | "Bake to image data-blocks associated with active image texture nodes in materials"}, | ||||
| {R_BAKE_TARGET_VERTEX_COLORS, | {R_BAKE_TARGET_VERTEX_COLORS, | ||||
| "VERTEX_COLORS", | "VERTEX_COLORS", | ||||
| ▲ Show 20 Lines • Show All 4,606 Lines • ▼ Show 20 Lines | static void rna_def_bake_data(BlenderRNA *brna) | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "margin", PROP_INT, PROP_PIXEL); | prop = RNA_def_property(srna, "margin", PROP_INT, PROP_PIXEL); | ||||
| RNA_def_property_range(prop, 0, SHRT_MAX); | RNA_def_property_range(prop, 0, SHRT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0, 64, 1, 1); | RNA_def_property_ui_range(prop, 0, 64, 1, 1); | ||||
| RNA_def_property_ui_text(prop, "Margin", "Extends the baked result as a post process filter"); | 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); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "margin_type", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, rna_enum_bake_margin_type_items); | |||||
| RNA_def_property_ui_text(prop, "Margin Type", "Algorithm to extend the baked result"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "max_ray_distance", PROP_FLOAT, PROP_DISTANCE); | prop = RNA_def_property(srna, "max_ray_distance", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_range(prop, 0.0, FLT_MAX); | 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_range(prop, 0.0, 1.0, 1, 3); | ||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Max Ray Distance", | "Max Ray Distance", | ||||
| "The maximum ray distance for matching points between the active and " | "The maximum ray distance for matching points between the active and " | ||||
| "selected objects. If zero, there is no limit"); | "selected objects. If zero, there is no limit"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| ▲ Show 20 Lines • Show All 775 Lines • ▼ Show 20 Lines | static void rna_def_scene_render_data(BlenderRNA *brna) | ||||
| /* Bake */ | /* Bake */ | ||||
| static const EnumPropertyItem bake_mode_items[] = { | static const EnumPropertyItem bake_mode_items[] = { | ||||
| //{RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"}, | //{RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"}, | ||||
| {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"}, | {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"}, | ||||
| {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake displacement"}, | {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake displacement"}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| static const EnumPropertyItem bake_margin_type_items[] = { | |||||
| {R_BAKE_EXTEND, "EXTEND", 0, "Extend", "Extend by averaging"}, | |||||
| {R_BAKE_COPYPIXELS, | |||||
| "COPYPIXELS", | |||||
| 0, | |||||
| "CopyPixels", | |||||
| "Extend by copying pixels from neighbouring polygons"}, | |||||
| {0, NULL, 0, NULL, NULL}, | |||||
| }; | |||||
| static const EnumPropertyItem pixel_size_items[] = { | 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}, | ||||
| }; | }; | ||||
| ▲ Show 20 Lines • Show All 399 Lines • ▼ Show 20 Lines | # endif | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR); | RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR); | ||||
| RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking"); | RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_PIXEL); | prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_PIXEL); | ||||
| RNA_def_property_int_sdna(prop, NULL, "bake_filter"); | RNA_def_property_int_sdna(prop, NULL, "bake_margin"); | ||||
| RNA_def_property_range(prop, 0, 64); | RNA_def_property_range(prop, 0, 64); | ||||
| RNA_def_property_ui_text(prop, "Margin", "Extends the baked result as a post process filter"); | 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); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "bake_margin_type", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "bake_margin_type"); | |||||
| RNA_def_property_enum_items(prop, bake_margin_type_items); | |||||
| RNA_def_property_ui_text(prop, "Margin Type", "Algorithm to generate the margin"); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |||||
| prop = RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "bake_biasdist"); | RNA_def_property_float_sdna(prop, NULL, "bake_biasdist"); | ||||
| RNA_def_property_range(prop, 0.0, 1000.0); | RNA_def_property_range(prop, 0.0, 1000.0); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Bias", "Bias towards faces further away from the object (in blender units)"); | prop, "Bias", "Bias towards faces further away from the object (in blender units)"); | ||||
| RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | ||||
| prop = RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 1,694 Lines • Show Last 20 Lines | |||||