DS, possible to make cumulative scale preset?

MistaraMistara Posts: 38,675

cumulative scale preset?

like, instead of like

x=102%

can make it take whatevet Xscale is and add 2%

x=x + 2%

@selection
@@selection

dunno

tysmiley

Comments

  • GatorGator Posts: 1,294

    Interesting question, but really, rather than locating an icon in the library isn't it faster to just click the scale + a few times in the Parameters window?

  • Richard HaseltineRichard Haseltine Posts: 100,778
    edited December 2017

    Easy to do with a script. Something like

    // Get the selection - could also get all seelcted items as ana rray and loop over themvar item = Scene.getPrimarySelection();if ( item ) {	// get the scale parameter	var scaleParam = item.getScaleControl();	if ( scaleParam ) {		// get the current scale		var curScale = scaleParam.getValue();		// set the new value - 100% is a value of 1, so 2% is 0.02		scaleParam.setValue( curScale + 0.02 );	}}

     

    Post edited by Richard Haseltine on
  • MistaraMistara Posts: 38,675
    edited December 2017

    Easy to do with a script. Something like

    // Get the selection - could also get all seelcted items as ana rray and loop over themvar item = Scene.getPrimarySelection();if ( item ) {	// get the scale parameter	var scaleParam = item.getScaleControl();	if ( scaleParam ) {		// get the current scale		var curScale = scaleParam.getValue();		// set the new value - 100% is a value of 1, so 2% is 0.02		scaleParam .setValue( curScale + 0.02 );	}}

     

     

    thanks Richard smiley

    Post edited by Richard Haseltine on
  • Fixed an error in the scriptlet (not that I've tested it anyway)

  • MistaraMistara Posts: 38,675

    okay.  thanks.

    nested if statement

Sign In or Register to comment.