Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_ui_api.c
| Show First 20 Lines • Show All 391 Lines • ▼ Show 20 Lines | static void api_ui_item_common(FunctionRNA *func) | ||||
| RNA_def_property_enum_items(prop, rna_enum_icon_items); | RNA_def_property_enum_items(prop, rna_enum_icon_items); | ||||
| RNA_def_property_ui_text(prop, "Icon", "Override automatic icon of the item"); | RNA_def_property_ui_text(prop, "Icon", "Override automatic icon of the item"); | ||||
| } | } | ||||
| static void api_ui_item_op(FunctionRNA *func) | static void api_ui_item_op(FunctionRNA *func) | ||||
| { | { | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); | parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| } | } | ||||
| static void api_ui_item_op_common(FunctionRNA *func) | static void api_ui_item_op_common(FunctionRNA *func) | ||||
| { | { | ||||
| api_ui_item_op(func); | api_ui_item_op(func); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| } | } | ||||
| static void api_ui_item_rna_common(FunctionRNA *func) | static void api_ui_item_rna_common(FunctionRNA *func) | ||||
| { | { | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| } | } | ||||
| void RNA_api_ui_layout(StructRNA *srna) | void RNA_api_ui_layout(StructRNA *srna) | ||||
| { | { | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| static EnumPropertyItem curve_type_items[] = { | static EnumPropertyItem curve_type_items[] = { | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | RNA_def_function_ui_description(func, "Sublayout. Items placed in this sublayout are placed " | ||||
| "in a radial fashion around the menu center)"); | "in a radial fashion around the menu center)"); | ||||
| /* Icon of a rna pointer */ | /* Icon of a rna pointer */ | ||||
| func = RNA_def_function(srna, "icon", "rna_ui_get_rnaptr_icon"); | func = RNA_def_function(srna, "icon", "rna_ui_get_rnaptr_icon"); | ||||
| parm = RNA_def_int(func, "icon_value", ICON_NONE, 0, INT_MAX, "", "Icon identifier", 0, INT_MAX); | parm = RNA_def_int(func, "icon_value", ICON_NONE, 0, INT_MAX, "", "Icon identifier", 0, INT_MAX); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); | ||||
| parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take the icon"); | parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take the icon"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_function_ui_description(func, "Return the custom icon for this data, " | RNA_def_function_ui_description(func, "Return the custom icon for this data, " | ||||
| "use it e.g. to get materials or texture icons"); | "use it e.g. to get materials or texture icons"); | ||||
| /* UI name, description and icon of an enum item */ | /* UI name, description and icon of an enum item */ | ||||
| func = RNA_def_function(srna, "enum_item_name", "rna_ui_get_enum_name"); | func = RNA_def_function(srna, "enum_item_name", "rna_ui_get_enum_name"); | ||||
| parm = RNA_def_string(func, "name", NULL, 0, "", "UI name of the enum item"); | parm = RNA_def_string(func, "name", NULL, 0, "", "UI name of the enum item"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); | parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_function_ui_description(func, "Return the UI name for this enum item"); | RNA_def_function_ui_description(func, "Return the UI name for this enum item"); | ||||
| func = RNA_def_function(srna, "enum_item_description", "rna_ui_get_enum_description"); | func = RNA_def_function(srna, "enum_item_description", "rna_ui_get_enum_description"); | ||||
| parm = RNA_def_string(func, "description", NULL, 0, "", "UI description of the enum item"); | parm = RNA_def_string(func, "description", NULL, 0, "", "UI description of the enum item"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); | parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_function_ui_description(func, "Return the UI description for this enum item"); | RNA_def_function_ui_description(func, "Return the UI description for this enum item"); | ||||
| func = RNA_def_function(srna, "enum_item_icon", "rna_ui_get_enum_icon"); | func = RNA_def_function(srna, "enum_item_icon", "rna_ui_get_enum_icon"); | ||||
| parm = RNA_def_int(func, "icon_value", ICON_NONE, 0, INT_MAX, "", "Icon identifier", 0, INT_MAX); | parm = RNA_def_int(func, "icon_value", ICON_NONE, 0, INT_MAX, "", "Icon identifier", 0, INT_MAX); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); | parm = RNA_def_string(func, "identifier", NULL, 0, "", "Identifier of the enum item"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_function_ui_description(func, "Return the icon for this enum item"); | RNA_def_function_ui_description(func, "Return the icon for this enum item"); | ||||
| /* items */ | /* items */ | ||||
| func = RNA_def_function(srna, "prop", "rna_uiItemR"); | func = RNA_def_function(srna, "prop", "rna_uiItemR"); | ||||
| RNA_def_function_ui_description(func, "Item. Exposes an RNA item and places it into the layout"); | RNA_def_function_ui_description(func, "Item. Exposes an RNA item and places it into the layout"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| RNA_def_boolean(func, "expand", false, "", "Expand button to show more detail"); | RNA_def_boolean(func, "expand", false, "", "Expand button to show more detail"); | ||||
| Show All 14 Lines | void RNA_api_ui_layout(StructRNA *srna) | ||||
| func = RNA_def_function(srna, "prop_menu_enum", "rna_uiItemMenuEnumR"); | func = RNA_def_function(srna, "prop_menu_enum", "rna_uiItemMenuEnumR"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| func = RNA_def_function(srna, "prop_enum", "rna_uiItemEnumR_string"); | func = RNA_def_function(srna, "prop_enum", "rna_uiItemEnumR_string"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_string(func, "value", NULL, 0, "", "Enum property value"); | parm = RNA_def_string(func, "value", NULL, 0, "", "Enum property value"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| func = RNA_def_function(srna, "prop_search", "rna_uiItemPointerR"); | func = RNA_def_function(srna, "prop_search", "rna_uiItemPointerR"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in"); | parm = RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "search_property", NULL, 0, "", "Identifier of search collection property"); | parm = RNA_def_string(func, "search_property", NULL, 0, "", "Identifier of search collection property"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| func = RNA_def_function(srna, "operator", "rna_uiItemO"); | func = RNA_def_function(srna, "operator", "rna_uiItemO"); | ||||
| api_ui_item_op_common(func); | api_ui_item_op_common(func); | ||||
| RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, just the icon/text"); | RNA_def_boolean(func, "emboss", true, "", "Draw the button itself, just the icon/text"); | ||||
| parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | ||||
| parm = RNA_def_pointer(func, "properties", "OperatorProperties", "", | parm = RNA_def_pointer(func, "properties", "OperatorProperties", "", | ||||
| "Operator properties to fill in, return when 'properties' is set to true"); | "Operator properties to fill in, return when 'properties' is set to true"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator"); | RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator"); | ||||
| func = RNA_def_function(srna, "operator_enum", "uiItemsEnumO"); | func = RNA_def_function(srna, "operator_enum", "uiItemsEnumO"); | ||||
| parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); | parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "operator_menu_enum", "rna_uiItemMenuEnumO"); | func = RNA_def_function(srna, "operator_menu_enum", "rna_uiItemMenuEnumO"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| api_ui_item_op(func); /* cant use api_ui_item_op_common because property must come right after */ | api_ui_item_op(func); /* cant use api_ui_item_op_common because property must come right after */ | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| /* useful in C but not in python */ | /* useful in C but not in python */ | ||||
| #if 0 | #if 0 | ||||
| func = RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string"); | func = RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string"); | ||||
| api_ui_item_op_common(func); | api_ui_item_op_common(func); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_string(func, "value", NULL, 0, "", "Enum property value"); | parm = RNA_def_string(func, "value", NULL, 0, "", "Enum property value"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "operator_boolean", "uiItemBooleanO"); | func = RNA_def_function(srna, "operator_boolean", "uiItemBooleanO"); | ||||
| api_ui_item_op_common(func); | api_ui_item_op_common(func); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_boolean(func, "value", false, "", "Value of the property to call the operator with"); | parm = RNA_def_boolean(func, "value", false, "", "Value of the property to call the operator with"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); */ | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); */ | ||||
| func = RNA_def_function(srna, "operator_int", "uiItemIntO"); | func = RNA_def_function(srna, "operator_int", "uiItemIntO"); | ||||
| api_ui_item_op_common(func); | api_ui_item_op_common(func); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "", | parm = RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "", | ||||
| "Value of the property to call the operator with", INT_MIN, INT_MAX); | "Value of the property to call the operator with", INT_MIN, INT_MAX); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); */ | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); */ | ||||
| func = RNA_def_function(srna, "operator_float", "uiItemFloatO"); | func = RNA_def_function(srna, "operator_float", "uiItemFloatO"); | ||||
| api_ui_item_op_common(func); | api_ui_item_op_common(func); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "", | parm = RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "", | ||||
| "Value of the property to call the operator with", -FLT_MAX, FLT_MAX); | "Value of the property to call the operator with", -FLT_MAX, FLT_MAX); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); */ | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); */ | ||||
| func = RNA_def_function(srna, "operator_string", "uiItemStringO"); | func = RNA_def_function(srna, "operator_string", "uiItemStringO"); | ||||
| api_ui_item_op_common(func); | api_ui_item_op_common(func); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_string(func, "value", NULL, 0, "", "Value of the property to call the operator with"); | parm = RNA_def_string(func, "value", NULL, 0, "", "Value of the property to call the operator with"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| #endif | #endif | ||||
| func = RNA_def_function(srna, "label", "rna_uiItemL"); | func = RNA_def_function(srna, "label", "rna_uiItemL"); | ||||
| RNA_def_function_ui_description(func, "Item. Displays text and/or icon in the layout"); | RNA_def_function_ui_description(func, "Item. Displays text and/or icon in the layout"); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | ||||
| func = RNA_def_function(srna, "menu", "rna_uiItemM"); | func = RNA_def_function(srna, "menu", "rna_uiItemM"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| parm = RNA_def_string(func, "menu", NULL, 0, "", "Identifier of the menu"); | parm = RNA_def_string(func, "menu", NULL, 0, "", "Identifier of the menu"); | ||||
| api_ui_item_common(func); | api_ui_item_common(func); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | parm = RNA_def_property(func, "icon_value", PROP_INT, PROP_UNSIGNED); | ||||
| RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | RNA_def_property_ui_text(parm, "Icon Value", "Override automatic icon of the item"); | ||||
| func = RNA_def_function(srna, "separator", "uiItemS"); | func = RNA_def_function(srna, "separator", "uiItemS"); | ||||
| RNA_def_function_ui_description(func, "Item. Inserts empty space into the layout between items"); | RNA_def_function_ui_description(func, "Item. Inserts empty space into the layout between items"); | ||||
| /* context */ | /* context */ | ||||
| func = RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer"); | func = RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer"); | ||||
| parm = RNA_def_string(func, "name", NULL, 0, "Name", "Name of entry in the context"); | parm = RNA_def_string(func, "name", NULL, 0, "Name", "Name of entry in the context"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context"); | parm = RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED | PARM_RNAPTR); | ||||
| /* templates */ | /* templates */ | ||||
| func = RNA_def_function(srna, "template_header", "uiTemplateHeader"); | func = RNA_def_function(srna, "template_header", "uiTemplateHeader"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| RNA_def_function_ui_description(func, "Inserts common Space header UI (editor type selector)"); | RNA_def_function_ui_description(func, "Inserts common Space header UI (editor type selector)"); | ||||
| func = RNA_def_function(srna, "template_ID", "uiTemplateID"); | func = RNA_def_function(srna, "template_ID", "uiTemplateID"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); | RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); | ||||
| RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); | RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); | ||||
| RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); | RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); | ||||
| func = RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview"); | func = RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); | RNA_def_string(func, "new", NULL, 0, "", "Operator identifier to create a new ID block"); | ||||
| RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); | RNA_def_string(func, "open", NULL, 0, "", "Operator identifier to open a file for creating a new ID block"); | ||||
| RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); | RNA_def_string(func, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block"); | ||||
| RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX); | RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX); | ||||
| RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX); | RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX); | ||||
| func = RNA_def_function(srna, "template_any_ID", "rna_uiTemplateAnyID"); | func = RNA_def_function(srna, "template_any_ID", "rna_uiTemplateAnyID"); | ||||
| parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_string(func, "type_property", NULL, 0, "", | parm = RNA_def_string(func, "type_property", NULL, 0, "", | ||||
| "Identifier of property in data giving the type of the ID-blocks to use"); | "Identifier of property in data giving the type of the ID-blocks to use"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| api_ui_item_common_text(func); | api_ui_item_common_text(func); | ||||
| func = RNA_def_function(srna, "template_path_builder", "rna_uiTemplatePathBuilder"); | func = RNA_def_function(srna, "template_path_builder", "rna_uiTemplatePathBuilder"); | ||||
| parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from"); | parm = RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED | PARM_RNAPTR); | ||||
| api_ui_item_common_text(func); | api_ui_item_common_text(func); | ||||
| func = RNA_def_function(srna, "template_modifier", "uiTemplateModifier"); | func = RNA_def_function(srna, "template_modifier", "uiTemplateModifier"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| RNA_def_function_ui_description(func, "Generates the UI layout for modifiers"); | RNA_def_function_ui_description(func, "Generates the UI layout for modifiers"); | ||||
| parm = RNA_def_pointer(func, "data", "Modifier", "", "Modifier data"); | parm = RNA_def_pointer(func, "data", "Modifier", "", "Modifier data"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); | parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "template_constraint", "uiTemplateConstraint"); | func = RNA_def_function(srna, "template_constraint", "uiTemplateConstraint"); | ||||
| RNA_def_function_ui_description(func, "Generates the UI layout for constraints"); | RNA_def_function_ui_description(func, "Generates the UI layout for constraints"); | ||||
| parm = RNA_def_pointer(func, "data", "Constraint", "", "Constraint data"); | parm = RNA_def_pointer(func, "data", "Constraint", "", "Constraint data"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); | parm = RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "template_preview", "uiTemplatePreview"); | func = RNA_def_function(srna, "template_preview", "uiTemplatePreview"); | ||||
| RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps or worlds"); | RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps or worlds"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| parm = RNA_def_pointer(func, "id", "ID", "", "ID data-block"); | parm = RNA_def_pointer(func, "id", "ID", "", "ID data-block"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_boolean(func, "show_buttons", true, "", "Show preview buttons?"); | RNA_def_boolean(func, "show_buttons", true, "", "Show preview buttons?"); | ||||
| RNA_def_pointer(func, "parent", "ID", "", "ID data-block"); | RNA_def_pointer(func, "parent", "ID", "", "ID data-block"); | ||||
| RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot"); | RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot"); | ||||
| RNA_def_string(func, "preview_id", NULL, 0, "", | RNA_def_string(func, "preview_id", NULL, 0, "", | ||||
| "Identifier of this preview widget, if not set the ID type will be used " | "Identifier of this preview widget, if not set the ID type will be used " | ||||
| "(i.e. all previews of materials without explicit ID will have the same size...)"); | "(i.e. all previews of materials without explicit ID will have the same size...)"); | ||||
| func = RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping"); | func = RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping"); | ||||
| Show All 25 Lines | #endif | ||||
| func = RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope"); | func = RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope"); | ||||
| RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data"); | RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| func = RNA_def_function(srna, "template_layers", "uiTemplateLayers"); | func = RNA_def_function(srna, "template_layers", "uiTemplateLayers"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property"); | parm = RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "used_layers_property", NULL, 0, "", "Identifier of property in data"); | parm = RNA_def_string(func, "used_layers_property", NULL, 0, "", "Identifier of property in data"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX); | parm = RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "template_color_picker", "uiTemplateColorPicker"); | func = RNA_def_function(srna, "template_color_picker", "uiTemplateColorPicker"); | ||||
| RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors"); | RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| RNA_def_boolean(func, "value_slider", false, "", "Display the value slider to the right of the color wheel"); | RNA_def_boolean(func, "value_slider", false, "", "Display the value slider to the right of the color wheel"); | ||||
| RNA_def_boolean(func, "lock", false, "", "Lock the color wheel display to value 1.0 regardless of actual color"); | RNA_def_boolean(func, "lock", false, "", "Lock the color wheel display to value 1.0 regardless of actual color"); | ||||
| RNA_def_boolean(func, "lock_luminosity", false, "", "Keep the color at its original vector length"); | RNA_def_boolean(func, "lock_luminosity", false, "", "Keep the color at its original vector length"); | ||||
| RNA_def_boolean(func, "cubic", false, "", "Cubic saturation for picking values close to white"); | RNA_def_boolean(func, "cubic", false, "", "Cubic saturation for picking values close to white"); | ||||
| func = RNA_def_function(srna, "template_palette", "uiTemplatePalette"); | func = RNA_def_function(srna, "template_palette", "uiTemplatePalette"); | ||||
| RNA_def_function_ui_description(func, "Item. A palette used to pick colors"); | RNA_def_function_ui_description(func, "Item. A palette used to pick colors"); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| RNA_def_boolean(func, "color", 0, "", "Display the colors as colors or values"); | RNA_def_boolean(func, "color", 0, "", "Display the colors as colors or values"); | ||||
| func = RNA_def_function(srna, "template_image_layers", "uiTemplateImageLayers"); | func = RNA_def_function(srna, "template_image_layers", "uiTemplateImageLayers"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| parm = RNA_def_pointer(func, "image", "Image", "", ""); | parm = RNA_def_pointer(func, "image", "Image", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "image_user", "ImageUser", "", ""); | parm = RNA_def_pointer(func, "image_user", "ImageUser", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "template_image", "uiTemplateImage"); | func = RNA_def_function(srna, "template_image", "uiTemplateImage"); | ||||
| RNA_def_function_ui_description(func, "Item(s). User interface for selecting images and their source paths"); | RNA_def_function_ui_description(func, "Item(s). User interface for selecting images and their source paths"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_pointer(func, "image_user", "ImageUser", "", ""); | parm = RNA_def_pointer(func, "image_user", "ImageUser", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_boolean(func, "compact", false, "", "Use more compact layout"); | RNA_def_boolean(func, "compact", false, "", "Use more compact layout"); | ||||
| RNA_def_boolean(func, "multiview", false, "", "Expose Multi-View options"); | RNA_def_boolean(func, "multiview", false, "", "Expose Multi-View options"); | ||||
| func = RNA_def_function(srna, "template_image_settings", "uiTemplateImageSettings"); | func = RNA_def_function(srna, "template_image_settings", "uiTemplateImageSettings"); | ||||
| RNA_def_function_ui_description(func, "User interface for setting image format options"); | RNA_def_function_ui_description(func, "User interface for setting image format options"); | ||||
| parm = RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", ""); | parm = RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_boolean(func, "color_management", false, "", "Show color management settings"); | RNA_def_boolean(func, "color_management", false, "", "Show color management settings"); | ||||
| func = RNA_def_function(srna, "template_image_stereo_3d", "uiTemplateImageStereo3d"); | func = RNA_def_function(srna, "template_image_stereo_3d", "uiTemplateImageStereo3d"); | ||||
| RNA_def_function_ui_description(func, "User interface for setting image stereo 3d options"); | RNA_def_function_ui_description(func, "User interface for setting image stereo 3d options"); | ||||
| parm = RNA_def_pointer(func, "stereo_3d_format", "Stereo3dFormat", "", ""); | parm = RNA_def_pointer(func, "stereo_3d_format", "Stereo3dFormat", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| func = RNA_def_function(srna, "template_image_views", "uiTemplateImageViews"); | func = RNA_def_function(srna, "template_image_views", "uiTemplateImageViews"); | ||||
| RNA_def_function_ui_description(func, "User interface for setting image views output options"); | RNA_def_function_ui_description(func, "User interface for setting image views output options"); | ||||
| parm = RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", ""); | parm = RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| func = RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip"); | func = RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip"); | ||||
| RNA_def_function_ui_description(func, "Item(s). User interface for selecting movie clips and their source paths"); | RNA_def_function_ui_description(func, "Item(s). User interface for selecting movie clips and their source paths"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| RNA_def_boolean(func, "compact", false, "", "Use more compact layout"); | RNA_def_boolean(func, "compact", false, "", "Use more compact layout"); | ||||
| func = RNA_def_function(srna, "template_track", "uiTemplateTrack"); | func = RNA_def_function(srna, "template_track", "uiTemplateTrack"); | ||||
| RNA_def_function_ui_description(func, "Item. A movie-track widget to preview tracking image."); | RNA_def_function_ui_description(func, "Item. A movie-track widget to preview tracking image."); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| func = RNA_def_function(srna, "template_marker", "uiTemplateMarker"); | func = RNA_def_function(srna, "template_marker", "uiTemplateMarker"); | ||||
| RNA_def_function_ui_description(func, "Item. A widget to control single marker settings."); | RNA_def_function_ui_description(func, "Item. A widget to control single marker settings."); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_pointer(func, "clip_user", "MovieClipUser", "", ""); | parm = RNA_def_pointer(func, "clip_user", "MovieClipUser", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_pointer(func, "track", "MovieTrackingTrack", "", ""); | parm = RNA_def_pointer(func, "track", "MovieTrackingTrack", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_boolean(func, "compact", false, "", "Use more compact layout"); | RNA_def_boolean(func, "compact", false, "", "Use more compact layout"); | ||||
| func = RNA_def_function(srna, "template_movieclip_information", "uiTemplateMovieclipInformation"); | func = RNA_def_function(srna, "template_movieclip_information", "uiTemplateMovieclipInformation"); | ||||
| RNA_def_function_ui_description(func, "Item. Movie clip information data."); | RNA_def_function_ui_description(func, "Item. Movie clip information data."); | ||||
| api_ui_item_rna_common(func); | api_ui_item_rna_common(func); | ||||
| parm = RNA_def_pointer(func, "clip_user", "MovieClipUser", "", ""); | parm = RNA_def_pointer(func, "clip_user", "MovieClipUser", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| func = RNA_def_function(srna, "template_list", "uiTemplateList"); | func = RNA_def_function(srna, "template_list", "uiTemplateList"); | ||||
| RNA_def_function_ui_description(func, "Item. A list widget to display data, e.g. vertexgroups."); | RNA_def_function_ui_description(func, "Item. A list widget to display data, e.g. vertexgroups."); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| parm = RNA_def_string(func, "listtype_name", NULL, 0, "", "Identifier of the list type to use"); | parm = RNA_def_string(func, "listtype_name", NULL, 0, "", "Identifier of the list type to use"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_string(func, "list_id", NULL, 0, "", | parm = RNA_def_string(func, "list_id", NULL, 0, "", | ||||
| "Identifier of this list widget (mandatory when using default \"" UI_UL_DEFAULT_CLASS_NAME | "Identifier of this list widget (mandatory when using default \"" UI_UL_DEFAULT_CLASS_NAME | ||||
| "\" class). " | "\" class). " | ||||
| "If this is set, the uilist gets a custom ID, otherwise it takes the " | "If this is set, the uilist gets a custom ID, otherwise it takes the " | ||||
| "name of the class used to define the uilist (for example, if the " | "name of the class used to define the uilist (for example, if the " | ||||
| "class name is \"OBJECT_UL_vgroups\", and list_id is not set by the " | "class name is \"OBJECT_UL_vgroups\", and list_id is not set by the " | ||||
| "script, then bl_idname = \"OBJECT_UL_vgroups\")"); | "script, then bl_idname = \"OBJECT_UL_vgroups\")"); | ||||
| parm = RNA_def_pointer(func, "dataptr", "AnyType", "", "Data from which to take the Collection property"); | parm = RNA_def_pointer(func, "dataptr", "AnyType", "", "Data from which to take the Collection property"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "propname", NULL, 0, "", "Identifier of the Collection property in data"); | parm = RNA_def_string(func, "propname", NULL, 0, "", "Identifier of the Collection property in data"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "active_dataptr", "AnyType", "", | parm = RNA_def_pointer(func, "active_dataptr", "AnyType", "", | ||||
| "Data from which to take the integer property, index of the active item"); | "Data from which to take the integer property, index of the active item"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "active_propname", NULL, 0, "", | parm = RNA_def_string(func, "active_propname", NULL, 0, "", | ||||
| "Identifier of the integer property in active_data, index of the active item"); | "Identifier of the integer property in active_data, index of the active item"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_string(func, "item_dyntip_propname", NULL, 0, "", | RNA_def_string(func, "item_dyntip_propname", NULL, 0, "", | ||||
| "Identifier of a string property in items, to use as tooltip content"); | "Identifier of a string property in items, to use as tooltip content"); | ||||
| RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Default and minimum number of rows to display", 0, INT_MAX); | RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Default and minimum number of rows to display", 0, INT_MAX); | ||||
| RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Default maximum number of rows to display", 0, INT_MAX); | RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Default maximum number of rows to display", 0, INT_MAX); | ||||
| RNA_def_enum(func, "type", rna_enum_uilist_layout_type_items, UILST_LAYOUT_DEFAULT, "Type", "Type of layout to use"); | RNA_def_enum(func, "type", rna_enum_uilist_layout_type_items, UILST_LAYOUT_DEFAULT, "Type", "Type of layout to use"); | ||||
| RNA_def_int(func, "columns", 9, 0, INT_MAX, "", "Number of items to display per row, for GRID layout", 0, INT_MAX); | RNA_def_int(func, "columns", 9, 0, INT_MAX, "", "Number of items to display per row, for GRID layout", 0, INT_MAX); | ||||
| func = RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs"); | func = RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs"); | ||||
| Show All 10 Lines | #endif | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| RNA_def_function_ui_description(func, "Inserts common 3DView Edit modes header UI (selector for selection mode)"); | RNA_def_function_ui_description(func, "Inserts common 3DView Edit modes header UI (selector for selection mode)"); | ||||
| func = RNA_def_function(srna, "template_reports_banner", "uiTemplateReportsBanner"); | func = RNA_def_function(srna, "template_reports_banner", "uiTemplateReportsBanner"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| func = RNA_def_function(srna, "template_node_link", "uiTemplateNodeLink"); | func = RNA_def_function(srna, "template_node_link", "uiTemplateNodeLink"); | ||||
| parm = RNA_def_pointer(func, "ntree", "NodeTree", "", ""); | parm = RNA_def_pointer(func, "ntree", "NodeTree", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "node", "Node", "", ""); | parm = RNA_def_pointer(func, "node", "Node", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "socket", "NodeSocket", "", ""); | parm = RNA_def_pointer(func, "socket", "NodeSocket", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "template_node_view", "uiTemplateNodeView"); | func = RNA_def_function(srna, "template_node_view", "uiTemplateNodeView"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| parm = RNA_def_pointer(func, "ntree", "NodeTree", "", ""); | parm = RNA_def_pointer(func, "ntree", "NodeTree", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "node", "Node", "", ""); | parm = RNA_def_pointer(func, "node", "Node", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "socket", "NodeSocket", "", ""); | parm = RNA_def_pointer(func, "socket", "NodeSocket", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "template_texture_user", "uiTemplateTextureUser"); | func = RNA_def_function(srna, "template_texture_user", "uiTemplateTextureUser"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT); | RNA_def_function_flag(func, FUNC_USE_CONTEXT); | ||||
| func = RNA_def_function(srna, "template_keymap_item_properties", "uiTemplateKeymapItemProperties"); | func = RNA_def_function(srna, "template_keymap_item_properties", "uiTemplateKeymapItemProperties"); | ||||
| parm = RNA_def_pointer(func, "item", "KeyMapItem", "", ""); | parm = RNA_def_pointer(func, "item", "KeyMapItem", "", ""); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| func = RNA_def_function(srna, "template_component_menu", "uiTemplateComponentMenu"); | func = RNA_def_function(srna, "template_component_menu", "uiTemplateComponentMenu"); | ||||
| RNA_def_function_ui_description(func, "Item. Display expanded property in a popup menu"); | RNA_def_function_ui_description(func, "Item. Display expanded property in a popup menu"); | ||||
| parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED | PARM_RNAPTR); | ||||
| parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_string(func, "name", NULL, 0, "", ""); | RNA_def_string(func, "name", NULL, 0, "", ""); | ||||
| func = RNA_def_function(srna, "introspect", "uiLayoutIntrospect"); | func = RNA_def_function(srna, "introspect", "uiLayoutIntrospect"); | ||||
| parm = RNA_def_string(func, "string", NULL, 1024 * 1024, "Descr", "DESCR"); | parm = RNA_def_string(func, "string", NULL, 1024 * 1024, "Descr", "DESCR"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* color management templates */ | /* color management templates */ | ||||
| func = RNA_def_function(srna, "template_colorspace_settings", "uiTemplateColorspaceSettings"); | func = RNA_def_function(srna, "template_colorspace_settings", "uiTemplateColorspaceSettings"); | ||||
| Show All 22 Lines | |||||