Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Xgen Python disable a Modifier

Xgen Python disable a Modifier

landonjpginn
Participant Participant
2,040 Views
4 Replies
Message 1 of 5

Xgen Python disable a Modifier

landonjpginn
Participant
Participant

Hello, 
I have been looking throught the API and all the source code and I cannot find any way to disable a listed Modifier for my XGen description. 

If i use xg.fxModule( palette, description) it lists the one i want to disable ("BakedGroomManager")
But how do I access the ability to set its state to Active?

xg.setActive(palette, description, 'BakedGroomManager', False)  Does not work.

and while I can run 
xge.removeFXModule(palette, description, 'BakedGroomManager')
I do not want to delete the fxModule. Only set it to inactive.

Any help will be greatly appreciated.


0 Likes
Accepted solutions (1)
2,041 Views
4 Replies
Replies (4)
Message 2 of 5

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

I think you could refer to activeClicked function at xgui/tabs/xgFXStackTab.py

 

isChecked = ( item.checkState() == QtCore.Qt.Checked ) 
xgg.DescriptionEditor.setAttrCmd( str(item.text()), "active", xg.boolToString( isChecked ) )
xgg.DescriptionEditor.playblast()
xgg.DescriptionEditor.fxStackTab.getCurrentStackUIWidget().activeUpdate()

It should be the way how xgen active/deactives its module.

 

Yours,

Li

 

0 Likes
Message 3 of 5

Anonymous
Not applicable

 

Untitled.png

0 Likes
Message 4 of 5

Anonymous
Not applicable

How do I hit those buttons with Python? Disabling preview is no good to me if I can only do it in the UI.

0 Likes
Message 5 of 5

awu2500
Enthusiast
Enthusiast

xg.setAttr('active', str(0), palette, description, modifier)

0 Likes