Pose library: add deprecation notices

The legacy Pose Library operators now refer to the "Legacy Pose Library",
and their description mentions they are deprecated and will be removed
from Blender 3.3. The same was added to the `Object.pose_library` RNA
property.

Ref: T93405

The removal of these deprecated properties is tracked in T93406.
This commit is contained in:
Sybren A. Stüvel 2022-04-04 15:26:02 +02:00
parent a824c076b7
commit 81b55d7988
2 changed files with 40 additions and 19 deletions

View File

@ -231,9 +231,11 @@ static int poselib_new_exec(bContext *C, wmOperator *UNUSED(op))
void POSELIB_OT_new(wmOperatorType *ot)
{
/* identifiers */
ot->name = "New Pose Library";
ot->name = "New Legacy Pose Library";
ot->idname = "POSELIB_OT_new";
ot->description = "Add New Pose Library to active Object";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Add New Legacy Pose Library to active Object";
/* callbacks */
ot->exec = poselib_new_exec;
@ -267,9 +269,11 @@ static int poselib_unlink_exec(bContext *C, wmOperator *UNUSED(op))
void POSELIB_OT_unlink(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Unlink Pose Library";
ot->name = "Unlink Legacy Pose Library";
ot->idname = "POSELIB_OT_unlink";
ot->description = "Remove Pose Library from active Object";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Remove Legacy Pose Library from active Object";
/* callbacks */
ot->exec = poselib_unlink_exec;
@ -352,9 +356,11 @@ static int poselib_sanitize_exec(bContext *C, wmOperator *op)
void POSELIB_OT_action_sanitize(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Sanitize Pose Library Action";
ot->name = "Sanitize Legacy Pose Library Action";
ot->idname = "POSELIB_OT_action_sanitize";
ot->description = "Make action suitable for use as a Pose Library";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Make action suitable for use as a Legacy Pose Library";
/* callbacks */
ot->exec = poselib_sanitize_exec;
@ -515,9 +521,11 @@ static int poselib_add_exec(bContext *C, wmOperator *op)
void POSELIB_OT_pose_add(wmOperatorType *ot)
{
/* identifiers */
ot->name = "PoseLib Add Pose";
ot->name = "Legacy PoseLib Add Pose";
ot->idname = "POSELIB_OT_pose_add";
ot->description = "Add the current Pose to the active Pose Library";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Add the current Pose to the active Legacy Pose Library";
/* api callbacks */
ot->invoke = poselib_add_menu_invoke;
@ -635,9 +643,11 @@ void POSELIB_OT_pose_remove(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
ot->name = "PoseLib Remove Pose";
ot->name = "Legacy PoseLib Remove Pose";
ot->idname = "POSELIB_OT_pose_remove";
ot->description = "Remove nth pose from the active Pose Library";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Remove nth pose from the active Legacy Pose Library";
/* api callbacks */
ot->invoke = WM_menu_invoke;
@ -724,9 +734,11 @@ void POSELIB_OT_pose_rename(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
ot->name = "PoseLib Rename Pose";
ot->name = "Legacy PoseLib Rename Pose";
ot->idname = "POSELIB_OT_pose_rename";
ot->description = "Rename specified pose from the active Pose Library";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Rename specified pose from the active Legacy Pose Library";
/* api callbacks */
ot->invoke = poselib_rename_invoke;
@ -805,9 +817,11 @@ void POSELIB_OT_pose_move(wmOperatorType *ot)
};
/* identifiers */
ot->name = "PoseLib Move Pose";
ot->name = "Legacy PoseLib Move Pose";
ot->idname = "POSELIB_OT_pose_move";
ot->description = "Move the pose up or down in the active Pose Library";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Move the pose up or down in the active Legacy Pose Library";
/* api callbacks */
ot->invoke = WM_menu_invoke;
@ -1813,9 +1827,11 @@ static int poselib_preview_exec(bContext *C, wmOperator *op)
void POSELIB_OT_browse_interactive(wmOperatorType *ot)
{
/* identifiers */
ot->name = "PoseLib Browse Poses";
ot->name = "Legacy PoseLib Browse Poses";
ot->idname = "POSELIB_OT_browse_interactive";
ot->description = "Interactively browse poses in 3D-View";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Interactively browse Legacy Pose Library poses in 3D-View";
/* callbacks */
ot->invoke = poselib_preview_invoke;
@ -1858,9 +1874,11 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot)
void POSELIB_OT_apply_pose(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Apply Pose Library Pose";
ot->name = "Apply Legacy Pose Library Pose";
ot->idname = "POSELIB_OT_apply_pose";
ot->description = "Apply specified Pose Library pose to the rig";
ot->description =
"Deprecated, will be removed in Blender 3.3. "
"Apply specified Legacy Pose Library pose to the rig";
/* callbacks */
ot->exec = poselib_preview_exec;

View File

@ -3696,7 +3696,10 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "poselib");
RNA_def_property_struct_type(prop, "Action");
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
RNA_def_property_ui_text(prop, "Pose Library", "Action used as a pose library for armatures");
RNA_def_property_ui_text(prop,
"Pose Library",
"Deprecated, will be removed in Blender 3.3. "
"Action used as a pose library for armatures");
prop = RNA_def_property(srna, "pose", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pose");