Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curve/editfont.c
| Show All 27 Lines | |||||
| #include "BKE_curve.h" | #include "BKE_curve.h" | ||||
| #include "BKE_layer.h" | #include "BKE_layer.h" | ||||
| #include "BKE_lib_id.h" | #include "BKE_lib_id.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_vfont.h" | #include "BKE_vfont.h" | ||||
| #include "BLT_translation.h" | |||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| ▲ Show 20 Lines • Show All 1,915 Lines • ▼ Show 20 Lines | |||||
| static int set_case_exec(bContext *C, wmOperator *op) | static int set_case_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| return set_case(C, RNA_enum_get(op->ptr, "case")); | return set_case(C, RNA_enum_get(op->ptr, "case")); | ||||
| } | } | ||||
| void FONT_OT_case_set(wmOperatorType *ot) | void FONT_OT_case_set(wmOperatorType *ot) | ||||
| { | { | ||||
| PropertyRNA *prop; | |||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Set Case"; | ot->name = "Set Case"; | ||||
| ot->description = "Set font case"; | ot->description = "Set font case"; | ||||
| ot->idname = "FONT_OT_case_set"; | ot->idname = "FONT_OT_case_set"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->exec = set_case_exec; | ot->exec = set_case_exec; | ||||
| ot->poll = ED_operator_editfont; | ot->poll = ED_operator_editfont; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; | ||||
| /* properties */ | /* properties */ | ||||
| RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case"); | prop = RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case"); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_TEXT); | |||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Toggle Case Operator | /** \name Toggle Case Operator | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines | |||||