Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Animation / Generic name to objet in a expression?
  RSS 2.0 ATOM  

Generic name to objet in a expression?
Rate this thread
 
61565
 
Permlink of this thread  
avatar
  • JMLetona
  • Posted: 01 November 2011 07:47 AM
  • Total Posts: 2
  • Joined: 25 April 2011 04:12 PM

Hi everyone,
i have this expression

group1|Gear1.rotateY = group2|Gear2.rotateY*(.5)

but i need copy this expression to many other objets, so in other tutorial y find some expression like ....

this.rotateY = group2|Gear2.rotateY*(-.5)

but i lose the tutorial and this expression is a error (this.rotateY)… so you can help me… give me some expression when the name of the objet is a generic name to link it.

thanks



Replies: 0
avatar
  • JMLetona
  • Posted: 01 November 2011 10:52 AM

I found the solution.... if the expression is

group1|Gear1.rotateY = group2|Gear2.rotateY*(.5)

and you want copy to many object without retyping the name of object every time.... just copy from the beginning the property…

rotateY = group2|Gear2.rotateY*(.5)

when you press enter, the system autocomplete the name of the object when you save the expression.

**************** Example *********
If Obj1 is rotting
And Obj2 (ex. if Obj2 rotting .5 times fast then Obj1)
you type a expression like that

Obj2.rotateY = Obj1.rotateY*(.5)

then if you have a Obj3 and you want copy the same expression you need to paste

rotateY = Obj1.rotateY*(.5) (Whit out the name of the object… in this case Obj2)

and when you save the expression, the system automatically insert the name of the object.. and your expression will see like that…

Obj3.rotateY = Obj1.rotateY*(.5)

**********************************

Very useful when have a lot of objects or the names of the objects are large or complex.

I hope this post being useful for someone.



Replies: 0