PDA

View Full Version : OMG, getAttr in maxscript? how? SOS


sabungero
09-21-2009, 03:24 AM
this thing is driving me crazy for the past 36 hours. is there a way to extract a local euler rotation value in max without using the expose transform helper?

sample: i have a joint with orient constraint, i want to write an expression that says

"jointA.rotateX = (jointB.rotateX / 2)"

or something like that...

or max's version of getAttr,so i can just put that thing in a float variable...

you see,i have nice setup wherein everything works from an expose Transform helper, but when i xref the objects,the parameter wiring will not work anymore since the base object(exposeTM) is xref'd...one work around is to do a sloppy solution wherein you connect everything off a fresh expose helper in the new scene to the xref'd object...

confused?

all i need to know is to get value of the rotation of a bone in one axis...(but it doesnt show in parameter wiring dialogue because it has an orientation constraint)

help :argh:

eek
09-21-2009, 05:22 AM
this thing is driving me crazy for the past 36 hours. is there a way to extract a local euler rotation value in max without using the expose transform helper?

sample: i have a joint with orient constraint, i want to write an expression that says

"jointA.rotateX = (jointB.rotateX / 2)"

or something like that...

or max's version of getAttr,so i can just put that thing in a float variable...

you see,i have nice setup wherein everything works from an expose Transform helper, but when i xref the objects,the parameter wiring will not work anymore since the base object(exposeTM) is xref'd...one work around is to do a sloppy solution wherein you connect everything off a fresh expose helper in the new scene to the xref'd object...

confused?

all i need to know is to get value of the rotation of a bone in one axis...(but it doesnt show in parameter wiring dialogue because it has an orientation constraint)

help :argh:

(($.transform * inverse $.parent.transform) as eulerAngles).x

degToRad (quatToEuler ($.transform * inverse $.parent.transform)).x

(($.transform * inverse target.Transform).rotation).z

etc.. etc

sabungero
09-21-2009, 06:24 AM
(jointA.transform * inverse jointB.parent.transform) as eulerAngles

did i get it right? :wavey:

thanks

PEN
09-21-2009, 12:07 PM
Close

(jointA.transform*inverse jointA.parent.transform) as eulerAngles

sabungero
09-21-2009, 12:51 PM
thanks...

so,is this saying
"multiply the xform of jointA by a negative value and read that as euler angles"?

im a total maxscript rookie... :banghead:

i hope that you guys can help me grow in my career,or at least get my maxscript into the same working leve as my understanding(or lack of) of MEL...

i wish somebody would write a MEL to maxscript bootcamp...

JHN
09-21-2009, 12:54 PM
There's always : http://www.scriptspot.com/bobo/mel2mxs/mel2mxs.htm

Hope that gets things going in the right direction!

-Johan

sabungero
09-21-2009, 12:55 PM
bookmarked!

any more ideas? this time without having to use expressions or scripts? :wavey:

eek
09-21-2009, 01:29 PM
bookmarked!

any more ideas? this time without having to use expressions or scripts? :wavey:

ExposeTM ..lol :scream:

sabungero
09-21-2009, 01:59 PM
awww... :cry:

shibumenon
09-22-2009, 09:46 AM
ideas ... well, while in Maxscript, forget the MEL "String" way of thinking

PEN
09-22-2009, 11:04 AM
Use a script controller if you must but the best solution is to use Extm helper when ever possible. If script controllers are used correctly they are fast and powerful. One tip, never list objects by name as you would in a Maya epression. Always variables in the left hand column and assign them the nodes, tracks and controllers that you need to reference in the expression.

sabungero
09-25-2009, 03:09 PM
thanks...i will try some more stuff and see what happens...

CGTalk Moderation
09-25-2009, 03:09 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.