Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_wm.c
| Show First 20 Lines • Show All 436 Lines • ▼ Show 20 Lines | EnumPropertyItem rna_enum_operator_return_items[] = { | ||||
| {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"}, | {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"}, | ||||
| {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"}, | {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"}, | ||||
| /* used as a flag */ | /* used as a flag */ | ||||
| {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, | {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, | ||||
| {OPERATOR_INTERFACE, "INTERFACE", 0, "Interface", "Handled but not executed (popup menus)"}, | {OPERATOR_INTERFACE, "INTERFACE", 0, "Interface", "Handled but not executed (popup menus)"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| EnumPropertyItem rna_enum_operator_property_tags[] = { | |||||
| {OP_PROP_TAG_BASIC, "BASIC", 0, "Basic", "The property is non-advanced so UI should avoid hiding it"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| /* flag/enum */ | /* flag/enum */ | ||||
| EnumPropertyItem rna_enum_wm_report_items[] = { | EnumPropertyItem rna_enum_wm_report_items[] = { | ||||
| {RPT_DEBUG, "DEBUG", 0, "Debug", ""}, | {RPT_DEBUG, "DEBUG", 0, "Debug", ""}, | ||||
| {RPT_INFO, "INFO", 0, "Info", ""}, | {RPT_INFO, "INFO", 0, "Info", ""}, | ||||
| {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""}, | {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""}, | ||||
| {RPT_PROPERTY, "PROPERTY", 0, "Property", ""}, | {RPT_PROPERTY, "PROPERTY", 0, "Property", ""}, | ||||
| {RPT_WARNING, "WARNING", 0, "Warning", ""}, | {RPT_WARNING, "WARNING", 0, "Warning", ""}, | ||||
| {RPT_ERROR, "ERROR", 0, "Error", ""}, | {RPT_ERROR, "ERROR", 0, "Error", ""}, | ||||
| ▲ Show 20 Lines • Show All 827 Lines • ▼ Show 20 Lines | static StructRNA *rna_Operator_register( | ||||
| } | } | ||||
| /* XXX, this doubles up with the operator name [#29666] | /* XXX, this doubles up with the operator name [#29666] | ||||
| * for now just remove from dir(bpy.types) */ | * for now just remove from dir(bpy.types) */ | ||||
| /* create a new operator type */ | /* create a new operator type */ | ||||
| dummyot.ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, dummyot.idname, &RNA_Operator); | dummyot.ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, dummyot.idname, &RNA_Operator); | ||||
| RNA_def_struct_flag(dummyot.ext.srna, STRUCT_NO_IDPROPERTIES); /* operator properties are registered separately */ | RNA_def_struct_flag(dummyot.ext.srna, STRUCT_NO_IDPROPERTIES); /* operator properties are registered separately */ | ||||
| RNA_def_struct_property_tags(dummyot.ext.srna, rna_enum_operator_property_tags); | |||||
| RNA_def_struct_translation_context(dummyot.ext.srna, dummyot.translation_context); | RNA_def_struct_translation_context(dummyot.ext.srna, dummyot.translation_context); | ||||
| dummyot.ext.data = data; | dummyot.ext.data = data; | ||||
| dummyot.ext.call = call; | dummyot.ext.call = call; | ||||
| dummyot.ext.free = free; | dummyot.ext.free = free; | ||||
| dummyot.pyop_poll = (have_function[0]) ? rna_operator_poll_cb : NULL; | dummyot.pyop_poll = (have_function[0]) ? rna_operator_poll_cb : NULL; | ||||
| dummyot.exec = (have_function[1]) ? rna_operator_execute_cb : NULL; | dummyot.exec = (have_function[1]) ? rna_operator_execute_cb : NULL; | ||||
| dummyot.check = (have_function[2]) ? rna_operator_check_cb : NULL; | dummyot.check = (have_function[2]) ? rna_operator_check_cb : NULL; | ||||
| ▲ Show 20 Lines • Show All 338 Lines • ▼ Show 20 Lines | #endif | ||||
| RNA_def_property_ui_text(prop, "Macros", ""); | RNA_def_property_ui_text(prop, "Macros", ""); | ||||
| RNA_api_operator(srna); | RNA_api_operator(srna); | ||||
| srna = RNA_def_struct(brna, "OperatorProperties", NULL); | srna = RNA_def_struct(brna, "OperatorProperties", NULL); | ||||
| RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator"); | RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator"); | ||||
| RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine"); | RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine"); | ||||
| RNA_def_struct_idprops_func(srna, "rna_OperatorProperties_idprops"); | RNA_def_struct_idprops_func(srna, "rna_OperatorProperties_idprops"); | ||||
| RNA_def_struct_property_tags(srna, rna_enum_operator_property_tags); | |||||
| RNA_def_struct_flag(srna, STRUCT_NO_DATABLOCK_IDPROPERTIES); | RNA_def_struct_flag(srna, STRUCT_NO_DATABLOCK_IDPROPERTIES); | ||||
| } | } | ||||
| static void rna_def_macro_operator(BlenderRNA *brna) | static void rna_def_macro_operator(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| ▲ Show 20 Lines • Show All 733 Lines • Show Last 20 Lines | |||||