[Maya-Python] Maya Mel/Python Command Reference moved URL?

2020-03-15 Thread Panupat Chongstitwattana
I tried accessing Maya MEL/Python command reference page from the script editor menu and got forwarded here. http://help.autodesk.com/view/MAYAUL/2019/ENU I cannot find the command reference anywhere. Tried their search function, no luck. The Maya 2016's web page has a link to Maya

[Maya-Python] Re: Selecting poly mesh faces from UV data

2020-02-07 Thread Panupat Chongstitwattana
the color_palette only exist inside display function. It does not exist inside applyColor function which is why this error popped up when clicking Apply # Error: NameError: file line 37: global name 'color_palette' is not defined # Quick fix is to give your palette a name and use that same

[Maya-Python] docking a Pyside widget.

2018-08-14 Thread Panupat Chongstitwattana
I can drag the widget to get it docking, but I cannot dock it with dockControl. It would say Object's window not found. Can anyone help me please? What should I add to make the command work? from shiboken import wrapInstance from PySide import QtGui, QtCore from maya import OpenMayaUI as

[Maya-Python] Re: qt and pyqt

2018-06-27 Thread Panupat Chongstitwattana
UI wise I love how PyQt/PySide code can be called everywhere on every platform. It's just a Python code, no compile needed and you can launch the same interface as stand-alone or from within Maya/Nuke. Python file being simple text files are easier to manage too IMO, no need to have separate

Re: [Maya-Python] A turntable player

2018-06-27 Thread Panupat Chongstitwattana
Figured another one out thanks to Stackoverflow. https://stackoverflow.com/questions/43454882/paint-over-qlabel-with-pyqt My paintEvent was done on QWidget, which was behind QLabel. Once the QLabel got stylesheet'd it covered up my image I suppose. So paintEvent needed to be implemented on the

[Maya-Python] Re: How to execute a Python Script through a Python script within Maya

2018-06-26 Thread Panupat Chongstitwattana
The path needs to be recognized by Maya, there's a few ways. The simplest is to add the path to sys.path. If you have your script at C:/some/path/yourscript.py you would do import sys sys.path.append('C:/some/path') import yourscript I highly recommend you check out the Python videos in

Re: [Maya-Python] A turntable player

2018-06-26 Thread Panupat Chongstitwattana
Ran into a problem. When I set qdarkstyle, the images no longer showed up. Neither load_stylesheet nor load_stylesheet_pyside worked. environ['QT_API'] = 'pyside' app = QApplication(sys.argv) app.setStyleSheet(qdarkstyle.load_stylesheet()) SCRUB = ScrubbaleImageSequenceWidget(images) # SCRUB =

Re: [Maya-Python] Call icon from exteranal Folder

2018-06-26 Thread Panupat Chongstitwattana
I tested and full path works. W = cmds.window() cmds.columnLayout(adjustableColumn=True) cmds.nodeIconButton( style='iconAndTextHorizontal',image1= 'C:/Users/joey/documents/images/mystery2.png', command='createsphere', label ='Sphere', fn="boldLabelFont") cmds.showWindow(W) On Tuesday, June

Re: [Maya-Python] A turntable player

2018-06-26 Thread Panupat Chongstitwattana
By the way I went with QPainter because it's the only way I could find how to control opacity. Is opacity possible if I use QPixmap? -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and

Re: [Maya-Python] A turntable player

2018-06-26 Thread Panupat Chongstitwattana
allows you to paint onto objects that are QPainDevice > instances (QWidget, QPixmap, ...). When you override a paintEvent, you are > handling the drawing onto the widget directly. But you can just as easily > draw into a pixmap. > > Justin > > On Tue, Jun 26, 2018 at 6:17 PM

Re: [Maya-Python] A turntable player

2018-06-26 Thread Panupat Chongstitwattana
> > > On Tue, Jun 26, 2018 at 4:33 PM Panupat Chongstitwattana < > panu...@gmail.com > wrote: > >> Thank you Justin. Wow so by setting minimal size it allows going smaller. >> I wouldn't have suspected that. >> >> By the way is it OK to call set

Re: [Maya-Python] A turntable player

2018-06-25 Thread Panupat Chongstitwattana
18, 12:39 AM Panupat Chongstitwattana > wrote: > >> Question on Pixmap resizing. >> >> I tried switching from fixed size to allow resizing. >> This is what I have at the moment and what happens is that I can increase >> my widget size, >> but it won't l

Re: [Maya-Python] A turntable player

2018-06-25 Thread Panupat Chongstitwattana
26, 2018 at 2:49:13 AM UTC+7, Justin Israel wrote: > > > > On Tue, Jun 26, 2018, 12:39 AM Panupat Chongstitwattana > wrote: > >> Question on Pixmap resizing. >> >> I tried switching from fixed size to allow resizing. >> This is what I have at the mome

Re: [Maya-Python] A turntable player

2018-06-25 Thread Panupat Chongstitwattana
): self.label.setPixmap( self.pic.scaled(self.label.width(), self.label.height(), QtCore.Qt.KeepAspectRatio)) On Monday, June 25, 2018 at 7:32:18 PM UTC+7, Panupat Chongstitwattana wrote: > > Thank you for your suggestion Justin. Did you mean the mouseMoveEvent > met

Re: [Maya-Python] A turntable player

2018-06-25 Thread Panupat Chongstitwattana
; would have to decide whether the code should run before or after performing >> the scrubbing. Sometimes it doesn’t matter, sometimes it does. >> ​ >> >> On 25 June 2018 at 08:19, Panupat Chongstitwattana > > wrote: >> >>> I see. Does it matter if you c

Re: [Maya-Python] A turntable player

2018-06-25 Thread Panupat Chongstitwattana
ers require this, so I make it a > habit out of always calling it for Qt events. > ​ > > On 25 June 2018 at 07:57, Panupat Chongstitwattana > wrote: > >> Thank you Marcus. Here's the updated methods and it's working as intended. >> >> def mousePressEvent(self, even

Re: [Maya-Python] A turntable player

2018-06-25 Thread Panupat Chongstitwattana
you wouldn’t inadvertently interfere with > events you aren’t interested in, and handling them would remain quick even > as complexity increases. > ​ > > On 25 June 2018 at 07:18, Panupat Chongstitwattana > wrote: > >> Got it working now with more returns added to the eventFilter.

Re: [Maya-Python] A turntable player

2018-06-25 Thread Panupat Chongstitwattana
tep(-1) event.accept() return True return False On Monday, June 25, 2018 at 12:42:57 PM UTC+7, Panupat Chongstitwattana wrote: > > Thank you for your suggestion Marcus. > > I added MouseButtonPress and MouseButtonRelease event based on your > suggestion and it almo

Re: [Maya-Python] A turntable player

2018-06-24 Thread Panupat Chongstitwattana
lta is positive, then you're scrubbing to the right. Negative > means scrubbing to the left. > 5. On mouse release, disable scrubbing mode. > > This should help produce a smooth and predictable scrubbing behaviour. > > On 22 June 2018 at 11:06, Panupat Chongstitwattana > wrote: &

[Maya-Python] A turntable player

2018-06-22 Thread Panupat Chongstitwattana
Hi. I'm trying to create a turntable viewer and in need of some guidance please. In this view, I want to be able to click and hold left mouse button then drag left/right to turn the turntable, which are image sequences. My questions: - Is there other way I should approach this? The mouse move

[Maya-Python] Batch render referenced layer

2018-05-24 Thread Panupat Chongstitwattana
Hi. I'm wondering if there's a way to get this to work for referenced render layers with namespace removed. I got the error "No render layers are marked as renderable." If I left the namespace there, it worked but would also add the namespace to the output directory name. -- You received

[Maya-Python] Resizing QWidget inside QMainWindow

2018-05-16 Thread Panupat Chongstitwattana
I'm trying to add QWidget to a QMainWindow but I cannot figure out how to make it resize properly. Top - if I show the widget by itself. Bottom - the widget added to QMainWindow. Am I doing something wrong? class LayerInfoWidget(QtGui.QWidget): def __init__(self, parent = None):

Re: [Maya-Python] Script access to studio virtualenv / repository

2018-01-16 Thread Panupat Chongstitwattana
+7, Marcus Ottosson wrote: > > The question is a bit broad. What was your experience trying the > alternatives you mention; (1) having IT set the %PATH%, (2) launch scripts > with a bat file and (3) an entrypoint executable? > > On 15 January 2018 at 07:45, Panupat Chon

Re: [Maya-Python] Popen - explicit env argument vs none?

2017-11-17 Thread Panupat Chongstitwattana
Thank you Justin. Appreciate your input. The Shell=True was out of curiosity since I see it being used in many script examples. On Tuesday, November 14, 2017 at 1:32:03 AM UTC+7, Justin Israel wrote: > > > > On Tue, Nov 14, 2017, 1:53 AM Panupat Chongstitwattana <panu...@gmail

Re: [Maya-Python] Popen - explicit env argument vs none?

2017-11-13 Thread Panupat Chongstitwattana
Thank you Justin! You're right env.dic was my mistake. Is the security risk a thing we should be concerned in a studio environment? Im trying to set up a system that would load the correct version of plug-ins for each project by launching Maya with custom Env. -- You received this message

[Maya-Python] Popen - explicit env argument vs none?

2017-11-10 Thread Panupat Chongstitwattana
Hi guys. I'm doing some simple test here and curious if there's any difference between these 2? os.environ["JOEY"] = "SOMETHING" Popen( maya, shell=True ) and os.environ["JOEY"] = "SOMETHING" Popen( maya, env.dict=dict(os.environ) ) 1 thing I notice is that, with Shell=True, maya.exe

[Maya-Python] Re: Older cmiVFX training videos released free (3 tutorials)

2017-03-24 Thread Panupat Chongstitwattana
Amazing news! Thank you so much Justin. These tutorials had helped me SO MUCH when I was starting out. It would be great to be able to watch them without having to go through CMI's horrible interface and player! On Thursday, March 23, 2017 at 8:59:51 AM UTC+7, Justin Israel wrote: > > Hey, > >

Re: [Maya-Python] This book about production Pipeline, opinion please?

2015-07-24 Thread Panupat Chongstitwattana
Ahhh awesome. Thanks and sorry Marcus! On Friday, July 24, 2015 at 10:25:37 PM UTC+7, Marcus Ottosson wrote: The search function is your friend. - https://groups.google.com/forum/#!topic/python_inside_maya/qDeso_asQvI On 24 July 2015 at 17:21, Panupat Chongstitwattana panu...@gmail.com

[Maya-Python] This book about production Pipeline, opinion please?

2015-07-24 Thread Panupat Chongstitwattana
I'm wondering if anyone here has read this book? Could you share your opinion, please? http://www.amazon.com/Production-Pipeline-Fundamentals-Film-Games/dp/0415812291 -- You received this message because you are subscribed to the Google Groups Python Programming for Autodesk Maya group. To

[Maya-Python] This book about production Pipeline, opinion please?

2015-07-24 Thread Panupat Chongstitwattana
I'm wondering if anyone here has read this book? Could you share your opinion, please? http://www.amazon.com/Production-Pipeline-Fundamentals-Film-Games/dp/0415812291 -- You received this message because you are subscribed to the Google Groups Python Programming for Autodesk Maya group. To

Re: [Maya-Python] Re: Any Python IDE that works similar to Maya's script editor?

2015-06-07 Thread Panupat Chongstitwattana
there is also the option of doing work in a IDE / editor, and using Maya's commandport to send code over. Justin's MayaSublime package is pretty awesome for this, and I know someone has made a similar set of tools for both PyCharm and Eclipse. On Thursday, June 4, 2015 at 10:51:00 PM UTC-5, Panupat

Re: [Maya-Python] Re: mel in python script calling

2015-06-04 Thread Panupat Chongstitwattana
If I use PySide as my main UI, can I fire up cmds.fileDialog2 instead of QtGui.QFileDialog and send the result back to PySide UI? What's the advantage of each you think? On Thursday, June 4, 2015 at 12:49:42 PM UTC+7, Joe Weidenbach wrote: You will basically need to come up with a desired UI

Re: [Maya-Python] What is your tool/workflow for checking sets discrepency?

2015-05-31 Thread Panupat Chongstitwattana
spot for better discoverability. - http://forums.pyblish.com On 31 May 2015 at 00:55, Panupat Chongstitwattana panu...@gmail.com javascript: wrote: API looks real interesting. I'll see if I can make a good use out of it. On Saturday, May 30, 2015 at 2:27:54 PM UTC+7, Justin Israel wrote

Re: [Maya-Python] What is your tool/workflow for checking sets discrepency?

2015-05-30 Thread Panupat Chongstitwattana
a scene? On Sat, May 30, 2015 at 5:08 PM Panupat Chongstitwattana panu...@gmail.com javascript: wrote: Hi. In my studio we often have problem with incorrect details being sent to render farm. For example, a big set may be using the wrong building, a character may be wearing the wrong

Re: [Maya-Python] What is your tool/workflow for checking sets discrepency?

2015-05-30 Thread Panupat Chongstitwattana
direction I would really appreciate. On Saturday, May 30, 2015 at 1:10:44 PM UTC+7, Justin Israel wrote: On Sat, May 30, 2015 at 6:02 PM Panupat Chongstitwattana panu...@gmail.com javascript: wrote: Thanks for chiming in Justin. I'm curious, when you publish your asset, do you save them

[Maya-Python] What is your tool/workflow for checking sets discrepency?

2015-05-29 Thread Panupat Chongstitwattana
Hi. In my studio we often have problem with incorrect details being sent to render farm. For example, a big set may be using the wrong building, a character may be wearing the wrong cloth, the animation data may not be the most recent version, etc, and we have to render that sequence all over

[Maya-Python] PySide eventFilter error warning

2015-05-07 Thread Panupat Chongstitwattana
I'm getting this error with my eventFilter using PySide in Maya 2014. Code: # RuntimeWarning: Invalid return value in function QMainWindow.eventFilter, expected bool, got NoneType., at line 3, in C:\Program Files\Autodesk\Maya2014\bin\maya.exe # RuntimeWarning: Invalid return value in

[Maya-Python] Query anyModified with PyMEL?

2015-04-19 Thread Panupat Chongstitwattana
Hi. What is the PyMEL command equivalent to cmds.file( query=True, anyModified=True) ? Google is sending me to PyMEL.core.system but I can't seem to find any method that does similar thing. Thank you! -- You received this message because you are subscribed to the Google Groups Python

Re: [Maya-Python] Re: Difference PyQt4/PySide in Tutorial : PyQt4 UI Development for maya by Justin Israel

2015-04-17 Thread Panupat Chongstitwattana
Awesome thank you :D Going to play with that now. On Saturday, April 18, 2015 at 11:37:39 AM UTC+7, Justin Israel wrote: On Sat, Apr 18, 2015 at 2:36 PM Panupat Chongstitwattana panu...@gmail.com javascript: wrote: Hi How do you make a code block Justin? You mean the email-formatted

Re: [Maya-Python] Re: Difference PyQt4/PySide in Tutorial : PyQt4 UI Development for maya by Justin Israel

2015-04-17 Thread Panupat Chongstitwattana
Hi How do you make a code block Justin? I would like to throw in what I found updating my script to PySide in the flowlayout. The example that comes with PySide itself was using some deprecated method too. The setMargin if parent is not None: self.setMargin(margin) The new one is

Re: [Maya-Python] QFileSystemModel - list only contents of certain directory?

2015-04-07 Thread Panupat Chongstitwattana
I thought about that too. Since I store the base path of each project in database, I could load them into a combo box and set the root path according to user input. If I am able to do this with 1 QTreeView tho it would be real nice because there are couple more folders in between that I'd

Re: [Maya-Python] QFileSystemModel - list only contents of certain directory?

2015-04-07 Thread Panupat Chongstitwattana
, 2015 at 5:00 PM Panupat Chongstitwattana panu...@gmail.com javascript: wrote: If I set my rootPath to .../project. And here's the folder structure under it. project |-- foo |-- bar |-- asset | item1 | item2 I want my QTreeView to display item1 and item2 under

[Maya-Python] QFileSystemModel - list only contents of certain directory?

2015-04-06 Thread Panupat Chongstitwattana
If I set my rootPath to .../project. And here's the folder structure under it. project |-- foo |-- bar |-- asset | item1 | item2 I want my QTreeView to display item1 and item2 under project without showing asset. Also ignore foo bar completely. project | item1 |

[Maya-Python] Cannot import geometry cache.

2015-03-17 Thread Panupat Chongstitwattana
Hi. I've been trying to import geometry cache with Python to no avail. When I select the object manually and import from menu, it works. The cache was created from a referenced rig. exFemaleHair010:shirt_plyShape associated xml file is exFemaleHair010_shirt_plyShape I want to import that

[Maya-Python] Re: Cannot import geometry cache.

2015-03-17 Thread Panupat Chongstitwattana
Finally got the cache working by generating cache separately per geometry and use pymel command *cacheFile*. However the warning is still there. Am I doing something wrong? Code: shape = 'cache000:shirt_plyshape' switch = mel.eval('createHistorySwitch(%s,false)' % shape) cacheNode =

[Maya-Python] Re: Selecting objects within a set namespace?

2015-03-16 Thread Panupat Chongstitwattana
Thank you every one :) Haven't used the contextmanager in a while, great example Justin thank you very much. On Monday, March 16, 2015 at 12:20:03 PM UTC+7, Panupat Chongstitwattana wrote: If I store my object names without namespace and then reference them into a new scene. For example

[Maya-Python] Selecting objects within a set namespace?

2015-03-15 Thread Panupat Chongstitwattana
If I store my object names without namespace and then reference them into a new scene. For example if this is the string I stored. rig_grp|geo_grp|head_grp|left_eye_geo And I know for certain my namespace would be ref_RN1 Currently I would manipulate the stored string so it turns into

Re: [Maya-Python] Re: New to PyMEL. Couple question please?

2015-03-12 Thread Panupat Chongstitwattana
ctrl-c, or even if you've explicitly tried to call sys.exit! On Wed, Mar 11, 2015 at 12:32 AM, Panupat Chongstitwattana panu...@gmail.com javascript: wrote: Ah thank you. Such a silly mistake :( Is there any draw back if I don't check objExists but instead go for this? try: PyNode

[Maya-Python] Re: New to PyMEL. Couple question please?

2015-03-11 Thread Panupat Chongstitwattana
Hi. I ran into another problem. objExists is returning different result when I put it in a for loop. selects = pmc.selected() for sel in selects: tmpname = %smaster_crtl % sel.namespace() print tmpname print pmc.objExists(tmpname) #

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

2015-03-11 Thread Panupat Chongstitwattana
I based my own style on QDarkStyle. I think it's a very decent and nice looking one with color very similar to VFX software like Clarisse. Buttons are a bit too round and some tree widget and tree view elements still have none-matching colors but over all still great.

Re: [Maya-Python] Re: New to PyMEL. Couple question please?

2015-03-11 Thread Panupat Chongstitwattana
except Exception as e: or except Exception: instead of except:, because the latter will catch strange things you almost certainly don't want to - ie, if the user presses ctrl-c, or even if you've explicitly tried to call sys.exit! On Wed, Mar 11, 2015 at 12:32 AM, Panupat Chongstitwattana

Re: [Maya-Python] Re: New to PyMEL. Couple question please?

2015-03-11 Thread Panupat Chongstitwattana
the string : tmpname = %smaster_crtl % sel.namespace() tmp = %smaster_ctrl % selects[0].namespace() crtl vs ctrl On Wed, 11 Mar 2015 7:02 PM Panupat Chongstitwattana panu...@gmail.com javascript: wrote: Hi. I ran into another problem. objExists is returning different result when I put

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

2015-03-11 Thread Panupat Chongstitwattana
How important it is to still support PyQt in your opinion? Would dropping it entirely and focusing on PySide have any draw back in the long run? On Thursday, March 12, 2015 at 1:29:59 AM UTC+7, Justin Israel wrote: That is pretty much all the information that I am aware of, as well. PySide

[Maya-Python] Re: New to PyMEL. Couple question please?

2015-03-10 Thread Panupat Chongstitwattana
Thank you Eric! Sorry about getPosition, my bad, I actually mean getTranslation. On Wednesday, March 11, 2015 at 12:02:20 PM UTC+7, AK Eric wrote: Nearly everything you need can be accessed by importing pymel.core When running this: myname = loop_anim_v001:master_ctrl

[Maya-Python] New to PyMEL. Couple question please?

2015-03-10 Thread Panupat Chongstitwattana
Trying my hands on PyMEL for the first time. Would appreciate some pointers. First, in the documentaion I see there's another level of hierarchy. pymel.core.general pymel.core.modeling etc However in all examples I see, none of them are using the general/modeling/etc when they call methods. Are

[Maya-Python] Merging Alembic cache question

2015-03-04 Thread Panupat Chongstitwattana
Hi. I'm wondering if anyone can point me to the correct workflow for importing Alembic Cache please? I'm experimenting with character and so far I can't get the cache to merge with my geometry. Always get a separate model in the scene instead. The character is referenced into scene and I

Re: [Maya-Python] Unable to call up an UI within a UI

2015-02-27 Thread Panupat Chongstitwattana
Is this inputWin.setAttribute(QtCore.Qt.WA_DeleteOnClose) The same as overriding close method with deleteLater ? On Friday, February 27, 2015 at 1:53:33 PM UTC+7, Justin Israel wrote: # anmgToolUI def editSelected(self): inputWin = PublishInfoUI() inputWin.show() You are

Re: [Maya-Python] Re: QListWidget crashing Maya.

2015-02-17 Thread Panupat Chongstitwattana
not really too much different. In some cases for smaller stuff you may end up changing only import statements. In others you may need to change more. On Mon, 16 Feb 2015 9:11 PM Panupat Chongstitwattana panu...@gmail.com javascript: wrote: Hi everyone. Sorry for the delay, replies

Re: [Maya-Python] Re: QListWidget crashing Maya.

2015-02-17 Thread Panupat Chongstitwattana
Thank you Marcus! I should keep this bookmarked :D On Tuesday, February 17, 2015 at 7:26:54 PM UTC+7, Marcus Ottosson wrote: This might be what you're looking for. http://doc.qt.io/qt-4.8/qt.html#WindowType-enum -- You received this message because you are subscribed to the Google Groups

[Maya-Python] Re: QListWidget crashing Maya.

2015-02-16 Thread Panupat Chongstitwattana
. It there any big differences I should be aware of before I start? Best regard. On Friday, February 13, 2015 at 9:37:08 PM UTC+7, Panupat Chongstitwattana wrote: Hi everyone. I got a call from my previous studio that a PyQt script I wrote, which worked with 2012-2014, is crashing

Re: [Maya-Python] Alembic cache and name space?

2014-01-17 Thread Panupat Chongstitwattana
@Asi, Aevar. It's mainly for crowd animation. I wanted to see if I can reference multiple instances of the same model, give them different materials and then apply alembic cache to them. Geo cache works but I'm curious if alembic can be used this way. Best regard. -- You received this

Re: [Maya-Python] Re: PyQt - interface similar to Tactic/Shotgun possible?

2013-12-22 Thread Panupat Chongstitwattana
by Justin from a year ago suggesting PyQWT : http://www.qtcentre.org/threads/40428-Gantt-charts-with-QWT On Sunday, 15 December 2013 23:32:20 UTC-8, Panupat Chongstitwattana wrote: https://lh5.googleusercontent.com/-euynIV9rRUQ/Uq6ruK6K19I/AeU/lHwD1lWC0qw/s1600/capture.png Hi. I'm

[Maya-Python] Re: PyQt - interface similar to Tactic/Shotgun possible?

2013-12-22 Thread Panupat Chongstitwattana
/threads/40428-Gantt-charts-with-QWT On Sunday, 15 December 2013 23:32:20 UTC-8, Panupat Chongstitwattana wrote: https://lh5.googleusercontent.com/-euynIV9rRUQ/Uq6ruK6K19I/AeU/lHwD1lWC0qw/s1600/capture.png Hi. I'm curious how possible is it to create some complex interface similar

Re: [Maya-Python] Re: PyQt - interface similar to Tactic/Shotgun possible?

2013-12-22 Thread Panupat Chongstitwattana
Would you recommend it over PyQt Justin? -- 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.

[Maya-Python] Best way to integrate art department into pipeline?

2013-10-16 Thread Panupat Chongstitwattana
Hi everyone. I need some advice and would appreciate any suggestion. On the 3D side, since Maya/Nuke can run Python, I don't have much problem having Python took care of most stuff from file location, version tracking to naming convention. But how would I go about enforcing similar system to

[Maya-Python] Regex help please?

2013-10-01 Thread Panupat Chongstitwattana
Hi. I have this string path = r'P:\various directories\scene\ch01\seq001\s0090\anim\...' I want to split out the ch01, seq001 and s0090 into 3 variables (or a list). Is there a way to do this with regex in a single line? Maybe with re.split(...) Currently I do it in 3 different steps

[Maya-Python] visual studio - do I need to use the recommended version?

2013-09-17 Thread Panupat Chongstitwattana
reference - http://around-the-corner.typepad.com/adn/2012/06/maya-compiler-versions.html Would it be ok if I use the latest version of VS (2012) to compile plug-ins for earlier Maya such as 2012? Or should I try to use matching version? -- You received this message because you are subscribed

[Maya-Python] Animation to Lighting pipeline question.

2013-09-06 Thread Panupat Chongstitwattana
Hi everyone. Currently we use reference replace for different stages on our pipeline. Along the way our materials would often get disconnected. Layout reference proxy model Animator replace it with rigged models Lightings replace it with look-dev'ed models and etc.

[Maya-Python] How reliable is SQLite in production?

2013-09-06 Thread Panupat Chongstitwattana
Hi everyone. I've been thinking about switching database of my pipeline tools from PostgreSQL to SQLite but still uncertain how reliable it is? The reason is that we're having a co-production going on between a few studio and to get PostgreSQL working on their end has not been easy... Most

Re: [Maya-Python] Maya API tuts

2013-03-08 Thread Panupat Chongstitwattana
Chad has an intro tutorial which is pretty recent. http://www.youtube.com/watch?v=7Uya-I9T2iM http://www.chadvernon.com/blog/resources/maya-api-programming/ On Fri, Mar 8, 2013 at 4:59 PM, Ricardo Viana cgolhei...@gmail.com wrote: Hi guys. I come from art background and slowly been learning

[Maya-Python] What does this decorator do?

2013-03-03 Thread Panupat Chongstitwattana
Hi. I'm experimenting with some code and I'm curious what the @QtCore.pyqtSlot() decoration does? I saw it from some other codes, but even without it, testdef() still returns the widget's name correctly. from PyQt4 import QtGui, QtCore class cb(QtGui.QComboBox): def __init__(self):

Re: [Maya-Python] What does this decorator do?

2013-03-03 Thread Panupat Chongstitwattana
. On Mar 3, 2013 9:06 PM, Panupat Chongstitwattana panup...@gmail.com wrote: Hi. I'm experimenting with some code and I'm curious what the @QtCore.pyqtSlot() decoration does? I saw it from some other codes, but even without it, testdef() still returns the widget's name correctly. from PyQt4

Re: [Maya-Python] What does this decorator do?

2013-03-03 Thread Panupat Chongstitwattana
. What do you mean by finding a list of methods exactly? All methods are documented in the api docs. Can you give an example of what you want to do? On Mar 3, 2013 9:53 PM, Panupat Chongstitwattana panup...@gmail.com wrote: Thanks for the link Justin. I don't quite understand what C

Re: [Maya-Python] What does this decorator do?

2013-03-03 Thread Panupat Chongstitwattana
, the PyQt4 modules are compiled objects): http://qt.gitorious.org/qt/qt/blobs/6248dff2c7f3288d675de639abfbbc6c1d618006/src/gui/widgets/qcombobox.cpp On Mar 3, 2013, at 10:49 PM, Panupat Chongstitwattana wrote: For example, QComboBox currentIndexChanged signal give me an index. If I want

Re: [Maya-Python] what does list[:] do ?

2013-03-02 Thread Panupat Chongstitwattana
to seven elements Sent from my iPad On 2013-3-2, at 0:33, Panupat Chongstitwattana panup...@gmail.com wrote: the [:] ? -- 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

Re: [Maya-Python] How does sip API version works?

2013-03-02 Thread Panupat Chongstitwattana
Sorry for digging up an old email. I'm just curious if there's any drawback of setting the sip api to 2 for use in Maya? Does api 1 have any advantage over 2? -- You received this message because you are subscribed to the Google Groups Python Programming for Autodesk Maya group. To unsubscribe

[Maya-Python] what does list[:] do ?

2013-03-01 Thread Panupat Chongstitwattana
for a in arrays: and for a in arrays[:]: seem to do exactly the same thing. Is there any difference made by the [:] ? -- 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

[Maya-Python] prompt save before opening a file?

2013-02-25 Thread Panupat Chongstitwattana
I'm getting an error - Runtime Error: Unsaved changes when I try to open a file via Python command. Is there a way I can make Maya prompt save similar to when opening files normally? The prompt flag doesn't seem to do it. -- You received this message because you are subscribed to the Google

Re: [Maya-Python] Re: Maya Python OOP examples

2013-02-22 Thread Panupat Chongstitwattana
And you have my vote! On Sat, Feb 23, 2013 at 2:24 AM, Mitch Rosefelt pixeldr...@gmail.comwrote: I gotta double up on promoting Justins videos. I started w/PyQt and it was so helpful I purchased vol.2 of the Python in Maya series. Watched both front to back. They'll definitely give you

[Maya-Python] reload imported modules?

2013-02-20 Thread Panupat Chongstitwattana
When I reload a python script, is there a way to force it to reload imported modules within the script, too? -- 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,

Re: [Maya-Python] reload imported modules?

2013-02-20 Thread Panupat Chongstitwattana
level module requires some inspection. I think you can search and fine some project out there that do advanced reloading. You also can't reload any modules that are not pure-python. On Thu, Feb 21, 2013 at 6:46 PM, Panupat Chongstitwattana panup...@gmail.com wrote: When I reload a python

[Maya-Python] QCheckBox disabled after setting stylesheet

2013-02-13 Thread Panupat Chongstitwattana
Hi. Trying to color a QCheckBox. But as soon as I add QCheckBox::indicator to the css, the check box isn't responding anymore. checkbox = QtGui.QCheckBox() checkbox.setStyleSheet( ::indicator{ background: black; } ) Am I doing anything wrong? -- You received this message because you are

Re: [Maya-Python] QCheckBox disabled after setting stylesheet

2013-02-13 Thread Panupat Chongstitwattana
)) checkbox.setPalette(palette) On Feb 14, 2013, at 12:58 AM, Panupat Chongstitwattana wrote: Hi. Trying to color a QCheckBox. But as soon as I add QCheckBox::indicator to the css, the check box isn't responding anymore. checkbox = QtGui.QCheckBox() checkbox.setStyleSheet( ::indicator{ background

Re: [Maya-Python] How does sip API version works?

2013-02-12 Thread Panupat Chongstitwattana
Oh.. so we can pass an empty list as argument. Thanks! On Wed, Feb 13, 2013 at 3:15 AM, Justin Israel justinisr...@gmail.comwrote: From docs: The list of available event names can be retrieved by calling the getEventNames method or by using the -listEvents flag on the

Re: [Maya-Python] How does sip API version works?

2013-01-30 Thread Panupat Chongstitwattana
Israel justinisr...@gmail.comwrote: Nice. You must have avoided using QString instances directly or handling QVariant return values. On Jan 30, 2013 8:01 PM, Panupat Chongstitwattana panup...@gmail.com wrote: Doing a little more test and I think you're right Justin. I guess I'm also lucky

Re: [Maya-Python] How does sip API version works?

2013-01-30 Thread Panupat Chongstitwattana
Hi Justin. I'm curious if there's a more pythonic way to iterate this? self.FIELDS = [ 'width', 'height', etc, etc] self.settings = QSettings(foo, bar) tmp = [] for field in FIELDS: tmp.append( self.settings.value(field) ) return tmp Panupat. -- You received this message because you are

Re: [Maya-Python] How does sip API version works?

2013-01-30 Thread Panupat Chongstitwattana
ahh that's really neat. Thanks! On Wed, Jan 30, 2013 at 4:40 PM, Justin Israel justinisr...@gmail.comwrote: You could use a list comprehension return [self.settings.value(field) for field in self.FIELDS] On Jan 30, 2013 10:21 PM, Panupat Chongstitwattana panup...@gmail.com wrote: Hi

[Maya-Python] How does sip API version works?

2013-01-29 Thread Panupat Chongstitwattana
Do I need to set the sip API in every scripts I call from Maya? I'm curious because I often get errors saying the api version was already set. Does that mean I can set the api version in userSetup.py and every scripts will follow it? If I run my main script which sets api to version 2, do I also

Re: [Maya-Python] How does sip API version works?

2013-01-29 Thread Panupat Chongstitwattana
2 in your userSetup, but that would force every pyqt script that you run to conform to it. Maybe I am wrong though. On Wed, Jan 30, 2013 at 5:07 PM, Panupat Chongstitwattana panup...@gmail.com wrote: Do I need to set the sip API in every scripts I call from Maya? I'm curious because I

Re: [Maya-Python] need chat messenger in maya

2013-01-25 Thread Panupat Chongstitwattana
You can try Squiggle. http://squiggle.codeplex.com/ On Fri, Jan 25, 2013 at 6:00 PM, karthik chowdary karthik.yerr...@gmail.com wrote: Is there any option in maya to chat with coliques in my office through any script -- You received this message because you are subscribed to the Google

Re: [Maya-Python] PyQt Resources and UI

2012-11-12 Thread Panupat Chongstitwattana
self.btnCut.clicked command. Can I stack them together 1 after another or is there some more complex way of loading them up? :s I thought I have to script a command for each button for each function to happen... On Friday, 9 November 2012 15:32:11 UTC, Panupat Chongstitwattana wrote: grr... forgot

Re: [Maya-Python] PyQt Resources and UI

2012-11-09 Thread Panupat Chongstitwattana
Hey Daz. self.setupUI() should use a small letter i. Sorry. self.seuoUi() On Fri, Nov 9, 2012 at 6:35 PM, Panupat Chongstitwattana panup...@gmail.com wrote: Hey Daz. No worry. I'm a newbie myself. Believe me, when I just started, I bombard this group with tons of questions

Re: [Maya-Python] PyQt Resources and UI

2012-11-09 Thread Panupat Chongstitwattana
), QtCore.QObject) def mayaMain(): maya_ui1_window = Ui_MainWindow(getMayaWindow()) maya_ui1_window.show() def btallClicked(self): # do whatever you want cmds.sphere() mayaMain() On Friday, 9 November 2012 12:14:48 UTC, Panupat Chongstitwattana wrote: Hey Daz. self.setupUI() should use a small

Re: [Maya-Python] PyQt Resources and UI

2012-11-09 Thread Panupat Chongstitwattana
grr... forgot parentesis import daz reload(daz) daz.launch() -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe

Re: [Maya-Python] UI questions

2012-11-06 Thread Panupat Chongstitwattana
Just my 2c. If you're aiming to use Qt/PyQt, the traditional cmds UI won't be necessary at all. I've created tons of tools with PyQt for my studio and I have almost 0 idea how to create cmds UI. On Tue, Nov 6, 2012 at 6:01 PM, Daz dariusz1...@gmail.com wrote: Heya I'm learning python UI

Re: [Maya-Python] PyQt Question

2012-11-02 Thread Panupat Chongstitwattana
:/test.ui, self) test = UI() test.show() You can replace parent=None with parent=getMayaWindow() so that your UI will be a child of Maya's window. You can get that function with example from Nathan's blog http://nathanhorne.com/?p=451 On Sat, Nov 3, 2012 at 12:32 PM, Panupat Chongstitwattana panup

[Maya-Python] get value from multiple selections QListWidget

2012-10-25 Thread Panupat Chongstitwattana
I'm wondering if there's a cleaner way to do this than the way I'm doing? Let's say I have myListWidget which is multiple-selection enabled QListWidget, I would then do this to print out the values of selected rows. for item in list(myListWidget.selectedItems()) print

Re: [Maya-Python] Re: get value from multiple selections QListWidget

2012-10-25 Thread Panupat Chongstitwattana
, October 25, 2012 2:39:08 PM UTC+3:30, Panupat Chongstitwattana wrote: I'm wondering if there's a cleaner way to do this than the way I'm doing? Let's say I have myListWidget which is multiple-selection enabled QListWidget, I would then do this to print out the values of selected rows. for item

[Maya-Python] global variable accessible for all modules?

2012-10-22 Thread Panupat Chongstitwattana
Hi. I have a couple Python UI for opening/saving scenes in our pipeline. Most of them share some common selection list. client project episode a few more hierarchy I'm wondering if there's a way to store those information globally, so when I launch other UI they can pick up the value? I want

Re: [Maya-Python] singleton / app scope

2012-10-19 Thread Panupat Chongstitwattana
try add global aaa On Fri, Oct 19, 2012 at 5:47 PM, nish singhai.n...@gmail.com wrote: following script runs once when called from maya - menu - menuItem. However when clicking again it does not run. What do i do to make it run again and again. import maya.cmds as cmds import maya.mel as

  1   2   >