Notifications
Clear all

[Closed] Moving keys from Link Constraint (keys access)

$.controller.setFrameNo 1 ($.controller.getFrameNo 1)

Ha!

And to be thorough!


mapped fn moveKeysAndLinkConstraint obj offset =
(
	moveKeys obj offset
	
	if classof obj.controller == Link_Constraint do
	(
		nTargets = obj.controller.getNumTargets()

		if nTargets > 0 do
		(
			--SORT THE LINK CONSTRAINT TARGETS
			obj.controller.setFrameNo 1 (obj.controller.getFrameNo 1)
						
			if offset > 0 then
			(
				for i = nTargets to 1 by -1 do
				(
					fNumber = obj.controller.getFrameNo i
					obj.controller.setFrameNo i (fNumber + offset)
				)
			)
			else
			(
				for i = 1 to nTargets do
				(
					fNumber = obj.controller.getFrameNo i
					obj.controller.setFrameNo i (fNumber + offset)					
				)
			)
		)
	)
)

moveKeysAndLinkConstraint selection 5

i said it’s simple

Page 2 / 2