ID 263220 - Match Selected Position (animated) feature will not always key matches for each frame with an animated snap.

Follow

Problem summary
Match Selected Position (animated) feature will not always key matches for each frame with an animated snap. Differences in results occur between 10.5v1 and 10.0v5. 

Customer reported version
nuke.10.0v4

Customer reported platform
10.09

Steps to reproduce

1. Open Nuke 
2. Create a Cube node
3. Animate the cube to translate and rotate across 100 frames
4. Copy the following to the script editor and run:

import nuke
import nukescripts.snap3d

def snapToPointsAnim( node=None, mode='t'):
'''
Animated versions of the three default snapping funtions in the axis menu
args:
node - node to snap
mode - which mode. Available modes are: 't' to match translation, 'tr', to match translation ans rotation, 'trs' to match translation, rotation and scale. default: 't'
'''

node = node or nuke.thisNode()
if mode not in ( 't', 'tr', 'trs' ):
raise ValueError, 'mode must be "t", "tr" or "trs"'
# KNOB MAP
knobs = dict( t=['translate'], tr=['translate', 'rotate'], trs=['translate', 'rotate','scaling'] )
# SNAP FUNCTION MAP
snapFn = dict( t=nukescripts.snap3d.translateToPoints,
tr=nukescripts.snap3d.translateRotateToPoints,
trs=nukescripts.snap3d.translateRotateScaleToPoints )

# SET REQUIRED KNOBS TO BE ANIMATED
for k in knobs[ mode ]:
node[ k ].clearAnimated()
node[ k ].setAnimated()
# GET FRAME RANGE
fRange = nuke.getInput( 'Frame Range', '%s-%s' % ( nuke.root().firstFrame(), nuke.root().lastFrame() ))
if not fRange:
return
# DO THE WORK
tmp = nuke.nodes.CurveTool() # HACK TO FORCE PROPER UPDATE. THIS SHOULD BE FIXED
for f in nuke.FrameRange( fRange ):
nuke.execute( tmp, f, f )
snapFn[ mode ](node)
nuke.delete( tmp ) # CLEAN UP THE HACKY BIT
5. Copy the following to the script editor and run:
m = nuke.menu( 'Axis' )
m.addCommand( 'Snap/Match selected position (animated)', lambda: snapToPointsAnim( mode='t' ) )
6. Create an Axis node
7. Go into vertex selection mode in viewer and select the bottom left corner vertex when looking down to Y axis (top view), with the x axis pointing down and the z axis pointing to the left
8. In the Axis properties select the axis icon > Match selected position animated > set frame range 1 -100 and hit OK
Result: each frame will be keyed with an axis translation value
9. Create a scene node and connect downstream of Cube node 
10. Connect input 2 of scene node to Axis node
11. Select Axis node > select axis icon > Match selected position animated > set frame range 1 -100 and hit OK
Result: Keyframes do not occur on each frame and instead occur between 1, 2, or 3 frames apart

Workaround
Unknown.

Reproduced by support
Can repro on:
OSX 10.10.5: 
Nue 10.0v4
Nuke 10.0v1
Nuke 9.0v8
Nuke 9.0v1

Nuke 10.5v1
When testing on 10.5v1 the result that 'Keyframes do not occur on each frame and instead occur between 1, 2, or 3 frames apart; occurs after step 8 rather than step 15

Windows 8:
Nuke 10.0v5
one thing to note is there are fewer frames keyed from the matching process

Nuke 10.5v1
Perform steps 1 - 8
Result: no frames are matched and keyed

Cannot repro on:
OSX 10.10.5:
8.0v7
result after step 11 was that all frames were keyed as expected

Expected behaviour
Frames to be matched and keyed without missing frames

Actual behaviour
Keyframes do not occur on each frame and instead occur between 1, 2, or 3 frames apart

    We're sorry to hear that

    Please tell us why