Re: [Maya-Python] SublimeText Syntax highlighting?

2014-03-17 Thread Fredrik Averpil
That doesn't get you MEL highlighting though...? I usually set the syntax to C++ and that will highlight MEL pretty nicely (ctrl+shift+p and type c++). // Fredrik > 17 mar 2014 kl. 22:19 skrev Tony Barbieri : > > You can try this one out: https://github.com/justinfx/MayaSublime > > I haven't

Re: [Maya-Python] PyQt and QGridLayout

2014-03-19 Thread Fredrik Averpil
+1 for flowlayout I have a side project which hasn't gotten a lot of attention lately but you can see how I implemented it here: https://github.com/fredrikaverpil/pyVFX-viewer // Fredrik -- You received this message because you are subscribed to the Google Groups "Python Programming for Autode

Re: [Maya-Python] Select object to import

2014-04-02 Thread Fredrik Averpil
Marcus, Would it not be possible to write a method which parses through an .ma and collects all nodes and their attributes, perhaps in one or two dictionaries. Then you would need a method to create a node from the dictionary and populate its attributes accordingly. When this is setup you could w

Re: [Maya-Python] MEL Autocompletion for Sublime and MayaSublime

2014-04-03 Thread Fredrik Averpil
Awesome! This definitively should get merged with the repo! // F -- 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+uns

Re: [Maya-Python] getting the correct vray.exe from maya.env

2014-04-08 Thread Fredrik Averpil
Just a quick word on userSetup.py: it is called later than userSetup.mel and prohibits some things to function correctly which would work fine if loaded through userSetup.mel (an example would be dirmap). I don't know why Autodesk made it this way... but it's truly annoying. We also have V-Ray cen

Re: [Maya-Python] getting the correct vray.exe from maya.env

2014-04-08 Thread Fredrik Averpil
On Mon, Apr 7, 2014 at 9:43 PM, Marcus Ottosson wrote: > I'm calling it Open Metadata > > That's really nice. Reminds me of Qt's QSettings! // Fredrik -- You received this message because you are subscribed to the Google Groups "Python Programmi

Re: [Maya-Python] Re: Loading ui files, addItems in QListWidgets

2014-04-27 Thread Fredrik Averpil
If you like, you can check out my boilerplate which intends to load .ui files exactly the same way whether you are using PySide or PyQt. Also, it's prepared to run inside Maya, Nuke or as standalone. https://github.com/fredrikaverpil/pyVFX-boilerplate more info: https://github.com/fredrikaverpil/p

Re: [Maya-Python] executing external python script and returning a list?

2014-05-04 Thread Fredrik Averpil
Hi Gerard, Here's an example how you can catch (or list the output) from python's subprocess: http://fredrik.averpil.com/post/63722065215 To source the script and run it within Maya, first do: import sys sys.path.append('c:/where/your/script/is/at') import yourScriptName And optionally/prefera

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

2014-05-08 Thread Fredrik Averpil
Regarding regex and such ... as long as you use scripts with predefine naming conventions, you can rely on the same regex always working. That's what we do here. In short, artists never get to name their files. This causes file structures to get basically unreadable as every scene or script file i

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

2014-05-08 Thread Fredrik Averpil
Hi all, We are revising our file structure on disk, and I figured I'd just ask for some advice/ideas here for anyone interested. Currently, we use the server/project/sequence/shot/ approach with assets being stored per sequence, but as we tend to rarely utilize "sequences" or "shots" as we do a l

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

2014-05-08 Thread Fredrik Averpil
just whether the whole approach is flawed in a major way that I haven't thought of. Fredrik On Thu, May 8, 2014 at 10:27 AM, Fredrik Averpil wrote: > Hi all, > > We are revising our file structure on disk, and I figured I'd just ask for > some advice/ideas here for anyon

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

2014-05-09 Thread Fredrik Averpil
Thanks for your feedback, guys. It's good to hear the mostly positive feedback towards this virtual folder structure idea. The logic behind everything is indeed made into a library, or rather python modules. Nuke and Maya imports the shared module (which is heavily focused on navigating the virtua

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

2014-05-09 Thread Fredrik Averpil
> 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. I'll take a look, thanks! I was planning on having a .json file i

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

2014-05-09 Thread Fredrik Averpil
> > Sounds like a schema to me! It concretely describes the projects layout > and what it must conform to. > Hehe, ok I just never heard that term before :) // Fredrik -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To

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

2014-05-11 Thread Fredrik Averpil
I'm not sure if fuse is the best option for me, but many thanks for suggesting it. Haven't thought about it, I've only used it very briefly in the past. I'm going to look into Stalker this week. It seems it offers everything I'm looking for (and more), and it allows me to not limiting myself to a

Re: [Maya-Python] Stalker

2014-05-11 Thread Fredrik Averpil
Looks very interesting for command line tools. Are all these packages included, or do they have to be downloaded/installed prior to using? http://golang.org/pkg/ It looks like third party Go packages are cross platform, text based (non-binary). Is this so? That would be awesome for easy deployment

[Maya-Python] Distributing or hosting module?

2014-05-12 Thread Fredrik Averpil
Hi, I've been meaning to learn how to efficiently serve a python module to all workstations/render blades without actually installing it locally... So far I've just copied already compiled modules from the site-packages folder from a local installation and then I keep these in folders such as pyt

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

2014-05-13 Thread Fredrik Averpil
Thanks guys for all your input. How come you don't use eggs? I thought eggs with egg-infos were supposed to be the easy way to maintain versions and distribute modules? Fredrik -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" gr

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

2014-05-13 Thread Fredrik Averpil
ent 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 think if you have the versions and packaging managed externally then &

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

2014-05-14 Thread Fredrik Averpil
re. We haven't gone as granular as having >> sub project contexts such as sequence/shot/asset (at least at launch time, >> once in the app we do), but we have the ability to set that up in the >> future if necessary. >> >> >> On Wed, May 14, 2014 at 5:18 AM, Ju

Re: [Maya-Python] Production Pipeline Fundamentals

2014-05-22 Thread Fredrik Averpil
I was actually going to order it. Worth purchasing and reading then? Fredrik On Thu, May 22, 2014 at 9:52 AM, David Martinez < david.martinez.a...@gmail.com> wrote: > I've got the bug but haven't had a chance to read it yet... :-) > > > -- > David Martinez - Technical Animator > > Email: dav

Re: [Maya-Python] Stalker

2014-05-29 Thread Fredrik Averpil
Chad, I'm soon done with a small addition to stalker, and after that I'm adding the possibility of adding additional data to any such entity in stalker. Personally, I'm going to store dictionaries (keys and values) / JSON style but I'm probably going to just allow anyone to store whatever (TEXT).

Re: [Maya-Python] Stalker

2014-05-29 Thread Fredrik Averpil
Actually, Erkan suggested PickleType so I might go for that. // Fredrik I'm going to store dictionaries (keys and values) / JSON style but I'm > probably going to just allow anyone to store whatever (TEXT). > > -- You received this message because you are subscribed to the Google Groups "Pyt

Re: [Maya-Python] Stalker

2014-05-29 Thread Fredrik Averpil
Justin, that's a very good point. That's why initially I was thinking of just storing plain text. But being able to store Python objects is also quite powerful. I think I might ending up implementing both as two separate attributes on the entity. Erkan, Hehe... you're being way too modest. I could

Re: [Maya-Python] Stalker

2014-05-30 Thread Fredrik Averpil
Yes. On Fri, May 30, 2014 at 4:17 PM, Nils Lerin wrote: > Regarding the addition of storing TEXT such as JSON. Whouldn't that just > mean adding a attribute/column to a entity of type text to hold your data? > Or am I missing something? > > -- You received this message because you are subscrib

Re: [Maya-Python] Stalker

2014-05-30 Thread Fredrik Averpil
You are probably completely right. I wasn't thinking of storing anything but plain text initially. I'm using MySQL (not Postgres) and to my knowledge there's no special JSON field type so it'll just be plain text. // Fredrik On Fri, May 30, 2014 at 5:25 PM, Marcus Ottosson wrote: > I'm with C

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

2014-06-03 Thread Fredrik Averpil
That's a great idea and I think it fills a need at least for me. In all classes I set the parent into something that can be accessed from a global object, which I know is always available from all classes. So in the end I can reach UI elements in a similar manner. But this could of course sometime

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

2014-06-03 Thread Fredrik Averpil
Sure. But I was referring to what I usually do, and which could sometimes be problematic and where it looks like your qtpaths solves it (I think): I set the parent from within a subclass with a parent like self.mainName = parent And then if this subclass is inherited I may set self.mainName.sub

Re: [Maya-Python] multiple userSetup.py files

2014-06-09 Thread Fredrik Averpil
Hi Kenneth, I believe you should be able to use a usercustomize.py which will be loaded just after sitecustomize.py. Also, you can load both a userSetup.mel and a userSetup.py. Mind you, userSetup.py is called later than userSetup.mel and cannot perform all commands that userSetup.mel can perform…

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

2014-06-09 Thread Fredrik Averpil
Awesome write-ups, guys! :) -- 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 view this

Re: [Maya-Python] mysql in maya

2014-06-25 Thread Fredrik Averpil
I've compiled MySQLdb for Python 2.7 (which Maya 2014/2015 is using). I jotted down some notes about compiling it here: http://fredrik.averpil.com/post/87906472836 Regards, Fredrik On Wed, Jun 25, 2014 at 4:37 PM, Marcus Ottosson wrote: > On Windows, Python in Maya is running MSC1600 (since

Re: [Maya-Python] Unloading the mental ray plugin

2014-07-02 Thread Fredrik Averpil
I've been trying to do the same thing but I never succeeded. I made the assumption mental ray is too deeply integrated in AE templates throughout the scene and so it cannot be unloaded. Not sure if that's the case though. Regards, Fredrik On Mon, Jun 30, 2014 at 5:58 PM, Sylvain Delhomme wrote

Re: [Maya-Python] Unloading the mental ray plugin

2014-07-02 Thread Fredrik Averpil
unload mental ray? I'm concerned about scene > corruption or even Maya crash. > > Le mercredi 2 juillet 2014 10:02:47 UTC+2, Fredrik Averpil a écrit : >> >> I've been trying to do the same thing but I never succeeded. I made the >> assumption mental ray is too

Re: [Maya-Python] Start Maya with project pre-set

2014-07-07 Thread Fredrik Averpil
I'm following this topic with interest. I'm doing an ugly workaround by creating a pre-defined set of folders, but ideally I'd like to solve this the "nice" way. // Fredrik On Mon, Jul 7, 2014 at 8:48 AM, Marcus Ottosson wrote: > Hey Justin, > > That would make a lot of sense, but unfortunatel

Re: [Maya-Python] Start Maya with project pre-set

2014-07-08 Thread Fredrik Averpil
Yes, thanks for sharing that!Sent from my iPhoneOn tis, jul 8, 2014 at 12:52 em, Marcus Ottosson wrote:Thanks Anthony, that's good to know.If anyone else is getting delivery issues, maybe try and re-post it in the groups directly:https://groups.google.com/forum/#!topic/python_inside_m

Re: [Maya-Python] PySide maya workflow

2014-07-08 Thread Fredrik Averpil
You could have a look at my old boilerplate:https://github.com/fredrikaverpil/pyVFX-boilerplateSent from my iPhoneOn tis, jul 8, 2014 at 10:31 fm, Justin Israel wrote:Have you looked at the documentation for using UI files using PyQt? It is pretty much the same thing aside from the di

Re: [Maya-Python] Recommendations for Diving into Python/PySide/QT for Maya

2014-07-10 Thread Fredrik Averpil
Yes, definitively start out with the Maya Python docs.Sent from my iPadOn tors, jul 10, 2014 at 7:21 em, Geordie Martinez wrote:I really like these starting points:http://zetcode.com/gui/pysidetutorial/ http://zurbrigg.com/maya-python/category/pyside-for-maya also super useful is pysi

Re: [Maya-Python] Recommendations for Diving into Python/PySide/QT for Maya

2014-07-11 Thread Fredrik Averpil
ntacted him about writing a book on PyQt. On 11/07/2014 7:23 AM, "Fredrik Averpil" <fredrik.aver...@gmail.com> wrote: Yes, definitively start out with the Maya Python docs.Sent from my iPadOn tors, jul 10, 2014 at 7:21 em, Geordie Martinez <geordiemarti...@gmail.com&g

Re: [Maya-Python] help to setup pyqt for maya 2014 under windows 7

2014-07-16 Thread Fredrik Averpil
You'll have to compile PyQt:http://download.autodesk.com/us/support/files/maya_documentation/pyqtmaya2014.pdfSent from my iPhoneOn tors, jul 17, 2014 at 3:52 fm, Gyurma wrote:Hi,I'm not very familiar with how to set this up, I read a few things downloaded pyqt, installed but obviously

Re: [Maya-Python] monitoring file name change

2014-08-04 Thread Fredrik Averpil
Forgive me for perhaps missing a step here... but how do you detect the fact that you close the scene, maya exists or maya crashes? --- meaning, when to know to remove the lock file? Fredrik On Mon, Aug 4, 2014 at 11:24 AM, Chris Gardner wrote: > Hi Marcus, > > Yeah, i'm an old softie, so i'

Re: [Maya-Python] Start Maya with project pre-set

2014-08-06 Thread Fredrik Averpil
orkspace.mel file (with defaults). What do you guys think about this approach? Should cmds.workspace() be used for some reason? (I can't see why if you want defaults) / Fredrik ​ On Tue, Jul 8, 2014 at 4:27 PM, Fredrik Averpil wrote: > Yes, thanks for sharing that! > > Sent from

Re: [Maya-Python] Maya's UI

2014-08-19 Thread Fredrik Averpil
Perhaps you can achieve what you need via scriptJob? http://download.autodesk.com/global/docs/maya2014/en_us/CommandsPython/scriptJob.html // Fredrik tisdag 19 augusti 2014 skrev illunara : > Hi everybody > I wonder if we can add some event/listener to Maya's Primitive UI? Like, > when some v

Re: [Maya-Python] Re: Flushing PyQT classes from Maya's Memory

2014-08-21 Thread Fredrik Averpil
I never got the sys.modules deleting approach to work (tried it about a year ago in python 2.6). As far as I understand you’re not supposed to delete imported modules. That’s not how Python is designed to work. Instead I just always (yes, always) import modules with a reload() as well: import myM

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

2014-08-22 Thread Fredrik Averpil
Hi, So I'm developing our next-gen cg production pipeline on top of stalker, which so far is going really well, and is scheduled to go live within a month or so. I've come to a point where I need to store information about the current environment/configuration when saving e.g. a Maya scene or a N

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

2014-08-27 Thread Fredrik Averpil
inly work, though there's possibly >>>>> some confusion with what maya calls the "workspace". I'm sure there's >>>>> potential problems of a similar magnitude with most other names you could >>>>> come up with, though. >>>>> >>>>> >

Re: [Maya-Python] fire a ray out to check for intersections python?~

2014-09-22 Thread Fredrik Averpil
Hey Sam, This is actually on my todo list. If you happen to solve this, I would be super happy if you would like to share the code. Regards, Fredrik On Mon, Sep 22, 2014 at 8:20 PM, wrote: > Hello friends, > > i have a piece of code here in python which gives me the 2d viewpoint > coords of t

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

2014-10-06 Thread Fredrik Averpil
Hi, You know how the save dialog locks up the Maya UI and only allows you to interact with the save dialog… do you know how can this be achieved when loading up a custom PySide window? I’m doing this at the moment, which makes sure that the custom ui stays on top of Maya, but it doesn’t lock up t

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

2014-10-06 Thread Fredrik Averpil
Thanks guys, So I think my main problem was I was inheriting QtGui.QMainWindow and not QtGui.QWidget or QtGui.QDialog. It seems you cannot load a QMainWindow as a modal window. I really never quite grasped the concept of a modal window before, so thanks for that link Marcus. Regards, Fredrik --

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

2014-10-06 Thread Fredrik Averpil
Guys, I was wrong (again). You can set a QMainWindow to modal using setWindowModality(). The code below works for me in Maya: class MyApp(QtGui.QMainWindow): def __init__(self, parent=None): super(MyApp, self).__init__(parent) self.centralWidget = QtGui.QWidget(self) s

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

2014-10-06 Thread Fredrik Averpil
The difference here is that exec_(), as mentioned by Justin, will block > until the window closes. Can be useful if you expect results from a window, > such as in a save-dialog returning a path. However I think exec_ is only > available on QDialog subclasses. > Ah yes. In my particular case, I don’

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

2014-10-06 Thread Fredrik Averpil
> Then it looks like you just stumbled upon a holy grail. :) Fetching this > handle has always been a PITA and this looks simple and logical. Will be > trying this out next. Thanks! > Nice, let me know how it works. I have only used this with QMainWindow and QDialog. I don't think it will work with

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

2014-10-08 Thread Fredrik Averpil
the case of running from the Script Editor is the >>>>> Script Editor window. Not sure it has any repercussions and shouldn’t be >>>>> an >>>>> issue when *not* running from the Script Editor. >>>>> >>>>> However, I also tr

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

2014-10-08 Thread Fredrik Averpil
Hm. That makes sense. I might revise that code, but any modal dialogs that open up from it, I probably won't change. -- 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

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

2014-10-08 Thread Fredrik Averpil
Yes, totally agreed on such a practice. On Wed, Oct 8, 2014 at 10:57 AM, Justin Israel wrote: > 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 men

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

2014-10-08 Thread Fredrik Averpil
But then you kind of need to write that prefix instruction in the footer or something... At least I know I'm going to forget about that in case I ever have a C++ related question, at least ;) -- You received this message because you are subscribed to the Google Groups "Python Programming for Aut

Re: [Maya-Python] Grab qcomboxbox index

2014-10-19 Thread Fredrik Averpil
That's pretty neat. I would have used a whole lot more code. Thanks for the tip, Justin. On Fri, Oct 10, 2014 at 12:22 PM, Justin Israel wrote: > 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__(se

Re: [Maya-Python] Modify layer override values (without render layer change)

2014-10-30 Thread Fredrik Averpil
I usually do it like this (sort of): current_layer = cmds.editRenderLayerGlobals( query=True, currentRenderLayer=True ) # Register the currently active render layer cmds.editRenderLayerGlobals(currentRenderLayer='renderLayerA') # step to renderLayerA cmds.setAttr('vraySettings.primaryEngine', 0) #

Re: [Maya-Python] Modify layer override values (without render layer change)

2014-10-30 Thread Fredrik Averpil
I may be wrong here but as far as I know you need the renderlayer you wish to modify to be the currently active renderlayer. Regards, Fredrik -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group

[Maya-Python] Remove reference edits via Python?

2014-10-30 Thread Fredrik Averpil
Hi, I’m having problems performing this via Python. If using the UI, you would right click the reference and choose to list the reference edits. Then you can select each edit and hit “Remove reference edit”. I’ve successfully been able to list reference edits in various ways with: cmds.reference

[Maya-Python] Re: Remove reference edits via Python?

2014-10-30 Thread Fredrik Averpil
And if it makes it easier to somehow solve this ... I'm looking to remove *all* reference edits. ​ > -- 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

Re: [Maya-Python] Re: Remove reference edits via Python?

2014-10-31 Thread Fredrik Averpil
t be faster to do a clean(), > which removes failed edits. If the ref is unloaded then all edits are > failed :) > for ref in pm.listReferences(): > ref.unload() > ref.clean() > ref.load() > > > > > On Thursday, October 30, 2014 11:51:12 AM UTC, Fredr

Re: [Maya-Python] Re: Remove reference edits via Python?

2014-10-31 Thread Fredrik Averpil
Whoops … I meant to write that Maya crashes when I export the editMB (sometimes) and later down the road it also crashes (sometimes) when I save down the edits into the actual scene (“Save reference edits”). By the way, this is how I save down the reference edits on a loaded reference: filepath =

Re: [Maya-Python] Re: Remove reference edits via Python?

2014-10-31 Thread Fredrik Averpil
One stable way I've gone about it in the past is to update the .ma file. > How do you mean, exactly? Do you mean launching a separate process such as maya -batch -command "[mel code]" -file hello.ma or do you mean reading in the .ma contents and modifying it with Python? ​ -- You received this me

Re: [Maya-Python] Re: Remove reference edits via Python?

2014-10-31 Thread Fredrik Averpil
Yes, however, that just simply does not work at all. Try this; for ref in cmds.ls(references=True): cmds.referenceEdit( ref, removeEdits=True) Here in my scene, nothing happens. No reference edits was removed. On Fri, Oct 31, 2014 at 11:56 AM, Eduardo Grana wrote: have you tryed the ref

Re: [Maya-Python] Re: Remove reference edits via Python?

2014-10-31 Thread Fredrik Averpil
Aaahhh... yes, that did work. Thank you! On Fri, Oct 31, 2014 at 5:13 PM, Eduardo Grana wrote: > import maya.cmds as cmds > > for ref in cmds.ls(references=True): > cmds.file(unloadReference=ref) > cmds.file (cr=ref) # *cleanReference* > -- You received this message because you are subscribe

[Maya-Python] Possible Maya bug: Loading editMB into Maya via cmds.file()

2014-10-31 Thread Fredrik Averpil
I think I found a bug in Maya. After having fiddled around with reference edits in a script, something broke and it is impossible to load an “editMB” file back into Maya using Python or MEL. See the example script below. Step 4 won't work. However, if you re-open the scene after having run this co

Re: [Maya-Python] maya_he3d mailing list

2014-11-24 Thread Fredrik Averpil
Yeah, hehe. It's a tad bit more oriented towards non-scripting. MEL's allowed though ;) // F mån 24 nov 2014 kl. 18:27 Marcus Ottosson skrev: > Think I just stumbled upon a parallel universe. > https://groups.google.com/forum/#!forum/maya_he3d > > Anyone familiar with it? > ​ > -- > *Marcus Otto

Re: [Maya-Python] Re: Merry Christmas!

2015-01-01 Thread Fredrik Averpil
Happy holidays, everyone! :) tors 1 jan 2015 kl. 13:18 skrev LIJU kunnummal : > Happy New Year to All > > > On Tuesday, 23 December 2014 22:54:14 UTC, Marcus Ottosson wrote: > >> Hope you all have a great Christmas, wherever you may be. :) >> >> Marcus >> >> -- >> *Marcus Ottosson* >> konstr..

Re: [Maya-Python] Learn C/C++ for Film and Games on GitHub

2015-01-05 Thread Fredrik Averpil
This is a great idea. Count me in! I'll try to make it to the screencast on Thursday. Cheers, Fredrik On Fri Jan 02 2015 at 16:32:46 CET Marcus Ottosson wrote: > 45 Lines In 45 Minutes > > We’re talking about having a screencast in which Sebastian Thiel, former > head of pipeline of Trixter,

Re: [Maya-Python] Learn C/C++ for Film and Games on GitHub

2015-01-05 Thread Fredrik Averpil
Marcus, In the event of that I can't make it, will this screencast become available for download/viewing later? // Fredrik mån 5 jan 2015 kl. 11:43 skrev Marcus Ottosson : > Welcome in!​ > > If anyone else wants in, there will be a beginner-level screencast on > **Thursday, 8th of January at 8

Re: [Maya-Python] Batch process

2015-02-13 Thread Fredrik Averpil
In case you want to do it on the commandline, check out `maya -batch -command ...` // F On Fri Feb 13 2015 at 9:45:05 AM likage wrote: > > > I am trying to attempt something where it does the following: > * Open a new Maya Scene > * Imports in a rig > * Apply animation curve onto the rig >

Re: [Maya-Python] Kill child process on exit

2015-03-06 Thread Fredrik Averpil
I think you can poll a pid using psutil. Check out its Process class. // F fre 6 mar 2015 kl. 16:46 skrev Marcus Ottosson : > No problem, Justin, it’s not terribly obvious that it’s using pywin32 as > it isn’t showing up in the imports; it looks like it’s got quite a few > different names, all pr

[Maya-Python] Fetching the stylesheet of Maya

2015-03-10 Thread Fredrik Averpil
Anyone know how to fetch the stylesheet of Maya 2015? I've tried this: from PyQt4 import QtGui, QtCoreimport sipimport maya.OpenMayaUI as mui def get_maya_window(): """Get the maya main window as a QMainWindow instance""" ptr = mui.MQtUtil.mainWindow() return sip.wrapinstance(long(ptr

Re: [Maya-Python] Fetching the stylesheet of Maya

2015-03-10 Thread Fredrik Averpil
No, I haven't. To be honest, I'm trying to snatch the complete stylesheet from Maya (if at all possible) to use that look in one of my UIs which runs outside of Maya. But it seems maybe this is not possible at all. // Fredrik On Tue, Mar 10, 2015 at 5:29 PM Marcus Ottosson wrote: > Fetch the

Re: [Maya-Python] Fetching the stylesheet of Maya

2015-03-10 Thread Fredrik Averpil
Getting closer ... (?) from PySide.QtGui import QApplication app = QApplicationprint app.style().metaObject().className() >> QadskDarkStyle ​ Hm, I wonder if I can somehow extract the CSS from this. // Fredrik On Tue, Mar 10, 2015 at 5:35 PM Fredrik Averpil wrote: > No, I haven&#

Re: [Maya-Python] Fetching the stylesheet of Maya

2015-03-10 Thread Fredrik Averpil
sh(MID_COLOR)) > > widget_palettes = {} > widget_palettes["QTabBar"] = tab_palette > widget_palettes["QTabWidget"] = tab_palette > > QtGui.QApplication.setStyle("Plastique") > QtGui.QApplication.setPalette(base_palette)for name, palette in > widget

Re: [Maya-Python] Fetching the stylesheet of Maya

2015-03-11 Thread Fredrik Averpil
Hey guys, I see you've been busy with this while I've been asleep ;) So, it seems you are totally right I cannot fetch the stylesheet, as the UI needs to have been created using the qApp.setStylesheet(), which Autodesk seems not to have done (?). Thanks to Tony's post about QPalette, I started se

Re: [Maya-Python] Fetching the stylesheet of Maya

2015-03-11 Thread Fredrik Averpil
just the QPalette. The > QPalette should give you a good base to start from. > > Best, > > On Wed, Mar 11, 2015 at 4:53 AM, Fredrik Averpil < > fredrik.aver...@gmail.com> wrote: > >> Hey guys, >> >> I see you've been busy with this while I've b

Re: [Maya-Python] PySide and PyQt current and future status

2015-03-11 Thread Fredrik Averpil
We've invested (so to speak) heavily in PySide. But like Justin mentions the differences aren't that big between PySide/PyQt. However I'd like to point one thing out: If you are reading in external ui files, I would recommend defining a routine/policy on how you do that throughout your company's

Re: [Maya-Python] PySide and PyQt current and future status

2015-03-12 Thread Fredrik Averpil
I second what Justin said. // F tors 12 mar 2015 kl. 07:20 skrev Justin Israel : > That would depend on your company, and whether your code is purely > internal or if you ship code. For my company, in particular, it shouldn't > matter since we handle it all internally with dependency management

[Maya-Python] How to acquire absolute filepath of drag-and-dropped file

2015-03-13 Thread Fredrik Averpil
Hi, I've created a custom QLabel class which allows dropping a file onto it. But I'm having issues with fetching the filepath of the dropped file when dropped from anything but a Windows drive letter. So for example if you drag and drop a file from a network share (which has not been mapped to dri

[Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
Anyone know if you can remove the "requires" statements which you can see at the top of a Maya Ascii file - but from within Maya? I'm trying to remove some of these from files which are binary, so I can't just open up the files from outside of Maya and edit the lines out... Regards, Fredrik --

[Maya-Python] Re: Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
And in this case, it's part of a workflow, so it won't help me to temporarily save down an ASCII file, edit it and save it back to binary. I really would need to be able to remove these "require" statements somehow from the binary file. // F On Fri, Mar 13, 2015 at 10:4

Re: [Maya-Python] Re: Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
I totally agree. This sounds dangerous if not handled properly, but in our case this problem propagates like a virus across all projects. The reason is that we once had e.g. the xfrog plugin, and it was used in a popular asset, such as a bunch of flowers sitting in a pot or something. This model w

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
;t in your MAYA_PLUG_IN_PATH, Maya will > register the plugin in its internal plugin database and save this > information out again when you save your scene file. In short, Maya > preserves info for plugins that cannot be loaded on file>open. > > So it can be confusing when you o

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
Hi Owen, I don't have the xfrog plugin in my paths. Also, I don't have any unknown nodes. I'm attaching a Maya binary file. When you open this up you'll see that it is empty, and it does not contain any xfrog nodes or unknown. But it says it requires xfrog 1.0 (and also a couple of other plugins)

Re: [Maya-Python] Remove "requires" from within Maya?

2015-03-13 Thread Fredrik Averpil
de of Maya... // Fredrik On Fri, Mar 13, 2015 at 12:17 PM Fredrik Averpil wrote: > Hi Owen, > > I don't have the xfrog plugin in my paths. Also, I don't have any unknown > nodes. > > I'm attaching a Maya binary file. When you open this up you'll see that

Re: [Maya-Python] How to acquire absolute filepath of drag-and-dropped file

2015-03-13 Thread Fredrik Averpil
of its drop. > > On Fri, 13 Mar 2015 9:48 PM Fredrik Averpil > wrote: > >> Hi, >> >> I've created a custom QLabel class which allows dropping a file onto it. >> But I'm having issues with fetching the filepath of the dropped file when >> dropped f

Re: [Maya-Python] How to acquire absolute filepath of drag-and-dropped file

2015-03-13 Thread Fredrik Averpil
? I > might be wrong, but my guess is that it is the actual mime data being > delivered to your application. > > On Sat, Mar 14, 2015 at 12:55 AM Fredrik Averpil < > fredrik.aver...@gmail.com> wrote: > >> Well, that's what I thought too, from reading the docs. >>

Re: [Maya-Python] How to acquire absolute filepath of drag-and-dropped file

2015-03-14 Thread Fredrik Averpil
x27;t tried this on OSX yet. // Fredrik On Fri, Mar 13, 2015 at 10:35 PM Justin Israel wrote: > Hmm, then I guess the windows specific logic in Qt is doing something :-/ > > On Sat, Mar 14, 2015 at 10:03 AM Fredrik Averpil < > fredrik.aver...@gmail.com> wrote: > >>

Re: [Maya-Python] How to acquire absolute filepath of drag-and-dropped file

2015-03-14 Thread Fredrik Averpil
Uhh... not really sure why I was bothering with all of this when there was this: url.toLocalFile() :) That seems to work for all kinds of paths. // Fredrik On Sat, Mar 14, 2015 at 10:45 AM Fredrik Averpil wrote: > I think I figured it out. > > When dragging and dropping a file from

[Maya-Python] Figuring out which way a connection goes in Maya

2015-03-18 Thread Fredrik Averpil
[cross-posting this as I posted this by mistake on the maya_he3d list too ] Okay so I want to store connections to and from objects in a python dictionary. I can check what is connected to an object or a certain attribute of the object using cmds.listConnections(myobject, plugs=True). But I can't

Re: [Maya-Python] splitting up python script into smaller files...

2015-03-19 Thread Fredrik Averpil
This is a very interesting topic! I'm trying to picture myself splitting up a generic and quite large python script. It almost requires you to rewrite it from scratch, I would say, although with a lot of copy-pasting from the old script of course. I wouldn't say I'm an expert in how to layout you

Re: [Maya-Python] Figuring out which way a connection goes in Maya

2015-03-19 Thread Fredrik Averpil
ults pointless when doing both a source and destination query since you > don't know which is which. Can you make two calls to listConnections which > one being s=True/d=False and the other being s=False/d=True? > > On Thu, 19 Mar 2015 5:34 AM Fredrik Averpil > wrote: >

Re: [Maya-Python] Figuring out which way a connection goes in Maya

2015-03-19 Thread Fredrik Averpil
Sweet, thanks Marcus! On Thu, Mar 19, 2015 at 11:23 AM Marcus Ottosson wrote: > Looks good to me. > > Depending on your use-case, you might find that about half of the > information you store about connections is duplicated due to A being > connected to B, but B also being connected to A. It’s

[Maya-Python] Adjusting Maya for 4k monitors ...via python?

2015-03-19 Thread Fredrik Averpil
We just received 4k monitors in the office. Now everyone's complaining over that the Maya UI is too small :) I've dug up these: http://www.danantonielli.com/adobe-app-scaling-on-high-dpi-displays-fix/ http://polygonspixelsandpaint.tumblr.com/post/2133934131 ...but ideally, since not all monitors

[Maya-Python] Re: Adjusting Maya for 4k monitors ...via python?

2015-03-19 Thread Fredrik Averpil
And it's the part about changing the UI settings via Python that I'm wondering about ... On Thu, Mar 19, 2015 at 12:49 PM Fredrik Averpil wrote: > We just received 4k monitors in the office. Now everyone's complaining > over that the Maya UI is too small :) > >

Re: [Maya-Python] OpenEXR for python

2015-04-01 Thread Fredrik Averpil
Tuan, would you mind sharing which converter executable that is, exactly? On Tue, Mar 31, 2015 at 7:53 PM Tuan Nguyen wrote: > Thank for sharing,Serena. That's very interesting > > To Michal > They have guide to compile to python library, Justin said that's good to > go too, it just that guide i

Re: [Maya-Python] Call maya's command from outer application or command shell

2015-04-06 Thread Fredrik Averpil
You can run Maya in headless mode or communicate with it via command ports. Regards, Fredrik tis 7 apr 2015 kl. 07:03 skrev illunara : > Hi everybody > Can i control an instance of maya's application, calling maya's command > from command shell or other application? > Mayapy is not an option, i

Re: [Maya-Python] Re: Remove "requires" from within Maya?

2015-04-13 Thread Fredrik Averpil
ange thing, couldn't understand why it writes out the require line >> with out it actually being used in the scene. So, to fix that I have to >> load the arnold plugin in batch mode, with out any real purpose. >> >> >> On Friday, 13 March 2015 15:11:01 UTC+5:30

  1   2   >