Menu

info about RiOption

Help
2005-05-06
2013-03-24
  • Cedric PAILLE

    Cedric PAILLE - 2005-05-06

    Hi, I use cgkit in my own application ( that is a 3D modelling/animation package with python embedded in ), and want to export RIB with th ri module.
    All works well, matrix and vector ops, but if i try to use:
    RiOption("limits","eyesplits",10) , the rib is correctely written, but python reports an error.

    Is there a way to correct this?

     
    • Matthias Baas

      Matthias Baas - 2005-05-06

      The binding checks the types of variables and as "eyesplits" is not a standard variable it generates an "error" (well, it's rather a warning) because it doesn't know its type.
      To get rid of the message you have to declare the variable, either inline or using RiDeclare().

      Using the inline declaration is probably the easiest solution:

      RiOption("limits","int eyesplits",10)

      - Matthias -

       
    • Cedric PAILLE

      Cedric PAILLE - 2005-05-06

      Many thanks Matthias.

      Cheers

       
    • Cedric PAILLE

      Cedric PAILLE - 2005-05-26

      BTW, is it possible to give to RiSurface an inline declaration ?
      to output: Surface "shader" "uniform float" [ 10 ]
      I haven't found how to do this.
      Because if I remember RiDeclare declares parameter in global scope(?)

      Cheers

       
    • Cedric PAILLE

      Cedric PAILLE - 2005-05-26

      Surface "shader" "uniform float Ka" [ 10 ]
      Sorry!

       
    • Matthias Baas

      Matthias Baas - 2005-05-26

      Yes, you can use inline declarations anywhere where parameter lists are allowed, it's not bound to specific commands.

      So a call to RiSurface("shader", "uniform float Ka", 10) should do (even though in this case the declaration wouldn't be necessary as Ka is already predeclared).

      - Matthias -

       
    • Cedric PAILLE

      Cedric PAILLE - 2005-05-30

      Many thanks Matthias, your cg toolkit is really great!!

      Cheers.

       

Log in to post a comment.

MongoDB Logo MongoDB