Message 1 of 1
How to call Xgen symmetric tool code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, everyone, I want to move Xgen tool to my script, but when I call Symmetry Tool again, I will report an error that I have not defined Python. What should I do?
import xgenm.ui as xgui
from functools import partial
groomVis = 1;
def xPreviewGroom(*args):
global groomVis
if groomVis == 1:
xgui.createDescriptionEditor(False).preview(False)
groomVis = 0
return groomVis
if groomVis == 0:
xgui.createDescriptionEditor(False).preview(True)
groomVis = 1
return groomVis
def xAddGuides(*args):
cmds.XgGuideTool()
def xgmFlipGuides(*args):
xgui.createDescriptionEditor(False).currentDescription()
def xMoveGuides(*args):
xgui.createDescriptionEditor(False).guideSculptContext(False)
def xVisGuides(*args):
xgen.toggleGuideDisplay(xgui.createDescriptionEditor(False).currentDescription())
cmds.iconTextButton( style='iconOnly', w=65, image1='xgPreview.png', label='Preview Groom', c=partial(xPreviewGroom))
cmds.iconTextButton( style='iconOnly', w=65, image1='xgGuideContext.png', label='Add Guides', c=partial(xAddGuides))
cmds.iconTextButton( style='iconOnly', w=65, image1='xgGuideSculptTool.png', label='Move Guides', c=partial(xMoveGuides))
cmds.iconTextButton( style='iconOnly', w=65, image1='xgToggleGuide.png', label='Show Hide Guides', c=partial(xVisGuides))
cmds.iconTextButton( style='iconOnly', w=65, image1='xgFlipGuides.png', label='Mirror Guides X-axis', c=partial(xgmFlipGuides))