Re: [Maya-Python] Speed up setting of keyframe

2018-07-30 Thread yann19
Thank you all for the replies, really appreciate it :D Will try to find the bottleneck issue which seemingly is pointing towards `cmds.currentTime` for the current code that is and spending more time to find out what is the exact cause.. -- You received this message because you are subscribed

Re: [Maya-Python] Speed up setting of keyframe

2018-07-25 Thread yann19
Hi combi, Sorry for the late reply. I do not think the use of `cmds.refresh()` may have any effects here. Rather, it is the `setting` of the currentTime that seemingly needs to be action so that the baking of keyframes are done properly. -- You received this message because you are subscribed

Re: [Maya-Python] Speed up setting of keyframe

2018-07-21 Thread Nicolas Combecave
Maybe not applicabl;e to your problem, but we got some significant improvements on some of our time-dependent tools using cmds.refresh(suspend=True) at start of the process and cmds.refresh(suspend=False) at the end. If you happen to use this concept more and more, it can be usefull to make a

Re: [Maya-Python] Speed up setting of keyframe

2018-07-20 Thread yann19
Perhaps it is something within my code that may needs to be refine. I tried to bake it per controller but it seems to take even longer... I have pasted my code here - https://pastebin.com/raw/25UhLt6C for reference. Appreciate if anyone could help to take a look and feedback :) -- You

Re: [Maya-Python] Speed up setting of keyframe

2018-07-19 Thread yann19
Only the first frame is being baked while the rest is static, though the process is fast, when using "update=False" or commenting that line out.. -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this

Re: [Maya-Python] Speed up setting of keyframe

2018-07-19 Thread Justin Israel
On Fri, Jul 20, 2018 at 10:49 AM yann19 wrote: > I added that command in, to ensure that animation is being baked properly > in each frame across the frame range defined. > > I tried commenting out that particular line, only the first frame is being > baked while the rest of the frames are

Re: [Maya-Python] Speed up setting of keyframe

2018-07-19 Thread yann19
I added that in as a precaution to ensure that every frame animation is being "baked". Let me try without that then On Thursday, July 19, 2018 at 2:51:27 PM UTC-7, Justin Israel wrote: > > Is the cmds.currentTime(frame) necessary, if you are already passing a > "time" value to setKeyframe()? I

Re: [Maya-Python] Speed up setting of keyframe

2018-07-19 Thread Justin Israel
Is the cmds.currentTime(frame) necessary, if you are already passing a "time" value to setKeyframe()? I imagine you are wasting a bunch of cpu time changing the current frame in the scene and triggering updates. On Fri, Jul 20, 2018 at 9:40 AM yann19 wrote: > Hi, I am writing up a script that