Any example of how to execute what you tell me, so I can do it from an example, it is very difficult for me to understand it without seeing an example. Thank you very much. El sábado, 13 de agosto de 2022 a las 8:01:33 UTC-3, romanp...@gmail.com escribió:
> Hi, > You get the names of the anim Curves that you want. You can loop in a > list of those if there's more than 1. And you add it as the first argument > of setkeyframe. > > Cordialement > Perrin Roman > > On Sat, 13 Aug 2022, 02:10 Darwin Giordano, <dg3...@gmail.com> wrote: > >> 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)) >> >> insertKeyPercentage(percentage = 100) >> >> [image: curves GROUPS.gif] >> >> >> >> -- >> 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 >> >> <https://groups.google.com/d/msgid/python_inside_maya/8e31de18-8de2-499c-b63e-92c9990fdef5n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/79945ded-854e-405a-ba2e-6eba654a9aean%40googlegroups.com.