Code Cleanup: no need to pass empty strings as default values
This commit is contained in:
parent
9f16790840
commit
348cf17448
Notes:
blender-bot
2023-02-14 11:21:34 +01:00
Referenced by issue #38252, Transforms = invalid Referenced by issue #38186, Mesh Insert-Function' important improve quest.
|
@ -1469,7 +1469,7 @@ void FONT_OT_text_insert(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
|
||||
RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to insert at the cursor position");
|
||||
RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input");
|
||||
}
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ void MASK_OT_new(wmOperatorType *ot)
|
|||
ot->poll = ED_operator_mask;
|
||||
|
||||
/* properties */
|
||||
RNA_def_string(ot->srna, "name", "", MAX_ID_NAME - 2, "Name", "Name of new mask");
|
||||
RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Name of new mask");
|
||||
}
|
||||
|
||||
/******************** create new masklay *********************/
|
||||
|
@ -373,7 +373,7 @@ void MASK_OT_layer_new(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
RNA_def_string(ot->srna, "name", "", MAX_ID_NAME - 2, "Name", "Name of new mask layer");
|
||||
RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Name of new mask layer");
|
||||
}
|
||||
|
||||
/******************** remove mask layer *********************/
|
||||
|
|
|
@ -831,9 +831,9 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
/* properties */
|
||||
prop = RNA_def_string(ot->srna, "filepath", "", FILE_MAX, "Filepath", "Path to image file");
|
||||
prop = RNA_def_string(ot->srna, "filepath", NULL, FILE_MAX, "Filepath", "Path to image file");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
|
||||
prop = RNA_def_string(ot->srna, "name", "", MAX_ID_NAME - 2, "Name", "Image name to assign");
|
||||
prop = RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Image name to assign");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
|
||||
ED_object_add_generic_props(ot, FALSE);
|
||||
}
|
||||
|
@ -2191,7 +2191,7 @@ void OBJECT_OT_add_named(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
RNA_def_boolean(ot->srna, "linked", 0, "Linked", "Duplicate object but not object data, linking to the original data");
|
||||
RNA_def_string(ot->srna, "name", "Cube", MAX_ID_NAME - 2, "Name", "Object name to add");
|
||||
RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Object name to add");
|
||||
}
|
||||
|
||||
/**************************** Join *************************/
|
||||
|
|
|
@ -555,7 +555,7 @@ static int edit_constraint_poll(bContext *C)
|
|||
|
||||
static void edit_constraint_properties(wmOperatorType *ot)
|
||||
{
|
||||
RNA_def_string(ot->srna, "constraint", "", MAX_NAME, "Constraint", "Name of the constraint to edit");
|
||||
RNA_def_string(ot->srna, "constraint", NULL, MAX_NAME, "Constraint", "Name of the constraint to edit");
|
||||
RNA_def_enum(ot->srna, "owner", constraint_owner_items, 0, "Owner", "The owner of this constraint");
|
||||
}
|
||||
|
||||
|
|
|
@ -1731,7 +1731,7 @@ void OBJECT_OT_game_property_new(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
RNA_def_enum(ot->srna, "type", gameproperty_type_items, GPROP_FLOAT, "Type", "Type of game property to add");
|
||||
RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the game property to add");
|
||||
RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the game property to add");
|
||||
}
|
||||
|
||||
static int game_property_remove_exec(bContext *C, wmOperator *op)
|
||||
|
|
|
@ -826,7 +826,7 @@ static int edit_modifier_poll(bContext *C)
|
|||
|
||||
static void edit_modifier_properties(wmOperatorType *ot)
|
||||
{
|
||||
RNA_def_string(ot->srna, "modifier", "", MAX_NAME, "Modifier", "Name of the modifier to edit");
|
||||
RNA_def_string(ot->srna, "modifier", NULL, MAX_NAME, "Modifier", "Name of the modifier to edit");
|
||||
}
|
||||
|
||||
static int edit_modifier_invoke_properties(bContext *C, wmOperator *op)
|
||||
|
|
|
@ -1065,7 +1065,7 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
|
|||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
||||
RNA_def_string(ot->srna, "group", "", MAX_ID_NAME, "Group", "Name of the group to select");
|
||||
RNA_def_string(ot->srna, "group", NULL, MAX_ID_NAME, "Group", "Name of the group to select");
|
||||
}
|
||||
|
||||
/**************************** Select Mirror ****************************/
|
||||
|
|
|
@ -907,9 +907,9 @@ void RENDER_OT_render(wmOperatorType *ot)
|
|||
RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene");
|
||||
RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)");
|
||||
RNA_def_boolean(ot->srna, "use_viewport", 0, "Use 3D Viewport", "When inside a 3D viewport, use layers and camera of the viewport");
|
||||
prop = RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render Layer", "Single render layer to re-render (used only when animation is disabled)");
|
||||
prop = RNA_def_string(ot->srna, "layer", NULL, RE_MAXNAME, "Render Layer", "Single render layer to re-render (used only when animation is disabled)");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
prop = RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME - 2, "Scene", "Scene to render, current scene if not specified");
|
||||
prop = RNA_def_string(ot->srna, "scene", NULL, MAX_ID_NAME - 2, "Scene", "Scene to render, current scene if not specified");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
|
|
@ -4544,5 +4544,5 @@ void PAINT_OT_image_from_view(wmOperatorType *ot)
|
|||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER;
|
||||
|
||||
RNA_def_string_file_name(ot->srna, "filepath", "", FILE_MAX, "File Path", "Name of the file");
|
||||
RNA_def_string_file_name(ot->srna, "filepath", NULL, FILE_MAX, "File Path", "Name of the file");
|
||||
}
|
||||
|
|
|
@ -787,7 +787,7 @@ static void SOUND_OT_unpack(wmOperatorType *ot)
|
|||
|
||||
/* properties */
|
||||
RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack");
|
||||
RNA_def_string(ot->srna, "id", "", MAX_ID_NAME - 2, "Sound Name", "Sound datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */
|
||||
RNA_def_string(ot->srna, "id", NULL, MAX_ID_NAME - 2, "Sound Name", "Sound datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */
|
||||
}
|
||||
|
||||
/* ******************************************************* */
|
||||
|
|
|
@ -1522,7 +1522,7 @@ void CLIP_OT_track_markers(wmOperatorType *ot)
|
|||
/* properties */
|
||||
RNA_def_boolean(ot->srna, "backwards", 0, "Backwards", "Do backwards tracking");
|
||||
RNA_def_boolean(ot->srna, "sequence", 0, "Track Sequence", "Track marker during image sequence rather than single image");
|
||||
prop = RNA_def_string(ot->srna, "clip", "", MAX_NAME, "Movie Clip", "Movie Clip to be tracked");
|
||||
prop = RNA_def_string(ot->srna, "clip", NULL, MAX_NAME, "Movie Clip", "Movie Clip to be tracked");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
|
|||
ot->poll = ED_operator_console_active;
|
||||
|
||||
/* properties */
|
||||
prop = RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
|
||||
prop = RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to insert at the cursor position");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
@ -825,7 +825,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
|
|||
ot->poll = ED_operator_console_active;
|
||||
|
||||
/* properties */
|
||||
RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
|
||||
RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to insert at the cursor position");
|
||||
RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, "Cursor", "The index of the cursor", 0, 10000);
|
||||
RNA_def_boolean(ot->srna, "remove_duplicates", 0, "Remove Duplicates", "Remove duplicate items in the history");
|
||||
}
|
||||
|
@ -880,7 +880,7 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
|
|||
ot->poll = ED_operator_console_active;
|
||||
|
||||
/* properties */
|
||||
RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
|
||||
RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to insert at the cursor position");
|
||||
RNA_def_enum(ot->srna, "type", console_line_type_items, CONSOLE_LINE_OUTPUT, "Type", "Console output type");
|
||||
}
|
||||
|
||||
|
|
|
@ -451,7 +451,7 @@ void FILE_OT_select_bookmark(wmOperatorType *ot)
|
|||
ot->poll = ED_operator_file_active;
|
||||
|
||||
/* properties */
|
||||
prop = RNA_def_string(ot->srna, "dir", "", FILE_MAXDIR, "Dir", "");
|
||||
prop = RNA_def_string(ot->srna, "dir", NULL, FILE_MAXDIR, "Dir", "");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
@ -1161,7 +1161,7 @@ void FILE_OT_directory_new(struct wmOperatorType *ot)
|
|||
ot->exec = file_directory_new_exec;
|
||||
ot->poll = ED_operator_file_active; /* <- important, handler is on window level */
|
||||
|
||||
prop = RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Name of new directory");
|
||||
prop = RNA_def_string_dir_path(ot->srna, "directory", NULL, FILE_MAX, "Directory", "Name of new directory");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
prop = RNA_def_boolean(ot->srna, "open", false, "Open", "Open new directory");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
|
|
|
@ -2158,7 +2158,7 @@ void IMAGE_OT_unpack(wmOperatorType *ot)
|
|||
|
||||
/* properties */
|
||||
RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack");
|
||||
RNA_def_string(ot->srna, "id", "", MAX_ID_NAME - 2, "Image Name", "Image datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */
|
||||
RNA_def_string(ot->srna, "id", NULL, MAX_ID_NAME - 2, "Image Name", "Image datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */
|
||||
}
|
||||
|
||||
/******************** sample image operator ********************/
|
||||
|
|
|
@ -350,7 +350,7 @@ void FILE_OT_unpack_item(wmOperatorType *ot)
|
|||
|
||||
/* properties */
|
||||
RNA_def_enum(ot->srna, "method", unpack_item_method_items, PF_USE_LOCAL, "Method", "How to unpack");
|
||||
RNA_def_string(ot->srna, "id_name", "", BKE_ST_MAXNAME, "ID name", "Name of ID block to unpack");
|
||||
RNA_def_string(ot->srna, "id_name", NULL, BKE_ST_MAXNAME, "ID name", "Name of ID block to unpack");
|
||||
RNA_def_int(ot->srna, "id_type", ID_IM, 0, INT_MAX, "ID Type", "Identifier type of ID block", 0, INT_MAX);
|
||||
}
|
||||
|
||||
|
|
|
@ -91,8 +91,8 @@ static int edit_actuator_poll(bContext *C)
|
|||
|
||||
static void edit_sensor_properties(wmOperatorType *ot)
|
||||
{
|
||||
RNA_def_string(ot->srna, "sensor", "", MAX_NAME, "Sensor", "Name of the sensor to edit");
|
||||
RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the object the sensor belongs to");
|
||||
RNA_def_string(ot->srna, "sensor", NULL, MAX_NAME, "Sensor", "Name of the sensor to edit");
|
||||
RNA_def_string(ot->srna, "object", NULL, MAX_NAME, "Object", "Name of the object the sensor belongs to");
|
||||
}
|
||||
|
||||
static int edit_sensor_invoke_properties(bContext *C, wmOperator *op)
|
||||
|
@ -147,8 +147,8 @@ static bSensor *edit_sensor_property_get(bContext *C, wmOperator *op, Object **o
|
|||
|
||||
static void edit_controller_properties(wmOperatorType *ot)
|
||||
{
|
||||
RNA_def_string(ot->srna, "controller", "", MAX_NAME, "Controller", "Name of the controller to edit");
|
||||
RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the object the controller belongs to");
|
||||
RNA_def_string(ot->srna, "controller", NULL, MAX_NAME, "Controller", "Name of the controller to edit");
|
||||
RNA_def_string(ot->srna, "object", NULL, MAX_NAME, "Object", "Name of the object the controller belongs to");
|
||||
}
|
||||
|
||||
static int edit_controller_invoke_properties(bContext *C, wmOperator *op)
|
||||
|
@ -186,8 +186,8 @@ static bController *edit_controller_property_get(bContext *C, wmOperator *op, Ob
|
|||
|
||||
static void edit_actuator_properties(wmOperatorType *ot)
|
||||
{
|
||||
RNA_def_string(ot->srna, "actuator", "", MAX_NAME, "Actuator", "Name of the actuator to edit");
|
||||
RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the object the actuator belongs to");
|
||||
RNA_def_string(ot->srna, "actuator", NULL, MAX_NAME, "Actuator", "Name of the actuator to edit");
|
||||
RNA_def_string(ot->srna, "object", NULL, MAX_NAME, "Object", "Name of the object the actuator belongs to");
|
||||
}
|
||||
|
||||
static int edit_actuator_invoke_properties(bContext *C, wmOperator *op)
|
||||
|
@ -332,9 +332,9 @@ static void LOGIC_OT_sensor_add(wmOperatorType *ot)
|
|||
/* properties */
|
||||
ot->prop = prop = RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add");
|
||||
RNA_def_enum_funcs(prop, rna_Sensor_type_itemf);
|
||||
prop = RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Sensor to add");
|
||||
prop = RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the Sensor to add");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
prop = RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Sensor to");
|
||||
prop = RNA_def_string(ot->srna, "object", NULL, MAX_NAME, "Object", "Name of the Object to add the Sensor to");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
@ -451,9 +451,9 @@ static void LOGIC_OT_controller_add(wmOperatorType *ot)
|
|||
|
||||
/* properties */
|
||||
ot->prop = RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add");
|
||||
prop = RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Controller to add");
|
||||
prop = RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the Controller to add");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
prop = RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Controller to");
|
||||
prop = RNA_def_string(ot->srna, "object", NULL, MAX_NAME, "Object", "Name of the Object to add the Controller to");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
@ -557,9 +557,9 @@ static void LOGIC_OT_actuator_add(wmOperatorType *ot)
|
|||
/* properties */
|
||||
ot->prop = prop = RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add");
|
||||
RNA_def_enum_funcs(prop, rna_Actuator_type_itemf);
|
||||
prop = RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the Actuator to add");
|
||||
prop = RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the Actuator to add");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
prop = RNA_def_string(ot->srna, "object", "", MAX_NAME, "Object", "Name of the Object to add the Actuator to");
|
||||
prop = RNA_def_string(ot->srna, "object", NULL, MAX_NAME, "Object", "Name of the Object to add the Actuator to");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
|
|
@ -757,7 +757,7 @@ static int edit_node_poll(bContext *C)
|
|||
static void edit_node_properties(wmOperatorType *ot)
|
||||
{
|
||||
/* XXX could node be a context pointer? */
|
||||
RNA_def_string(ot->srna, "node", "", MAX_NAME, "Node", "");
|
||||
RNA_def_string(ot->srna, "node", NULL, MAX_NAME, "Node", "");
|
||||
RNA_def_int(ot->srna, "socket", 0, 0, MAX_SOCKET, "Socket", "", 0, MAX_SOCKET);
|
||||
RNA_def_enum(ot->srna, "in_out", node_socket_in_out_items, SOCK_IN, "Socket Side", "");
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ void SCRIPT_OT_python_file_run(wmOperatorType *ot)
|
|||
ot->exec = run_pyfile_exec;
|
||||
ot->poll = ED_operator_areaactive;
|
||||
|
||||
RNA_def_string_file_path(ot->srna, "filepath", "", FILE_MAX, "Path", "");
|
||||
RNA_def_string_file_path(ot->srna, "filepath", NULL, FILE_MAX, "Path", "");
|
||||
}
|
||||
|
||||
#ifdef WITH_PYTHON
|
||||
|
|
|
@ -2933,7 +2933,7 @@ void TEXT_OT_insert(wmOperatorType *ot)
|
|||
ot->poll = text_edit_poll;
|
||||
|
||||
/* properties */
|
||||
prop = RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
|
||||
prop = RNA_def_string(ot->srna, "text", NULL, 0, "Text", "Text to insert at the cursor position");
|
||||
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
|
||||
}
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot)
|
|||
ot->exec = create_orientation_exec;
|
||||
ot->poll = ED_operator_areaactive;
|
||||
|
||||
RNA_def_string(ot->srna, "name", "", MAX_NAME, "Name", "Name of the new custom orientation");
|
||||
RNA_def_string(ot->srna, "name", NULL, MAX_NAME, "Name", "Name of the new custom orientation");
|
||||
RNA_def_boolean(ot->srna, "use_view", FALSE, "Use View",
|
||||
"Use the current view instead of the active object to create the new orientation");
|
||||
RNA_def_boolean(ot->srna, "use", FALSE, "Use after creation", "Select orientation after its creation");
|
||||
|
|
|
@ -558,10 +558,10 @@ static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
func = RNA_def_function(srna, "new", "rna_Action_fcurve_new");
|
||||
RNA_def_function_ui_description(func, "Add a keyframe to the F-Curve");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
parm = RNA_def_string(func, "data_path", "", 0, "Data Path", "F-Curve data path to use");
|
||||
parm = RNA_def_string(func, "data_path", NULL, 0, "Data Path", "F-Curve data path to use");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index", 0, INT_MAX);
|
||||
RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this F-Curve into");
|
||||
RNA_def_string(func, "action_group", NULL, 0, "Action Group", "Acton group to add this F-Curve into");
|
||||
|
||||
parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created F-Curve");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
@ -590,7 +590,7 @@ static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
|
||||
func = RNA_def_function(srna, "new", "rna_Action_pose_markers_new");
|
||||
RNA_def_function_ui_description(func, "Add a pose marker to the action");
|
||||
parm = RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
|
||||
parm = RNA_def_string(func, "name", "Marker", 0, NULL, "New name for the marker (not unique)");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker");
|
||||
|
|
|
@ -738,7 +738,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* rna-path */
|
||||
/* XXX hopefully this is long enough */
|
||||
parm = RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property");
|
||||
parm = RNA_def_string(func, "data_path", NULL, 256, "Data-Path", "RNA-Path to destination property");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* index (defaults to -1 for entire array) */
|
||||
RNA_def_int(func, "index", -1, -1, INT_MAX, "Index",
|
||||
|
@ -747,7 +747,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
/* grouping */
|
||||
RNA_def_enum(func, "group_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME,
|
||||
"Grouping Method", "Method used to define which Group-name to use");
|
||||
RNA_def_string(func, "group_name", "", 64, "Group Name",
|
||||
RNA_def_string(func, "group_name", NULL, 64, "Group Name",
|
||||
"Name of Action Group to assign destination to (only if grouping mode is to use this name)");
|
||||
|
||||
|
||||
|
|
|
@ -1655,6 +1655,20 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
|
|||
case PROP_STRING:
|
||||
{
|
||||
StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
|
||||
|
||||
if (value == NULL) {
|
||||
fprintf(stderr, "%s: \"%s.%s\", NULL string passed (dont call in this case).\n", __func__, srna->identifier, prop->identifier);
|
||||
DefRNA.error = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!value[0]) {
|
||||
fprintf(stderr, "%s: \"%s.%s\", empty string passed (dont call in this case).\n", __func__, srna->identifier, prop->identifier);
|
||||
DefRNA.error = 1;
|
||||
// BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
sprop->defaultvalue = value;
|
||||
break;
|
||||
}
|
||||
|
@ -2635,7 +2649,9 @@ PropertyRNA *RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier,
|
|||
{
|
||||
ContainerRNA *cont = cont_;
|
||||
PropertyRNA *prop;
|
||||
|
||||
|
||||
BLI_assert(default_value == NULL || default_value[0]);
|
||||
|
||||
prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_NONE);
|
||||
if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
|
||||
if (default_value) RNA_def_property_string_default(prop, default_value);
|
||||
|
@ -2649,7 +2665,9 @@ PropertyRNA *RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *id
|
|||
{
|
||||
ContainerRNA *cont = cont_;
|
||||
PropertyRNA *prop;
|
||||
|
||||
|
||||
BLI_assert(default_value == NULL || default_value[0]);
|
||||
|
||||
prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_FILEPATH);
|
||||
if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
|
||||
if (default_value) RNA_def_property_string_default(prop, default_value);
|
||||
|
@ -2663,7 +2681,9 @@ PropertyRNA *RNA_def_string_dir_path(StructOrFunctionRNA *cont_, const char *ide
|
|||
{
|
||||
ContainerRNA *cont = cont_;
|
||||
PropertyRNA *prop;
|
||||
|
||||
|
||||
BLI_assert(default_value == NULL || default_value[0]);
|
||||
|
||||
prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_DIRPATH);
|
||||
if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
|
||||
if (default_value) RNA_def_property_string_default(prop, default_value);
|
||||
|
@ -2677,7 +2697,9 @@ PropertyRNA *RNA_def_string_file_name(StructOrFunctionRNA *cont_, const char *id
|
|||
{
|
||||
ContainerRNA *cont = cont_;
|
||||
PropertyRNA *prop;
|
||||
|
||||
|
||||
BLI_assert(default_value == NULL || default_value[0]);
|
||||
|
||||
prop = RNA_def_property(cont, identifier, PROP_STRING, PROP_FILENAME);
|
||||
if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen);
|
||||
if (default_value) RNA_def_property_string_default(prop, default_value);
|
||||
|
|
|
@ -287,7 +287,7 @@ void RNA_api_image(StructRNA *srna)
|
|||
func = RNA_def_function(srna, "save_render", "rna_Image_save_render");
|
||||
RNA_def_function_ui_description(func, "Save image to a specific path using a scenes render settings");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
|
||||
parm = RNA_def_string_file_path(func, "filepath", "", 0, "", "Save path");
|
||||
parm = RNA_def_string_file_path(func, "filepath", NULL, 0, "", "Save path");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_pointer(func, "scene", "Scene", "", "Scene to take image parameters from");
|
||||
|
||||
|
|
|
@ -954,7 +954,7 @@ void RNA_api_main(StructRNA *srna)
|
|||
* for now they are all in collections bpy.data.images.new(...) */
|
||||
func = RNA_def_function(srna, "add_image", "rna_Main_add_image");
|
||||
RNA_def_function_ui_description(func, "Add a new image");
|
||||
parm = RNA_def_string_file_path(func, "filepath", "", 0, "", "File path to load image from");
|
||||
parm = RNA_def_string_file_path(func, "filepath", NULL, 0, "", "File path to load image from");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_pointer(func, "image", "Image", "", "New image");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
@ -1946,7 +1946,7 @@ void RNA_def_main_masks(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
/* new func */
|
||||
func = RNA_def_function(srna, "new", "rna_Main_mask_new");
|
||||
RNA_def_function_ui_description(func, "Add a new mask with a given name to the main database");
|
||||
RNA_def_string_file_path(func, "name", "", MAX_ID_NAME - 2, "Mask", "Name of new mask datablock");
|
||||
RNA_def_string_file_path(func, "name", NULL, MAX_ID_NAME - 2, "Mask", "Name of new mask datablock");
|
||||
/* return type */
|
||||
parm = RNA_def_pointer(func, "mask", "Mask", "", "New mask datablock");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
|
|
@ -901,7 +901,7 @@ static void rna_def_masklayers(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
|
||||
func = RNA_def_function(srna, "new", "rna_Mask_layers_new");
|
||||
RNA_def_function_ui_description(func, "Add layer to this mask");
|
||||
RNA_def_string(func, "name", "", 0, "Name", "Name of new layer");
|
||||
RNA_def_string(func, "name", NULL, 0, "Name", "Name of new layer");
|
||||
parm = RNA_def_pointer(func, "layer", "MaskLayer", "", "New mask layer");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ void RNA_api_mesh(StructRNA *srna)
|
|||
"Compute tangents and bitangent signs, to be used together with the split normals "
|
||||
"to get a complete tangent space for normal mapping "
|
||||
"(split normals are also computed if not yet present)");
|
||||
parm = RNA_def_string(func, "uvmap", "", MAX_CUSTOMDATA_LAYER_NAME, "",
|
||||
parm = RNA_def_string(func, "uvmap", NULL, MAX_CUSTOMDATA_LAYER_NAME, "",
|
||||
"Name of the UV map to use for tangent space computation");
|
||||
|
||||
func = RNA_def_function(srna, "free_tangents", "rna_Mesh_free_tangents");
|
||||
|
|
|
@ -3822,7 +3822,7 @@ static void def_sh_script(StructRNA *srna)
|
|||
#if 0 /* XXX TODO use general node api for this */
|
||||
func = RNA_def_function(srna, "find_socket", "rna_ShaderNodeScript_find_socket");
|
||||
RNA_def_function_ui_description(func, "Find a socket by name");
|
||||
parm = RNA_def_string(func, "name", "", 0, "Socket name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, 0, "Socket name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/*parm =*/ RNA_def_boolean(func, "is_output", FALSE, "Output", "Whether the socket is an output");
|
||||
parm = RNA_def_pointer(func, "result", "NodeSocket", "", "");
|
||||
|
@ -3831,7 +3831,7 @@ static void def_sh_script(StructRNA *srna)
|
|||
func = RNA_def_function(srna, "add_socket", "rna_ShaderNodeScript_add_socket");
|
||||
RNA_def_function_ui_description(func, "Add a socket socket");
|
||||
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
||||
parm = RNA_def_string(func, "name", "", 0, "Name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, 0, "Name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
@ -4261,7 +4261,7 @@ static void rna_def_cmp_output_file_slots_api(BlenderRNA *brna, PropertyRNA *cpr
|
|||
func = RNA_def_function(srna, "new", "rna_NodeOutputFile_slots_new");
|
||||
RNA_def_function_ui_description(func, "Add a file slot to this node");
|
||||
RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS | FUNC_USE_CONTEXT);
|
||||
parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, MAX_NAME, "Name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* return value */
|
||||
parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
|
||||
|
@ -6321,7 +6321,7 @@ static void rna_def_node_socket(BlenderRNA *brna)
|
|||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
||||
parm = RNA_def_property(func, "text", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_ui_text(parm, "Text", "Text label to draw alongside properties");
|
||||
RNA_def_property_string_default(parm, "");
|
||||
// RNA_def_property_string_default(parm, "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
func = RNA_def_function(srna, "draw_color", NULL);
|
||||
|
@ -6410,7 +6410,7 @@ static void rna_def_node_socket_interface(BlenderRNA *brna)
|
|||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
||||
parm = RNA_def_pointer(func, "socket", "NodeSocket", "Socket", "Socket to initialize");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
||||
parm = RNA_def_string(func, "data_path", "", 0, "Data Path", "Path to specialized socket data");
|
||||
parm = RNA_def_string(func, "data_path", NULL, 0, "Data Path", "Path to specialized socket data");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
func = RNA_def_function(srna, "from_socket", NULL);
|
||||
|
@ -6719,7 +6719,7 @@ static void rna_def_node_socket_standard_types(BlenderRNA *brna)
|
|||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
||||
parm = RNA_def_property(func, "text", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_ui_text(parm, "Text", "Text label to draw alongside properties");
|
||||
RNA_def_property_string_default(parm, "");
|
||||
// RNA_def_property_string_default(parm, "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
func = RNA_def_function(srna, "draw_color", "rna_NodeSocketStandard_draw_color");
|
||||
|
@ -6897,11 +6897,11 @@ static void rna_def_node_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, int i
|
|||
func = RNA_def_function(srna, "new", newfunc);
|
||||
RNA_def_function_ui_description(func, "Add a socket to this node");
|
||||
RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
|
||||
parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Data type");
|
||||
parm = RNA_def_string(func, "type", NULL, MAX_NAME, "Type", "Data type");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, MAX_NAME, "Name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_string(func, "identifier", "", MAX_NAME, "Identifier", "Unique socket identifier");
|
||||
RNA_def_string(func, "identifier", NULL, MAX_NAME, "Identifier", "Unique socket identifier");
|
||||
/* return value */
|
||||
parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
@ -7195,7 +7195,7 @@ static void rna_def_node(BlenderRNA *brna)
|
|||
func = RNA_def_function(srna, "draw_label", NULL);
|
||||
RNA_def_function_ui_description(func, "Returns a dynamic label string");
|
||||
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
|
||||
parm = RNA_def_string(func, "label", "", MAX_NAME, "Label", "");
|
||||
parm = RNA_def_string(func, "label", NULL, MAX_NAME, "Label", "");
|
||||
RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */
|
||||
RNA_def_function_output(func, parm);
|
||||
}
|
||||
|
@ -7262,7 +7262,7 @@ static void rna_def_nodetree_nodes_api(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
/* XXX warning note should eventually be removed,
|
||||
* added this here to avoid frequent confusion with API changes from "type" to "bl_idname"
|
||||
*/
|
||||
parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Type of node to add (Warning: should be same as node.bl_idname, not node.type!)");
|
||||
parm = RNA_def_string(func, "type", NULL, MAX_NAME, "Type", "Type of node to add (Warning: should be same as node.bl_idname, not node.type!)");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* return value */
|
||||
parm = RNA_def_pointer(func, "node", "Node", "", "New node");
|
||||
|
@ -7341,9 +7341,9 @@ static void rna_def_node_tree_sockets_api(BlenderRNA *brna, PropertyRNA *cprop,
|
|||
func = RNA_def_function(srna, "new", newfunc);
|
||||
RNA_def_function_ui_description(func, "Add a socket to this node tree");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Data type");
|
||||
parm = RNA_def_string(func, "type", NULL, MAX_NAME, "Type", "Data type");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, MAX_NAME, "Name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* return value */
|
||||
parm = RNA_def_pointer(func, "socket", "NodeSocketInterface", "", "New socket");
|
||||
|
|
|
@ -588,7 +588,7 @@ void RNA_api_object(StructRNA *srna)
|
|||
parm = RNA_def_enum(func, "type", mesh_dm_info_items, 0, "", "Modifier settings to apply");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
/* weak!, no way to return dynamic string type */
|
||||
parm = RNA_def_string(func, "result", "", 16384, "result", "");
|
||||
parm = RNA_def_string(func, "result", NULL, 16384, "result", "");
|
||||
RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */
|
||||
RNA_def_function_output(func, parm);
|
||||
#endif /* NDEBUG */
|
||||
|
|
|
@ -380,7 +380,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
|
|||
RNA_def_property_flag(prop, PROP_REQUIRED);
|
||||
prop = RNA_def_int(func, "h", 0, 0, INT_MAX, "Height", "", 0, INT_MAX);
|
||||
RNA_def_property_flag(prop, PROP_REQUIRED);
|
||||
RNA_def_string(func, "layer", "", 0, "Layer", "Single layer to get render result for"); /* NULL ok here */
|
||||
RNA_def_string(func, "layer", NULL, 0, "Layer", "Single layer to get render result for"); /* NULL ok here */
|
||||
prop = RNA_def_pointer(func, "result", "RenderResult", "Result", "");
|
||||
RNA_def_function_return(func, prop);
|
||||
|
||||
|
@ -403,9 +403,9 @@ static void rna_def_render_engine(BlenderRNA *brna)
|
|||
|
||||
func = RNA_def_function(srna, "update_stats", "RE_engine_update_stats");
|
||||
RNA_def_function_ui_description(func, "Update and signal to redraw render status text");
|
||||
prop = RNA_def_string(func, "stats", "", 0, "Stats", "");
|
||||
prop = RNA_def_string(func, "stats", NULL, 0, "Stats", "");
|
||||
RNA_def_property_flag(prop, PROP_REQUIRED);
|
||||
prop = RNA_def_string(func, "info", "", 0, "Info", "");
|
||||
prop = RNA_def_string(func, "info", NULL, 0, "Info", "");
|
||||
RNA_def_property_flag(prop, PROP_REQUIRED);
|
||||
|
||||
func = RNA_def_function(srna, "update_progress", "RE_engine_update_progress");
|
||||
|
@ -423,7 +423,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
|
|||
RNA_def_function_ui_description(func, "Report info, warning or error messages");
|
||||
prop = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
|
||||
RNA_def_property_flag(prop, PROP_REQUIRED);
|
||||
prop = RNA_def_string(func, "message", "", 0, "Report Message", "");
|
||||
prop = RNA_def_string(func, "message", NULL, 0, "Report Message", "");
|
||||
RNA_def_property_flag(prop, PROP_REQUIRED);
|
||||
|
||||
func = RNA_def_function(srna, "bind_display_space_shader", "engine_bind_display_space_shader");
|
||||
|
@ -520,7 +520,7 @@ static void rna_def_render_result(BlenderRNA *brna)
|
|||
func = RNA_def_function(srna, "load_from_file", "RE_result_load_from_file");
|
||||
RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
parm = RNA_def_string_file_name(func, "filename", "", FILE_MAX, "File Name",
|
||||
parm = RNA_def_string_file_name(func, "filename", NULL, FILE_MAX, "File Name",
|
||||
"Filename to load into this render tile, must be no smaller than "
|
||||
"the render result");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
@ -556,7 +556,7 @@ static void rna_def_render_layer(BlenderRNA *brna)
|
|||
func = RNA_def_function(srna, "load_from_file", "RE_layer_load_from_file");
|
||||
RNA_def_function_ui_description(func, "Copies the pixels of this renderlayer from an image file");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
prop = RNA_def_string(func, "filename", "", 0, "Filename",
|
||||
prop = RNA_def_string(func, "filename", NULL, 0, "Filename",
|
||||
"Filename to load into this render tile, must be no smaller than the renderlayer");
|
||||
RNA_def_property_flag(prop, PROP_REQUIRED);
|
||||
RNA_def_int(func, "x", 0, 0, INT_MAX, "Offset X",
|
||||
|
|
|
@ -5371,7 +5371,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
|||
|
||||
/* Statistics */
|
||||
func = RNA_def_function(srna, "statistics", "ED_info_stats_string");
|
||||
prop = RNA_def_string(func, "statistics", "", 0, "Statistics", "");
|
||||
prop = RNA_def_string(func, "statistics", NULL, 0, "Statistics", "");
|
||||
RNA_def_function_return(func, prop);
|
||||
|
||||
/* Grease Pencil */
|
||||
|
|
|
@ -219,7 +219,7 @@ void RNA_api_scene(StructRNA *srna)
|
|||
#ifdef WITH_COLLADA
|
||||
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
|
||||
func = RNA_def_function(srna, "collada_export", "rna_Scene_collada_export");
|
||||
parm = RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
|
||||
parm = RNA_def_string(func, "filepath", NULL, FILE_MAX, "File Path", "File path to write Collada file");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */
|
||||
parm = RNA_def_boolean(func, "apply_modifiers", 0, "Apply Modifiers", "Apply modifiers");
|
||||
|
@ -258,7 +258,7 @@ void RNA_api_scene_render(StructRNA *srna)
|
|||
RNA_def_function_ui_description(func, "Return the absolute path to the filename to be written for a given frame");
|
||||
RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "",
|
||||
"Frame number to use, if unset the current frame will be used", MINAFRAME, MAXFRAME);
|
||||
parm = RNA_def_string_file_path(func, "filepath", "", FILE_MAX, "File Path",
|
||||
parm = RNA_def_string_file_path(func, "filepath", NULL, FILE_MAX, "File Path",
|
||||
"The resulting filepath from the scenes render settings");
|
||||
RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */
|
||||
RNA_def_function_output(func, parm);
|
||||
|
|
|
@ -118,7 +118,7 @@ void RNA_api_environment_map(StructRNA *srna)
|
|||
RNA_def_function_ui_description(func, "Save the environment map to disc using the scene render settings");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
|
||||
|
||||
parm = RNA_def_string_file_name(func, "filepath", "", FILE_MAX, "File path", "Location of the output file");
|
||||
parm = RNA_def_string_file_name(func, "filepath", NULL, FILE_MAX, "File path", "Location of the output file");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken");
|
||||
|
|
|
@ -1662,7 +1662,7 @@ static void rna_def_trackingTracks(BlenderRNA *brna)
|
|||
func = RNA_def_function(srna, "new", "rna_trackingTracks_new");
|
||||
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
||||
RNA_def_function_ui_description(func, "Create new motion track in this movie clip");
|
||||
RNA_def_string(func, "name", "", 0, "", "Name of new track");
|
||||
RNA_def_string(func, "name", NULL, 0, "", "Name of new track");
|
||||
RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to add track on", MINFRAME, MAXFRAME);
|
||||
parm = RNA_def_pointer(func, "track", "MovieTrackingTrack", "", "Newly created track");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
@ -1709,7 +1709,7 @@ static void rna_def_trackingObjectTracks(BlenderRNA *brna)
|
|||
func = RNA_def_function(srna, "new", "rna_trackingObject_tracks_new");
|
||||
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
||||
RNA_def_function_ui_description(func, "create new motion track in this movie clip");
|
||||
RNA_def_string(func, "name", "", 0, "", "Name of new track");
|
||||
RNA_def_string(func, "name", NULL, 0, "", "Name of new track");
|
||||
RNA_def_int(func, "frame", 1, MINFRAME, MAXFRAME, "Frame", "Frame number to add tracks on", MINFRAME, MAXFRAME);
|
||||
parm = RNA_def_pointer(func, "track", "MovieTrackingTrack", "", "Newly created track");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
@ -1824,7 +1824,7 @@ static void rna_def_trackingObjects(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
|
||||
func = RNA_def_function(srna, "new", "rna_trackingObject_new");
|
||||
RNA_def_function_ui_description(func, "Add tracking object to this movie clip");
|
||||
parm = RNA_def_string(func, "name", "", 0, "", "Name of new object");
|
||||
parm = RNA_def_string(func, "name", NULL, 0, "", "Name of new object");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_pointer(func, "object", "MovieTrackingObject", "", "New motion tracking object");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
|
|
@ -1086,7 +1086,7 @@ static void rna_def_uilist(BlenderRNA *brna)
|
|||
parm = RNA_def_pointer(func, "active_data", "AnyType", "",
|
||||
"Data from which to take property for the active element");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR | PROP_NEVER_NULL);
|
||||
parm = RNA_def_string(func, "active_property", "", 0, "",
|
||||
parm = RNA_def_string(func, "active_property", NULL, 0, "",
|
||||
"Identifier of property in active_data, for the active element");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_int(func, "index", 0, 0, INT_MAX, "", "Index of the item in the collection", 0, INT_MAX);
|
||||
|
@ -1113,7 +1113,7 @@ static void rna_def_uilist(BlenderRNA *brna)
|
|||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take Collection property");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
|
||||
parm = RNA_def_string(func, "property", "", 0, "", "Identifier of property in data, for the collection");
|
||||
parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in data, for the collection");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
prop = RNA_def_property(func, "filter_flags", PROP_INT, PROP_UNSIGNED);
|
||||
RNA_def_property_flag(prop, PROP_REQUIRED | PROP_DYNAMIC);
|
||||
|
|
|
@ -371,8 +371,8 @@ static int rna_ui_get_enum_icon(bContext *C, PointerRNA *ptr, const char *propna
|
|||
|
||||
static void api_ui_item_common_text(FunctionRNA *func)
|
||||
{
|
||||
RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item");
|
||||
RNA_def_string(func, "text_ctxt", "", 0, "", "Override automatic translation context of the given text");
|
||||
RNA_def_string(func, "text", NULL, 0, "", "Override automatic text of the item");
|
||||
RNA_def_string(func, "text_ctxt", NULL, 0, "", "Override automatic translation context of the given text");
|
||||
RNA_def_boolean(func, "translate", true, "", "Translate the given text, when UI translation is enabled");
|
||||
}
|
||||
|
||||
|
@ -390,7 +390,7 @@ static void api_ui_item_common(FunctionRNA *func)
|
|||
static void api_ui_item_op(FunctionRNA *func)
|
||||
{
|
||||
PropertyRNA *parm;
|
||||
parm = RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator");
|
||||
parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
}
|
||||
|
||||
|
@ -406,7 +406,7 @@ static void api_ui_item_rna_common(FunctionRNA *func)
|
|||
|
||||
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);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
}
|
||||
|
||||
|
@ -474,20 +474,20 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
|
||||
/* UI name, description and icon of an enum item */
|
||||
func = RNA_def_function(srna, "enum_item_name", "rna_ui_get_enum_name");
|
||||
parm = RNA_def_string(func, "name", "", 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_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT);
|
||||
api_ui_item_rna_common(func);
|
||||
parm = RNA_def_string(func, "identifier", "", 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_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");
|
||||
parm = RNA_def_string(func, "description", "", 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_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT);
|
||||
api_ui_item_rna_common(func);
|
||||
parm = RNA_def_string(func, "identifier", "", 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_function_ui_description(func, "Return the UI description for this enum item");
|
||||
|
||||
|
@ -496,7 +496,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
RNA_def_function_return(func, parm);
|
||||
RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT);
|
||||
api_ui_item_rna_common(func);
|
||||
parm = RNA_def_string(func, "identifier", "", 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_function_ui_description(func, "Return the icon for this enum item");
|
||||
|
||||
|
@ -529,7 +529,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
|
||||
func = RNA_def_function(srna, "prop_enum", "rna_uiItemEnumR_string");
|
||||
api_ui_item_rna_common(func);
|
||||
parm = RNA_def_string(func, "value", "", 0, "", "Enum property value");
|
||||
parm = RNA_def_string(func, "value", NULL, 0, "", "Enum property value");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
api_ui_item_common(func);
|
||||
|
||||
|
@ -537,7 +537,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
api_ui_item_rna_common(func);
|
||||
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);
|
||||
parm = RNA_def_string(func, "search_property", "", 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);
|
||||
api_ui_item_common(func);
|
||||
|
||||
|
@ -551,15 +551,15 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
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");
|
||||
parm = RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator");
|
||||
parm = RNA_def_string(func, "operator", NULL, 0, "", "Identifier of the operator");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
|
||||
func = RNA_def_function(srna, "operator_menu_enum", "rna_uiItemMenuEnumO");
|
||||
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 */
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
api_ui_item_common(func);
|
||||
|
||||
|
@ -568,21 +568,21 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
|
||||
func = RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string");
|
||||
api_ui_item_op_common(func);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
parm = RNA_def_string(func, "value", "", 0, "", "Enum property value");
|
||||
parm = RNA_def_string(func, "value", NULL, 0, "", "Enum property value");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
func = RNA_def_function(srna, "operator_boolean", "uiItemBooleanO");
|
||||
api_ui_item_op_common(func);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
parm = RNA_def_boolean(func, "value", false, "", "Value of the property to call the operator with");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED); */
|
||||
|
||||
func = RNA_def_function(srna, "operator_int", "uiItemIntO");
|
||||
api_ui_item_op_common(func);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
parm = RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "",
|
||||
"Value of the property to call the operator with", INT_MIN, INT_MAX);
|
||||
|
@ -590,7 +590,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
|
||||
func = RNA_def_function(srna, "operator_float", "uiItemFloatO");
|
||||
api_ui_item_op_common(func);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
parm = RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "",
|
||||
"Value of the property to call the operator with", -FLT_MAX, FLT_MAX);
|
||||
|
@ -598,9 +598,9 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
|
||||
func = RNA_def_function(srna, "operator_string", "uiItemStringO");
|
||||
api_ui_item_op_common(func);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
parm = RNA_def_string(func, "value", "", 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);
|
||||
#endif
|
||||
|
||||
|
@ -614,7 +614,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
|
||||
func = RNA_def_function(srna, "menu", "rna_uiItemM");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
|
||||
parm = RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu");
|
||||
parm = RNA_def_string(func, "menu", NULL, 0, "", "Identifier of the menu");
|
||||
api_ui_item_common(func);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
|
@ -623,7 +623,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
|
||||
/* context */
|
||||
func = RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer");
|
||||
parm = RNA_def_string(func, "name", "", 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);
|
||||
parm = RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
|
||||
|
@ -636,25 +636,25 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
func = RNA_def_function(srna, "template_ID", "uiTemplateID");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
|
||||
api_ui_item_rna_common(func);
|
||||
RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block");
|
||||
RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block");
|
||||
RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the 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, "unlink", NULL, 0, "", "Operator identifier to unlink the ID block");
|
||||
|
||||
func = RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
|
||||
api_ui_item_rna_common(func);
|
||||
RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block");
|
||||
RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block");
|
||||
RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the 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, "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, "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");
|
||||
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);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
parm = RNA_def_string(func, "type_property", "", 0, "",
|
||||
parm = RNA_def_string(func, "type_property", NULL, 0, "",
|
||||
"Identifier of property in data giving the type of the ID-blocks to use");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
api_ui_item_common_text(func);
|
||||
|
@ -662,7 +662,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
func = RNA_def_function(srna, "template_path_builder", "rna_uiTemplatePathBuilder");
|
||||
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);
|
||||
parm = RNA_def_string(func, "property", "", 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);
|
||||
parm = RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
|
||||
|
@ -723,7 +723,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
api_ui_item_rna_common(func);
|
||||
parm = RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
|
||||
parm = RNA_def_string(func, "used_layers_property", "", 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);
|
||||
parm = RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX);
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
@ -785,9 +785,9 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
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_flag(func, FUNC_USE_CONTEXT);
|
||||
parm = RNA_def_string(func, "listtype_name", "", 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);
|
||||
parm = RNA_def_string(func, "list_id", "", 0, "",
|
||||
parm = RNA_def_string(func, "list_id", NULL, 0, "",
|
||||
"Identifier of this list widget (mandatory when using default \"" UI_UL_DEFAULT_CLASS_NAME
|
||||
"\" class). "
|
||||
"If this is set, the uilist gets a custom ID, otherwise it takes the "
|
||||
|
@ -796,12 +796,12 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
"script, then bl_idname = \"OBJECT_UL_vgroups\")");
|
||||
parm = RNA_def_pointer(func, "dataptr", "AnyType", "", "Data from which to take the Collection property");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
|
||||
parm = RNA_def_string(func, "propname", "", 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);
|
||||
parm = RNA_def_pointer(func, "active_dataptr", "AnyType", "",
|
||||
"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);
|
||||
parm = RNA_def_string(func, "active_propname", "", 0, "",
|
||||
parm = RNA_def_string(func, "active_propname", NULL, 0, "",
|
||||
"Identifier of the integer property in active_data, index of the active item");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Default and minimum number of rows to display", 0, INT_MAX);
|
||||
|
@ -851,12 +851,12 @@ void RNA_api_ui_layout(StructRNA *srna)
|
|||
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");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_RNAPTR);
|
||||
parm = RNA_def_string(func, "property", "", 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_string(func, "name", "", 0, "", "");
|
||||
RNA_def_string(func, "name", NULL, 0, "", "");
|
||||
|
||||
func = RNA_def_function(srna, "introspect", "uiLayoutIntrospect");
|
||||
parm = RNA_def_string(func, "string", "", 1024 * 1024, "Descr", "DESCR");
|
||||
parm = RNA_def_string(func, "string", NULL, 1024 * 1024, "Descr", "DESCR");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
||||
/* color management templates */
|
||||
|
|
|
@ -447,7 +447,7 @@ void RNA_api_wm(StructRNA *srna)
|
|||
/* wrap uiPupMenuBegin */
|
||||
func = RNA_def_function(srna, "pupmenu_begin__internal", "rna_PupMenuBegin");
|
||||
RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_CONTEXT);
|
||||
parm = RNA_def_string(func, "title", "", 0, "", "");
|
||||
parm = RNA_def_string(func, "title", NULL, 0, "", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(parm, icon_items);
|
||||
|
@ -472,7 +472,7 @@ void RNA_api_operator(StructRNA *srna)
|
|||
func = RNA_def_function(srna, "report", "rna_Operator_report");
|
||||
parm = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_string(func, "message", "", 0, "Report Message", "");
|
||||
parm = RNA_def_string(func, "message", NULL, 0, "Report Message", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
|
||||
|
@ -556,7 +556,7 @@ void RNA_api_macro(StructRNA *srna)
|
|||
func = RNA_def_function(srna, "report", "rna_Operator_report");
|
||||
parm = RNA_def_enum_flag(func, "type", wm_report_items, 0, "Type", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_string(func, "message", "", 0, "Report Message", "");
|
||||
parm = RNA_def_string(func, "message", NULL, 0, "Report Message", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
||||
|
||||
|
@ -622,7 +622,7 @@ void RNA_api_keymapitems(StructRNA *srna)
|
|||
|
||||
func = RNA_def_function(srna, "new", "rna_KeyMap_item_new");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
parm = RNA_def_string(func, "idname", "", 0, "Operator Identifier", "");
|
||||
parm = RNA_def_string(func, "idname", NULL, 0, "Operator Identifier", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_enum(func, "type", event_type_items, 0, "Type", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
@ -642,7 +642,7 @@ void RNA_api_keymapitems(StructRNA *srna)
|
|||
|
||||
func = RNA_def_function(srna, "new_modal", "rna_KeyMap_item_new_modal");
|
||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||
parm = RNA_def_string(func, "propvalue", "", 0, "Property Value", "");
|
||||
parm = RNA_def_string(func, "propvalue", NULL, 0, "Property Value", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_enum(func, "type", event_type_items, 0, "Type", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
|
@ -677,7 +677,7 @@ void RNA_api_keymaps(StructRNA *srna)
|
|||
PropertyRNA *parm;
|
||||
|
||||
func = RNA_def_function(srna, "new", "rna_keymap_new"); /* add_keymap */
|
||||
parm = RNA_def_string(func, "name", "", 0, "Name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, 0, "Name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", "");
|
||||
RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", "");
|
||||
|
@ -692,7 +692,7 @@ void RNA_api_keymaps(StructRNA *srna)
|
|||
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
|
||||
|
||||
func = RNA_def_function(srna, "find", "rna_keymap_find"); /* find_keymap */
|
||||
parm = RNA_def_string(func, "name", "", 0, "Name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, 0, "Name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", "");
|
||||
RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", "");
|
||||
|
@ -700,7 +700,7 @@ void RNA_api_keymaps(StructRNA *srna)
|
|||
RNA_def_function_return(func, parm);
|
||||
|
||||
func = RNA_def_function(srna, "find_modal", "rna_keymap_find_modal"); /* find_keymap_modal */
|
||||
parm = RNA_def_string(func, "name", "", 0, "Operator Name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, 0, "Operator Name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
@ -712,7 +712,7 @@ void RNA_api_keyconfigs(StructRNA *srna)
|
|||
PropertyRNA *parm;
|
||||
|
||||
func = RNA_def_function(srna, "new", "WM_keyconfig_new_user"); /* add_keyconfig */
|
||||
parm = RNA_def_string(func, "name", "", 0, "Name", "");
|
||||
parm = RNA_def_string(func, "name", NULL, 0, "Name", "");
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm = RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Added key configuration");
|
||||
RNA_def_function_return(func, parm);
|
||||
|
|
|
@ -2493,7 +2493,7 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw
|
|||
|
||||
prop = RNA_def_property(srna, id, PROP_STRING, subtype);
|
||||
if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen + 1); /* +1 since it includes null terminator */
|
||||
if (def) RNA_def_property_string_default(prop, def);
|
||||
if (def && def[0]) RNA_def_property_string_default(prop, def);
|
||||
RNA_def_property_ui_text(prop, name ? name : id, description);
|
||||
|
||||
if (pyopts) {
|
||||
|
|
|
@ -1163,13 +1163,13 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
|
|||
|
||||
|
||||
if (flag & WM_FILESEL_FILEPATH)
|
||||
RNA_def_string_file_path(ot->srna, "filepath", "", FILE_MAX, "File Path", "Path to file");
|
||||
RNA_def_string_file_path(ot->srna, "filepath", NULL, FILE_MAX, "File Path", "Path to file");
|
||||
|
||||
if (flag & WM_FILESEL_DIRECTORY)
|
||||
RNA_def_string_dir_path(ot->srna, "directory", "", FILE_MAX, "Directory", "Directory of the file");
|
||||
RNA_def_string_dir_path(ot->srna, "directory", NULL, FILE_MAX, "Directory", "Directory of the file");
|
||||
|
||||
if (flag & WM_FILESEL_FILENAME)
|
||||
RNA_def_string_file_name(ot->srna, "filename", "", FILE_MAX, "File Name", "Name of the file");
|
||||
RNA_def_string_file_name(ot->srna, "filename", NULL, FILE_MAX, "File Name", "Name of the file");
|
||||
|
||||
if (flag & WM_FILESEL_FILES)
|
||||
RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", "");
|
||||
|
@ -1983,7 +1983,7 @@ static void WM_OT_call_menu(wmOperatorType *ot)
|
|||
|
||||
ot->flag = OPTYPE_INTERNAL;
|
||||
|
||||
RNA_def_string(ot->srna, "name", "", BKE_ST_MAXNAME, "Name", "Name of the menu");
|
||||
RNA_def_string(ot->srna, "name", NULL, BKE_ST_MAXNAME, "Name", "Name of the menu");
|
||||
}
|
||||
|
||||
/* ************ window / screen operator definitions ************** */
|
||||
|
@ -2094,7 +2094,7 @@ static void WM_OT_read_homefile(wmOperatorType *ot)
|
|||
ot->invoke = WM_operator_confirm;
|
||||
ot->exec = wm_homefile_read_exec;
|
||||
|
||||
prop = RNA_def_string_file_path(ot->srna, "filepath", "",
|
||||
prop = RNA_def_string_file_path(ot->srna, "filepath", NULL,
|
||||
FILE_MAX, "File Path",
|
||||
"Path to an alternative start-up file");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
@ -4054,28 +4054,28 @@ static void WM_OT_radial_control(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING;
|
||||
|
||||
/* all paths relative to the context */
|
||||
prop = RNA_def_string(ot->srna, "data_path_primary", "", 0, "Primary Data Path", "Primary path of property to be set by the radial control");
|
||||
prop = RNA_def_string(ot->srna, "data_path_primary", NULL, 0, "Primary Data Path", "Primary path of property to be set by the radial control");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
||||
prop = RNA_def_string(ot->srna, "data_path_secondary", "", 0, "Secondary Data Path", "Secondary path of property to be set by the radial control");
|
||||
prop = RNA_def_string(ot->srna, "data_path_secondary", NULL, 0, "Secondary Data Path", "Secondary path of property to be set by the radial control");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
||||
prop = RNA_def_string(ot->srna, "use_secondary", "", 0, "Use Secondary", "Path of property to select between the primary and secondary data paths");
|
||||
prop = RNA_def_string(ot->srna, "use_secondary", NULL, 0, "Use Secondary", "Path of property to select between the primary and secondary data paths");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
||||
prop = RNA_def_string(ot->srna, "rotation_path", "", 0, "Rotation Path", "Path of property used to rotate the texture display");
|
||||
prop = RNA_def_string(ot->srna, "rotation_path", NULL, 0, "Rotation Path", "Path of property used to rotate the texture display");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
||||
prop = RNA_def_string(ot->srna, "color_path", "", 0, "Color Path", "Path of property used to set the color of the control");
|
||||
prop = RNA_def_string(ot->srna, "color_path", NULL, 0, "Color Path", "Path of property used to set the color of the control");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
||||
prop = RNA_def_string(ot->srna, "fill_color_path", "", 0, "Fill Color Path", "Path of property used to set the fill color of the control");
|
||||
prop = RNA_def_string(ot->srna, "fill_color_path", NULL, 0, "Fill Color Path", "Path of property used to set the fill color of the control");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
||||
prop = RNA_def_string(ot->srna, "zoom_path", "", 0, "Zoom Path", "Path of property used to set the zoom level for the control");
|
||||
prop = RNA_def_string(ot->srna, "zoom_path", NULL, 0, "Zoom Path", "Path of property used to set the zoom level for the control");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
||||
prop = RNA_def_string(ot->srna, "image_id", "", 0, "Image ID", "Path of ID that is used to generate an image for the control");
|
||||
prop = RNA_def_string(ot->srna, "image_id", NULL, 0, "Image ID", "Path of ID that is used to generate an image for the control");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
|
||||
prop = RNA_def_boolean(ot->srna, "secondary_tex", 0, "Secondary Texture", "Tweak brush secondary/mask texture");
|
||||
|
|
Loading…
Reference in New Issue