Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show only
|
Search instead for
Did you mean:
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service.Translate
Submitted byAnonymouson02-12-201906:53 AM
Status:
Accepted
wireframe opacity
I really need to turn down wireframe opacity so it’s slightly transparent, especially when im working with lidar scanned sets and matching meshes on plates.
While the feature is documented and available under "Set wireframe transparency," I needed a dedicated tool in my workflow to quickly toggle between 0.25 and 1 alpha. Therefore, I created this Python script, which you may find useful.
import maya.cmds as cmds
import maya.mel as mel
def set_polymesh_dormant_alpha(alpha):
current_color = cmds.displayRGBColor('polymeshDormant', query=True)
cmds.displayRGBColor('polymeshDormant', current_color[0], current_color[1], current_color[2], alpha)
mel.eval("updateColorPrefUI()")
def create_alpha_control_ui():
if cmds.window("alphaControlWin", exists=True):
cmds.deleteUI("alphaControlWin")
cmds.window("alphaControlWin", title="Polygon Alpha Control", widthHeight=(200, 100))
cmds.columnLayout(adjustableColumn=True)
cmds.button(label="Set Alpha to 1.0", command=lambda _: set_polymesh_dormant_alpha(1.0))
cmds.button(label="Set Alpha to 0.25", command=lambda _: set_polymesh_dormant_alpha(0.25))
cmds.showWindow("alphaControlWin")
create_alpha_control_ui()