[Maya-Python] How to change the text color of an item in a QListWidget?

2016-09-20 Thread Juan Tigreros
Hi everyone! Perhaps this is a simple question but I can seemed to succeed at googling it. Maybe someone here can help? I would like to change the text color of a text or background color if the item in a qlistwidget? I am double clicking on an item and will like to change the color of it, th

Re: [Maya-Python] How to change the text color of an item in a QListWidget?

2016-09-20 Thread Justin Israel
On Tue, 20 Sep 2016, 8:54 PM Juan Tigreros wrote: > Hi everyone! > > Perhaps this is a simple question but I can seemed to succeed at googling > it. Maybe someone here can help? > > I would like to change the text color of a text or background color if the > item in a qlistwidget? I am double cli

[Maya-Python] Re: How to change the text color of an item in a QListWidget?

2016-09-20 Thread Juan Tigreros
Thanks for the quick response Justin. First, I should mention that I am fairly new to this. With that said, here is what im trying to do. def doubleClickedItem(self): """for when an item is double clicked """ theListWidget = self.sender() currentItem = theListWidget

Re: [Maya-Python] Re: How to change the text color of an item in a QListWidget?

2016-09-20 Thread Alok Gandhi
Take a loot at the pyside docs here: https://srinikom.github.io/pyside-docs/contents.html You can also use `PySide.QtGui.QWidget.setStyleSheet(styleSheet)` to update the colors. For capturing double click, another approach would be apply an even filter: def clickable(widget): """Re implemen

Re: [Maya-Python] Re: How to change the text color of an item in a QListWidget?

2016-09-20 Thread Justin Israel
I've thrown together an example here: https://gist.github.com/justinfx/5926db12d275737e5eb66c7bf7e77e93 QListWidget lets you connect to a double click signal which hands you the item that was double clicked. >From there it is trivial to toggle the color as needed. Justin On Tue, Sep 20, 2016 at

[Maya-Python] Maya API MEvent

2016-09-20 Thread Rémi Deletrain
Hi everyone, It's possible to get MEvent of panel ? I try to get mouse clic out of MpxContext / draggerContext / Qt. Maya have this MEvent for move, rotate camera, select, etc etc But it's impossible to get this event ?! ... -- You received this message because you are subscribed to the G

[Maya-Python] Re: How to change the text color of an item in a QListWidget?

2016-09-20 Thread Juan Tigreros
Thanks Justin!!! This was the missing piece. :) I truly appreciate the help. On Tuesday, September 20, 2016 at 10:54:50 AM UTC+2, Juan Tigreros wrote: > > Hi everyone! > > Perhaps this is a simple question but I can seemed to succeed at googling > it. Maybe someone here can help? > > I would l

[Maya-Python] getAttr of fileTextureName on an image sequence doesn't return wildcards

2016-09-20 Thread Lidia Martinez
I need to modify the path set for an image sequence on a texture file. First, when I try to get the path using getAttr, instead of having the same string in the field: path_to_files_.iff I get the first file of the sequence instead: path_to_files_0001.iff I suppose this is a bug in Maya?... T

[Maya-Python] Re: getAttr of fileTextureName on an image sequence doesn't return wildcards

2016-09-20 Thread Lidia Martinez
Just as a follow up. Maya does this on the background when you activate image sequences: import maya.app.general.fileTexturePathResolver maya.app.general.fileTexturePathResolver.getFilePatternString('C:/texture.0001.iff', True, 0) # Result: 'C:/texture..iff' But it doesn't tell you what it does,

Re: [Maya-Python] mayapy playblast

2016-09-20 Thread Fredrik Averpil
synColor Oh the memories …of segfault. Anyway, this is something I’ve wanted to know for a while; is it possible to switch to “legacy” from commandline somehow, prior to launching Maya or maya.standalone? (sorry for possibly derailing the thread) ​ On Mon, Sep 19, 2016 at 7:42 AM Geordie Martine

[Maya-Python] Better way to select a object by it's verts?

2016-09-20 Thread I73
selectedObject = cmds.ls( selection=True) dagObject = selectedObject[0].split('.')[0] cmds.select(dagObject) Currently I am able to return the dag object by using a split method, is there a cleaner way of doing this? -- You received this message because you are subscribed to the Google Groups

[Maya-Python] succesfully adding to PYTHONPATH using Maya.env

2016-09-20 Thread stephenkmann
Has anyone been able to get the maya.env to add to an existing PYTHONPATH ? adding the MAYA_SCRIPT_PATH is as easy as MAYA_SCRIPT_PATH = %MAYA_SCRIPT_PATH%, c:/myWwnDir but doing the same with PYTHONPATH doesn't appear to be working. PYTHONPATH = %PYTHONPATH% , c/myOwnDir/ ( does not add to

Re: [Maya-Python] Better way to select a object by it's verts?

2016-09-20 Thread Marcus Ottosson
Have a look at passing objectsOnly=True to the ls() function. > On 20 Sep 2016, at 21:14, I73 wrote: > > selectedObject = cmds.ls( selection=True) > dagObject = selectedObject[0].split('.')[0] > cmds.select(dagObject) > > Currently I am able to return the dag object by using a

Re: [Maya-Python] Better way to select a object by it's verts?

2016-09-20 Thread Wesley Keeling
Unfortunately that does not work. Sorry, I should have explained a little further. I need to start with selected objects verts from there I would like to grab the dag object from it's verts. On Tue, Sep 20, 2016 at 1:27 PM, Marcus Ottosson wrote: > Have a look at passing objectsOnly=True to the

Re: [Maya-Python] Better way to select a object by it's verts?

2016-09-20 Thread Marcus Ottosson
Hm, that should work. Here’s an example that works for me in Maya 2016. cmds.file(new=True, force=True) cmds.polyCube() cmds.select("pCube1.vtx[0]") dag_object = cmds.ls(sl=True, objectsOnly=True) cmds.select(dag_object) ​ -- You received this message because you are subscribed to the Google Gr

[Maya-Python] Re: succesfully adding to PYTHONPATH using Maya.env

2016-09-20 Thread Robert White
Usually the path separator is ; not , Not sure if that is the potential problem here or not. I've stopped using the Maya.env file, and instead do any environment variable setup in a maya module definition file. Some links: http://docs.autodesk.com/MAYAUL/2013/ENU/Maya-API-Documentation/index.html

Re: [Maya-Python] Better way to select a object by it's verts?

2016-09-20 Thread Wesley Keeling
FFS I don't know why it did not work the first time but yes that did it. Thanks so much!!! dagObject = cmds.ls( selection=True, objectsOnly=True) cmds.select(dagObject) On Tue, Sep 20, 2016 at 1:45 PM, Marcus Ottosson wrote: > Hm, that should work. Here’s an example that works for me in Maya 20

Re: [Maya-Python] Better way to select a object by it's verts?

2016-09-20 Thread Marcus Ottosson
Don't mention it, glad it worked!​ -- 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+unsubscr...@googlegroups.com. To vi

Re: [Maya-Python] getAttr of fileTextureName on an image sequence doesn't return wildcards

2016-09-20 Thread Justin Israel
On Wed, Sep 21, 2016 at 1:11 AM Lidia Martinez wrote: > > I need to modify the path set for an image sequence on a texture file. > First, when I try to get the path using getAttr, instead of having the > same string in the field: > > path_to_files_.iff > > I get the first file of the sequence ins

[Maya-Python] Issues with getting the root node of the hierarchy based on selection

2016-09-20 Thread yann19
Hi all, I need some help with this function of mine. Suppose I have the following hierarchy as seen in the attachment. Assuming that everything in that attachment is of custom nodes (I used locators, groups etc. for easy visual, i hope) and I am trying to grab the Root Node in which its type is 's

Re: [Maya-Python] Issues with getting the root node of the hierarchy based on selection

2016-09-20 Thread Justin Israel
> I got the issue, where if I select only 1 pCube#, and it returns nothing, > though it seems to be working if I only select 1 Root Node > While that is one of the issue, can someone kindly guide me if I am > writing my code correctly? > I could see why this might happen. The first thing you do is

Re: [Maya-Python] Qt.py and .ui files

2016-09-20 Thread Marcus Ottosson
Ok, we’ve made an alpha version of this to test with. If you’re interested in compiling Qt Designer files for use across bindings, your help would be most appreciated. The rule is, .ui files are first compiled with the PySide2 compiler, and then converted to Qt.py. $ pip install Qt.py $ pyside2-u