Hey guys.
I'm trying to have an automated wire parameter and am getting caught up in one of the arguments.
Here's the code:
paramWire.connect $.pos.controller.X_Position.controller[#Limited_Controller__Bezier_Float] (pickMesh.object).modifiers[#Morpher][(morphNameResult)](endString)
Which translates into:
paramWire.connect $TeapotTestCircleController.pos.controller.X_Position.controller[#Limited_Controller__Bezier_Float] $Teapot001.modifiers[#Morpher][#_1__Teapot002___Target_Available] "Limited_Controller__Bezier_Float*20"
Or rather it WOULD, if morphNameResult didn't print as "#_1__Teapot002___Target_Available".
Any idea how to pass a string without quotation marks?
I've tried doing it another method, by grabbing the name from obj.morpher[1].name and just passing that, but it does say it wants a string. If I use obj.morpher[1].name as string inside the argument it then just gives me the same error.
Super stuck here.
Replies
check the string parser section in the maxscript help - you'll be able to chop those off fairly easily
Isn't getting my anywhere, not that I thought it would.
the channel that's pointing at is called Sphere002
the output in the listener is as follows
in this case it's reporting the right length - ie. it'd be 11 if the quotes were included. If i iterate through the string and print the results out character by character the quotes aren't included either.
looks like the listener quotes strings by itself to me - given the amount of scripting Ive been doing lately you'd think I'd have known that.
Number "9" is printed without quotes since it's an integer.
will be printed as
I haven't looked into your code, because I don't have much time. But my guess is you are using a string when you should be using something else.
Edit: Okay, after being super confused for a good while now I think I've cracked it.
For some random ass reason declaring an integer of the morph channel (instead of the name) as a global variable and passing that works.