His method seemed very well resolved. Thank you for your help.
b1 = controler
b2 = obj
cmds.setDrivenKeyframe( 'b2.tx', cd='b1.tx', dv=0,v=0 )
cmds.setDrivenKeyframe( 'b2.tx', cd='b1.tx', dv=20,v=-20 )
cmds.setDrivenKeyframe( 'b2.tx', cd='b1.tx', dv=-20,v=20 )
What am I doing wrong?
I want to create a simple setdrivenkey where the motion controls in
positions x, y, z, and this monitor.
def tmirror():
b1 = controler
b2 = obj
cmds.setDrivenKeyframe( 'b2.tx', cd='b1.tx', dv=0,v=0 )
cmds.setDrivenKeyframe( 'b2.tx', cd='b1.tx', dv=20,v=-20 )
cmds.setDrivenKeyframe( 'b2.tx', cd='b1.tx', dv=-20,v=20 )
What am I doing wrong?
I want to create a simple setdrivenkey where the motion controls in
positions x, y, z, and this monitor.
cmds.setDrivenKeyframe( 'b2.ty', cd='b1.ty', dv=0,v=0 ) # functional
#But, with def
def teste():
b1 = controler
b2 = obj
cmds.setDrivenKeyframe( b2 + '.tx', cd=b1+'.tx', dv=0,v=0 ) # not
work
cmds.setDrivenKeyframe( '%s.tx' % b2, cd=('%s.tx' % b1), dv=0,v=0 )
# not work
cmds.setDrivenKeyframe( 'b2.tx', cd='b1.tx', dv=20,v=-20 ) # not
work
cmds.setDrivenKeyframe( 'name1.ty', cd='name2.ty', dv=0,v=0 ) #
functional
# But, with def
.......
When I try to organize in def, no functionality
On Dec 20, 7:03 pm, Vitor Lôbo Ramos <vitaummprima...@gmail.com>
wrote:
The intention here is just create a setdrivenkey between 2 objects.
Example: Driver and Control, Obj is Driven. I move the Controller
translateX 20, and move the obj translateX -20. With that, I key.
Exemple:
import maya.cmds as cmds
cmds.setDrivenKeyframe( 'obj.tx', cd='controler.tx', dv=0,v=0 ) # work
cmds.setDrivenKeyframe( 'obj.tx', cd='controler.tx', dv=20,v=-20 )#
work
cmds.setDrivenKeyframe( 'obj.tx', cd='controler.tx', dv=-20,v=20 )
#work
Using a: def rtest ():
cmds.setDrivenKeyframe( 'obj.tx', cd='controler.tx', dv=0,v=0 ) #
not work
cmds.setDrivenKeyframe( 'obj.tx', cd='controler.tx', dv=20,v=-20 )
# not work
cmds.setDrivenKeyframe( 'obj.tx', cd='controler.tx', dv=-20,v=20 )
# not work
the above methods also did not work .... what am I doing wrong?
Another method tested:
b1 = controler
b2 = obj
cmds.setDrivenKeyframe(b2,at='translateX', cd=b1, dv=0,v=0 ) # not
work
On Dec 21, 1:47 am, Paul Molodowitch <elron...@gmail.com> wrote:
> Some questions:
>
> 1) What's the error you get?
> 2) Where are controler and obj defined?
> 3) What's the point of having b1 and b2, anyway? Why not just use controler
> and obj?
>
> - Paul
>
> 2009/12/20 Vitor Lôbo Ramos <vitaummprima...@gmail.com>
def foo()
cmds.someJunk()
foo() #<------ call the function
a little question: When set a call, it does not run by "select all +
execute, enter a pad? I'm sure he had done it before and funcina.
Unless, that is isolated in codigos. I'm confused now.
The code has to work when I call the "test ()" on the command line
python.
Now the code works. However, only a restricted calling line def.
Sorry the confusion Guys.
On Dec 21, 12:09 pm, Vitor Lôbo Ramos <vitaummprima...@gmail.com>