Cleanup: UI: Remove disabled RNA code
As noted in the removed comment, python has better syntax for assigning operator properties values, as: ``` py op = layout.operator('my_operator') op.string_prop = "value" ``` Code has been unused since e0fc6d0c3360c1e5b61bdeefeb92cd3325780fab Pull Request: https://projects.blender.org/blender/blender/pulls/139243
This commit is contained in:
parent
8dd9aeb11e
commit
ae5a0d3a1b
@ -1609,63 +1609,6 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED | PARM_RNAPTR);
|
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED | PARM_RNAPTR);
|
||||||
RNA_def_function_return(func, parm);
|
RNA_def_function_return(func, parm);
|
||||||
|
|
||||||
/* useful in C but not in python */
|
|
||||||
# if 0
|
|
||||||
|
|
||||||
func = RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string");
|
|
||||||
api_ui_item_op_common(func);
|
|
||||||
parm = RNA_def_string(func, "property", nullptr, 0, "", "Identifier of property in operator");
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
parm = RNA_def_string(func, "value", nullptr, 0, "", "Enum property value");
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
|
|
||||||
func = RNA_def_function(srna, "operator_boolean", "uiItemBooleanO");
|
|
||||||
api_ui_item_op_common(func);
|
|
||||||
parm = RNA_def_string(func, "property", nullptr, 0, "", "Identifier of property in operator");
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
parm = RNA_def_boolean(
|
|
||||||
func, "value", false, "", "Value of the property to call the operator with");
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
|
|
||||||
func = RNA_def_function(srna, "operator_int", "uiItemIntO");
|
|
||||||
api_ui_item_op_common(func);
|
|
||||||
parm = RNA_def_string(func, "property", nullptr, 0, "", "Identifier of property in operator");
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
parm = RNA_def_int(func,
|
|
||||||
"value",
|
|
||||||
0,
|
|
||||||
INT_MIN,
|
|
||||||
INT_MAX,
|
|
||||||
"",
|
|
||||||
"Value of the property to call the operator with",
|
|
||||||
INT_MIN,
|
|
||||||
INT_MAX);
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
|
|
||||||
func = RNA_def_function(srna, "operator_float", "uiItemFloatO");
|
|
||||||
api_ui_item_op_common(func);
|
|
||||||
parm = RNA_def_string(func, "property", nullptr, 0, "", "Identifier of property in operator");
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
parm = RNA_def_float(func,
|
|
||||||
"value",
|
|
||||||
0,
|
|
||||||
-FLT_MAX,
|
|
||||||
FLT_MAX,
|
|
||||||
"",
|
|
||||||
"Value of the property to call the operator with",
|
|
||||||
-FLT_MAX,
|
|
||||||
FLT_MAX);
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
|
|
||||||
func = RNA_def_function(srna, "operator_string", "uiItemStringO");
|
|
||||||
api_ui_item_op_common(func);
|
|
||||||
parm = RNA_def_string(func, "property", nullptr, 0, "", "Identifier of property in operator");
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
parm = RNA_def_string(
|
|
||||||
func, "value", nullptr, 0, "", "Value of the property to call the operator with");
|
|
||||||
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
|
|
||||||
# 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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user