Re: [Maya-Python] mysql in maya

2014-07-03 Thread Robert White
Or PyMySQL which is another pure python implementation this one offers the same interface as MySQLdb so it can act as a drop in replacement. No idea if the MySQL connector behaves the same way. On Thursday, July 3, 2014 7:20:23 AM UTC-5, Nils wrote: > > The

Re: [Maya-Python] Fun fact

2014-11-21 Thread Robert White
"The script or callable object is executed in the main thread during the next idle event. The thread callingexecuteInMainThreadWithResult() blocks until the main thread becomes idle and runs the code. Once the main thread is done executing the code, executeInMainThreadWithResult() returns the

Re: [Maya-Python] Fun fact

2014-11-21 Thread Robert White
I've had good luck with it for simple tasks like updating GUIs. I also use it as part of my startup sequence for any tasks that need to build/tweak/change maya's default GUIs, because not enough of the maya environment is loaded during userSetup.py's execution. But if you defer those tasks, the

Re: [Maya-Python] Fun fact

2014-11-27 Thread Robert White
eadWithResult? > ​ > > On 21 November 2014 at 16:39, Robert White > wrote: > >> I've had good luck with it for simple tasks like updating GUIs. >> >> I also use it as part of my startup sequence for any tasks that need to >> build/tweak/change maya

[Maya-Python] Re: Basic question about pyMel

2015-03-24 Thread Robert White
Nope this wouldn't work: pm.ls(type='camera')[0].pm.getParent().pm.getTranslation().z Instead you'd need: pm.ls(type='camera')[0].getParent()..getTranslation().z Its only the initial function that gets prefixed with the module namespace. On Monday, March 23, 2015 at 12:59:00 PM UTC-5, Simon

Re: [Maya-Python] Thread with callback

2015-03-25 Thread Robert White
If you're worried about event handlers keeping callback objects alive when they should have already been wiped out. Use the weakref module. They have a pretty good example at http://code.activestate.com/recipes/578298-bound-method-weakref/. I ended up using a variation of this for my MSceneMes

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

2015-06-05 Thread Robert White
Sounds like you're looking for more of a live coding environment than an IDE. The thing to keep in mind with Maya is that you're sort of dealing with a constantly running interpreter, not a development environment. Happily though there are some python tools that do work similarly. I use iPython

Re: [Maya-Python] Re: Simple program with complicated problem! InternalVar issue?

2015-08-10 Thread Robert White
Or, if you're like me and don't ever remember how the %s formatting works: imagePath="{pth}icons/staircon.jpg".format(pth=mc.internalVar(userPrefDir=True)) or better yet, because it's a file path: import os imagePath= os.path.join(mc.internalVar(userPrefDir=True), 'icons', 'staircon.jpg') That

Re: [Maya-Python] List referenced files

2015-08-11 Thread Robert White
So if you want the texture file nodes in the scene, you can get them from pymel with: import pymel.core as pm file_nodes = pm.ls(type=pm.nt.File) file_paths = [fyle.fileTextureName.get() for fyle in file_nodes] with cmds: import maya.cmds as cmds file_nodes = cmds.ls(type='file') file_paths = [c

[Maya-Python] Re: Procedurally determining the number of submenus

2015-10-09 Thread Robert White
So, subMenus are really just menus, which means you can query the itemArray value and get a list of their children, if that list is empty, you've got an empty subMenu. I've got an example of how to search a top level menu recursively and return a list of all the empty subMenus: https://gist.gi

Re: [Maya-Python] Re: Procedurally determining the number of submenus

2015-10-09 Thread Robert White
#x27; method to no avail. I'll have a look at >>> your code reference and see what I was doing wrong. >>> >>> Cheers! Ken >>> >>> On Fri, Oct 9, 2015 at 12:03 AM, Robert White >> > wrote: >>> >>>> So, subMenus are r

[Maya-Python] Re: mel global vars

2015-10-21 Thread Robert White
Should be the melGlobals object. It works like a dict So this should work import pymel.core as pm pm.melGlobals['$gShelfTopLevel'] # Result: 'MayaWindow|toolBar2|MainShelfLayout|formLayout14|ShelfLayout' # On Wednesday, October 21, 2015 at 12:51:33 PM UTC-5, todd@gmail.com wrote: > > do

Re: [Maya-Python] pymel crashing maya.standalone

2015-11-12 Thread Robert White
So I've been running into this a lot with 2016. The fix I've been using is: def crash_fix(): import maya.cmds as cmds try: cmds.quit() except AttributeError: pass atexit.register(crash_fix) I usually throw that in either userSetup.py or sitecustomize.py, mostly so I

Re: [Maya-Python] Qmake: Error compiling qtforms from the Maya devkit [C++]

2015-11-18 Thread Robert White
Maya 2016 on windows uses VS2012 not 2013. So you'll need to install the other compiler. I believe there is a way to tell VS2013 to use older compilers, but I'm not sure how on earth to go about doing that. Also if you don't want the entire VS2012 installation you should be able to use the Windo

[Maya-Python] Re: userSetup.py not running on startup

2015-11-24 Thread Robert White
So I just tested that in Maya2016 and it seemed to work fine. Remember that anything printed in a userSetup.py will most likely end up in the output window (which is minimized by default in 2016), and not in the script editor window once Maya is done loading. This is because userSetup.py is run

Re: [Maya-Python] Re: userSetup.py not running on startup

2015-11-24 Thread Robert White
You're right, it just has to be importable, so sys.path. I think I got my maya / python brains crossed there. Also glad it got worked out! On Tuesday, November 24, 2015 at 2:20:55 PM UTC-6, Justin Israel wrote: > > > > On Wed, Nov 25, 2015 at 8:47 AM Robert White > wrote: &

Re: [Maya-Python] Re: easy_install from Maya's python interpreter

2016-01-21 Thread Robert White
So maya doesn't play to nicely with virtualenv, has to do with how it packages the standard lib into a zip-file. Now you can transfer pure python libraries from a standard python install's virtualenv, and then just place that onto maya's pythonpath. So I use a version of pip that I've installed

Re: [Maya-Python] Re: easy_install from Maya's python interpreter

2016-01-21 Thread Robert White
API and PySide/PyQt > ect… > > I’m curious, how come you compiled your own Python here, and didn’t use > mayapy? I’ve compiled packages with it before and can’t recall having any > issues with it. > ​ > > On 21 January 2016 at 14:16, Robert White > wrote: > >> So m

Re: [Maya-Python] python modules

2016-02-11 Thread Robert White
I've got a build of Perforce that should work with both 2015 and 2016, its also compiled with a compatible version of openSSL if your server happens to require that. https://onedrive.live.com/?cid=de880f5659db1a15&id=DE880F5659DB1A15%2118925&ithint=folder,zip&authkey=!AEinLoalQenrHdE On Thurs

[Maya-Python] Re: need help with userSetup.py and calling a script that is mainly a class.

2016-02-15 Thread Robert White
Looks like your error is in your create_cam_class.py file, not in your userSetup.py, probably something in that file is trying to interact with the GUI outside of your evalDeferred call. You could probably try testing it by moving the import create_cam_class and from_cam_class import smRealCame

[Maya-Python] Re: PyGame Installation

2016-02-16 Thread Robert White
You can't use compiled extension libraries from standard python27 with Maya's internal python interpreter. You'll need to recompile the extension with Visual Studio 2012, because standard python27 is compiled against vs2008. On Tuesday, February 16, 2016 at 10:10:58 PM UTC-6, Ruchit Bhatt wrote

Re: [Maya-Python] Re: Plugin hanging with change to currentTime

2016-04-12 Thread Robert White
We were getting some hard crashes in parallel eval using bakeResults. So I wrote a decorator to swap us back to DG eval for our baking/export functions. Haven't had any time to actually dig into the rig's that were causing the issues, but it felt really weird given that we're not using any custo

[Maya-Python] Re: Re-Direct print back to the Script Editor

2016-07-28 Thread Robert White
If you're on windows the following file is where the maya log handling stuff gets setup. Should be in a fairly similar place on other OSs C:\Program Files\Autodesk\Maya2014\Python\Lib\site-packages\maya\utils.py That should hopefully give you a starting point for how they're hooking into stdout

Re: [Maya-Python] ImageMagick and subprocess

2016-08-30 Thread Robert White
If you're running this from python, take a look at http://docs.wand-py.org/en/0.4.3/ . I've not used it myself, but I've had a few people I trust recommend it. On Tuesday, August 30, 2016 at 8:16:53 AM UTC-5, Cesar Saez wrote: > > Hi, > You have check imagemagick/whatever-app return codes by get

[Maya-Python] Re: Installing Pillow for Maya 2016 / Python 3.6

2016-09-19 Thread Robert White
Are you on windows? Because Maya (2013+) does not use the same C-runtime as standard python2.7 on windows, which means you can't just reuse the same C-extensions between the two versions. Usually you need to rebuild the library against the version(s) of Maya that you're planning to support. On

[Maya-Python] Re: succesfully adding to PYTHONPATH using Maya.env

2016-09-20 Thread Robert White
Usually the path separator is ; not , Not sure if that is the potential problem here or not. I've stopped using the Maya.env file, and instead do any environment variable setup in a maya module definition file. Some links: http://docs.autodesk.com/MAYAUL/2013/ENU/Maya-API-Documentation/index.html

[Maya-Python] Re: How to use subprocess.Popen() with maya ?

2016-10-21 Thread Robert White
https://pymotw.com/2/subprocess/ is a really good rundown of working with the subprocess module. In fact the site is full of tutorials for the entire std library. On Friday, October 21, 2016 at 2:12:37 PM UTC-5, cyrill...@gmail.com wrote: > > Hello, > > Anyone know how to use subprocess inside M

Re: [Maya-Python] Help with a closure in Maya and Python.

2016-10-28 Thread Robert White
Does this work by chance? # File_1 from file_2 import selection as sel def create_window(): def pushButton(): sel() On Friday, October 28, 2016 at 10:46:26 AM UTC-5, Padraig Ó Cuínn wrote: > > Hi Marcus, > > I am trying to get to selection() which is in a maya code file, T

Re: [Maya-Python] Help with a closure in Maya and Python.

2016-10-28 Thread Robert White
What error exactly are you getting when you try that? On Friday, October 28, 2016 at 12:50:46 PM UTC-5, Padraig Ó Cuínn wrote: > > Nope no difference > > On Friday, 28 October 2016 08:58:37 UTC-7, Robert White wrote: >> >> Does this work by chance? >> >> # Fil

[Maya-Python] Re: finding plane normal to a vector

2016-11-08 Thread Robert White
http://mathonline.wikidot.com/point-normal-form-of-a-plane Should just need the normal and a point. On Tuesday, November 8, 2016 at 3:19:14 PM UTC-6, s...@weacceptyou.com wrote: > > Hello, > > i was wondering if there was a quick way of finding the equation of a > plane normal to a vector in m

Re: [Maya-Python] bakeresults in Python is super slow

2016-12-24 Thread Robert White
Also, preserveOutsideKeys used to cause some major slowdown in 2014/2015. I believe the bug was finally fixed in 2016, so that might be another culprit. On Saturday, December 24, 2016 at 6:42:35 AM UTC-8, Jeremie Passerin wrote: > > Thanks Christopher, > I'll take a look that could be useful. >

[Maya-Python] Re: MayaPy 2017 PythonInterpreter crash

2017-01-26 Thread Robert White
I've had the interpreter crash a lot on exit due to plugins not unloading cleanly. Might be worth trying it with all of them disabled? On Thursday, January 26, 2017 at 5:22:45 AM UTC-6, Erik Karlsson wrote: > > Hi everyone! > > I'm trying to get maya 2017 up and working. But I'm having some issue

Re: [Maya-Python] Rename all objects in list with name of an other lists

2017-02-23 Thread Robert White
for shader_name, new_name in zip(ShaderNames, newNames): rename shader_name, new_name On Thursday, February 23, 2017 at 11:53:08 AM UTC-6, Michał Frątczak wrote: > > smth like this... > > for i in xrange(len(ShaderNames)): > rename ShaderNames[i] NewNames[i] > > > W dniu 2017-02-23 o 17:1

Re: [Maya-Python] Command flag in symbolButton keeps erroring for me

2017-03-14 Thread Robert White
Try wrapping it in a lambda? self.btn_add = cmds.symbolButton( width=60, height=20, annotation='Add object(s)', image='add.xpm', command=lambda *x: self.add_btn_callback( "item_list") ) On Tuesday, March 14, 2017 at 10:59:37 AM UTC-5, likage wrote: > > While it works for the example, I tried appl

Re: [Maya-Python] Command flag in symbolButton keeps erroring for me

2017-03-14 Thread Robert White
Because maya expects you to pass either a string, or a callable to the command flag. When you don't wrap the function in a lambda, you're calling the function, and passing the result to the command flag. On Tuesday, March 14, 2017 at 11:12:08 AM UTC-5, likage wrote: > > Try wrapping it in a la

Re: [Maya-Python] protecting python code

2017-03-27 Thread Robert White
Yeah, it is really easy actually. https://sourceforge.net/projects/easypythondecompiler/ is just one of many examples. Even saw an article a few weeks ago about someone rescuing some source code by grabbing it from the in-memory code objects. On Monday, March 27, 2017 at 8:52:31 AM UTC-5, Rudi

[Maya-Python] Re: PYTHON MAYA convert string u'001' to 001?

2017-04-17 Thread Robert White
Try it without the backticks around cmds.textField. SBpath = 'G:\\ProjectPath\\' import maya.cmds as cmds import os, glob, time def buttonLGTPressed(*args): EpisodeName = cmds.textField("Episode", query = True, text = True) print EpisodeName rootEp = SBpath + "{}\\".format(Episo

[Maya-Python] Re: Nearest Point On Mesh in Maya

2017-05-05 Thread Robert White
` is usually referred to as the backtick. On Thursday, May 4, 2017 at 4:09:37 PM UTC-5, Michael Boon wrote: > > The little apostrophe character you're using should be `, not ' > On a US keyboard, that's the key above Tab. I don't know what it's called > (and I've never seen it used for anything o

[Maya-Python] Re: Get objects that are not uv

2017-07-20 Thread Robert White
If you need to avoid pymel for some reason: from maya import cmds def find_unmapped_meshes(): unmapped_meshes = [] for mesh in cmds.ls(type='mesh'): uvs = cmds.polyListComponentConversion(mesh, toUV=True) uvs = cmds.ls(uvs, fl=True) if len(mesh) < 2: unmapped_meshes.append(mesh) return unmapped_m

Re: [Maya-Python] where is does maya source the python scripts from.

2017-09-08 Thread Robert White
Also, a fun fact, starting with Maya 2017, the import paths are scrambled during startup by maya. Basically they are doing: sys.path = list(set(sys.path) | set(os.environ.get('PYTHONPATH', '').split(os.pathsep))) The idea is that they are trying to eliminate duplicates, which this does, but b

Re: [Maya-Python] where is does maya source the python scripts from.

2017-09-09 Thread Robert White
Easiest place to places scripts while learning everything is in (if you're on windows) `C:/Users//documents/maya/2017/scripts` No clue on other OS's off the top of my head though. On Saturday, September 9, 2017 at 10:48:08 AM UTC-5, jettam wrote: > > I am using maya 2017. Robert mentioned thing

Re: [Maya-Python] where is does maya source the python scripts from.

2017-09-10 Thread Robert White
Try that with a userSetup.py instead of .mel. Otherwise, yes that should work. On Sunday, September 10, 2017 at 7:49:40 PM UTC-5, jettam wrote: > > I made a userSetup.mel file, and placed it here: > C:\Users\justin\Documents\maya\2017\scripts\userSetup.mel > In this file I added this text:

Re: [Maya-Python] couple of userSetup file questions.

2017-09-11 Thread Robert White
Maya will exec every single `userSetup.py` files that it finds on `sys.path` during startup, into the `__main__` namespace, the GUI won't exist yet, so any modifications you want to make to the interface need to be wrapped in a function that is passed to `maya.utils.executeDeffered` which will

Re: [Maya-Python] couple of userSetup file questions.

2017-09-11 Thread Robert White
t the `MAYA_SKIP_USERSETUP_PY` environment variable, no `userSetup.py` files will be executed. I don't know if there is a similar way to block `userSetup.mel` On Monday, September 11, 2017 at 6:10:13 PM UTC-5, Robert White wrote: > > Maya will exec every single `userSetup.py` files that it finds

Re: [Maya-Python] where is does maya source the python scripts from.

2017-09-14 Thread Robert White
So it looks like 2018.1 has potentially fixed this. I've not yet tried the update, but it made it onto the release notes. On Friday, September 8, 2017 at 9:26:34 PM UTC-5, Robert White wrote: > > Also, a fun fact, starting with Maya 2017, the import paths are scrambled > during s

[Maya-Python] Re: P4python doesn't work under maya 2017

2017-09-28 Thread Robert White
Last job I was using the version that I've shared here , I had tested it up through 2017, but it might work in 2018 as well (no promises on 2018). It was compiled with OpenSSL

Re: [Maya-Python] Re: P4python doesn't work under maya 2017

2017-09-28 Thread Robert White
n your compile? like what syntax > its looking for and such, or do I have to do run("p4 command","files") > > > On Thu, Sep 28, 2017 at 5:46 AM, Robert White > wrote: > >> Last job I was using the version that I've shared here >> <https://one

[Maya-Python] Re: python 2.7 v.1700 64 bit VC 2012 build

2017-10-02 Thread Robert White
You can always just use the mayapy.exe as your python build. To get the libs/headers you'll need to download the proper devkit for your maya version. On Monday, October 2, 2017 at 7:37:35 AM UTC-5, riga_rig wrote: > > Hello! > Could you please point me on python 2.7 v.1700 64 bit VC 2012 build b

Re: [Maya-Python] StopIteration, where art thou?

2017-10-11 Thread Robert White
I can see StopIteration just fine in 2018 on windows. It should live in both __builtins__ and the exceptions module. Maybe some other script is messing those up? On Wednesday, October 11, 2017 at 3:23:57 PM UTC-5, Justin Israel wrote: > > Is this only in Windows? I just tested 2016, 2017, and 20

Re: [Maya-Python] Re: string formatting.

2017-10-11 Thread Robert White
Some other great examples: https://mkaz.tech/code/python-string-format-cookbook/ On Wednesday, October 11, 2017 at 7:56:30 PM UTC-5, Simon Anderson wrote: > > +1 :) > > On Thursday, 12 October 2017 11:50:02 UTC+11, damonshelton wrote: >> >> I would suggest utilizing keywords rather than order - al

Re: [Maya-Python] StopIteration, where art thou?

2017-10-11 Thread Robert White
> 1 1 > 2# Error: > # Traceback (most recent call last): > # File "", line 4, in > # StopIteration # > > > On Thursday, 12 October 2017 08:09:43 UTC+11, Robert White wrote: >> >> I can see StopIteration just fine in 2018 on windows. >> >> It shou

Re: [Maya-Python] Add menu to grapheditor/hypershape

2017-11-27 Thread Robert White
Yeah, there isn't an API call for when UI's are created, just destroyed. http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__cpp_ref_class_m_ui_message_html On Sunday, November 26, 2017 at 7:13:17 PM UTC-6, Justin Israel wrote: > > > > On Sat, Nov 25, 2017 at 9:35 AM Pritish Dogra > wrote: >

Re: [Maya-Python] changing path to references witha callback

2017-11-29 Thread Robert White
MSceneMessage.addCheckFileCallback with kBeforeLoadReferenceCheck should get you what you want. You'll get a reference to the file object before the reference has been loaded, and you should be able to tweak and update the file paths from there. I've used this in the past to fix issues where

Re: [Maya-Python] MayaPy Cython Error

2018-01-23 Thread Robert White
You'd need to build Cython for maya against the proper version of visual studio. Which in 2014 I believe was VS2010. You'll also need to use that version when actually compiling your cython project. On Monday, January 22, 2018 at 9:47:31 PM UTC-6, Justin Israel wrote: > > My guess is that the co

[Maya-Python] Re: Has anyone had success with setting up virtualenv with mayapy?

2018-03-07 Thread Robert White
Maya does some things when it comes to how it deploys python that just aren't compatible with virtualenv. The biggest hurdle is that they zip up the entire standard library, while virtualenv likes to copy and enhance certain files from the standard library so as to operate properly. On Wedne

[Maya-Python] Re: Has anyone had success with setting up virtualenv with mayapy?

2018-03-08 Thread Robert White
The only time I've gotten virtualenv to operate was using a custom python build that matched the runtime environment of Maya (I was on windows, which meant compiling with a newer compiler), and then manually doing the dirty work to set all the paths and environment variables properly so that it

Re: [Maya-Python] List all registered callbacks

2018-04-23 Thread Robert White
I'm not sure there is a simple way. I went looking the last time I was doing serious work with callbacks, and eventually just settled on wrapping them with my own custom classes that could handle de-registration as needed. The closest I could find was `MMessage.nodeCallbacks` which will return a

[Maya-Python] Re: PyCharm Auto Completion in Maya 2018 for QT5

2018-06-12 Thread Robert White
Someone has posted some backups of them here: https://github.com/tds-anonymous/maya-devkit Not sure where autodesk has moved them to this time, but they've been bouncing around the last few years. On Tuesday, June 12, 2018 at 11:56:09 AM UTC-5, meljunky wrote: > > I have been using the completio

[Maya-Python] Re: popupMenu command works in Python but not in Mel

2018-07-26 Thread Robert White
I believe the problem you're running into here, is that the popupMenu -postMenuCommand expects the command to be in mel, because you're triggering it from mel. On Thursday, July 26, 2018 at 3:01:24 PM UTC-5, likage wrote: > > I was trying to convert a popupMenu command from Python to Mel.. > >

Re: [Maya-Python] dynamically changing sys.path

2018-07-27 Thread Robert White
I think you'd be better served with a small launcher app. That allows for the artist to make their selection. Then that opens the proper app from the proper location. Otherwise you're going to be fighting a lot of low level language machinery to get what you want. On Friday, July 27, 2018 at 8:4

[Maya-Python] Re: MayaPy Cython Error

2018-09-02 Thread Robert White
2:20:45 PM UTC-5, lirui...@gmail.com wrote: > > 在 2018年2月8日星期四 UTC+8上午11:12:52,徐宗巧写道: > > Thanks very much to Justin Israel and Robert White, I had solved the > issue already!! > > Like you said, i had install visual studio 2012, and build Cython for > maya2014 and maya2

Re: [Maya-Python] how to install pyodbc for maya 2017

2018-09-12 Thread Robert White
I think he's looking for a library to specifically access MS-SQL not MySQL. Sadly I couldn't find any pure python implementations. So you'll probably just need to compile your own version. On Wednesday, September 12, 2018 at 6:27:35 AM UTC-5, flop...@gmail.com wrote: > > You could try a pure pyt

[Maya-Python] Re: pymel.core.nodetypes.Locator class giving a ValueError when instantiated

2018-11-02 Thread Robert White
So what seems to be happening is that pymel.core.general.spaceLocator has been altered to return just a Locator and not a list. pymel.core.nodetypes.Locator uses pymel.core.general.spaceLocator to generate the object, and then because it isn't a list (which is what the generic pymel machinery ex

[Maya-Python] Re: pymel.core.nodetypes.Locator class giving a ValueError when instantiated

2018-11-02 Thread Robert White
Also, the secondary check, where it tries to see if the nodetype matches the newly created node also fails, because spaceLocator has created a transform, and the secondary check is looking for a locator. On Friday, November 2, 2018 at 10:00:09 PM UTC-5, Robert White wrote: > > So what se

[Maya-Python] Re: pymel.core.nodetypes.Locator class giving a ValueError when instantiated

2018-11-02 Thread Robert White
Opened a PR for a fix https://github.com/LumaPictures/pymel/pull/415, may or may not get accepted. But simple enough if you want to patch it locally. On Friday, November 2, 2018 at 10:02:28 PM UTC-5, Robert White wrote: > > Also, the secondary check, where it tries to see if the nodetype m

[Maya-Python] Re: remap reference paths on load

2018-12-07 Thread Robert White
I've done this at a past job, and sadly don't have the code in front of me anymore. But from what I remember you get a MFile object from the callback, and can edit the paths in that file object, and they will be passed into the created reference node after the callback is finished. On Friday,

Re: [Maya-Python] Is it possible to install new modules in python to be used inside maya ?

2019-01-31 Thread Robert White
You can use mayapy instead of a custom python install when compiling modules for Maya. I've done this for quite a few extensions. Also the easiest way to get pip running specifically for maya, is just `mayapy -m ensurepip` (at least for more recent versions) On windows this will install it in c:

[Maya-Python] Re: String formatting error for arg in dictionary for use in mel.eval

2019-03-08 Thread Robert White
Try: my_naming = 'my_layer' command = '"{{"BaseAnimation", "{0}"'.format(my_naming) I believe the problem is that because you've got the single open { the formatting code gets confused. To insert a { into a formatted string you just double them up. On Friday, March 8, 2019 at 1:54:09 PM UTC-6,

Re: [Maya-Python] Re: Do Maya has signal to tell object's transform being changed?

2019-05-14 Thread Robert White
scritpJob is built on top of the MMessage event system that is exposed through the API. So it is capable of doing everything that a scriptJob is, plus has access to some more granular events. Nothing is stored in userPrefs though, you have to setup the events for each session. On Tuesday, May

[Maya-Python] Re: maya api : while importing prompts error

2019-11-20 Thread Robert White
It looks like in some of your code you're referencing it as `twistYAttribute` but in other places as `twistYAttr` which appears to be the correct spelling. On Tuesday, November 19, 2019 at 4:06:58 AM UTC-6, blossom ghuntla wrote: > > Hello All, > > I autodidact basic python, basic maya.cmds, bas

Re: [Maya-Python] MayaPy Cython Import Error

2020-02-03 Thread Robert White
You don't need to copy the files to a new include folder, instead you want to just make sure the folder is on the `INCLUDE` environment variable. So much like you did for LIB, you'd do `set INCLUDE=%INCLUD%;path_to_maya\include\python2.7` On Monday, February 3, 2020 at 3:47:17 AM UTC-6, Paul Wi