Announcement

Collapse
No announcement yet.

Post translate Python Script and imported .vrScene

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

  • Post translate Python Script and imported .vrScene

    Hello,

    I am looking for a way to make some change ( a simple string replacement )to a .vrscene imported via the new VRaySceneManager.
    But is seems that Post translate Python Script does not affect it.
    The goal is to be able to change some strings in bitmap buffer in order to change path files if needed and replace current texture (jpg, tga, png...) by .tx one.
    I am working on maya 2016 vray3.3

    the little script i wrote , who work for files in maya , but not with .vrscene imported
    Code:
    from vray.utils import*
    
    b=findByType("BitmapBuffer")
    for each in b :
    	bs=each.get("file")
    	new=bs.replace("Z:","X:")
    	each.set("file",new)
    Let me know if i am missing something.

  • #2
    How do you import vrscene? With python also? It worked out with the same script in my test.
    V-Ray/PhoenixFD for Maya developer

    Comment


    • #3
      I import vrscene via the gui,(create/Vray/VRayScene Manager)

      Comment


      • #4
        It will not work in this way, since the python post translate doesn't have access to this scene. If you are using it just for the preview, you can disable it, and use python's "addSceneContent" function to actually import the scene.
        V-Ray/PhoenixFD for Maya developer

        Comment


        • #5
          ok thanks for explanation !

          Comment

          Working...
          X