[Maya-Python] Re: How to remove an MNodeMessage

2015-12-18 Thread Balazs Pataki
Hey Michael, I still use the 1.0 Python API in Maya 2014 (maya.OpenMaya and not maya.api.OpenMaya since it's very limited doesn\'t have MNodeMessage etc) and it works perfectly. You should check it out with it. On Wednesday, December 16, 2015 at 4:25:26 AM UTC+1, Michael Boon wrote: > > Hi all,

Re: [Maya-Python] MPxNode Plug-in Crashing Maya

2017-11-06 Thread Balazs Pataki
You are incorrectly creating matrix attributes: eg.: The input matrix is created as > TransformHistory.matrixInputAttribute = matrixAttributeFn.create( > 'inMatrix', 'inMatrix', om.MFnMatrixData.kMatrix) but it should be > TransformHistory.matrixInputAttribute = matrixAttributeFn.create( > '

[Maya-Python] Re: python list sorting issue

2017-11-06 Thread Balazs Pataki
You could also try this, which is a bit more pythonic, also faster. def re_sort(to_sort): > # we need those zeroes so we check how many of them we have > nr_of_zeroes = to_sort.count(0) > # list comprehension that gets rid of zeroes > filtered = [item for item in to_sort if item !=

[Maya-Python] Re: Printing to console from custom node while playback or timeline scrubbing.

2017-11-10 Thread Balazs Pataki
This is due to the evaluation manager. If you switch to DG instead of Parallel, you will see that it will work. Ok, so how should we go around not limiting ourselves to DG evaluation only? The problem is the printing into the script editor, instead, you could log into the Output Window with sys._

Re: [Maya-Python] Re: python list sorting issue

2017-11-10 Thread Balazs Pataki
dict_compr = {letter : random.randint(0, 10) for letter in string. ascii_lowercase} sorted_by_values = sorted(dict_compr.iteritems(), key=operator.itemgetter(1 )) On Monday, November 6, 2017 at 7:47:27 PM UTC+1, Justin Israel wrote: > > > > On Tue, Nov 7, 2017, 4:58 AM Balazs Pataki &

[Maya-Python] Re: Printing to console from custom node while playback or timeline scrubbing.

2017-11-10 Thread Balazs Pataki
No need for always on top, 2-3 monitors or just scale the windows :P If you can provide an example maybe we could figure something out. On Friday, November 10, 2017 at 12:51:06 PM UTC+1, Simone Tartaglia wrote: > > Thanks Michael and Balazs, > I liked the logger option as it's faster and better t