diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-12-23 23:03:00 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-12-24 14:40:48 +0300 |
commit | 2221389d6e8e799ae1a001e4a3457fa5c3fd90fb (patch) | |
tree | fd63649a404d21d94fa000245ba029d4b321a495 /source/blender/makesrna/intern/rna_scene.c | |
parent | 0b4fae7a51fb869c27d9407b8b5eadeb418d0bfc (diff) |
Bake: vertex color baking support for Cycles
In the Bake > Output panel, there is now a choice between Image Textures and
Vertex Colors. The active vertex color layer is used for baking. This works
with both existing per-corner and sculpt per-vertex vertex colors.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index e37df0225cf..1f000c9bffa 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -433,6 +433,20 @@ const EnumPropertyItem rna_enum_normal_swizzle_items[] = { {0, NULL, 0, NULL, NULL}, }; +const EnumPropertyItem rna_enum_bake_target_items[] = { + {R_BAKE_TARGET_IMAGE_TEXTURES, + "IMAGE_TEXTURES", + 0, + "Image Textures", + "Bake to image data-blocks associated with active image texture nodes in materials"}, + {R_BAKE_TARGET_VERTEX_COLORS, + "VERTEX_COLORS", + 0, + "Vertex Colors", + "Bake to active vertex color layer on meshes"}, + {0, NULL, 0, NULL, NULL}, +}; + const EnumPropertyItem rna_enum_bake_save_mode_items[] = { {R_BAKE_SAVE_INTERNAL, "INTERNAL", @@ -5166,10 +5180,15 @@ static void rna_def_bake_data(BlenderRNA *brna) RNA_def_property_struct_type(prop, "ImageFormatSettings"); RNA_def_property_ui_text(prop, "Image Format", ""); + prop = RNA_def_property(srna, "target", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, rna_enum_bake_target_items); + RNA_def_property_ui_text(prop, "Target", "Where to output the baked map"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); + prop = RNA_def_property(srna, "save_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_bitflag_sdna(prop, NULL, "save_mode"); RNA_def_property_enum_items(prop, rna_enum_bake_save_mode_items); - RNA_def_property_ui_text(prop, "Save Mode", "Choose how to save the baking map"); + RNA_def_property_ui_text(prop, "Save Mode", "Where to save baked image textures"); RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); /* flags */ |