Convert Proxy to mesh

VRay 7.4

There are a large number of VRayProxy objects in the scene, and these VRayProxies are displayed as bounding boxes (BBOX). When batch-converting them using the following code, the resulting meshes end up being simple boxes.

for p in vrayproies do (
-- change to whole object mode

p.display = 4 

-- convert to mesh

convertToMesh p
)

Hey there,

Thanks for reaching out!

Can we please clarify a couple of things? This appears to be MaxScript - am I correct? Would it be possible to share the entire script so our colleagues can reproduce and report for the developers?

Best regards!

I’d also suggest keeping a copy of the original scene or mesh before converting anything. It’s really handy if you need to go back and make edits later, especially since proxies are meant more for performance than editing.

You are using the 3ds Max native convertToMesh(), which is expected to create a box (bbox of the VRayProxy itself).

You need to use our own vrayMeshImport function instead.

When using vrayMeshImport() , the following code fails to import assets.

However, executing vrayMeshImport $ successfully imports the currently selected objects.

proxies = for o in objects where classof o == VRayProxy collect o

for o in proxies do 	
(
print o	
-- can't import mesh
-- but vrayMeshImport $ can import current selected object
newmesh = vrayMeshImport o
)

Correct. Here’s what’s written in the docs: