Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Python "time" flag - any way to set negative value?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
k.nalobin
916 Views, 2 Replies

Python "time" flag - any way to set negative value?

So i'm trying to delete keyframes via python script.

And the following line is working just fine:

cmds.cutKey(time=(5, 10))

However, if i'm trying to use negative time value it's doesnt work: 

cmds.cutKey(time=(-5, 1))

and returns an error: 

# Error: TypeError: file <maya console> line 1: Error retrieving default arguments #

 

is there a way to use negative time value in maya via python?

Thanks!

Labels (1)
2 REPLIES 2
Message 2 of 3
mspeer
in reply to: k.nalobin

Hi!

What Maya version are you using?

Here it works.

Are you sure you had an object selected, cause if nothing is selected, then you get this error.

Message 3 of 3
k.nalobin
in reply to: mspeer

well, it's seems like it was some kind of a glitch - I've just reloaded maya and everything works like a charm

thanks!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report