--
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/ac118da8-9795-4095-bae0-aaab344edac5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Mon, Mar 26, 2018, 8:40 AM john patterson <0.j...@gmail.com> wrote:Can someone please translate this MEL to Python? I am not using pyMEL.selectKey -add -k -t 1 -t 9 -t 17 -t 25 -t 33 -t 41 pSphere1_translateY ;The docs say that a single time is acceptable, or a range. I can't even get this to work...cmds.selectKey("pSphere1.translateY", add=1, k=1,t=1)I don't mind writing 6 lines of Python for those 6 different times. Anyone?Did you check the docs? There are examples at the bottom. The time parameter expects a python tuple, since python functions cant accept multiple uses of the same parameter name, like in MelTrycmds.selectKey("pSphere1.translateY", add=True, k=True, t=(1,)cmds.selectKey("pSphere1.translateY", add=True, k=True, t=(1, 9, 17, 25, 33, 41)The part of that doc that isn't very clear is that it pretends to support more variations of that time value than it actually does. Sometimes the python docs were copied from Mel without fully updating.
--
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+unsub...@googlegroups.com.
Thanks for the reply. Yes, I read the documentation. It was not helpful. I read the specs for the time flag, (quoted below), which are wrong. It says that single values are valid, but it doesn't say that even a single value has to be in a tuple, and shows a misleading example that looks like MEL...."""time(t) timerange createmultiusetime uniquely representing a key (or key range) on a time-based animCurve. Valid timeRanges include single values (-t 10) or a string with a lower and upper bound, separated by a colon (-t "10:20")In query mode, this flag needs a value."""Your examples would be a great addition to the doc page.
On Sunday, March 25, 2018 at 5:08:46 PM UTC-4, Justin Israel wrote:
On Mon, Mar 26, 2018, 8:40 AM john patterson <0.j...@gmail.com> wrote:Can someone please translate this MEL to Python? I am not using pyMEL.selectKey -add -k -t 1 -t 9 -t 17 -t 25 -t 33 -t 41 pSphere1_translateY ;The docs say that a single time is acceptable, or a range. I can't even get this to work...cmds.selectKey("pSphere1.translateY", add=1, k=1,t=1)I don't mind writing 6 lines of Python for those 6 different times. Anyone?Did you check the docs? There are examples at the bottom. The time parameter expects a python tuple, since python functions cant accept multiple uses of the same parameter name, like in MelTrycmds.selectKey("pSphere1.translateY", add=True, k=True, t=(1,)cmds.selectKey("pSphere1.translateY", add=True, k=True, t=(1, 9, 17, 25, 33, 41)The part of that doc that isn't very clear is that it pretends to support more variations of that time value than it actually does. Sometimes the python docs were copied from Mel without fully updating.
--
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/ac118da8-9795-4095-bae0-aaab344edac5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/a178fbb5-0353-4a4e-ae6f-631b874f8217%40googlegroups.com.