Maybe you would need to keep a record of the last objects you had changed and their previous setting. Then each time the condition fires, you would reset all of the last objects that aren't in the current selection.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/cb1e5b7e-b8a7-45fe-ae71-1e6af723ce11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2HtiOy7R5Fo6vQVsFa37NnSZ%2BTovYb%2BSBM3eOjZ-QHnA%40mail.gmail.com.
Is this for a rig? E.g. animators select part of the mesh for visual feedback? It's actually quite cool, but sadly I've only seen this used once before. 8 years ago, in The Art Of Rigging by Cg Toolkit.Their site is down, but they go through how they do it on one of their dvd, possibly vol 1. Maybe that could help. And if not, the series is amazing and should be viewed anyway.
On 8 October 2014 01:21, Justin Israel <justin...@gmail.com> wrote:
Maybe you would need to keep a record of the last objects you had changed and their previous setting. Then each time the condition fires, you would reset all of the last objects that aren't in the current selection.
On 8/10/2014 8:32 AM, "Aren Voorhees" <are...@gmail.com> wrote:
Hey All, I'm trying to use pymel to create a scriptJob that will assign a particular material to whatever object(s) you have selected. When you select something else, I need the previously selected objects to switch back their original material. Making it assign a material based on selection was not too hard, but I haven't been able to figure out how to re-assign the original material once the object is no longer selected. Thanks for any help!--from pymel.core import *def assignBlueMatFn():curSel = ls(sl=True)for i in curSel:hyperShade(i, assign='Blue_MAT')scriptJob(event=['SelectionChanged', 'assignBlueMatFn()'])
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/cb1e5b7e-b8a7-45fe-ae71-1e6af723ce11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2HtiOy7R5Fo6vQVsFa37NnSZ%2BTovYb%2BSBM3eOjZ-QHnA%40mail.gmail.com.