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

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.

How do you import vrscene? With python also? It worked out with the same script in my test.

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

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.

ok thanks for explanation !