blender-v3.6-release backports #111977

Merged
Philipp Oeser merged 17 commits from lichtwerk/blender:blender-v3.6-release into blender-v3.6-release 2023-09-05 15:50:28 +02:00
1 changed files with 80 additions and 10 deletions
Showing only changes of commit b9f78a0fcf - Show all commits

View File

@ -838,13 +838,81 @@ static bool rna_Curve_is_editmode_get(PointerRNA *ptr)
}
}
static bool rna_TextCurve_is_select_bold_get(PointerRNA *ptr)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL) {
return (cu->editfont->select_char_info_flag & CU_CHINFO_BOLD);
}
return false;
}
static void rna_TextCurve_is_select_bold_set(PointerRNA *ptr, const bool value)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL) {
cu->editfont->select_char_info_flag |= CU_CHINFO_BOLD;
}
}
static bool rna_TextCurve_is_select_italic_get(PointerRNA *ptr)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL) {
return (cu->editfont->select_char_info_flag & CU_CHINFO_ITALIC);
}
return false;
}
static void rna_TextCurve_is_select_italic_set(PointerRNA *ptr, const bool value)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL) {
cu->editfont->select_char_info_flag |= CU_CHINFO_ITALIC;
}
}
static bool rna_TextCurve_is_select_underline_get(PointerRNA *ptr)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL) {
return (cu->editfont->select_char_info_flag & CU_CHINFO_UNDERLINE);
}
return false;
}
static void rna_TextCurve_is_select_underline_set(PointerRNA *ptr, const bool value)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL) {
cu->editfont->select_char_info_flag |= CU_CHINFO_UNDERLINE;
}
}
static bool rna_TextCurve_is_select_smallcaps_get(PointerRNA *ptr)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL) {
return (cu->editfont->select_char_info_flag & CU_CHINFO_SMALLCAPS);
}
return false;
}
static void rna_TextCurve_is_select_smallcap_set(PointerRNA *ptr, const bool value)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL) {
cu->editfont->select_char_info_flag |= CU_CHINFO_SMALLCAPS;
}
}
static bool rna_TextCurve_has_selection_get(PointerRNA *ptr)
{
Curve *cu = (Curve *)ptr->owner_id;
if (cu->editfont != NULL)
if (cu->editfont != NULL) {
return (cu->editfont->selboxes != NULL);
else
return false;
}
return false;
}
#else
@ -1284,25 +1352,27 @@ static void rna_def_font(BlenderRNA *UNUSED(brna), StructRNA *srna)
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop = RNA_def_property(srna, "is_select_bold", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "editfont->select_char_info_flag", CU_CHINFO_BOLD);
RNA_def_property_boolean_funcs(
prop, "rna_TextCurve_is_select_bold_get", "rna_TextCurve_is_select_bold_set");
RNA_def_property_ui_text(prop, "Selected Bold", "Whether the selected text is bold");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "is_select_italic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "editfont->select_char_info_flag", CU_CHINFO_ITALIC);
RNA_def_property_boolean_funcs(
prop, "rna_TextCurve_is_select_italic_get", "rna_TextCurve_is_select_italic_set");
RNA_def_property_ui_text(prop, "Selected Italic", "Whether the selected text is italics");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "is_select_underline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(
prop, NULL, "editfont->select_char_info_flag", CU_CHINFO_UNDERLINE);
RNA_def_property_boolean_funcs(
prop, "rna_TextCurve_is_select_underline_get", "rna_TextCurve_is_select_underline_set");
RNA_def_property_ui_text(prop, "Selected Underline", "Whether the selected text is underlined");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "is_select_smallcaps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(
prop, NULL, "editfont->select_char_info_flag", CU_CHINFO_SMALLCAPS);
RNA_def_property_ui_text(prop, "Selected Smallcaps", "Whether the selected text is small caps");
RNA_def_property_boolean_funcs(
prop, "rna_TextCurve_is_select_smallcaps_get", "rna_TextCurve_is_select_smallcaps_set");
RNA_def_property_ui_text(prop, "Selected Small Caps", "Whether the selected text is small caps");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
prop = RNA_def_property(srna, "has_selection", PROP_BOOLEAN, PROP_NONE);