jwildfire.org

The official JWildfire forum
It is currently Tue Nov 24, 2020 6:05 pm

All times are UTC+01:00




Post new topic Reply to topic  [6 posts ] 
Author Message
 Post subject: Set gradient blur
PostPosted:Sun May 17, 2020 9:27 pm 
Offline
User avatar

Joined:Fri Sep 02, 2016 1:57 pm
Posts:185
How do I set the gradient blur from a script?

_________________
**Visit The JWildfire Sanctuary**
** Or the JWildfire Art Galleries**


Top
   
 Post subject: Re: Set gradient blur
PostPosted:Sun May 17, 2020 11:29 pm 
Offline
Site Admin
User avatar

Joined:Wed May 15, 2013 10:28 pm
Posts:1476
Example, that sets the value to 15 for the first layer of the currently selected flame:
Code:
public void run(ScriptRunnerEnvironment pEnv) throws Exception {
  Flame selFlame = pEnv.getCurrFlame();
  if(selFlame!=null) {
    selFlame.getFirstLayer().getPalette().setModBlur(15);
    pEnv.refreshUI();
  }
}


Top
   
 Post subject: Re: Set gradient blur
PostPosted:Mon May 18, 2020 2:17 pm 
Offline
User avatar

Joined:Fri Sep 02, 2016 1:57 pm
Posts:185
Thank you, I was trying to set it via flame.set etc

_________________
**Visit The JWildfire Sanctuary**
** Or the JWildfire Art Galleries**


Top
   
 Post subject: Re: Set gradient blur
PostPosted:Mon May 18, 2020 9:17 pm 
Offline
User avatar

Joined:Fri Sep 02, 2016 1:57 pm
Posts:185
Where would this go in normal script output from a flame. It resembles the end of the flame, so I added it there, didn't work.
Code:
  Flame selFlame = pEnv.getCurrFlame();
  if(selFlame!=null) {
  selFlame.getFirstLayer().getPalette().setModBlur(15);
    selFlame.assign(flame);
    pEnv.refreshUI();
  }

_________________
**Visit The JWildfire Sanctuary**
** Or the JWildfire Art Galleries**


Top
   
 Post subject: Re: Set gradient blur
PostPosted:Tue May 19, 2020 12:11 am 
Offline
Site Admin
User avatar

Joined:Wed May 15, 2013 10:28 pm
Posts:1476
Code:
flame.getFirstLayer().getPalette().setModBlur(15);


Top
   
 Post subject: Re: Set gradient blur
PostPosted:Tue May 19, 2020 9:41 pm 
Offline
User avatar

Joined:Fri Sep 02, 2016 1:57 pm
Posts:185
8-) So cool, that's what I was after, thanks !!

_________________
**Visit The JWildfire Sanctuary**
** Or the JWildfire Art Galleries**


Top
   
Display posts from previous: Sort by 
Post new topic Reply to topic  [6 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited
Theme Created by HOLLYSMOKE
Theme updated to phpBB 3.1.6 by KamijouTouma
Theme Version is 3.1.6-ss2