Bone Audio Wiggle Script Crash Moho (Sometimes)

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

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

Bone Audio Wiggle Script Crash Moho (Sometimes)

Post by Rai López »

Well, I can't give you more information (I'll try the next time), but sometimes, when I press OK button in Bone Audio Wiggle window, Moho crashes... And, as Moho is always SO stable, this seems strange to me, only that... CIAO!
User avatar
Rai López
Posts: 2292
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

...By the way! This is another issue no relationated with the previous, but well, seems like Bone Audio Wiggle is not prepared to work under Switch Layers, it seems extrange, but must be a very little writing mistake, now I've deleted this part of the code and the script works perfectly:

Code: Select all

	if (moho.layer:LayerType() ~= MOHO.LT_BONE) then
		return false
	end
...But, have I do the correct thing?? I mean, instead delete this part, would have been better add something referent to a Switch Layers Type? Well, as I've said, the script works now in both layer types, but I'd want to be sure, maybe for resolve future problems/doubts about scripting world :roll: ...THANKS!
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

I dunno, Ramón, the reason that line is there is so the script only works on bone layers. But, since switch layers are a subset of bone layers now, maybe that is okay. If thats the case, I would change it to

Code: Select all

if (moho.layer:LayerType() ~= MOHO.LT_BONE)  and (moho.layer:LayerType() ~= MOHO.LT_SWITCH) then
      return false
end
If you try to use a script on the wrong layer type, and you have deleted the "idiot proofing" from the script, things blow up real good.
User avatar
Rai López
Posts: 2292
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

...ALAAA!!! 7feet... I'd have not seen this reply yet... so :arrow: THANK YOU for the info! :D How could I assign two types of layers to a certain script was an ancient little doubt that I had, and now seem resolved :) ...I'll repare now the Bone Audio Wiggle script and take good note about this advice for the future events... CIAO! :D
macton
Posts: 93
Joined: Thu Aug 18, 2005 6:29 am
Location: San Diego

IsBoneType()

Post by macton »

7feet wrote:I dunno, Ramón, the reason that line is there is so the script only works on bone layers. But, since switch layers are a subset of bone layers now, maybe that is okay. If thats the case, I would change it to

Code: Select all

if (moho.layer:LayerType() ~= MOHO.LT_BONE)  and (moho.layer:LayerType() ~= MOHO.LT_SWITCH) then
      return false
end
If you try to use a script on the wrong layer type, and you have deleted the "idiot proofing" from the script, things blow up real good.
If you use moho:layer:IsBoneType() instead, you should be able to do processing on bones without having to check for LT_SWITCH everywhere. And if a new layer type is created that is derived from LT_BONE, it should still work.
Post Reply