Re: [Maya-Python] Parent QtWindow to Viewport?

2014-04-27 Thread Justin Israel
Have you tried looking up the QWidget reference and parenting your widget to it? I know there are some issues with transparency, but I think you can parent it up higher than the actual viewport display. On Mon, Apr 28, 2014 at 6:38 AM, Arvid Schneider wrote: > Is it possible to constrain a wind

Re: [Maya-Python] Re: Towers of Hanoi

2014-04-28 Thread Justin Israel
Yea good notes. I agree to just avoid using globals as they aren't needed here. Your functions should return their list values, and the TowersOfHanoi() should take the arguments it needs to run. In terms of initialization, where you need to clear and establish the scene, that may call for either a

Re: [Maya-Python] Create contextMenu on lots of buttons PyQt - QtDesigner - Maya

2014-05-02 Thread Justin Israel
If you have the exact same menu to show for all the buttons then you could just handle the menu from the window instead of individually for each button: class Window(QtGui.QDialog): def __init__(self): super(Window, self).__init__() self.resize(800,600) layout = QtGui

Re: [Maya-Python] GUI Help! Python in maya

2014-05-03 Thread Justin Israel
Are there multiple people doing this Towers of Hanoi thing on this list? :-) Are you saying you have defined your code like this? def Hanoi(): def solve_hanoi(): ... If so, don't do that. Refactor your code to have reusable logic by putting solve_hanoi() in a scope that can be reached

Re: [Maya-Python] Create contextMenu on lots of buttons PyQt - QtDesigner - Maya

2014-05-03 Thread Justin Israel
mai 2014 10:47:01 UTC+2, Manuel Macha a écrit : >>> >>> Alternatively you could sub-class QPushButton, >>> implement the context-menu and create your buttons from the sub-class instead of from QPushButton. >>> >>> >>> On Sat, May 3, 2

Re: [Maya-Python] Regex Stuff to determinng versioning.

2014-05-04 Thread Justin Israel
The re module also has a case insensitive flag: re.search(r'_v\d+', 'hello_v001', re.I) You can also limit it to a 3 padded version scheme if you want to go that far: re.search(r'_v\d{3}', 'hello_v001', re.I) On May 4, 2014 11:07 PM, "Anthony Tan" wrote: > If the leading 'v' is the relevant th

Re: [Maya-Python] Create contextMenu on lots of buttons PyQt - QtDesigner - Maya

2014-05-04 Thread Justin Israel
ginal target, to each parent until someone handles it. Make sure to read the docs to see all the available methods you can use on a widget. Don't forget to check the parent class for more functionality that was inherited. > Thanks again !! > > m. > > Le samedi 3

Re: [Maya-Python] Create contextMenu on lots of buttons PyQt - QtDesigner - Maya

2014-05-04 Thread Justin Israel
> self.offset = event.pos() > QtGui.QWidget.mousePressEvent(self, event) > cmds.select(clear=True) > > Thanks for everything :D > > Le dimanche 4 mai 2014 21:45:09 UTC+2, Justin Israel a écrit : >> >> >> On May 5, 2014 5:33 AM, "mAtt RINGOT" w

Re: [Maya-Python] Re: Regex Stuff to determinng versioning.

2014-05-07 Thread Justin Israel
If you know you are always parsing strings that have some form of a "v" and you are just worried about padding, then you can use a very targeted regex to produce a numeric sort key: import re v = ["test_v1.ma", "test_v2.ma","test_v11.ma","test_v8.ma","test_v10.ma"] sorted(v, key=lambda s: int(re.f

Re: [Maya-Python] Re: Regex Stuff to determinng versioning.

2014-05-07 Thread Justin Israel
The re.compile() thing is a small optimization where you compile the pattern ahead of time so that it doesn't have to do it each time you reuse it. The re module actually caches the last 100 patterns anyways, so it only really matters if you have many regular expressions that you are using over and

Re: [Maya-Python] Re: Regex Stuff to determinng versioning.

2014-05-07 Thread Justin Israel
schema for > lists and the like? > > I'm eager to witness an example. > > > On 7 May 2014 09:40, Stefan Andersson wrote: > >> Thanks guys! >> Lot's of information there! >> >> regards >> stefan >> >> >> >> On Wed,

Re: [Maya-Python] Re: Regex Stuff to determinng versioning.

2014-05-07 Thread Justin Israel
7;project', 'shot' ,'used_asset] > > Which would map each level of a hierarchy to the respective index. > > # For example > $ /myprojects/hulk/1000/myasset1 > $ 0 12 3 > > > > On 7 May 2014 12:02, Justin Israel wrote: > >&

Re: [Maya-Python] Re: pymel / maya.cmds completion vim

2014-05-07 Thread Justin Israel
I agree on the debugging. With python, usually my debugging consists of print statements. I use strace/GDB to attach to running processes and see what they are doing and/or stuck on, but not really for active development. But everyone has their needs I suppose, and in other languages that are compi

Re: [Maya-Python] pymel / maya.cmds completion vim

2014-05-07 Thread Justin Israel
I think I played with this once for a couple hours: https://pypi.python.org/pypi/PdbSublimeTextSupport It was kinda neat since it would bring up and control the sublime session as the viewer while you are stepping around the code. On Thu, May 8, 2014 at 10:32 AM, Tony Barbieri wrote: > My ti

Re: [Maya-Python] Re: Regex Stuff to determinng versioning.

2014-05-08 Thread Justin Israel
sto > > > > On Wed, May 7, 2014 at 11:40 AM, Stefan Andersson wrote: > >> Thanks guys! >> Lot's of information there! >> >> regards >> stefan >> >> >> >> On Wed, May 7, 2014 at 9:38 AM, Justin Israel wrote: >> >>

Re: [Maya-Python] Re: Advice on file structure based on virtual folders

2014-05-08 Thread Justin Israel
Hey Fredrik, Is your logic from the Project Manager separated out into a library that can be reused easily by other tools? If so, then I think that is a good path, since if you are going to move towards an almost pure filesystem abstraction, it will be pretty good to have a way to support tooling

Re: [Maya-Python] Software Design Questions

2014-05-09 Thread Justin Israel
Hey David On Fri, May 9, 2014 at 8:24 PM, David Martinez < david.martinez.a...@gmail.com> wrote: > Hello, > > I'm working on a new script and I'm looking for some advice in relation to > *Software > Design*. > > The tool that I'm working on allows to import files into the current scene > an

Re: [Maya-Python] Re: Advice on file structure based on virtual folders

2014-05-09 Thread Justin Israel
On Fri, May 9, 2014 at 10:41 PM, Fredrik Averpil wrote: > > If what you're looking for is customisability of folder structure on a >> per-project basis, then have you considered working with schemas? >> > > Yes, that's what I'm planning on doing - but I have not considered working > with schemas.

Re: [Maya-Python] Software Design Questions

2014-05-09 Thread Justin Israel
nsider adopting this thinking to your object models. >>> >>> *API Design for C++* >>> Not specifically for Python, but provides some very good methodologies >>> on dividing interface from implementation. >>> >>> *Game Engine Architecture* >>> T

Re: [Maya-Python] Re: Software Design Questions

2014-05-10 Thread Justin Israel
Well maybe not the artist names in there since that is something that usually changes and is handled in the project tracking system. On May 10, 2014 8:01 PM, "LIJU kunnummal" wrote: > Hi David, > *Creating classes for Project* > > Maintaining different classes for different project is n

Re: [Maya-Python] Stalker

2014-05-10 Thread Justin Israel
On the topic of introducing other languages in a studio, has anyone had experience trying Go in a production VFX pipeline? I've brought it in for one tool rewrite, and one web service so far, and have been really hoping to see it pick up as a standard in pipeline. Benefits that relate specifically

Re: [Maya-Python] __init__.py Using it as an inherited object.

2014-05-11 Thread Justin Israel
I would say though that some might find it bad form to put class definitions and extensive code into the __init__.py of the package, as really what it is meant for is initialization. Personally I feel it is more appropriate to do this: mypackage/ __init__.py myclass.py *__init__.py* from

Re: [Maya-Python] Advice on file structure based on virtual folders

2014-05-11 Thread Justin Israel
I did a fuse filesystem when I was at my previous studio. It wasn't the primary system. Just a mount that offered specific functionality. When you navigated it, it was aware of your user name and could show you a directory of just your assigned shots and then department specific areas under that s

Re: [Maya-Python] Re: __init__.py Using it as an inherited object.

2014-05-11 Thread Justin Israel
Is the Car class an abstract or concrete class? You could name it something like: base.Car car.AbstractCar car.CarBase I wouldn't be too concerned with seeing something like car.Car because it is possible you might put other things into that module and it just ends up being a car namespace for a

Re: [Maya-Python] Re: [ANN] Plow: Open Source Render Farm Software for VFX

2014-05-11 Thread Justin Israel
The official repo is not available anymore at this time. But Chad Vernon did put up the latest fork that was available : https://github.com/chadmv/plow It probably lost its fork reference when the original was made private. On May 12, 2014 2:34 PM, "郭金锋" wrote: > Hey, > Seems I have some probl

Re: [Maya-Python] Re: [ANN] Plow: Open Source Render Farm Software for VFX

2014-05-11 Thread Justin Israel
"Official", being the original repo for Plow, is just no longer publicly available at this time. We can't work on it in an Open Source capacity because of conflicts of interest / contractual limitations. But forks exists and can continue to progress if they want to. Unfortunately, myself and the or

Re: [Maya-Python] Stalker

2014-05-12 Thread Justin Israel
(Sorry, I realized after I posted my side-topic that I might hijack the thread with it. I can move it to a new thread if need be) @Fredrik Ya what you are pointing at is the standard library, so it is all included. Go compiles to native binary, but the source is all cross platform. You can even cr

Re: [Maya-Python] Distributing or hosting module?

2014-05-12 Thread Justin Israel
We actually avoid eggs and just deploy everything to a network location right now. No local installs. Then we use the environment management system to sort out the paths for a given env. Gunna need to check out rez. I remember coming across the name before. The proposed updates sound cool about m

Re: [Maya-Python] Distributing or hosting module?

2014-05-12 Thread Justin Israel
Thanks Marcus. Will check those out. On Tue, May 13, 2014 at 8:51 AM, Marcus Ottosson wrote: > Justin, have a look here > https://code.google.com/p/rez-config/downloads/list > > > On 12 May 2014 20:55, Justin Israel wrote: > >> We actually avoid eggs and just deploy

Re: [Maya-Python] Distributing or hosting module?

2014-05-13 Thread Justin Israel
We manage versions with a custom packaging and deploy system that is integrated with the environment management system. The eggs can be annoying because they require being reliant on either having pth files being updated or having the eggs added to the path as opposed to just a normal package. I th

Re: [Maya-Python] Distributing or hosting module?

2014-05-14 Thread Justin Israel
t; >> # This would be the gist of it >> import openmetadata as om >> location = om.Location('/hulk/shots/1000') >> pythonpath = om.Entry('PYTHONPATH', parent=location) >> om.inherit(pythonpath) >> print pythonpath >> '/projects/hulk/

Re: [Maya-Python] Encapsulating wrapped logger

2014-05-14 Thread Justin Israel
Hey Marcus, My opinion is that if its a library (I am not exactly sure from the small examples, if they are) should not install handlers on the logger. They should just establish one and log to it. Then the entry point / application can set up the handlers. Something like this? ## wrapper.py ##im

Re: [Maya-Python] Encapsulating wrapped logger

2014-05-14 Thread Justin Israel
d ones > that the user can manually set-up. But, isn’t that what is happening in my > example? Without the call to setup_log(), no logging happens (except for > the error messages that you muted in yours, thanks for the hint). > > > On 14 May 2014 12:58, Justin Israel wrote: >

Re: [Maya-Python] mayapy crashing when done

2014-05-14 Thread Justin Israel
Maybe it is the force quit using the Maya command. Its possible that it is doing some faulty shutdown logic when it is not running in the GUI. Do you get the error if you just exit with sys.exit()? On May 15, 2014 2:16 AM, "Erik Johansson-Evegård" < erik.johansson.eveg...@gmail.com> wrote: > Sure

Re: [Maya-Python] mayapy crashing when done

2014-05-14 Thread Justin Israel
eg...@gmail.com>: > > Same error with sys.quit() and just not doing anything at all. >> >> Good news tho. It is when xgen is loaded it crashes. Guess that is one to >> pass along to autodesk. >> >> Cheers, >> Erik >> >> >> On Wednesday,

Re: [Maya-Python] Command Pattern

2014-05-16 Thread Justin Israel
If you end up wanting to expand to that point of communicating between different systems, you could maybe look at Google Protocol Buffers. It's a serialization format that is structured and can be versioned and validated, so that you can

Re: [Maya-Python] Encapsulating wrapped logger

2014-05-17 Thread Justin Israel
ite frequent; > > *Ctrl+Alt+M* to toggle between parsed/unparsed markdown. > > Best, > Marcus > > > On 14 May 2014 20:33, Justin Israel wrote: > >> Its close to what you were doing. Each module can create logger instances >> and set some setting on it. But instead o

Re: [Maya-Python] Simple Web Service to track scripts usage

2014-05-17 Thread Justin Israel
Depending on how you want to expose it you could use a client library that accesses something like ElasticSearch, or mongodb, or Redis. They are document or key/value-based and would have flexible storage for the data. Or you could have a really simple service exposing an API using some micro Web f

Re: [Maya-Python] Simple Web Service to track scripts usage

2014-05-18 Thread Justin Israel
Looks cools. I couldn't tell at a glance if it was fully paid service or if the Pypi package is a self hosting open source version. For something a bit more generic that let's you visualize basically anything in your custom data you can also check out Kibana: http://www.elasticsearch.org/overview/

Re: [Maya-Python] Simple Web Service to track scripts usage

2014-05-18 Thread Justin Israel
obably spend an > equal amount of time figuring out either of these products and still be > none the wiser about what the users of your tools are up to. > > > On 18 May 2014 20:34, Justin Israel wrote: > >> Looks cools. I couldn't tell at a glance if it was fully paid se

Re: [Maya-Python] Re: Building Qt / PyQt4 for Mavericks

2014-05-19 Thread Justin Israel
Hey Mark! Not sure if you tried this out yet but I was maintaining OSX build scripts for Maya PyQt here: https://github.com/justinfx/MyQt4 But I stopped doing at after 2013 since as Chad noted they began shipping 2014 with PySide. So the whole thing got simpler. You could start with my 2013 scri

Re: [Maya-Python] Re: Building Qt / PyQt4 for Mavericks

2014-05-19 Thread Justin Israel
ld script. Maybe it will point me in a > undiscovered direction. FYI: I'm also opening a case with Autodesk. > > On Monday, May 19, 2014 12:28:05 PM UTC-7, Justin Israel wrote: >> >> Hey Mark! >> >> Not sure if you tried this out yet but I was maintaining OSX build &g

Re: [Maya-Python] Re: Need direction; renderview

2014-05-20 Thread Justin Israel
You could find the layout and add it? On May 21, 2014 4:57 AM, "Macbeth R." wrote: > Is it possible to do the opposite, in order to skip the chase for the > renderView panel trough maya, I mean embed our own QT widget for example in > a bottom horizontal layout inside the renderViewPanel.. ? ma

Re: [Maya-Python] Command Pattern

2014-05-20 Thread Justin Israel
but possible > not in the context of the Command Pattern. > > So, in terms of human performance, I stand by my statement that working > with a structured message is slower, yet less prone to (again, human) error. > > Thoughts? > > On Tuesday, May 20, 2014, Justin Israel wrote:

Re: [Maya-Python] Command Pattern

2014-05-21 Thread Justin Israel
e work involved *up-front*. > > E.g. it takes more research and more typing to write a protobuf, a message > using protobuf and a build script to automatically build the protobuf, then > it does in simply writing a in-line dict and send it across. > > Again, the goal is not to prove

Re: [Maya-Python] Command Pattern

2014-05-21 Thread Justin Israel
to begin with. I think > libraries such as protobuf can only really show its true colors once you’ve > already gained traction and can start thinking about optimisations and > maintenance. > > Thoughts? > > Best, > Marcus > ​ > > > On 21 May 2014 09:56, Justin Israel wrote

Re: [Maya-Python] Get progress from file import

2014-05-22 Thread Justin Israel
You could grab the reference to the main progress bar and connect to its signal: import maya.OpenMayaUI as mui from PySide import QtGuiimport shiboken ptr = mui.MQtUtil.mainWindow() win = shiboken.wrapInstance(long(ptr), QtGui.QWidget) prog = win.findChild(QtGui.QProgressBar)print prog.objectNa

[Maya-Python] Re: Editing UI Layout

2014-05-25 Thread Justin Israel
Hey John, As is common with writing native Maya UI code, the solution is a bit hard to spot. Your layout lacks an attachment definition for the widgets in the rowLayout. So it means that while your createNodePanel is being placed into the 1st horizontal cell, it is not having any constraints be

Re: [Maya-Python] Re: Maya 2014 and Qt problems with getting it to run...very newbie

2014-05-25 Thread Justin Israel
I actually don't have any experience compiling PyQt on Windows. But I am positive there are others here that work on Windows platforms and have done it. On May 26, 2014 7:40 AM, wrote: > Hai Justin > > Can You teach me how to buil PyQt with VS for maya 2014 x64 ?? > > i searcing the guideline bu

Re: [Maya-Python] Re: Maya 2014 and Qt problems with getting it to run...very newbie

2014-05-26 Thread Justin Israel
ult >>> Python is compiled with Visual Studio 2010 whereas Maya uses a custom >>> Python compiled in VS2012. So you must use Maya's own python, mayapy.exe >>> for your compilation. >>> >>> Best, >>> Marcus >>> >>> >>> On 25

Re: [Maya-Python] Re: Maya 2014 and Qt problems with getting it to run...very newbie

2014-05-26 Thread Justin Israel
;> and let me know where you get stuck, that would help a lot. >> >> Best, >> Marcus >> >> >> On 26 May 2014 09:31, Justin Israel wrote: >> >>> Similar topic was discussed on another thread, but you might find less >>> and less inter

Re: [Maya-Python] Re: Maya 2014 and Qt problems with getting it to run...very newbie

2014-05-26 Thread Justin Israel
h, in bundling LGPL libraries instead of GPL libraries > >>> >>> On 26 May 2014 10:47, Marcus Ottosson wrote: >>> >>>> Hi Eric, >>>> >>>> Its difficult to know exactly how much to document, but if you could >>>> giv

Re: [Maya-Python] Re: Maya 2014 and Qt problems with getting it to run...very newbie

2014-05-26 Thread Justin Israel
On Mon, May 26, 2014 at 11:02 PM, Marcus Ottosson wrote: > Straying off-topic here, but I hardly consider updates to a repo as any > form of development or updates; that's a keep-alive with bugfixes. Where is > Qt 5? > > > On 26 May 2014 11:50, Justin Israel

Re: [Maya-Python] Python API

2014-05-28 Thread Justin Israel
On May 29, 2014 7:42 AM, wrote: > > A nice one! > > have a look at these: > > def faceCenter(): > > faceCenter = [] > > I suppose it is not really a good idea to name the function exactly like a variable. > Unless you don't care about making recursive calls withing the function. > haggi > >

Re: [Maya-Python] Stalker

2014-05-29 Thread Justin Israel
Would PickleType imply that you are storing Python-specific data in the database? Maybe json is better since it means the data is retrievable by any type of client? Unless of course the data is always being served by a python application server to the clients. On Fri, May 30, 2014 at 8:36 AM, Fr

Re: [Maya-Python] Setting up a virtual renderfarm

2014-05-30 Thread Justin Israel
I was playing with docker earlier this week since I also want to integrate it at work. Although the only thing I see it being related to for your question is being able to distribute a ready made container that will just do what you want when it starts up. Is that what your question is about? On M

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Justin Israel
You could just register all your different endpoints or types in a dict where the key is the type and the value is the handler function. And each handler function could do the custom logic that transforms the message into a conformned message for the output. On May 30, 2014 11:57 PM, "Marcus Ottos

Re: [Maya-Python] Setting up a virtual renderfarm

2014-05-30 Thread Justin Israel
I'm interested in it > having its own dependencies too and possibly reserved performance from the > host system. Ultimately coming as close as possible to working against an > actual farm of computers. > > > On 30 May 2014 12:58, Justin Israel wrote: > >> I

Re: [Maya-Python] Stalker

2014-05-30 Thread Justin Israel
Yea totally agree with Chad's detailed reasons not to put pickle data in a database. It is much better suited for a private data store used specifically by a python application, and not a generic storage format. I think Postgres also has other really awesome field types like being able to store dic

[Maya-Python] Senior Java Dev at Weta

2014-05-30 Thread Justin Israel
I've posted something like this in the past, but its a new job posting so I thought I would share it again. It is also related to some of the other topics that have been going on in the mailing list lately. Know any hardcore java developers that wanna move to New Zealand? http://careers.stackoverf

Re: [Maya-Python] Service-oriented task distribution

2014-05-30 Thread Justin Israel
Hey Tony, I haven't used celery for more than a super simple addition as a local background task queue to a Django server, so I thought I would ask specifically related to the render farm concept that Marcus mentioned, and celery's granularity. Does celery give you the control to define the schedu

Re: [Maya-Python] Re: API MFnMesh SetFaceVertexNormals

2014-05-30 Thread Justin Israel
Ah ya. That's the fun of dynamically typed languages huh? Big surprises at run time. On May 31, 2014 12:08 PM, "Joe Weidenbach" wrote: > Figured it out. Actually, it makes perfect sense now. I rewrote the > whole thing in C++ so I could make sure the logic was sound, and in the > process figur

Re: [Maya-Python] python for loop with a mel function included

2014-05-31 Thread Justin Israel
I'm pretty sure the error you are seeing from this is that there are not enough format arguments for the string? It is because in your string you use %s two times but only provide one format argument. It would work if you modified it to: mm.eval("polyProjection -ch 1 -type Planar -ibd on -kir -md

Re: [Maya-Python] Service-oriented task distribution

2014-05-31 Thread Justin Israel
On Sun, Jun 1, 2014 at 8:39 AM, Tony Barbieri wrote: > I think it’d be about one billion times slower than querying anything >> local. :) > > > Lol, yes it is definitely slower than querying local...but when working > with distributed tasks I'm not sure how else you can track > progress/failures/

Re: [Maya-Python] Service-oriented task distribution

2014-05-31 Thread Justin Israel
nd it would require writing a bit of routing logic for the broker, and logic for the celery app, in order to support direct worker assignments and accounting the available resources at the broken level for all the workers. > > > On Fri, May 30, 2014 at 6:02 PM, Justin Israel > wrote: >

Re: [Maya-Python] Service-oriented task distribution

2014-05-31 Thread Justin Israel
I've done RPC, and I have done message passing. I don't really think about it as one being better than the other. I just think about it as the right one for the job. But like I said, depending on the implementation, RPC can really be just message passing with syntactic sugar that makes the interfac

Re: [Maya-Python] Service-oriented task distribution

2014-05-31 Thread Justin Israel
wo? >> >> Yes, precisely. What is the difference? That’s what I’m looking to find >> out. :) >> > The question was rhetorical. I don't see the difference other than some sugar on the call site. > ​ >> >> >> On 31 May 2014 22:24, Justin Israel wrote: >

Re: [Maya-Python] Service-oriented task distribution

2014-05-31 Thread Justin Israel
On Sun, Jun 1, 2014 at 9:39 AM, Marcus Ottosson wrote: > I think both ways work great > > Aw, that’s no good. :) I’m looking for actual cases where one is more > appropriate than the other, not which one is the silver bullet of computing. > > It’s a discussion on distributing work via a chat-like

Re: [Maya-Python] Setting up a virtual renderfarm

2014-06-01 Thread Justin Israel
ther specific to Linux. I’m having a go in Ubuntu and so far haven’t experienced any hiccups. > > ​ > > > On 30 May 2014 21:39, Justin Israel wrote: >> >> Docker looks well suited for deploying an application that is already set up in its own environment by a developer. I

Re: [Maya-Python] Service-oriented task distribution

2014-06-01 Thread Justin Israel
essage passing as being Y, and this is why one is better than the other". I would take it with a grain of salt (as I am sure you are already doing by asking opinions here). My point that I keep going back to is that I don't think RPC, to me, is exactly and solely what you have represented

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-03 Thread Justin Israel
Hey Marcus, I can see the value in using this tool for debugging purposes, as a convenient way to list the absolute location of a given widget in a meaningful way. That is, as long as all of your widgets have meaningful names set on them. But I am wondering, if used in non-debugging (normal produ

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-03 Thread Justin Israel
On Wed, Jun 4, 2014 at 9:35 AM, Marcus Ottosson wrote: > Ah, but I believe you’re missing the bigger picture. > > Files and folders have absolute paths and we can reference them. But of > course, coding anything to absolute paths is no good and I believe the same > is true for object hierarchies.

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-04 Thread Justin Israel
fferent from Qt in that it does introduce globally accessible names >>>>> (called topics, like with messaging), but I’m too early in to make an >>>>> educated guess about whether or not it promotes bad design. The idea is to >>>>> study it, evaluat

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-05 Thread Justin Israel
Hey, The QAbstractItemModel speaks in terms of QModelIndex as a way to communicate between any implementations of QAbstractItemView, regardless if the view is a single column, a table, a tree, or some other abstract representation. You can't really avoid it as it is part of the interface. But that

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-05 Thread Justin Israel
Yea sorry. Apparently I don't get it either. I was following Tony's reply and it made sense to me but I suppose was not applicable to you? I also saw it as a situation where child items in a model know their own context and their parent item. So when representing the "run" item, it knows the contex

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-05 Thread Justin Israel
o maintain? Even if we disregard the low count in items, and disregard > performance, can you see anywhere where this model would stop making sense? > > I'm trying hard to KISS, QAbstractItem* isn't simple enough. I really > don't think it's as much of a silver bulle

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-05 Thread Justin Israel
o your thoughts on the example, I find it nimble and > complete, more sophisticated than what I've got going on currently and > mainly simple and easy to communicate to others with minimal knowledge of > Python. > > Best, > Marcus > > On Thursday, June 5, 2014, Justin Is

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-06 Thread Justin Israel
o use as a baseclass for all your widgets. You would have one class that can look at an event and decide what to do with the object and then install it as an event handler on any widget that needs it. ​ > > > On 5 June 2014 23:12, Justin Israel wrote: >> >> If you are doing Miller c

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-06 Thread Justin Israel
re we go any further, I suggest you have a look at my example. I > believe what you are suggesting is what has already been done. > > > On 6 June 2014 08:15, Justin Israel wrote: > >> >> On Jun 6, 2014 5:42 PM, "Marcus Ottosson" wrote: >> >> >> &g

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-06 Thread Justin Israel
BTW, sorry but I converted your example to PySide since I didn't have Qt5 handy. It was a minimal change. Just some imports and a type convert for the event types. On Fri, Jun 6, 2014 at 8:44 PM, Justin Israel wrote: > I did already look at your example earlier. I just didn't ge

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-06 Thread Justin Israel
wrote: > >> One thing, what about widgets in the path leading up to the global >> handler, what if they want to do something with the event before passing it >> along? >> >> >> On 6 June 2014 09:52, Marcus Ottosson wrote: >> >>> That looks great

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-06 Thread Justin Israel
To be perfectly honest, I don't know. I'd say keep the course and evaluate your available tools. If your aren't working against the grain and the framework is doing what you need in a clean and easy to reason about manner, then keep on keepin' on. It's hard to say if one tool is better than the

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-06 Thread Justin Israel
Glad it was helpful to solve something! There are so many facets to Qt that it is hard to know them all. I haven't actually sized widgets much through CSS so I will keep that in mind. I use CSS for all the other look related stuff. On Jun 7, 2014 12:50 AM, "Marcus Ottosson" wrote: > Unrelated to

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-06 Thread Justin Israel
tiple themes too! > > In fact I was going to put up a new thread about SCSS, to make CSS more > manageable and pretty. I recommend having a look. > > > On 6 June 2014 14:17, Justin Israel wrote: > >> Glad it was helpful to solve something! There are so many facets to Qt

Re: [Maya-Python] Qt Path serialistation/de-serialisation

2014-06-07 Thread Justin Israel
s; generally > avoiding re-setting stylesheets on the entire application due to > performance concerns. Having “css snippets” sounds really powerful and > aligns well with another methodology I use. I’m mocking up a new thread on > CSS as we speak, let’s continue our discussions in there.

Re: [Maya-Python] GUI Development Tips and Tricks

2014-06-07 Thread Justin Israel
Nice write up. I've uses SASS only once before, during an experience with writing an ipad-based front end app in the Sencha Framework. I don't think I fully experienced its features, as it was just a part of the workflow. I will have to try it out with Qt development. Here has been my experience us

[Maya-Python] pyMel

2014-06-09 Thread Justin Israel
(Sorry, I accidentally filtered an email away instead of approving it when it was marked as spam. Reposting.) From: brianeyr...@googlemail.com > To: python_inside_maya@googlegroups.com > Cc: > Date: Mon, 9 Jun 2014 17:35:07 -0700 (PDT) > Subject: pyMel > Hi Folks, > Just wondering if there's a pyM

Re: [Maya-Python] Setting up a virtual renderfarm

2014-06-09 Thread Justin Israel
It should be able to run any type of application really. The only limitation by default are what ports and access to the host filesystem that are made available to the container. But you can export whatever ports you want and mount the host file system. To the host, it all looks like a docker insta

Re: [Maya-Python] Pass iterators as pointers to a function

2014-06-10 Thread Justin Israel
In addition to what Marcus said about passing the iterator instance, have you profiled your code to come to the conclusion that it is inefficient to create your iterator and function sets from within the function? On Jun 11, 2014 2:57 AM, "Marcus Ottosson" wrote: > Hi Enrico, > > I’m not very ac

Re: [Maya-Python] Re: String literals with maya.eval in python

2014-06-12 Thread Justin Israel
This seems to work fine: mel.eval('runTimeCommand -annotation "Herrow" -category "User" -commandLanguage "python" -command "from tools.anim import picker; reload(picker)" customCmd2;') ​ And so does the python commands equivalent cmds.runTimeCommand("customCmd", annotation="Herrow", category="Us

Re: [Maya-Python] [PyQt] Index in the model after selecting from QTreeView

2014-06-13 Thread Justin Israel
Hey David, I wanted to add that you should not use the internalPointer method outside of the internal code of your model. Normally in Qt land that would return a pointer to something outside components shouldn't be messing with but I know it feels natural to use it when you are setting your own ob

Re: [Maya-Python] [PyQt] Index in the model after selecting from QTreeView

2014-06-13 Thread Justin Israel
On Jun 14, 2014 8:17 AM, "Justin Israel" wrote: > > Also Erkan, I think your answer was meant for a QTreeWidget where you are dealing with converting between indexes and model items. > Correction. I should have said a QTreeView in combination with QStandardItemModel subcla

Re: [Maya-Python] How to emit particles from CV curve and control lifespanPP with a ramp?

2014-06-13 Thread Justin Israel
Maybe something like this might help for the first part of the problem? import maya.cmds as cmdsimport maya.OpenMaya as om # This point would refer to our particle birth location point = om.MPoint(*cmds.xform(q=True, t=True, ws=True)) # Loading the curve, in case we didn't have it already curve =

Re: [Maya-Python] How to emit particles from CV curve and control lifespanPP with a ramp?

2014-06-14 Thread Justin Israel
Oh I hope I didn't mislead you too much on that. The part at the beginning was really a temp example solution to producing a point. I assumed you would be slotting in your own source for the particle birth location. Mine was just grabbing a point off a locator for test. On Jun 14, 2014 7:10 PM, "E

Re: [Maya-Python] Sublime Text MayaSublime use the code sent to the Maya, so Sublime Text can get to the Maya Script Editor Window of Hirstory Window information? ?

2014-06-14 Thread Justin Israel
Hi If I understand you correctly, you want to know if the MayaSublime plugin can send the text to the script editor instead of executing it? Couldn't you just copy and paste for that? On Jun 14, 2014 6:13 AM, "提颖浩" wrote: > Hi All > Sublime Text MayaSublime use the code sent to the Maya, so S

Re: [Maya-Python] Sublime Text MayaSublime use the code sent to the Maya, so Sublime Text can get to the Maya Script Editor Window of Hirstory Window information? ?

2014-06-14 Thread Justin Israel
I guess even with the picture I am not clear on what you want. I'm not sure what you mean by getting information from the script editor and sending it to Sublime. You want communication in the other direction? Can you explain an example of how you would use the feature you want? On Sat, Jun 14, 2

Re: [Maya-Python] Sublime Text MayaSublime use the code sent to the Maya, so Sublime Text can get to the Maya Script Editor Window of Hirstory Window information? ?

2014-06-15 Thread Justin Israel
Oh right. Getting the return value and printing it to the Sublime console has been asked before. But there are two aspects of the script editor output. There is the return value for a function call, and also the output that Maya just prints to stdout. Getting the stdout would be a different task

Re: [Maya-Python] Pass iterators as pointers to a function

2014-06-15 Thread Justin Israel
but I am. Probably because I'm spending like > tens of hours everyday in front of the code, studying and working at the > same time and having random epiphanies occasionally :D > > > Il giorno martedì 10 giugno 2014 21:26:35 UTC+2, Justin Israel ha scritto: >> >> In ad

Re: [Maya-Python] Reloading functions called from button commands

2014-06-15 Thread Justin Israel
It's because you delete the window but leave behind the DockWindow. It doesn't really make sense to try and bring the dock window forward if it exists, since the old one will no longer have a window content (it was deleted). You use a fixed DockWindow name each time, so you end up with duplicates a

Re: [Maya-Python] [PyQt] Index in the model after selecting from QTreeView

2014-06-16 Thread Justin Israel
ez < >> david.martinez.a...@gmail.com> wrote: >> >>> That makes sense! Thanks Justin! >>> >>> I will do the appropriate changes on my code so it does not use >>> internalPointer anymore. I'll take it that 'QtCore.Qt.UserRole' return

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