Anim: Cleanup: Move CfraElem
struct to editors #110527
|
@ -34,14 +34,6 @@ struct StructRNA;
|
|||
struct bAction;
|
||||
struct bContext;
|
||||
|
||||
/* ************** Keyframe Tools ***************** */
|
||||
|
||||
typedef struct CfraElem {
|
||||
struct CfraElem *next, *prev;
|
||||
float cfra;
|
||||
int sel;
|
||||
} CfraElem;
|
||||
|
||||
/* ************** F-Curve Modifiers *************** */
|
||||
|
||||
/**
|
||||
|
|
|
@ -1011,43 +1011,6 @@ bool BKE_fcurve_is_keyframable(const FCurve *fcu)
|
|||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Keyframe Column Tools
|
||||
* \{ */
|
||||
|
||||
static void UNUSED_FUNCTION(bezt_add_to_cfra_elem)(ListBase *lb, BezTriple *bezt)
|
||||
{
|
||||
CfraElem *ce, *cen;
|
||||
|
||||
for (ce = static_cast<CfraElem *>(lb->first); ce; ce = ce->next) {
|
||||
/* Double key? */
|
||||
if (IS_EQT(ce->cfra, bezt->vec[1][0], BEZT_BINARYSEARCH_THRESH)) {
|
||||
if (bezt->f2 & SELECT) {
|
||||
ce->sel = bezt->f2;
|
||||
}
|
||||
return;
|
||||
}
|
||||
/* Should key be inserted before this column? */
|
||||
if (ce->cfra > bezt->vec[1][0]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Create a new column */
|
||||
cen = static_cast<CfraElem *>(MEM_callocN(sizeof(CfraElem), "add_to_cfra_elem"));
|
||||
if (ce) {
|
||||
BLI_insertlinkbefore(lb, ce, cen);
|
||||
}
|
||||
else {
|
||||
BLI_addtail(lb, cen);
|
||||
}
|
||||
|
||||
cen->cfra = bezt->vec[1][0];
|
||||
cen->sel = bezt->f2;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Samples Utilities
|
||||
* \{ */
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "UI_view2d.h"
|
||||
|
||||
#include "ED_anim_api.h"
|
||||
#include "ED_keyframes_edit.h"
|
||||
#include "ED_markers.h"
|
||||
#include "ED_numinput.h"
|
||||
#include "ED_object.h"
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
#include "UI_resources.h"
|
||||
|
||||
#include "ED_armature.h"
|
||||
#include "ED_keyframes_edit.h"
|
||||
#include "ED_keyframes_keylist.h"
|
||||
#include "ED_keyframing.h"
|
||||
#include "ED_markers.h"
|
||||
|
|
|
@ -160,6 +160,16 @@ ENUM_OPERATORS(eKeyframeIterFlags, KEYFRAME_ITER_HANDLES_DEFAULT_INVISIBLE)
|
|||
/** \name Generic Properties for Keyframe Edit Tools
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* Temporary struct used to store frame time and selection status.
|
||||
* Used for example by `columnselect_action_keys` to select all keyframes in a column.
|
||||
*/
|
||||
typedef struct CfraElem {
|
||||
struct CfraElem *next, *prev;
|
||||
float cfra;
|
||||
int sel;
|
||||
} CfraElem;
|
||||
|
||||
typedef struct KeyframeEditData {
|
||||
/* generic properties/data access */
|
||||
/** temp list for storing custom list of data to check */
|
||||
|
|
Loading…
Reference in New Issue