Hi guys. I'm pretty new to the SDK, sorry in advance if this has been discussed already.
Using python, I am looking at loading a main vrscene containing instances of VRayScene's, where each included scene can contain other scenes and so on. The main and the included scenes contain BitmapBuffer nodes, of which I am interested in getting the filenames and possibly change them before rendering.
So, ideally, upon a scene load, I'd like to have a flattened representation of the entire scene, over which I could iterate all the bitmaps.
All the VRayScene's have the preload_assets flag enabled, however I can't get the desired behaviour. After loading the main scene, only the bitmaps in the main scene itself get discovered by my script:
Is there a way to work around this behaviour ?
Thankyou.
Stefano Jannuzzo
Using python, I am looking at loading a main vrscene containing instances of VRayScene's, where each included scene can contain other scenes and so on. The main and the included scenes contain BitmapBuffer nodes, of which I am interested in getting the filenames and possibly change them before rendering.
So, ideally, upon a scene load, I'd like to have a flattened representation of the entire scene, over which I could iterate all the bitmaps.
All the VRayScene's have the preload_assets flag enabled, however I can't get the desired behaviour. After loading the main scene, only the bitmaps in the main scene itself get discovered by my script:
Code:
... with vray.VRayRenderer() as renderer: renderer.renderMode = 'production' renderer.load(os.path.join(SCENE_PATH, 'main_scene.vrscene')) instances = renderer.classes.BitmapBuffer.getInstances() # instances will not include the bitmaps in the included vrscenes ...
Thankyou.
Stefano Jannuzzo
Comment