Merge branch 'blender-v4.0-release'

This commit is contained in:
Philipp Oeser
2023-10-11 13:36:18 +02:00
2 changed files with 29 additions and 13 deletions

View File

@@ -164,11 +164,11 @@ static void brush_painter_2d_require_imbuf(
cache->ibuf = nullptr;
cache->tex_mask = nullptr;
cache->lastdiameter = -1; /* force ibuf create in refresh */
cache->invert = invert;
}
cache->use_float = use_float;
cache->use_color_correction = use_float && use_color_correction;
cache->invert = invert;
cache->is_texbrush = (brush->mtex.tex && brush->imagepaint_tool == PAINT_TOOL_DRAW) ? true :
false;
cache->is_maskbrush = (brush->mask_mtex.tex) ? true : false;

View File

@@ -634,7 +634,6 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna)
static void rna_def_modifier_type_common(StructRNA *srna,
const EnumPropertyItem *modifier_type_items,
const char *set_name_func,
const bool blend,
const bool color)
{
@@ -659,13 +658,6 @@ static void rna_def_modifier_type_common(StructRNA *srna,
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Modifier Type", "Type of the modifier");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, nullptr, "modifier.name");
RNA_def_property_string_funcs(prop, nullptr, nullptr, set_name_func);
RNA_def_property_ui_text(prop, "Modifier Name", "Name of the modifier");
RNA_def_property_update(prop, NC_LINESTYLE, nullptr);
RNA_def_struct_name_property(srna, prop);
if (blend) {
prop = RNA_def_property(srna, "blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, nullptr, "modifier.blend");
@@ -696,7 +688,6 @@ static void rna_def_color_modifier(StructRNA *srna)
{
rna_def_modifier_type_common(srna,
rna_enum_linestyle_color_modifier_type_items,
"rna_LineStyleColorModifier_name_set",
true,
true);
}
@@ -705,7 +696,6 @@ static void rna_def_alpha_modifier(StructRNA *srna)
{
rna_def_modifier_type_common(srna,
rna_enum_linestyle_alpha_modifier_type_items,
"rna_LineStyleAlphaModifier_name_set",
true,
false);
}
@@ -714,7 +704,6 @@ static void rna_def_thickness_modifier(StructRNA *srna)
{
rna_def_modifier_type_common(srna,
rna_enum_linestyle_thickness_modifier_type_items,
"rna_LineStyleThicknessModifier_name_set",
true,
false);
}
@@ -723,7 +712,6 @@ static void rna_def_geometry_modifier(StructRNA *srna)
{
rna_def_modifier_type_common(srna,
rna_enum_linestyle_geometry_modifier_type_items,
"rna_LineStyleGeometryModifier_name_set",
false,
false);
}
@@ -882,6 +870,13 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
RNA_def_struct_ui_text(
srna, "Line Style Color Modifier", "Base type to define line color modifiers");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, nullptr, "name");
RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_LineStyleColorModifier_name_set");
RNA_def_property_ui_text(prop, "Modifier Name", "Name of the modifier");
RNA_def_property_update(prop, NC_LINESTYLE, nullptr);
RNA_def_struct_name_property(srna, prop);
srna = RNA_def_struct(brna, "LineStyleColorModifier_AlongStroke", "LineStyleColorModifier");
RNA_def_struct_ui_text(srna, "Along Stroke", "Change line color along stroke");
rna_def_color_modifier(srna);
@@ -986,6 +981,13 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
RNA_def_struct_ui_text(
srna, "Line Style Alpha Modifier", "Base type to define alpha transparency modifiers");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, nullptr, "name");
RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_LineStyleAlphaModifier_name_set");
RNA_def_property_ui_text(prop, "Modifier Name", "Name of the modifier");
RNA_def_property_update(prop, NC_LINESTYLE, nullptr);
RNA_def_struct_name_property(srna, prop);
srna = RNA_def_struct(brna, "LineStyleAlphaModifier_AlongStroke", "LineStyleAlphaModifier");
RNA_def_struct_ui_text(srna, "Along Stroke", "Change alpha transparency along stroke");
rna_def_alpha_modifier(srna);
@@ -1091,6 +1093,13 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
RNA_def_struct_ui_text(
srna, "Line Style Thickness Modifier", "Base type to define line thickness modifiers");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, nullptr, "name");
RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_LineStyleThicknessModifier_name_set");
RNA_def_property_ui_text(prop, "Modifier Name", "Name of the modifier");
RNA_def_property_update(prop, NC_LINESTYLE, nullptr);
RNA_def_struct_name_property(srna, prop);
srna = RNA_def_struct(brna, "LineStyleThicknessModifier_Tangent", "LineStyleThicknessModifier");
RNA_def_struct_ui_text(srna, "Tangent", "Thickness based on the direction of the stroke");
rna_def_thickness_modifier(srna);
@@ -1263,6 +1272,13 @@ static void rna_def_linestyle_modifiers(BlenderRNA *brna)
RNA_def_struct_ui_text(
srna, "Line Style Geometry Modifier", "Base type to define stroke geometry modifiers");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, nullptr, "name");
RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_LineStyleGeometryModifier_name_set");
RNA_def_property_ui_text(prop, "Modifier Name", "Name of the modifier");
RNA_def_property_update(prop, NC_LINESTYLE, nullptr);
RNA_def_struct_name_property(srna, prop);
srna = RNA_def_struct(brna, "LineStyleGeometryModifier_Sampling", "LineStyleGeometryModifier");
RNA_def_struct_ui_text(
srna,