Graph editor, when 'Only Selected Handles' is enabled, dont allow selecting a handle unless they key is alredy partially selected.
This commit is contained in:
@@ -688,6 +688,15 @@ enum {
|
|||||||
NEAREST_HANDLE_RIGHT
|
NEAREST_HANDLE_RIGHT
|
||||||
} eHandleIndex;
|
} eHandleIndex;
|
||||||
|
|
||||||
|
/* check if its ok to select a handle */
|
||||||
|
// XXX also need to check for int-values only?
|
||||||
|
static int fcurve_handle_sel_check(SpaceIpo *sipo, BezTriple *bezt)
|
||||||
|
{
|
||||||
|
if (sipo->flag & SIPO_NOHANDLES) return 0;
|
||||||
|
if ((sipo->flag & SIPO_SELVHANDLESONLY) && BEZSELECTED(bezt)==0) return 0;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Find the vertex (either handle (0/2) or the keyframe (1)) that is nearest to the mouse cursor (in area coordinates)
|
/* Find the vertex (either handle (0/2) or the keyframe (1)) that is nearest to the mouse cursor (in area coordinates)
|
||||||
* Selected verts get a disadvantage, to make it easier to select handles behind.
|
* Selected verts get a disadvantage, to make it easier to select handles behind.
|
||||||
* Returns eHandleIndex
|
* Returns eHandleIndex
|
||||||
@@ -751,8 +760,7 @@ static short findnearest_fcurve_vert (bAnimContext *ac, int mval[2], FCurve **fc
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* handles - only do them if they're visible */
|
/* handles - only do them if they're visible */
|
||||||
// XXX also need to check for int-values only?
|
if (fcurve_handle_sel_check(sipo, bezt1)) {
|
||||||
if ((sipo->flag & SIPO_NOHANDLES)==0) {
|
|
||||||
/* first handle only visible if previous segment had handles */
|
/* first handle only visible if previous segment had handles */
|
||||||
if ( (!prevbezt && (bezt1->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) )
|
if ( (!prevbezt && (bezt1->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ)) )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user