Announcement

Collapse
No announcement yet.

Calculating VRayProxy bounding box in MayaBatch

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

  • Calculating VRayProxy bounding box in MayaBatch

    Hi, I'm calculating the bounding box of VRay proxies as part of a thumbnail creation process. This works fine in Maya as long as the geo is displayed, using:
    cmds.polyEvaluate(meshNode, boundingBox=True)
    But when the process runs in Maya batch, the bounding box returns as empty. I guess this is because in Maya batch it dosn't generate the Maya geo or something?

    Does anyone know a better way of getting the bounding box, maybe directly from the proxy or something?

    Thanks

  • #2
    Excuse the delayed answer. Indeed the geometry is not loaded for preview in Maya Batch, however, setting the proxy's 'Geometry to load' type to 'Maya mesh' should output correct bounding box coordinates.

    Example script:

    Code:
    polyMesh = maya.cmds.vrayCreateProxy(node='mesh_vraymesh', existing=True, dir='E:\\Proxies\\3333.vrmesh', createProxyNode=True)
    
    print polyMesh
    
    cmds.setAttr("mesh_vraymesh_vraymesh.geomType", 3)
    
    print cmds.polyEvaluate(polyMesh, b=True)
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Hi Alexandar, sorry I've only just had the chance to test this out and indeed this solution works. thanks a lot!

      Comment

      Working...
      X