Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_operators.c
| Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /** \name Operator Type Append | /** \name Operator Type Append | ||||
| * \{ */ | * \{ */ | ||||
| static wmOperatorType *wm_operatortype_append__begin(void) | static wmOperatorType *wm_operatortype_append__begin(void) | ||||
| { | { | ||||
| wmOperatorType *ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); | wmOperatorType *ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); | ||||
| ot->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_OperatorProperties); | ot->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_OperatorProperties); | ||||
| RNA_def_struct_property_tags(ot->srna, rna_enum_operator_property_tags); | |||||
| /* Set the default i18n context now, so that opfunc can redefine it if needed! */ | /* Set the default i18n context now, so that opfunc can redefine it if needed! */ | ||||
| RNA_def_struct_translation_context(ot->srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT); | RNA_def_struct_translation_context(ot->srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT); | ||||
| ot->translation_context = BLT_I18NCONTEXT_OPERATOR_DEFAULT; | ot->translation_context = BLT_I18NCONTEXT_OPERATOR_DEFAULT; | ||||
| return ot; | return ot; | ||||
| } | } | ||||
| static void wm_operatortype_append__end(wmOperatorType *ot) | static void wm_operatortype_append__end(wmOperatorType *ot) | ||||
| { | { | ||||
| if (ot->name == NULL) { | if (ot->name == NULL) { | ||||
| fprintf(stderr, "ERROR: Operator %s has no name property!\n", ot->idname); | fprintf(stderr, "ERROR: Operator %s has no name property!\n", ot->idname); | ||||
| ot->name = N_("Dummy Name"); | ot->name = N_("Dummy Name"); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 4,616 Lines • Show Last 20 Lines | |||||