Announcement

Collapse
No announcement yet.

Problem setting "output_rawFileName" in maxscript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem setting "output_rawFileName" in maxscript

    I'm trying to set the "renderers.current.output_rawFileName" via maxscript but am running into problem I just can't get around. Whenever I try to set it to a path that has a "\t", such as "C:\Documents and Settings\testFolder\test.vrimg", instead of the "\t" I'm getting a tab (blank spaces) which obviously screws up the path. Not using folders or files that start with a lowercase 't' is not an option as it could be anything depending on how the project or filenames are setup (I'm actually trying to save and then later restore the raw filename)

    How can I workaround this issue? Is it a problem with max and maxscript in general or something particular to the vray variable?
    www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

  • #2
    Hello,
    I think it's a maxscript issue. In fact, it is not an issue, it's the usual way. the "\" is a "pass character", it is used to pass a special character behind him. ie :
    \t = tab
    \n = return
    ...

    in your case you need the "\" to pass itself. So your filename should look like that:
    "C:\\Documents and Settings\\testFolder\\test.vrimg"

    Best;

    JF
    Vanilla Seed

    Comment


    • #3
      Thanks. I just discovered that as well about the escape characters ("\t, \n,\\, etc) which is a total PITA for what I need to do. The problem with your suggestion is that I'm trying to store the existing filname and path in a string and then replace it back in. Once the '\t' goes into the string there seems to be no way of getting it out. I've tried using a "findstring" and "replace" to replace the '\' with '\\' but once the escape character is in place it looks like it's already chnaged it in the string to a tab. Anyone got any ideas how to get around this?
      www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

      Comment


      • #4
        I'm not sure to understand your needs. Sometimes you need to put four "\" to write and then read back the string.
        Otherwise, you can also replace all your "\" by "/" whicch is not a by pass character, this could be easiest.

        Best

        Comment


        • #5
          I'm not sure exactly what my problem was but everything seems to be working fine in the script now. I kept trying different code at the part of the script where the value is stored and then recalled and it seems to be working now although I'm not sure exactly what I changed that corrected it. At least I learned about the "\" characters for next time. Thanks for your help though.
          www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

          Comment

          Working...
          X