How to call Xgen symmetric tool code

How to call Xgen symmetric tool code

2368457978
Enthusiast Enthusiast
380 Views
0 Replies
Message 1 of 1

How to call Xgen symmetric tool code

2368457978
Enthusiast
Enthusiast

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?08eb15ae6501fa4ec7595dd8281c08b.png

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))				​
0 Likes
381 Views
0 Replies
Replies (0)