Page 1 of 1

Set noise interval with script?

Posted: Fri Sep 27, 2013 3:06 pm
by Lukas
Hey guys,

Does anyone know how I can set the noise interval of a layer with lua?

I need to apply the sketchy effect with a script, but needed my own values:

Code: Select all

		vectorLayer.fNoisyLines = true;
		vectorLayer.fNoisyShapes = true;
		vectorLayer.fAnimatedNoise = true;
		vectorLayer.fExtraSketchy = false;
		vectorLayer.fExtraLines = 0;
		vectorLayer.fNoiseAmp = 50.0 / moho.document:Height();
		vectorLayer.fNoiseScale = 111.0 / moho.document:Height();
		vectorLayer.fNoiseInterval = 2
I tried adding "fNoiseInterval" but it doesn't work, and I can't find any info on lua for asp anywhere. Where should I look for these things?

The rest of the script works fine.

PS- I have no knowledge of .lua... :|

Re: Set noise interval with script?

Posted: Fri Sep 27, 2013 4:26 pm
by heyvern
When you say the rest of the script works fine, it's only the interval that isn't set?

I think maybe that specific value is not available in the scripting interface. Just a guess. I did a search of the script interface and couldn't find any reference to that particular property.

I can't remember specifically but I think the noise interval might be a new addition to the sketchy feature. It might not be in the scripting interface yet.

you can look here for lua scripting reference with ASP:

http://animestudioscripting.com/moho

Re: Set noise interval with script?

Posted: Fri Sep 27, 2013 10:34 pm
by hayasidist
are you looking for "interval" in noisy interpolation?? (i.e. 1 to interpolate every frame, 2 to animate on 2's, 3 to animate on 3's, etc.). if so it's in the interpSettings control block (9.5 only) .. check pkg_moho.lua_pkg

Re: Set noise interval with script?

Posted: Mon Sep 30, 2013 3:39 pm
by Lukas
Thanks guys :)

Re: Set noise interval with script?

Posted: Thu Oct 03, 2013 6:13 pm
by amanandink
Hey Lukas

did you figure out about the interval settings? if it is possible to have an interval of 2

thanks
Jeremy

Re: Set noise interval with script?

Posted: Fri Oct 04, 2013 7:48 am
by Lukas
amanandink wrote:Hey Lukas

did you figure out about the interval settings? if it is possible to have an interval of 2

thanks
Jeremy
I haven't been able to put it in the script yet...

But it's possible to have a noise interval of 2:
Image

Setting the entire animation of a layer on 2s isn't possible unless you keyframe it that way. It would be a nice function to have though... I think I made an issue about it on mantis a while ago.

Re: Set noise interval with script?

Posted: Fri Oct 04, 2013 8:42 am
by amanandink
thanks Lukas

no problem, its a little annoying to have to do it outside the apply sketchy script but I can do a find and replace in the code and change all layers to an interval of 2.

thanks again
J

Re: Set noise interval with script?

Posted: Fri Oct 04, 2013 8:46 am
by Lukas
amanandink wrote:thanks Lukas

no problem, its a little annoying to have to do it outside the apply sketchy script but I can do a find and replace in the code and change all layers to an interval of 2.

thanks again
J
Ah, good to know it's possible to do it that way.

If I can get it in the script I'll share it here.