Re: [Maya-Python] Re: Qt.Tool

2016-08-09 Thread Justin Israel
On Wed, Aug 10, 2016 at 5:50 PM Fredrik Averpil wrote: > Just tried it on my mac and it worked fine when the Qt.Tool flag was set > > Hi Johan, yeah - that’s what I found was weird too. It works when the flag > is set in Maya on OS X, but not in Maya on Windows. > > You aren’t actually passing th

Re: [Maya-Python] Re: Qt.Tool

2016-08-09 Thread Fredrik Averpil
Just tried it on my mac and it worked fine when the Qt.Tool flag was set Hi Johan, yeah - that’s what I found was weird too. It works when the flag is set in Maya on OS X, but not in Maya on Windows. You aren’t actually passing the parent argument from your own constructor to the superclass const

[Maya-Python] Re: how to get an MDagPath in a deformer, starting from the dataBlock ?

2016-08-09 Thread vincent . touache
Le mardi 9 août 2016 22:18:00 UTC+1, risto@framestore.com a écrit : > On Tuesday, 9 August 2016 13:00:44 UTC+1, fruity wrote: > > Hi there, > > > > I'm prototyping a new deformer in python, and i'm stuck with a super stupid > > problem. So essentially, i need to get the dagPath of an object

Re: [Maya-Python] What scene was just imported?

2016-08-09 Thread Mark Dietel
Oh, man. This looks like exactly what I want. .and thanks for the BDay wishes. ;) On Tuesday, August 9, 2016 at 3:23:21 PM UTC-7, Justin Israel wrote: > > Hey Mark! Happy early birthday... > > Maybe you could hook into the "before import check"? > > import maya.OpenMaya as om > def catchFi

Re: [Maya-Python] What scene was just imported?

2016-08-09 Thread Justin Israel
Hey Mark! Happy early birthday... Maybe you could hook into the "before import check"? import maya.OpenMaya as om def catchFileImport(ret, fileObj, *args): print "Importing:", fileObj.resolvedFullName() om.MScriptUtil.setBool(ret, True) mid = om.MSceneMessage.addCheckFileCallback(om.MSce

[Maya-Python] What scene was just imported?

2016-08-09 Thread Mark Dietel
Hey guys, I'm trying to catch some data about scenes that are imported. Something like: def import_callback(): print "SOMETHING WAS IMPORTED. I WISH I KNEW WHAT IT WAS" cmds.scriptJob( event=("SceneImported", import_callback) ) It feels like a scriptJob callback is the way to go bu

[Maya-Python] Re: how to get an MDagPath in a deformer, starting from the dataBlock ?

2016-08-09 Thread risto . puukko
On Tuesday, 9 August 2016 13:00:44 UTC+1, fruity wrote: > Hi there, > > I'm prototyping a new deformer in python, and i'm stuck with a super stupid > problem. So essentially, i need to get the dagPath of an object, and to do > that, i have only an outMesh plug connected to my deformer. I have

[Maya-Python] Re: Procedural modeling - one click greeble/panel maker tool

2016-08-09 Thread figster1962
On Wednesday, September 9, 2015 at 12:51:34 PM UTC-4, Dante Rinaldi wrote: > Hello everyone! > I just found this group and I'm looking forward to reading all your posts! > I just started coding in Python for Maya - I have a couple of tools made and > would love to share them if anyone thinks they

Re: [Maya-Python] Re: Qt.Tool

2016-08-09 Thread Justin Israel
You aren't actually passing the parent argument from your own constructor to the superclass constructor. Is that still a typo? If it is a typo and you are properly passing the parent, try moving the Tool window flag into the superclass constructor call as well, instead of calling it afterwards. Ju

[Maya-Python] Re: Qt.Tool

2016-08-09 Thread johan Borgström
Hi Fredrik, Just tried it on my mac and it worked fine when the Qt.Tool flag was set. // Johan On Tuesday, August 9, 2016 at 2:11:58 PM UTC+2, Fredrik Averpil wrote: > > Argh.. ok, here's a gist instead: > https://gist.github.com/fredrikaverpil/b76bd91b9924435465ecb1b2270c1a9d > > > -- You rec

[Maya-Python] Re: Qt.Tool

2016-08-09 Thread Fredrik Averpil
Argh.. ok, here's a gist instead: https://gist.github.com/fredrikaverpil/b76bd91b9924435465ecb1b2270c1a9d -- 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, s

[Maya-Python] Re: Qt.Tool

2016-08-09 Thread Fredrik Averpil
Sorry… managed to copy-paste the wrong code where I didn’t parent to the MayaWindow. Still can’t make it to work though, so any input is greatly appreciated! from PySide2 import QtWidgets, QtCore def _maya_main_window(): """Return Maya's main window""" for obj in QtWidgets.qApp.topLevelWid

[Maya-Python] how to get an MDagPath in a deformer, starting from the dataBlock ?

2016-08-09 Thread fruity
Hi there, I'm prototyping a new deformer in python, and i'm stuck with a super stupid problem. So essentially, i need to get the dagPath of an object, and to do that, i have only an outMesh plug connected to my deformer. I have something that looks like that : # this is what i get from my d

[Maya-Python] Qt.Tool

2016-08-09 Thread Fredrik Averpil
I’m scratching my head here… why does this window when launched in Maya 2017 not stay on top of the main Maya window? If you click outside this window, it’ll disappear behind the main Maya window. I just want this window to behave like e.g. the hypershade or any other editor which floats atop May