How is it possible to make this code work but that it works with each active curve, and does not apply in the other curves the keys since it incorporates them in places where I do not want them to be.
import maya.cmds as mc
def insertKeyPercentage(percentage = 100):
key1 = mc.currentTime(q = True)
key2 = mc.findKeyframe(t = (key1,key1), w = "next")
keyx = mc.findKeyframe(t = (key1,key1), w = "previous")
p = ((key2-keyx)/100)*percentage
newKey = mc.setKeyframe(i = True, t = (key2 -p/2))
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8e31de18-8de2-499c-b63e-92c9990fdef5n%40googlegroups.com.