Zero Displacement Limits

Richard HaseltineRichard Haseltine Posts: 96,838
edited March 2015 in Freebies

https://www.dropbox.com/s/xnqjh4o8nfk9h23/ZeroDisplacementLimits.zip?dl=0

A simple DAZ Studio script to zero the Minimum and Maximum values for surfaces that have Displacement Strength set to 0, to avoid weird effects when using the SSS Shader for DAZ Studio 4.5 and later.

Post edited by Richard Haseltine on

Comments

  • SzarkSzark Posts: 10,634
    edited December 1969

    That will come in handy eventually Richard thank you.

  • DarleymikeyDarleymikey Posts: 8
    edited December 1969

    Thank you, Richard.

  • KeryaKerya Posts: 10,943
    edited December 1969

    Sorry - I am always pointing people here - and forgot to say thank you ...
    THANK YOU!

  • DarleymikeyDarleymikey Posts: 8
    edited December 1969

    Again, thanks for the help.

  • Richard HaseltineRichard Haseltine Posts: 96,838
    edited December 1969

    You're all welcome.

  • Eustace ScrubbEustace Scrubb Posts: 2,687
    edited December 1969

    Is there a way to script a reset of all non-hidden values in a shader to their defaults in one swell foop-- er, fell swoop?

  • Richard HaseltineRichard Haseltine Posts: 96,838
    edited December 1969

    Should be possible - using my script above as a starting point, something like

    if ( materialList.length > 0 ) {
     beginUndo();
     
     var dispControl, maxControl, minControl;
    
     // Go through the materials looking for the 
     // SSS Displacement Strength setting
     var m , n;
     for ( n = 0 ; n < materialList.length ; n++ ) {
      var nProp = materialList[ n ].getNumProperties();
      if ( for m = 0 ; m < nProp ; m++ ) {
       // Is the property hidden?
       if ( ! materialList[ n ].getProperty[ m ].isHidden() && materialList[ n ].getProperty[ m ].inherits( "DzFloatProperty" ) {
        materialList[ n ].getProperty[ m ].setValue( materialList[ n ].getProperty[ m ].getDefaultValue() );
       }
      }
     }
    }[/code[
    
    instead of its original zeroing procedure (I haven't checked that for functionality - and you'd need to handle other property types yourself in an analogous manner)
  • Yonas AngYonas Ang Posts: 108
    edited December 1969

    http://ovbi.org/~rhaseltine/data/ZeroDisplacementLimits.zip

    A simple DAZ Studio script to zero the Minimum and Maximum values for surfaces that have Displacement Strength set to 0, to avoid weird effects when using the SSS Shader for DAZ Studio 4.5 and later.

    Thank you very much Richard, this surely come in play when you have many SSS surface and some with displacement some aren't

Sign In or Register to comment.