Fix T76852: Breakdowner remembers limits last used

This commit is contained in:
Campbell Barton 2020-05-18 18:47:50 +10:00
parent 04d15f1625
commit 008e964940
Notes: blender-bot 2023-02-14 06:00:49 +01:00
Referenced by issue #76852, Breakdowner remembers last Limit to Transform/Property Set
Referenced by issue #76113, Crash closing file browsers with AMD GPUs
1 changed files with 50 additions and 41 deletions

View File

@ -1254,51 +1254,60 @@ static int pose_slide_exec_common(bContext *C, wmOperator *op, tPoseSlideOp *pso
return OPERATOR_FINISHED;
}
/* common code for defining RNA properties */
/* TODO: Skip save on these? */
/**
* Common code for defining RNA properties.
*/
static void pose_slide_opdef_properties(wmOperatorType *ot)
{
RNA_def_float_percentage(ot->srna,
"percentage",
0.5f,
0.0f,
1.0f,
"Percentage",
"Weighting factor for which keyframe is favored more",
0.0,
1.0);
PropertyRNA *prop;
RNA_def_int(ot->srna,
"prev_frame",
0,
MINAFRAME,
MAXFRAME,
"Previous Keyframe",
"Frame number of keyframe immediately before the current frame",
0,
50);
RNA_def_int(ot->srna,
"next_frame",
0,
MINAFRAME,
MAXFRAME,
"Next Keyframe",
"Frame number of keyframe immediately after the current frame",
0,
50);
prop = RNA_def_float_percentage(ot->srna,
"percentage",
0.5f,
0.0f,
1.0f,
"Percentage",
"Weighting factor for which keyframe is favored more",
0.0,
1.0);
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
RNA_def_enum(ot->srna,
"channels",
prop_channels_types,
PS_TFM_ALL,
"Channels",
"Set of properties that are affected");
RNA_def_enum(ot->srna,
"axis_lock",
prop_axis_lock_types,
0,
"Axis Lock",
"Transform axis to restrict effects to");
prop = RNA_def_int(ot->srna,
"prev_frame",
0,
MINAFRAME,
MAXFRAME,
"Previous Keyframe",
"Frame number of keyframe immediately before the current frame",
0,
50);
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_int(ot->srna,
"next_frame",
0,
MINAFRAME,
MAXFRAME,
"Next Keyframe",
"Frame number of keyframe immediately after the current frame",
0,
50);
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_enum(ot->srna,
"channels",
prop_channels_types,
PS_TFM_ALL,
"Channels",
"Set of properties that are affected");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
prop = RNA_def_enum(ot->srna,
"axis_lock",
prop_axis_lock_types,
0,
"Axis Lock",
"Transform axis to restrict effects to");
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
/* ------------------------------------ */