Re: [Maya-Python] Getting value dynamically from QLineEdit

2018-05-28 Thread Justin Israel
What does your legBuild or headBuild slot callback look like? I am not sure from your reduced example, but it seems like you are getting the values from the text boxes once and storing them in globals. You should remove the use of globals and have your button callback look up the text box values

Re: [Maya-Python] Forcing Script Editor custom changes in Maya 2017

2018-05-28 Thread likage
Hi Justin, Thanks for getting back. Noted about Qt hacks, had thought it will be possible as I was using userSetup.py which seems to have resolve the issue I had on hand. Am trying to see if the change I made, can be implemented/ enforce into Maya. May not be ideal to apply a python event

Re: [Maya-Python] [Socket] error 10061

2018-05-28 Thread Justin Israel
Are you trying to connect from RV to the Maya commandPort? If so, are you sure you have an open commandPort in that Maya 2018 instance at the given port number? On Tue, May 29, 2018, 3:30 AM Rémi Deletrain wrote: > Hi everyone, > > For my animators I've created a tool for launch a motion

Re: [Maya-Python] Forcing Script Editor custom changes in Maya 2017

2018-05-28 Thread Justin Israel
This is probably the same issue one faces when trying to make custom Qt hacks on a 3d viewport. They will work the first time, but new viewport instances will not have the changes. One approach is to use an event filter that checks for QEvent::ChildAdded. This even is fired when the parent (main

Re: [Maya-Python] Keypress event in Maya

2018-05-28 Thread Alexey Vasilyev
Thanks, Markus, It definitely helps! This is more or less what I've been trying to do. The Issue I have with this approach is that keypress tracking only works when the widget is in focus. I need my widget to track keypress events during my work in Maya viewport. As soon as I switch focus from

[Maya-Python] Getting value dynamically from QLineEdit

2018-05-28 Thread Nazmi Yazıcı
Hello, i have a .py file which contains all the functions i need and at the very bottom this class is laying which converting the .ui file etc. def headBuild(*arg): ... cmds.matchTransform('head_L_eye_bindDummy_JNT', leyeGeo) ... class nyBipedUI(form_class, base_class): ...

[Maya-Python] Forcing Script Editor custom changes in Maya 2017

2018-05-28 Thread likage
Hi all, I am trying to "fix" the spacing/ fonts in the Script Editor of Maya 2017 version as I am used to the format and style of Maya 2016 versions and before. After some searching, I created the script for the change as well as created a userSetup.py that will load and executes the script

Re: [Maya-Python] Calling user function from module

2018-05-28 Thread Nicolas Chaverou
Totally valid. Thanks for the suggestion, it's way easier and pythonic :) --- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Mon, May 28, 2018 at 1:00 PM, Justin Israel wrote: > I definitely second

[Maya-Python] [Socket] error 10061

2018-05-28 Thread Rémi Deletrain
Hi everyone, For my animators I've created a tool for launch a motion capture movie reference in RV from maya scene file name and I connecting RV to Maya. With this tool it's possible to compare movie and animation juste with maya animation timeLine. It's perfecly works in Maya 2014. But with

Re: [Maya-Python] compiling OpenVDB

2018-05-28 Thread Juan Cristóbal Quesada
Ok, i found out. The "rm" command is a linux command so thats what it s not finding. So i will use the git bash shell to run the make command but then i got an error saying "g++ command not found" Since im trying to compile a linux project with its makefile from windows and i dont have a

Re: [Maya-Python] compiling OpenVDB

2018-05-28 Thread Juan Cristóbal Quesada
sorry, here is the error im getting: 2018-05-28 15:04 GMT+02:00 Juan Cristóbal Quesada < juan.cristobal...@gmail.com>: > Hi Marcus, > i finally managed to compile and generate the openvdb.lib file. > > Im stuck right now with the openvdb maya plugin. > > I have compiled "make 3.8.1" exe and

Re: [Maya-Python] compiling OpenVDB

2018-05-28 Thread Juan Cristóbal Quesada
Hi Marcus, i finally managed to compile and generate the openvdb.lib file. Im stuck right now with the openvdb maya plugin. I have compiled "make 3.8.1" exe and im issueing the following command in a windows shell: <...>\openvdb_maya> make the openvdb_maya has the following makefile

Re: [Maya-Python] Keypress event in Maya

2018-05-28 Thread Marcus Ottosson
Yes, this is possible. from PySide import QtGui, QtCore class MyEventHandler(QtCore.QObject): def eventFilter(self, target, event): if event.type() == event.KeyPress: print("That's a keypress") return super(MyEventHandler, self).eventFilter(target, event) handler =

Re: [Maya-Python] Calling user function from module

2018-05-28 Thread Justin Israel
I definitely second the suggestion from Marcus and recommend to avoid trying to construct a text based expression to pass to eval. Inverting the design and offering a callback registration is much more flexible and reliable. On Mon, May 28, 2018, 10:34 PM Marcus Ottosson

Re: [Maya-Python] Calling user function from module

2018-05-28 Thread Marcus Ottosson
How about this, for the user: import glm def mycallback(): print("Did it!") glm.registerUserCallback(mycallback) That way, your registerUserCallback can take and store the callback, regardless of whether it’s from the Script Editor or another module. ​ On 28 May 2018 at 11:20, Nicolas

[Maya-Python] Calling user function from module

2018-05-28 Thread Nicolas Chaverou
Hi guys, I'm trying to implement a user callback mechanism; I'm having a function in a predefined module called glm.utils : def createNodeUserCallback(functionName, nodeName): callbackFunction = functionName + 'UserCallback' call = callbackFunction + '(\'' + nodeName + '\')' try: