Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space_api.c
| Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | void RNA_api_space_text(StructRNA *srna) | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_int(func, "column", 0, INT_MIN, INT_MAX, "Column", "Column index", 0, INT_MAX); | parm = RNA_def_int(func, "column", 0, INT_MIN, INT_MAX, "Column", "Column index", 0, INT_MAX); | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_int_array( | parm = RNA_def_int_array( | ||||
| func, "result", 2, NULL, -1, INT_MAX, "", "Region coordinates", -1, INT_MAX); | func, "result", 2, NULL, -1, INT_MAX, "", "Region coordinates", -1, INT_MAX); | ||||
| RNA_def_function_output(func, parm); | RNA_def_function_output(func, parm); | ||||
| } | } | ||||
| void rna_def_object_type_visibility_flags_common(StructRNA *srna, int noteflag) | void rna_def_object_type_visibility_flags_common(StructRNA *srna, | ||||
| int noteflag, | |||||
| const char *update_func) | |||||
| { | { | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| struct { | struct { | ||||
| const char *name; | const char *name; | ||||
| int type_mask; | int type_mask; | ||||
| const char *identifier[2]; | const char *identifier[2]; | ||||
| } info[] = { | } info[] = { | ||||
| Show All 37 Lines | void rna_def_object_type_visibility_flags_common(StructRNA *srna, | ||||
| }; | }; | ||||
| for (int mask_index = 0; mask_index < 2; mask_index++) { | for (int mask_index = 0; mask_index < 2; mask_index++) { | ||||
| for (int type_index = 0; type_index < ARRAY_SIZE(info); type_index++) { | for (int type_index = 0; type_index < ARRAY_SIZE(info); type_index++) { | ||||
| prop = RNA_def_property( | prop = RNA_def_property( | ||||
| srna, info[type_index].identifier[mask_index], PROP_BOOLEAN, PROP_NONE); | srna, info[type_index].identifier[mask_index], PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_negative_sdna( | RNA_def_property_boolean_negative_sdna( | ||||
| prop, NULL, view_mask_member[mask_index], info[type_index].type_mask); | prop, NULL, view_mask_member[mask_index], info[type_index].type_mask); | ||||
| RNA_def_property_ui_text(prop, info[type_index].name, ""); | RNA_def_property_ui_text(prop, info[type_index].name, ""); | ||||
| RNA_def_property_update(prop, noteflag, NULL); | RNA_def_property_update(prop, noteflag, update_func); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| void RNA_api_space_filebrowser(StructRNA *srna) | void RNA_api_space_filebrowser(StructRNA *srna) | ||||
| { | { | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| Show All 30 Lines | |||||