Graphics

 View Only
  • 1.  Script: Set material field mode to progressive

    Posted 05-03-2016 17:04
    Hi,

    Does anyone know the syntax for setting a material's field mode to progressive in a script?

    T


  • 2.  RE: Script: Set material field mode to progressive

    Posted 05-03-2016 17:49
    You need to retreive the video shader from the material first and then you can just use:


    shader.VideoFieldMode = vfm_Progressive;
    #XPression


  • 3.  RE: Script: Set material field mode to progressive

    Posted 05-04-2016 12:16
    Cool.

    Now I've done this in OnOnline:

    dim quad as xpBaseObject
    dim mat as xpMaterial
    dim shader as xpBaseShader
    Self.GetObjectNyName("Player", quad)
    quad.GetMaterial(0, mat)
    mat.Stop
    mat.GetShader(0, shader)
    shader.VideoFieldMode = vfm_Progressive

    However I get this message "Name "vfm_Progressive" is not declared". Why does this happen?


    T
    #XPression


  • 4.  RE: Script: Set material field mode to progressive

    Posted 05-04-2016 17:37
    I guess vfm_Progressive only exists for external API applications. You can just use the value 1 instead of the constant and it will do the same thing.

    shader.VideoFieldMode = 1

    The value of 0 is autodetect, and 2 is "upper field first".

    #XPression


  • 5.  RE: Script: Set material field mode to progressive

    Posted 09-14-2016 12:05
    @bford is there any way to set the shaders Source Mode (shaped/unshaped) and the Run Mode (Loop/PlayOnce/Pingpong) ?
    #XPression


  • 6.  RE: Script: Set material field mode to progressive

    Posted 09-14-2016 12:10
    Yes, by using a videoshader instead of baseshader...

    Then use : Unshaped As Boolean

    About RunMode, it's a material property...
    #XPression