Re: [Maya-Python] Industry "standard" nomenclature for environment configuration

2014-08-22 Thread Justin Israel
I just call that entire bit the "environment". As in, "baking out the environment when sending the job to the render farm". That, or "context". "A shot can be run on the render farm under the same environment / context as it was submitted " But yea, whatever doesn't conflict with your existing t

Re: [Maya-Python] Re: How to create stacked QDockWidgets

2014-08-22 Thread Justin Israel
You can keep using the tabify method to switch the order of the tabs. tabifyDockWidget(under, over) import random class MainWin(QtGui.QMainWindow): def __init__(self): super(MainWin, self).__init__() prev = None for i in xrange(5): d = QtGui.QDockWidget("D

Re: [Maya-Python] Re: How to create stacked QDockWidgets

2014-08-22 Thread Justin Israel
> > -- > David Martinez - Technical Animator > > Email: david.martinez.a...@gmail.com > Website: http://www.elusiveideas.com > > > > > On Fri, Aug 22, 2014 at 10:11 PM, Justin Israel > wrote: > >> You can keep using the tabify method to switch the ord

Re: [Maya-Python] Re: How to create stacked QDockWidgets

2014-08-23 Thread Justin Israel
>bar instead of having to implement my own? > > > I'm learning a lot with your responses. > Thanks a lot! > > > -- > David Martinez - Technical Animator > Email: david.martinez.a...@gmail.com > Website: http://www.elusiveideas.com > > > > > On

Re: [Maya-Python] Re: How to create stacked QDockWidgets

2014-08-25 Thread Justin Israel
ot for your reply and your explanations Justin. > > > -- > David Martinez - Technical Animator > > Email: david.martinez.a...@gmail.com > Website: http://www.elusiveideas.com > > > > > On Sat, Aug 23, 2014 at 11:22 PM, Justin Israel > wrote: > >>

Re: [Maya-Python] List the members of a shading group.

2014-08-25 Thread Justin Israel
mat_list = cmds.ls(mat=True, sl=True)for mat in mat_list: sg_list = cmds.listConnections(type='shadingEngine') for sg in sg_list: member_list = cmds.sets(sg, q=True) if not member_list: continue for member in member_list: print member ​

Re: [Maya-Python] List the members of a shading group.

2014-08-25 Thread Justin Israel
tType(member, isType='mesh'): > print('mesh and face') > > Cheers, > Johan > > > > On Monday, August 25, 2014 11:20:17 AM UTC+2, Justin Israel wrote: > >> mat_list = cmds.ls(mat=True, sl=True)for mat in mat_list: >> sg_lis

Re: [Maya-Python] List the members of a shading group.

2014-08-26 Thread Justin Israel
Naw I would give it much more credit than a "micro-optimization". It is definitely better to leave the selection list as it is, if you can help it, in addition to getting a bump for not having to change it :-) Thanks! On Tue, Aug 26, 2014 at 7:50 PM, Roy Nieterau wrote: > Just to add on top of

Re: [Maya-Python] How can you add maya's color picker UI into a pyside tool?

2014-09-03 Thread Justin Israel
Do you specifically not want to use the Qt QColorDialog? http://qt-project.org/doc/qt-4.8/qcolordialog.html There isn't anything stopping you from using the Maya colorEditor if you really want that specifically: http://download.autodesk.com/global/docs/maya2014/en_us/CommandsPython/colorEditor.htm

Re: [Maya-Python] || Sr. PL/SQL - BO- Java/ Jquery/Ext JS Developer || TX- NY

2014-09-03 Thread Justin Israel
Also, I am not sure this posting has much to do at all with the focus of this group. It appears to be a somewhat random job posting. On Thu, Sep 4, 2014 at 9:55 AM, Kurian O.S wrote: > NICE TO HAVE SKILLS: > > · Mortgage Banking Experience - Must. > > What you mean by "must" under -NICE

Re: [Maya-Python] Begin

2014-09-03 Thread Justin Israel
Hi, You might find this section of the Maya documentation helpful: File Path Variables In a nutshell though, the scripts location is for MEL files, an

Re: [Maya-Python] shiboken type error

2014-09-04 Thread Justin Israel
What about print statements along the way of the script to test as it is running? Does it do this on more than one machine? On 5/09/2014 2:55 AM, "Todd Widup" wrote: > # TypeError: You need a shiboken-based type. # > > I get this on EVERY pySide window that I try to launch on one machine. I >

Re: [Maya-Python] shiboken type error

2014-09-04 Thread Justin Israel
ystem. like I said, I have ran > it line by line and actually verified before that wrapInstance call if its > a shiboken type and it is. > > so at this point, I have to assume its a conflict on my workstation with > something else in python in maya, but I cant track down anything else

Re: [Maya-Python] || SharePoint Lead with 2013 - System Analyst || Washington, DC- Hendon, VA

2014-09-04 Thread Justin Israel
Banning in progress. On Fri, Sep 5, 2014 at 9:34 AM, Deepak Kaushik wrote: > *Job Position:- SharePoint Lead with 2013* > > Location: Washington, DC > > Duration:- Long Term > > Exp.:- 8+ years > > > > *SKILLS NEEDED:* > > > > · Must have experience in

Re: [Maya-Python] Prompt a UI when a certain format is imported

2014-09-05 Thread Justin Israel
Might help to check the docs http://download.autodesk.com/global/docs/maya2012/en_us/CommandsPython/fileDialog2.html Return value: string array Copy and paste is only going to get you so far. One operation/paste may lead into the next problem if you don't fully understand what the code does and r

Re: [Maya-Python] Segmentation Fault Catch

2014-09-05 Thread Justin Israel
Hey Kurian, I'm not clear on this from your code example, but are you using the multiprocessing module from within Maya? Your example indicates that it is a standalone script. First, I don't think it is safe to use the multiprocessing module within Maya, since forking is not a very safe thing to d

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-05 Thread Justin Israel
Hey, You might find the easiest approach is just using a stylesheet: http://qt-project.org/doc/qt-4.8/stylesheet-examples.html#customizing-qlistview It lets you use the "hover" state for items. I'm guessing with your current solution, the color will stay the same if you move your mouse out of th

Re: [Maya-Python] Segmentation Fault Catch

2014-09-05 Thread Justin Israel
Well if you want to stick with the multiprocessing module and just endure the possible seg faults and some files not getting processed, you could print a warning and then do a os._exit(1) to just terminate the process. Using subprocess, you could have your script take arguments, such as a -file fl

Re: [Maya-Python] Segmentation Fault Catch

2014-09-05 Thread Justin Israel
I am confusing you all > > Here is a snippet > > http://pastebin.com/J526ftrM > > I tried my max to explain :) > > > On Fri, Sep 5, 2014 at 4:30 PM, Justin Israel > wrote: > >> Well if you want to stick with the multiprocessing module and just endure >> the

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-05 Thread Justin Israel
Can you show a small example of how you are setting up your list and items and their background? I'm not sure what you mean when you say the stylesheet doesn't do anything to your system. If I set a background on the items in the list, and then use a stylesheet to control the hover, it seems to wor

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-06 Thread Justin Israel
You have a typo in your stylesheet: item:hover needs to be: QListView::item:hover Or if you are setting the stylesheet on the actual widget and want a relative reference (in which case you are), you can write: ::item:hover "::item" is one of the sub-control references: http://qt-project.org/do

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-06 Thread Justin Israel
That would be because there is only one background. First you set it to your image, and then you have it use a different background during a hover state. It doesn't have a separate layer just for overlays on the background. To achieve something like that, you might have to use a Q{Styled}ItemDelega

Re: [Maya-Python] Prompt a UI when a certain format is imported

2014-09-07 Thread Justin Israel
er 5, 2014 7:51:00 PM UTC+8, Justin Israel wrote: >> >> Might help to check the docs >> http://download.autodesk.com/global/docs/maya2012/en_us/ >> CommandsPython/fileDialog2.html >> >> Return value: string array >> >> Copy and paste is only going to get you

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-07 Thread Justin Israel
@Marcus, I believe based on the example code that a different image is meant to be used dynamically for each item. That is, unless I read the example wrong. @Bay, since you can only assign one delegate per row/column, you would need to have all of you conditions in that same delegate. Just be very

Re: [Maya-Python] Prompt a UI when a certain format is imported

2014-09-07 Thread Justin Israel
which >>> is *.chan* >>> Then as I implemented the bailed-out scenario and your code that you >>> have written, I got the same set of errors that I have posted previously >>> and I am not getting any statement etc. >>> >>> Still getting the unrecogn

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-07 Thread Justin Israel
On Mon, Sep 8, 2014 at 6:35 PM, Bay Gann Boon wrote: > Hi Marcus > thank you so much for taking the time to look at my > question and giving suggestions on how to resolve my problem! Just want to > let you know I've attempted some of your solutions and just want to let you > know

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-07 Thread Justin Israel
al on cmivfx? > Yea, in that cmiVFX PyQt video I used custom painting for a Gauge widget that draws progress > > Thank you > Gann Boon Bay > > On Sun, Sep 7, 2014 at 12:41 PM, Justin Israel > wrote: > >> @Marcus, I believe based on the example code that a different

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-08 Thread Justin Israel
You definitely don't want to be calling any of the begin* methods in this situation. I think what you are looking for it the save() / restore() methods: http://qt-project.org/doc/qt-4.8/qpainter.html#save That would let you first call save() and then make a bunch of changes to the painter setting

Re: [Maya-Python] Prompt a UI when a certain format is imported

2014-09-08 Thread Justin Israel
gt; a camera in maya itself. > > I will try and see if I can implement the code you have provided. > > Thank you! > > > On Monday, September 8, 2014 11:49:32 AM UTC+8, Justin Israel wrote: >> >> You are saying that your problem is not using the dialog and operati

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-09 Thread Justin Israel
I'm surprised you even had to call that. Normally that all should happen automatically. I wonder if you were painting outside of the rect area? If you paint larger than the rect in one situation and then not in another, you can get left over pixels not cleaned up until the surrounding areas get rep

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-10 Thread Justin Israel
Perfect! I am glad it ended up being what I had thought, since it didn't seem right that you needed to force updates. On Thu, Sep 11, 2014 at 8:46 AM, Bay wrote: > Hi Justin, > forgot to reply to this post. Turns out you were right , > it was left over pixels. I tried the code y

Re: [Maya-Python] maya dockControl problem

2014-09-12 Thread Justin Israel
What is annoying is that when you set the window into the dockControl, Maya changes a bunch of the parenting/path references for those existing controls in your window. So the path you stored, before having set the window into the dockControl, is no longer valid after the dockControl. But Maya does

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-14 Thread Justin Israel
You shouldn't be using both a delegate and the cell widget feature. They both aren't meant to work together, as like you said, the widget is drawn on top of whatever is being painted in the cell. Either you use a delegate with a QAbstractItemView or subclasses, or you are using the special feature

Re: [Maya-Python] Re: PySide: initlal button state

2014-09-15 Thread Justin Israel
On 16/09/2014 6:06 AM, "damon shelton" wrote: > > These should be fine. The thing to look out for is what you are actually doing each time the event triggers your code. sometimes triggers can happen faster than you like and you can then use a qtimer to limit the minimum amount of time before a fun

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-15 Thread Justin Israel
Bay, do you want to email me directly, and we can continue this conversation offline, in greater detail? On Tue, Sep 16, 2014 at 9:26 AM, Bay wrote: > Hi Justin, >sorry to keep bothering you. It seems like the solution is > like you say to just use QStyledItemDelegate to do it.

Re: [Maya-Python] Re: Question on QlistWidgetItem leave event

2014-09-15 Thread Justin Israel
legate class like so: > > index.data(QtCore.Qt.DisplayRole) > > On Mon, Sep 15, 2014 at 2:34 PM, Justin Israel > wrote: > >> Bay, do you want to email me directly, and we can continue this >> conversation offline, in greater detail? >> >> >> On Tue, Sep 16, 2014 a

Re: [Maya-Python] Not able to detect the same existing window

2014-09-17 Thread Justin Israel
This code example looks like if the window exists, you delete it and then don't initialize a new one. Also I would recommend not using a constant for the window name, and instead saving the last window name returned from cmds.window as an instance attribute. That way you can always be sure you are

Re: [Maya-Python] Not able to detect the same existing window

2014-09-17 Thread Justin Israel
On 17/09/2014 10:44 PM, "likage" wrote: > > Do you mean to say, I should wrote it like this perhaps: > > def initialWindow(self, *args): > self.window = cmds.window(win_name, menuBar=True, iconName='.chanFileImport', widthHeight=(335, 221), sizeable=False) > Well you would have an initial

Re: [Maya-Python] Is pyMEL slower than MEL? Why PyMEL?

2014-09-18 Thread Justin Israel
I think there are valid points in that post. MEL is still fast, though annoying to write. PyMel is an abstraction over both the python commands and Maya API. And PyMel can be both it easier/shorter to write, and can be slower than the pure Python API. You would just need to explore these areas for

Re: [Maya-Python] How to modify the way the code is being read

2014-09-18 Thread Justin Israel
This looks like it should be pretty easy to narrow down, since it is obviously in the ReadObjCloud constructor. You read one line and print the first character. Is that a throw away line or are you accidentally advancing your file handle past the first line when you didn't meant to? Is the first c

Re: [Maya-Python] Re: component islands

2014-09-18 Thread Justin Israel
On 19/09/2014 11:20 AM, wrote: > > I suppose I've been put on ignore for mentioning xsi (i'm sorry, i'm sorry ;) ) > You haven't been put on ignore for any reason. I just think it's a matter of the the right person not yet having responded with an answer. > but if anyone is listening, I've taken

Re: [Maya-Python] How to modify the way the code is being read

2014-09-19 Thread Justin Israel
To be honest, that rewrite is doing a lot of strange things. You read the first character of the first line and loop over that single character string to see if it starts with 'v'. At that point you have burned the first line and won't process it. Then your processLine function actually loops ove

Re: [Maya-Python] How to modify the way the code is being read

2014-09-19 Thread Justin Israel
ld be a different case scenario... > Now I am totally lost... > > > On Friday, September 19, 2014 3:35:43 PM UTC+8, Justin Israel wrote: >> >> To be honest, that rewrite is doing a lot of strange things. >> >> You read the first character of the first line and loop ove

Re: [Maya-Python] How to modify the way the code is being read

2014-09-19 Thread Justin Israel
lly just dumps groups of types together > > All v together all vs together all f together mainly because most sections > refer to other sections by Id > On Sep 19, 2014 12:55 AM, "Justin Israel" wrote: > >> For now, just call self.fileHandle.seek(0) at the sta

Re: [Maya-Python][ANN] Pyblish 1.0 Alpha

2014-09-20 Thread Justin Israel
I've used Django as well and enjoyed it. But if you don't need an ORM or integrated template engine for your project, and all the bells and whistles, then Django can be a pretty heavy framework. The benefit of Flask is that it is a micro-framework, so you are just going to get the basics like the r

Re: [Maya-Python] pymel.internal.startup : ERROR : maya.standalone was successfully initialized, but pymel failed to import maya.cmds (or it was not populated)

2014-09-20 Thread Justin Israel
On Sun, Sep 21, 2014 at 8:33 AM, Mahmoodreza Aarabi wrote: > Can you give Full name of book? > or give any link of the page? > It was already mentioned in the first post: *Practical Maya Programming Book by Robert Galanakis* > > > On Sat, Sep 20, 2014 at 11:47 PM, Geordie Martinez < > geordiem

Re: [Maya-Python] Re: Compile C++ Plugin in Maya 2014

2014-09-20 Thread Justin Israel
Wow, interesting formatting On Sun, Sep 21, 2014 at 5:52 PM, Jeremy YeoKhoo wrote: > Ok I got it to build. Had a silly syntax error BUT. > > I now get this error maya: > // Error: file: C:/Program > Files/Autodesk/Maya2014/scripts/others/pluginWin.mel line 658: > initializePlugin function c

Re: [Maya-Python] api: functions sets vs. iterators

2014-09-21 Thread Justin Israel
Hey Kev, The official docs describe the API structure in detail, but in a nutshell... The basic object is an opaque handle, like an identifier, that can't do much of anything other than represent itself in memory. Then you have function sets which are decoupled from the object handles and group t

Re: [Maya-Python] installing external packages into Maya python

2014-09-22 Thread Justin Israel
Is there a reason you wouldn't prefer to just add an external path to your environments PYTHONPATH, as opposed to trying to install it into the application location? On Tue, Sep 23, 2014 at 9:51 AM, Todd Widup wrote: > hey, I am having a hell of a time with our setup getting this to work. > > Is

Re: [Maya-Python] installing external packages into Maya python

2014-09-22 Thread Justin Israel
, and Maya is not picking it up > > On Mon, Sep 22, 2014 at 3:16 PM, Justin Israel > wrote: > >> Is there a reason you wouldn't prefer to just add an external path to >> your environments PYTHONPATH, as opposed to trying to install it into the >> application locat

Re: [Maya-Python] draggerContext command helppeee!!

2014-09-23 Thread Justin Israel
Hey there, Your command is actually firing and the locator being created when your mouse button presses down, but you aren't seeing the viewport update to show the locator until you release the mouse. I'm guessing it is because a redraw is being blocked/postponed while the mouse down event is happ

Re: [Maya-Python] How to modify the way the code is being read

2014-09-23 Thread Justin Israel
need to modify the > style, then why not.. > > > > On Saturday, September 20, 2014 5:04:30 AM UTC+8, Justin Israel wrote: >> >> Here is a really quick generic example of parsing that file format: >> https://gist.github.com/justinfx/c49c4bd4acd872a8ad57 >> >&g

Re: [Maya-Python] How to modify the way the code is being read

2014-09-23 Thread Justin Israel
Not sure if I follow. Are you saying that you expected the constructor of the ObjProcessor class to immediately do all of the parsing work? If so, then the answer is that it is not supposed to do anything. A class constructor shouldn't implicitly have a bunch of side effects or start doing a bunch

Re: [Maya-Python] MHWRender

2014-09-25 Thread Justin Israel
It is possible that these classes are not exported to the Python bindings. Maybe they are C++ only? On Fri, Sep 26, 2014 at 3:58 AM, wrote: > Sorry Guys, I feel really stupid. But I can't figure this out. > > The docs say the new viewport 2.0 classes are under the namespace > MHWRender. sooo, ho

Re: [Maya-Python] difference between pymel selection and python selection

2014-09-26 Thread Justin Israel
The native Maya cmds module deals in terms of string paths as the identifiers. pymel is an abstraction layer that creates a node object with methods. On 27/09/2014 10:44 AM, wrote: > Hi there, > > can anyone tell me the difference between these two commands, one in pymel > and the other in pytho

Re: [Maya-Python] difference between pymel selection and python selection

2014-09-26 Thread Justin Israel
the two different approaches. But one is actually a unicode object and the other is am instance PyNode subclass. On Sat, Sep 27, 2014 at 10:49 AM, Justin Israel wrote: > The native Maya cmds module deals in terms of string paths as the > identifiers. pymel is an abstraction layer that cre

Re: [Maya-Python] difference between pymel selection and python selection

2014-09-27 Thread Justin Israel
Not anything that is exactly similar. You have the option of either working with the Python commands module, which mirrors the way MEL works, or you can use the Python API which mirrors how the C++ API works. PyMel is its own separate 3rd party abstraction. On 27/09/2014 9:29 PM, wrote: > oh wai

Re: [Maya-Python][ANN] Pyblish 1.0 Alpha

2014-09-29 Thread Justin Israel
I'm not familiar with Firebase, but I don't think it is the same thing as sqlAlchemy. sqlAlchemy is an ORM, which gives you an object-oriented abstraction around a database using models. It generates the raw queries for your specific driver, giving you a generic interface to multiple database drive

Re: [Maya-Python][ANN] Pyblish 1.0 Alpha

2014-09-29 Thread Justin Israel
A few of those illustrations you made are constructed oddly. There shouldn't be a database between your plugin and flask (and I am not sure that was implied as a suggestion)... On Mon, Sep 29, 2014 at 9:57 PM, Marcus Ottosson wrote: > I’m not familiar with Firebase, but I don’t think it is the s

Re: [Maya-Python][ANN] Pyblish 1.0 Alpha

2014-09-29 Thread Justin Israel
Flask instance running on a server within a > facility, and all of the client Pyblish libraries (through a plugin as you > mentioned) would make requests to the service. > > At least, that’s what I’d expect. > > Thanks, Justin. > > Best, > Marcus > ​ > > On 29 Se

Re: [Maya-Python][ANN] Pyblish 1.0 Alpha

2014-09-29 Thread Justin Israel
e to the clients > ​ > > On 29 September 2014 11:15, Justin Israel wrote: >> >> >> >> On Mon, Sep 29, 2014 at 11:00 PM, Marcus Ottosson wrote: >>>> >>>> A database doesn’t have to mean a big heavy beast that sits next to your application. &

Re: [Maya-Python] partitions project's database

2014-09-29 Thread Justin Israel
You are referring to this generic wiki about partitioned data, but are you specifically talking about MySQL as your target? The reason I ask is because some databases have built in concepts of sharding and routing. And also some databases may use row locking instead of table locking. Maybe it is be

Re: [Maya-Python] Grab text of the selection in QMenu

2014-09-30 Thread Justin Israel
Hey there, You want to get the camera that was selected from the QMenu? Then instead of connecting to the button click, you probably want to watch the signals on the actual QMenu, which will tell you exactly which action was selected. Here is a simplified version: def camMenu(self): allCams =

Re: [Maya-Python] Grab text of the selection in QMenu

2014-09-30 Thread Justin Israel
ardized my code style? > > > On Tuesday, September 30, 2014 3:58:48 PM UTC+8, Justin Israel wrote: >> >> Hey there, >> >> You want to get the camera that was selected from the QMenu? Then instead >> of connecting to the button click, you probably want to watch

Re: [Maya-Python] Grab text of the selection in QMenu

2014-09-30 Thread Justin Israel
You have complete freedom to clear the menu or add more items at any time, but there is no live binding between the number of cameras in the scene and the menu. You would need to update the menu instance based on some action or trigger On 30/09/2014 10:10 PM, "likage" wrote: > okay.. > > Just on

Re: [Maya-Python] partitions project's database

2014-10-01 Thread Justin Israel
lexible but at the same time the complexity is hidden from our day to day > tools/code :) > > > > > > > > > > > > > On Monday, 29 September 2014 18:47:56 UTC-7, Justin Israel wrote: >> >> You are referring to this generic wiki about partitioned data, but are

Re: [Maya-Python][ANN] Pyblish 1.0 Alpha

2014-10-02 Thread Justin Israel
I hear that term referred to as "bubble up". I suppose there are a few different scenarios depending on how you represent and manage your assets. If your assets capture and store the references to its dependencies in a version-specific way, then updating one dependency might trigger the others to n

Re: [Maya-Python] Grab text of the selection in QMenu

2014-10-02 Thread Justin Israel
You have a couple ways to go about it. Either your camMenu function gets called whenever you need to trigger an update, and it will replace the button menu with a new one. Or it can edit the same menu over and over. Or, you can create the menu once and connect it's aboutToShow signal to a function

Re: [Maya-Python] Load up PySide window and lock main Maya window behind it

2014-10-06 Thread Justin Israel
You can either set the modality setting as Marcus mentioned, or you can use exec_() instead of show() which automatically does a modal window and also blocks on the call until it is accepted or rejected. On 6/10/2014 10:46 PM, "Marcus Ottosson" wrote: > Hi Fredrik, > > This behaviour is called “

Re: [Maya-Python] Load up PySide window and lock main Maya window behind it

2014-10-06 Thread Justin Israel
I'm not sure I would consider activeWindow() the "holy grail" since it has circumstances where it will not return the Maya main window, depending on how your tool was launched. If it happens to be launched when the main window does not have focus, or if any other tools are running in top level wind

Re: [Maya-Python] Load up PySide window and lock main Maya window behind it

2014-10-06 Thread Justin Israel
Application.allWidgets())print > time.time() - start > > Whereas topLevelWidgets() takes ~0.002 seconds. > > start = time.time() > dict((w.objectName(), w) for w in QtGui.QApplication.topLevelWidgets())print > time.time() - start > > ​ > > On 6 October 2014 21:00,

Re: [Maya-Python] Grab text of the selection in QMenu

2014-10-07 Thread Justin Israel
menu did managed to get updated but there is a laggy-ness in it, where > I will need to press the button twice before I am getting the correct list > of cameras. > self.connect(self.setCameraBtn, SIGNAL("pressed()"), self.camMenu) > > > > > On Friday, Octobe

Re: [Maya-Python] scriptJob to assign material

2014-10-07 Thread Justin Israel
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" wrote: > Hey All, I'm trying to use pymel

Re: [Maya-Python] Grab text of the selection in QMenu

2014-10-07 Thread Justin Israel
Yea there are a few problems in your code, so I can see why it wasn't working correctly. Here is a modified version: ## No globals# camLs = [] class orientCameraUI(QDialog): def __init__(self, parent=None): super(orientCameraUI, self).__init__(parent) # You have a class, so yo

Re: [Maya-Python] Grab text of the selection in QMenu

2014-10-07 Thread Justin Israel
They are not the same, and also not doing what you said... *menu = QMenu("menu", self.setCameraBtn)* This creates a brand new QMenu, with the setCameraBtn as its parent, and then simply leaks it (the object remains for the life of the application, but is never used). It is never set as the actual

Re: [Maya-Python] Load up PySide window and lock main Maya window behind it

2014-10-08 Thread Justin Israel
the API is less likely to change, than >>> the objectName of the Maya window, which might even have that name set by >>> coincidence as many of Maya’s other widgets don’t have *any* namy, as >>> can be seen by the allWidgets() command. >>> ​ >>> >>&

Re: [Maya-Python] Load up PySide window and lock main Maya window behind it

2014-10-08 Thread Justin Israel
Totally reasonable. What the application does at that point makes sense. At least it wont make assumptions about how it is launched. You could always supply the parent (activeWindow()) via the menu-specific code as opposed to the core application code. That would mean your menu launches it one way,

Re: [Maya-Python] installing external packages into Maya python

2014-10-08 Thread Justin Israel
I'm sure this is obvious to most, but I wanted to make sure to point out that this extra complication with compiled python extensions is referring to a Windows environment. The other available platforms don't really share this same level of complication with needing to match a compiler that was use

Re: [Maya-Python] List recent projects

2014-10-08 Thread Justin Israel
I messed with that at my last studio but I don't remember exactly. It was via actual Mel procs, and not something exposed in the python API, I think. You make need to bust out some whatIs Mel commands to track down the source of that menu. On 9/10/2014 12:46 AM, "Marcus Ottosson" wrote: > Hi all

Re: [Maya-Python] C++ Programming for Autodesk Maya

2014-10-08 Thread Justin Israel
Personally I think it is fine to have C++ discussions on this list, simply because we all know this list has evolved in scope. It is a bit misleading still having the group called python inside Maya, but we also tend to talk a lot about general Qt regardless of it being in Maya. Or we talk about g

Re: [Maya-Python] Library versioning

2014-10-08 Thread Justin Israel
I'm actually getting into this area a bit for some work related to env and package management. But for what you are asking, have you seen the StrictVersion and LooseVersion classes available in distutils? http://epydoc.sourceforge.net/stdlib/distutils.version.Version-class.html You can instantiat

Re: [Maya-Python] List recent projects

2014-10-08 Thread Justin Israel
AM, damon shelton > wrote: > >> it is stored in an optionVar >> >> cmds.optionVar(q='RecentFilesList') >> >> On Wed, Oct 8, 2014 at 11:17 AM, Justin Israel >> wrote: >> >>> I messed with that at my last studio but I don't re

Re: [Maya-Python] Re: dictionary help

2014-10-08 Thread Justin Israel
Here is a little tip about itertools.chain... If you already have an iterable of sequences (the values of a dict being a list of verts), you can use chain.from_iterable() d['a'] = range(5) d['b'] = range(5) d['c'] = range(5) chained = chain.from_iterable(d.itervalues()) The benefit is that you do

Re: [Maya-Python] Scripting For Rig Portability

2014-10-08 Thread Justin Israel
I don't have much in-depth knowledge about rigging practices or expressions, but I wonder if some of the reasons people aren't doing it involve performance impacts? As far as I know, expressions are evaluated often and can be slow. Have you tried out these approaches and found them to work well? O

Re: [Maya-Python] Library versioning

2014-10-08 Thread Justin Israel
le ranges and they’re essentially the equivalent > of comparing plain tuples, aside from the alpha/beta extras. > > assert (1, 0, 5) > (1, 0, 4) > > ​ > > On 8 October 2014 19:31, Justin Israel wrote: > >> I'm actually getting into this area a bit for some wor

Re: [Maya-Python] List recent projects

2014-10-08 Thread Justin Israel
cmds.optionVar(list=True) ? On Thu, Oct 9, 2014 at 8:21 AM, Marcus Ottosson wrote: > Brilliant, thanks Damon. > > Do you know if there's some reference to which variables are available as > option-vars? > > On 8 October 2014 19:37, Justin Israel wrote: > >&

Re: [Maya-Python] Re: dictionary help

2014-10-08 Thread Justin Israel
On Thu, Oct 9, 2014 at 8:45 AM, wrote: > Ah-ha. I was appending a list to the list of connectedVerts. > > I still need to test it a bit, but I think this gets me what I'm after. > Thanks guys for holding my hand through it. > > btw, how are you guys nicely formatting your code? are there no > t

Re: [Maya-Python] Re: dictionary help

2014-10-09 Thread Justin Israel
I threw together a cmds version of this code (but someone please confirm my results. Maybe I did this wrong). I didn't really do anything to the actual logic, other than switching from PyMel to cmds, and I also switched to using a set, for an extra bit of performance increase, since the loop is doi

Re: [Maya-Python] Re: dictionary help

2014-10-09 Thread Justin Israel
Fo' sho' Anytime you see a for/while loop in there with many inner PyMel calls, it probably could benefit from testing a cmds or api variation wow, that's quite a bit faster. Thanks for this! I didn't anticipate that much of an increase. Guess it's time to start using cmds more often. Kev -- Yo

Re: [Maya-Python] Grab qcomboxbox index

2014-10-10 Thread Justin Israel
There are a couple ways to do this. One is to store your callbacks as the data for each item: class Test(QtGui.QDialog): def __init__(self): super(Test, self).__init__() self.combo = QtGui.QComboBox() self.combo.addItem("First Callback", self.callback1) self.c

Re: [Maya-Python] Create function for optionMenuGrp

2014-10-12 Thread Justin Israel
You are seeing that error because you are trying to pass a “non-keyword arg after keyword arg”: test1 = cmds.menuItem(label='Export using item selection range', test1_func()) test2 = cmds.menuItem(test2_func(), label='Export using time slide range', test2_func()) When you start using keyword arg

Re: [Maya-Python] sel.getDagPath(0,dag) meaning....

2014-10-13 Thread Justin Israel
Which class are you dealing with when you call getDagPath? The docs explain the usage: http://download.autodesk.com/us/maya/2010help/API/class_m_selection_list.html#e2c80bef6a4c0c23fdba1bba25bc31c5 http://download.autodesk.com/us/maya/2011help/API/class_m_it_selection_list.html#47eaf93b417b90d4f0

Re: [Maya-Python] Dictionary help

2014-10-14 Thread Justin Israel
I didn't extensively examine your pastebin, but one thing that stands out is that you seem to be appending sets of lists to your ikHandles list, and then assigning that list as the value to every limbName in your dHandles dict: self.ikHandles.append(allHandles) self.dHandles[limbName]=self.ikHandl

Re: [Maya-Python] Create function for optionMenuGrp

2014-10-14 Thread Justin Israel
On Tue, Oct 14, 2014 at 7:56 PM, likage wrote: > I have kind of manage to get it to work. > This is actually an exporting object plugin but I have got 2 problems. > 1. My initial window aren't popping up when I select my object >> File >> > Export selection > Not sure from what you posted. > 2

Re: [Maya-Python] Dictionary help

2014-10-14 Thread Justin Israel
andles[limbName]=allHandles > > Pretty much, yea. Instead of trying to maintain both a list and a dictionary that just associates a name with the list... just maintain the dictionary > > self.dIkjnts[limbName]=IKjoints > > > Thanks, > > > > On Tuesd

Re: [Maya-Python][ANN] Pyblish 1.0 Alpha

2014-10-14 Thread Justin Israel
t;>> the scope of Pyblish. Physically updating an asset is most likely also >>> outside this scope too. >>> >>> However, I would expect such a process to ultimately produce one or more >>> absolute paths to files in need of updating. This is what Pyblish woul

Re: [Maya-Python][ANN] Pyblish 1.0 Alpha

2014-10-14 Thread Justin Israel
> In the case of polling, what does JS poll from? > ​ > > On 14 October 2014 11:55, Justin Israel wrote: > >> It wouldn't matter so much if you were using MongoDB, or MySQL, or >> completely in memory, since that is all behind the application server >> eithe

Re: [Maya-Python] Re: Dictionary help

2014-10-14 Thread Justin Israel
On Wed, Oct 15, 2014 at 3:16 PM, flaye wrote: > > > Solved it: > > Tried initially > self.dHandles[limbName]=allHandles > > but the dictionary kept returning only one value list. > > Tried also > self.dHandles[limbName].append(allHandles) > > with the same result. > > Finally, got this to work li

Re: [Maya-Python] RuntimeError setAttr

2014-10-14 Thread Justin Israel
It would be great if you could identify which line actually produces this error. On Wed, Oct 15, 2014 at 3:24 PM, flaye wrote: > I get this error, and haven't been able to find the source of it. Is it > way Python interprets the numbers for Y & Z? > > > # RuntimeError: setAttr: Error reading dat

Re: [Maya-Python] Create function for optionMenuGrp

2014-10-15 Thread Justin Israel
You may need to post more of your plugin (and also I probably have a lack of experience with the specific plugin type you are writing), but the structure seems strange to me. I wouldn't expect that you should be doing so much work within the constructor of the class. Is that how the plugin is meant

<    2   3   4   5   6   7   8   9   10   11   >