Thanks, LM, for throwing this in, but it's not working correctly. So what I did:
Print the path of the current soundtrack using moho.document:Soundtrack(). That reports correctly. Set a new one with SetSoundtrack, and then print moho.document:Soundtrack() again. Still looks good. However, the new soundtrack isn't actually assigned. The old one still plays and displays in the timeline. Ack!
I have a whole passel of pretty nifty sound stuff about ready to go, but I need this lil' doodad so it's a bit of a bummer. If you could look into it I'd greatly appreciate it. Oh, yeah, this is using 5.2 on Win2k. Thanks again.
SetSoundtrack() not working
Moderators: Víctor Paredes, Belgarath, slowtiger
- Lost Marble
- Site Admin
- Posts: 2355
- Joined: Tue Aug 03, 2004 6:02 pm
- Location: Scotts Valley, California, USA
- Contact:
A mixer of sorts. The first one I was trying to use it with was the PadSound script I put over in the swcripting section. Basically, add silence to the begginning of an audio file so that it starts at the currently selected frame, and then assign it as the soundtrack. But once it's working I'm planning on putting together a reasonable audio mixer script (that should make some people happy). I wrote a buncha audio routines in Lua, so I might as well use them. Thanks.
Also, I believe it's been mentioned before, but is there anything in place that will allow me to get the path of the currently opened Moho file? I have a few things that need to produce data files to keep track of things, and it would be a lot simplern to keep track of things to just be able to save them to the same folder as the moho file.
And I have one other question - Is there acces in the scripting interface to the animatable bone dynamics keyframe values yet, and if so, what are the called? Thanks again.
Also, I believe it's been mentioned before, but is there anything in place that will allow me to get the path of the currently opened Moho file? I have a few things that need to produce data files to keep track of things, and it would be a lot simplern to keep track of things to just be able to save them to the same folder as the moho file.
And I have one other question - Is there acces in the scripting interface to the animatable bone dynamics keyframe values yet, and if so, what are the called? Thanks again.
- Lost Marble
- Site Admin
- Posts: 2355
- Joined: Tue Aug 03, 2004 6:02 pm
- Location: Scotts Valley, California, USA
- Contact:
No, but I think that can be added.7feet wrote:Also, I believe it's been mentioned before, but is there anything in place that will allow me to get the path of the currently opened Moho file?
Yes. If you have a bone object, then it would be:7feet wrote:And I have one other question - Is there acces in the scripting interface to the animatable bone dynamics keyframe values yet, and if so, what are the called? Thanks again.
bone.fBoneDynamics
It's a AnimBool object, so you could do things like
bone.fBoneDynamics:SetValue(144, true)
if (bone.fBoneDynamics.value) then
...
end