Bone Audio Wiggle Script Crash Moho (Sometimes)
Moderators: Víctor Paredes, Belgarath, slowtiger
Bone Audio Wiggle Script Crash Moho (Sometimes)
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!
...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:
...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
...THANKS!
Code: Select all
if (moho.layer:LayerType() ~= MOHO.LT_BONE) then
return false
end

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
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.
Code: Select all
if (moho.layer:LayerType() ~= MOHO.LT_BONE) and (moho.layer:LayerType() ~= MOHO.LT_SWITCH) then
return false
end
...ALAAA!!! 7feet... I'd have not seen this reply yet... so
THANK YOU for the info!
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! 




IsBoneType()
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.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 toIf 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.Code: Select all
if (moho.layer:LayerType() ~= MOHO.LT_BONE) and (moho.layer:LayerType() ~= MOHO.LT_SWITCH) then return false end