PLEASE,a Little Question...(RL_LineWidthSound script added)

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Rai López
Posts: 2289
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

PLEASE,a Little Question...(RL_LineWidthSound script added)

Post by Rai López »

...Can anybody (or even LM) tell me the "code" to call Line Width function in a script? There are no examples still and I need it for put it instead bone.fAnimAngle:SetValue (in "Bone Audio Wiggle" script), because with this (and some changes more) I hope can animate it with sound (for lip sinc and other uses) and I need this parameter... THANK YOU!!! :D (in advance)
Last edited by Rai López on Tue Feb 21, 2006 8:45 pm, edited 1 time in total.
User avatar
Lost Marble
Site Admin
Posts: 2354
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

Take a look at the lm_line_width.lua script - line width is actually a property of each point that the line passes through. So, if you have a pt object that is a point in a mesh, you can set the line width through that point like so:

pt.fWidth:SetValue(frame, widthValue)
User avatar
Rai López
Posts: 2289
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

THANK YOU VERY MUCH for the information LM you are SO kind :D ...I'll try to do something tomorrow with all of that, seems more difficult that I believed in a first moment, but I'll try it... *CIAO*
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Try looking at the part of the Select Points script where it creates the selected points list. You could lift that code, and then run a loop for each frame, with another loop inside that goes through all the points in that list to make your point width adjustments.
User avatar
Rai López
Posts: 2289
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

:?: :?: :?:
7feet wrote:and then run a loop for each frame, with another loop inside that goes through all the points in that list to make your point width adjustments.
:roll: :roll: :roll: ...Jaja, THANK YOU 7feet, but for my ignorance in all this script world I've no idea what are you talking about... :(
...And, of course, my script doesn't works (yet) :cry: Sniff...
User avatar
Rai López
Posts: 2289
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

HEY! Finaly I(we)'ve get it :D, THANKS TO BOTH! :) Well... not too much difficult now that the LM's Bone Audio Giggle script can be applied over several bones :roll: ...But anyway could be useful for things like simple LipSync or many other quick audio-visual (in sync) pourposes, here it is :arrow: RL_LineWidthSound and here:arrow: (HERE) there is a quick (made in a few seconds) & UgLy example using this script :) ...CIAO!

PD: Remember the script only works over selected and "variated" points I mean, of course it doesn't works over default or "reset line width" points.
Post Reply