[Maya-Python] Re: MArrays and undoing in Python API 2.0

2018-11-08 Thread dur
Hey! Sorry I didn't notice the response, I ended up doing it by essentially using the setcolors, and setting the colorset, but this is really a great answer! And much less code. On Thursday, October 11, 2018 at 1:44:24 AM UTC+2, mjlefevre wrote: > > > Hi dur, > > This works for m

[Maya-Python] Re: MArrays and undoing in Python API 2.0

2018-10-10 Thread dur
'setColor' means only giving an MColorArray and optionally a colorset. So since you don't need an explicit reference to the verts, I would suspect the issue lies somewhere there. On Tuesday, October 9, 2018 at 1:40:58 PM UTC+2, dur wrote: > > Hello, > > So I have been quite stuck

[Maya-Python] Re: MArrays and undoing in Python API 2.0

2018-10-10 Thread dur
lors and not faceVertexColors. My logic says if I use a getVertexColors, I have an array of MColors for each vertex, which shouldn't upset anything with faceVertexColors, but I've tried a bunch of things to get this working without luck, so my logic is failing me. On Tuesday, October 9, 2018

Re: [Maya-Python] MArrays and undoing in Python API 2.0

2018-10-09 Thread dur
ng with a `MObjectHandle` > and checking it's `isAlive` prior to using it? > > On Tue, 9 Oct 2018 at 12:41, dur > wrote: > >> Hello, >> >> So I have been quite stuck on a problem in regards to Maya crashing when >> I undo. >> More specifically,

[Maya-Python] MArrays and undoing in Python API 2.0

2018-10-09 Thread dur
Hello, So I have been quite stuck on a problem in regards to Maya crashing when I undo. More specifically, it will crash on second, third or fourth undo. So the undo step *can* work. def doIt(self, args): self.parseArguments(args) sel = om.MGlobal.getActiveSelectionList() __, vertices =

[Maya-Python] Asset Browser with dynamic UI - Creating a new scene breaks UI

2018-09-06 Thread dur
Hello all! So I'm creating an asset browser to filter folders and fbx files, using native Maya UI. I'm basically listing folders and files in a path as buttons, and assigning partial functions to each. Jumping between directories works just fine, as I initially run the script from the Script