Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

xray doesn't work

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
301 Views, 0 Replies

xray doesn't work

this is my code

 

import maya.cmds as cmds


Difference = cmds.ls ( sl = True, tl = 1)
BoundingBox = cmds.xform ( Difference, q = True, bb = True );
cmds.polyBoolOp ( op = 2, n = 'Difference' );
BoundingBoxLocation = cmds.xform ( Difference, wd = True, q = True, t = True );
BoundingBoxWidth = BoundingBox[3] - BoundingBox[0]
BoundingBoxHeight = BoundingBox[4] - BoundingBox[1]
BoundingBoxDepth = BoundingBox[5] - BoundingBox[2]
LiveBox = cmds.polyCube ( w = BoundingBoxWidth, h = BoundingBoxHeight, d = BoundingBoxDepth );
cmds.move ( BoundingBoxLocation[0], BoundingBoxLocation[1], BoundingBoxLocation[2], LiveBox, absolute = True );
cmds.displaySurface ( x = True )

 

Everything works except the xray

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report