Merge branch 'blender-v4.0-release'
This commit is contained in:
@@ -38,30 +38,37 @@ static bool mesh_extract_uv_format_init(GPUVertFormat *format,
|
||||
}
|
||||
}
|
||||
|
||||
r_uv_layers = uv_layers;
|
||||
r_uv_layers = 0;
|
||||
|
||||
for (int i = 0; i < MAX_MTFACE; i++) {
|
||||
if (uv_layers & (1 << i)) {
|
||||
char attr_name[32], attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
|
||||
const char *layer_name = CustomData_get_layer_name(cd_ldata, CD_PROP_FLOAT2, i);
|
||||
|
||||
GPU_vertformat_safe_attr_name(layer_name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME);
|
||||
/* UV layer name. */
|
||||
SNPRINTF(attr_name, "a%s", attr_safe_name);
|
||||
GPU_vertformat_attr_add(format, attr_name, GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||
/* Active render layer name. */
|
||||
if (i == CustomData_get_render_layer(cd_ldata, CD_PROP_FLOAT2)) {
|
||||
GPU_vertformat_alias_add(format, "a");
|
||||
}
|
||||
/* Active display layer name. */
|
||||
if (i == CustomData_get_active_layer(cd_ldata, CD_PROP_FLOAT2)) {
|
||||
GPU_vertformat_alias_add(format, "au");
|
||||
/* Alias to `pos` for edit uvs. */
|
||||
GPU_vertformat_alias_add(format, "pos");
|
||||
}
|
||||
/* Stencil mask uv layer name. */
|
||||
if (i == CustomData_get_stencil_layer(cd_ldata, CD_PROP_FLOAT2)) {
|
||||
GPU_vertformat_alias_add(format, "mu");
|
||||
/* not all UV layers are guaranteed to exist, since the list of available UV
|
||||
* layers is generated for the evaluated mesh, which is needed to show modifier
|
||||
* results in editmode, but the actual mesh might be the base mesh.
|
||||
*/
|
||||
if (layer_name) {
|
||||
r_uv_layers |= (1 << i);
|
||||
GPU_vertformat_safe_attr_name(layer_name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME);
|
||||
/* UV layer name. */
|
||||
SNPRINTF(attr_name, "a%s", attr_safe_name);
|
||||
GPU_vertformat_attr_add(format, attr_name, GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
|
||||
/* Active render layer name. */
|
||||
if (i == CustomData_get_render_layer(cd_ldata, CD_PROP_FLOAT2)) {
|
||||
GPU_vertformat_alias_add(format, "a");
|
||||
}
|
||||
/* Active display layer name. */
|
||||
if (i == CustomData_get_active_layer(cd_ldata, CD_PROP_FLOAT2)) {
|
||||
GPU_vertformat_alias_add(format, "au");
|
||||
/* Alias to `pos` for edit uvs. */
|
||||
GPU_vertformat_alias_add(format, "pos");
|
||||
}
|
||||
/* Stencil mask uv layer name. */
|
||||
if (i == CustomData_get_stencil_layer(cd_ldata, CD_PROP_FLOAT2)) {
|
||||
GPU_vertformat_alias_add(format, "mu");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1108,7 +1108,7 @@ static const char *template_id_browse_tip(const StructRNA *type)
|
||||
case ID_PA:
|
||||
return N_("Browse Particle Settings to be linked");
|
||||
case ID_GD_LEGACY:
|
||||
return N_("Browse Grease Pencil (legacy) Data to be linked");
|
||||
return N_("Browse Grease Pencil Data to be linked");
|
||||
case ID_MC:
|
||||
return N_("Browse Movie Clip to be linked");
|
||||
case ID_MSK:
|
||||
@@ -1130,7 +1130,7 @@ static const char *template_id_browse_tip(const StructRNA *type)
|
||||
case ID_VO:
|
||||
return N_("Browse Volume Data to be linked");
|
||||
case ID_GP:
|
||||
return N_("Browse Grease Pencil Data to be linked");
|
||||
return N_("Browse Grease Pencil v3 Data to be linked");
|
||||
|
||||
/* Use generic text. */
|
||||
case ID_LI:
|
||||
|
||||
@@ -1535,9 +1535,9 @@ static EnumPropertyItem rna_enum_gpencil_add_stroke_depth_order_items[] = {
|
||||
|
||||
void OBJECT_OT_gpencil_add(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
ot->name = "Add Grease Pencil (legacy)";
|
||||
ot->description = "Add a Grease Pencil (legacy) object to the scene";
|
||||
/* identifiers */
|
||||
ot->name = "Add Grease Pencil";
|
||||
ot->description = "Add a Grease Pencil object to the scene";
|
||||
ot->idname = "OBJECT_OT_gpencil_add";
|
||||
|
||||
/* api callbacks */
|
||||
@@ -2913,16 +2913,8 @@ static const EnumPropertyItem convert_target_items[] = {
|
||||
{OB_GPENCIL_LEGACY,
|
||||
"GPENCIL",
|
||||
ICON_OUTLINER_OB_GREASEPENCIL,
|
||||
#ifdef WITH_GREASE_PENCIL_V3
|
||||
"Grease Pencil (legacy)",
|
||||
#else
|
||||
"Grease Pencil",
|
||||
#endif
|
||||
#ifdef WITH_GREASE_PENCIL_V3
|
||||
"Grease Pencil (legacy) from Curve or Mesh objects"},
|
||||
#else
|
||||
"Grease Pencil from Curve or Mesh objects"},
|
||||
#endif
|
||||
#ifdef WITH_POINT_CLOUD
|
||||
{OB_POINTCLOUD,
|
||||
"POINTCLOUD",
|
||||
@@ -2935,8 +2927,8 @@ static const EnumPropertyItem convert_target_items[] = {
|
||||
{OB_GREASE_PENCIL,
|
||||
"GREASEPENCIL",
|
||||
ICON_OUTLINER_OB_GREASEPENCIL,
|
||||
"Grease Pencil",
|
||||
"Grease Pencil from Grease Pencil (legacy)"},
|
||||
"Grease Pencil v3",
|
||||
"Grease Pencil v3 from Grease Pencil"},
|
||||
#endif
|
||||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
@@ -42,8 +42,8 @@ const EnumPropertyItem rna_enum_id_type_items[] = {
|
||||
{ID_CU_LEGACY, "CURVE", ICON_CURVE_DATA, "Curve", ""},
|
||||
{ID_CV, "CURVES", ICON_CURVES_DATA, "Curves", ""},
|
||||
{ID_VF, "FONT", ICON_FONT_DATA, "Font", ""},
|
||||
{ID_GD_LEGACY, "GREASEPENCIL", ICON_GREASEPENCIL, "Grease Pencil (legacy)", ""},
|
||||
{ID_GP, "GREASEPENCIL_V3", ICON_GREASEPENCIL, "Grease Pencil", ""},
|
||||
{ID_GD_LEGACY, "GREASEPENCIL", ICON_GREASEPENCIL, "Grease Pencil", ""},
|
||||
{ID_GP, "GREASEPENCIL_V3", ICON_GREASEPENCIL, "Grease Pencil v3", ""},
|
||||
{ID_IM, "IMAGE", ICON_IMAGE_DATA, "Image", ""},
|
||||
{ID_KE, "KEY", ICON_SHAPEKEY_DATA, "Key", ""},
|
||||
{ID_LT, "LATTICE", ICON_LATTICE_DATA, "Lattice", ""},
|
||||
|
||||
@@ -334,20 +334,15 @@ void RNA_def_main(BlenderRNA *brna)
|
||||
{"grease_pencils",
|
||||
"GreasePencil",
|
||||
"rna_Main_gpencils_begin",
|
||||
# ifdef WITH_GREASE_PENCIL_V3
|
||||
"Grease Pencil (legacy)",
|
||||
"Grease Pencil (legacy) data-blocks",
|
||||
# else
|
||||
"Grease Pencil",
|
||||
"Grease Pencil data-blocks",
|
||||
# endif
|
||||
RNA_def_main_gpencil_legacy},
|
||||
# ifdef WITH_GREASE_PENCIL_V3
|
||||
{"grease_pencils_v3",
|
||||
"GreasePencilv3",
|
||||
"rna_Main_grease_pencils_begin",
|
||||
"Grease Pencil",
|
||||
"Grease Pencil data-blocks",
|
||||
"Grease Pencil v3",
|
||||
"Grease Pencil v3 data-blocks",
|
||||
RNA_def_main_grease_pencil},
|
||||
# endif
|
||||
{"movieclips",
|
||||
|
||||
@@ -262,8 +262,8 @@ const EnumPropertyItem rna_enum_object_type_items[] = {
|
||||
{OB_CURVES, "CURVES", ICON_OUTLINER_OB_CURVES, "Hair Curves", ""},
|
||||
{OB_POINTCLOUD, "POINTCLOUD", ICON_OUTLINER_OB_POINTCLOUD, "Point Cloud", ""},
|
||||
{OB_VOLUME, "VOLUME", ICON_OUTLINER_OB_VOLUME, "Volume", ""},
|
||||
{OB_GPENCIL_LEGACY, "GPENCIL", ICON_OUTLINER_OB_GREASEPENCIL, "Grease Pencil (legacy)", ""},
|
||||
{OB_GREASE_PENCIL, "GREASEPENCIL", ICON_OUTLINER_OB_GREASEPENCIL, "Grease Pencil", ""},
|
||||
{OB_GPENCIL_LEGACY, "GPENCIL", ICON_OUTLINER_OB_GREASEPENCIL, "Grease Pencil", ""},
|
||||
{OB_GREASE_PENCIL, "GREASEPENCIL", ICON_OUTLINER_OB_GREASEPENCIL, "Grease Pencil v3", ""},
|
||||
RNA_ENUM_ITEM_SEPR,
|
||||
{OB_ARMATURE, "ARMATURE", ICON_OUTLINER_OB_ARMATURE, "Armature", ""},
|
||||
{OB_LATTICE, "LATTICE", ICON_OUTLINER_OB_LATTICE, "Lattice", ""},
|
||||
|
||||
Reference in New Issue
Block a user