Re: [Maya-Python] locator follow ground geometry

2009-12-02 Thread Ian Jones
You could use a geometry constraint on keep it snapped to the surface. On Wed, Dec 2, 2009 at 10:37 AM, jonmill...@gmail.com wrote: > is there a way in python to make a locator follow a planes geometry in > the y axis? > > ive got a locator driving the x and z translations but i want it to > als

Re: [Maya-Python] Generate Maya Python pi files for Wing

2010-01-05 Thread Ian Jones
Yes. Though it won't be installed via easy_install. Only a manual one. You can download pymel and just copy the maintainence module into your path to create them with: import maintainence maintainence.stubs.pymelstubs(extension='pi') Ian I can also post 2010/1/5 Miguel González Viñé : > Hi Chad,

Re: [Maya-Python] Re: PyMEL 1.0.0 Beta

2010-01-21 Thread Ian Jones
Drew, What I've been doing is using sitecustomize to inject pymel to the front of the python path at startup. The `downside` is that pymel shows up in the python path universally but some of the utils that are included I've been learning/finding great use for in other places. The Path class in par

Re: [Maya-Python] Re: PyMEL 1.0.0 Beta

2010-01-21 Thread Ian Jones
Sure can On Thu, Jan 21, 2010 at 6:21 PM, Chad Dombrova wrote: > ian, can you provide some instructions on how to set this up that we can > include in the docs? > > On Thu, Jan 21, 2010 at 4:51 PM, Ian Jones wrote: >> >> Drew, >> >> What I've been doing

Re: [Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-05 Thread Ian Jones
ial docs updated in a few days.  in the >> meantime, ian was nice enough to post his instructions here:   >> http://github.com/shrtcww/pymel/blob/1e4d2fbab671445b21e89c0c7a6f2b7d... >> >> github automatically turns the restructuredText into html, which is >> awesome. &

Re: [Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-05 Thread Ian Jones
; >>>> >>>> Putthing this in userSetup.mel does not work either: >>>> python("import sys;sys.path.insert(0,'/path/to/top-pymel-dir');"); >>>> >>>> Nor does this in userSetup.mel: >>>> putenv "PYTHONPATH" (

Re: [Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-05 Thread Ian Jones
7;via userSetup.mel scripts but it did > not put it > 'quick enough', it is too late once it gets to userSetup.mel scripts. > > Thanks, > > -jason > > On Feb 5, 4:26 pm, Ian Jones wrote: >> Looks like what is inside your sitecustomize.py file is correct >

Re: [Maya-Python] Re: PyMEL 1.0.0 Beta

2010-02-06 Thread Ian Jones
r >> version of Maya. I cannot have 1 path designated for the entire >> machine. >> >> Appreciate your responses, >> >> -jason >> >> On Feb 5, 4:46 pm, Ian Jones wrote: >> > Sort of. >> > >> > I do set this at the operating sys

Re: [Maya-Python] sitecustomize.py help

2010-04-11 Thread Ian Jones
I use a sitecustomize.py for our general python packages and a seperate usersetup.py (right beside the sitecustomize.py) to handle specific items for maya. It cuts down the sitecustomize into more manageable pieces and seems to be working out well for us. Ian On Sun, Apr 11, 2010 at 8:06 PM, Da

Re: [Maya-Python] sitecustomize.py help

2010-04-12 Thread Ian Jones
gt; can call the correct mayapy directly. >> >> At any rate, what you are describing sounds reasonable, but I would >> advise limiting the content of sitecustomize to site customization >> only. Not only will your cmds problem go away, but you will a system >> t

Re: [Maya-Python] pymel call in userSetup crashing our renderfarm

2010-04-15 Thread Ian Jones
Sounds like you are running into an issue with the dummy loading in the maya package. I thought this was suppose to be fixed - so it might be a red herring. To verify I would ensure the maya package is coming from beside pymel's maya package (if your using 1.0+) and not the one that ships with maya

Re: [Maya-Python] Re: Running process/command without the prompt appearing

2010-07-28 Thread Ian Jones
You might also want to look at: http://docs.python.org/library/subprocess.html On Wed, Jul 28, 2010 at 2:19 PM, Alan Fregtman wrote: > And shortly after I press "Send", I notice this search result on Google: > > http://linux.byexamples.com/archives/366/python-how-to-run-a-command-line-within-pyt

Re: [Maya-Python] Re: How do you query if the open scene is modified?

2010-08-04 Thread Ian Jones
pymel.cmds.file(q=1, mf=1) should work. On Tue, Aug 3, 2010 at 9:46 AM, Jamie Macdougall wrote: > Ok thanks. I was trying to avoid importing maya.cmds > > > > On Tue, Aug 3, 2010 at 1:17 AM, Ofer Koren wrote: > >> I don't think pymel has any convenience function for this, so you have to >> go vi

Re: [Maya-Python] Re: Debugging Maya in WingIDE

2010-12-04 Thread Ian Jones
Have you made sure you have kEmbedded = 1 ~line 96? I followed the instructions in Wing's How To and it's been working great for me. Top Menu > Help > How To's > 6.5 Using WingIDE with Autodesk Maya. On Sat, Dec 4, 2010 at 10:44 PM, Count Zer0 wrote: > I seem to recall that happening to me aw

Re: [Maya-Python] Re: 2011: python API. MFnAnimCurve.addKey(),addKeyframe(),addKeys().. not working?

2011-02-17 Thread Ian Jones
This is the code I'm using (2011x64.hotfix3-win7) import maya.OpenMaya as om import maya.OpenMayaAnim as oma #variables outside the scope of this but should be straight forward plug = MPlug_from_elsewhere values = list_of_values_from_elsewhere #initialize function set anim_curve_function_set = o

Re: [Maya-Python] First Post: trying to get the first and last keyframe

2011-03-02 Thread Ian Jones
So this is annoying but I think this has something to do with how findKeyframe works. If you add a pause it seems to work just fine: import maya.cmds as mc #create sphere mc.polySphere(ch=True,o=True, r=5) #key sphere in diffrent time mc.currentTime(5, edit=True ) mc.setKeyframe("pSphere1")

Re: [Maya-Python] First Post: trying to get the first and last keyframe

2011-03-03 Thread Ian Jones
t the executeInMainThread. Just wanted something to make sure everything was caught up before running. Ian On Wed, Mar 2, 2011 at 10:40 PM, Paul Molodowitch wrote: > > On Wed, Mar 2, 2011 at 8:28 PM, Ian Jones wrote: > >> So this is annoying but I think this has something to do with how &

Re: [Maya-Python] First Post: trying to get the first and last keyframe

2011-03-03 Thread Ian Jones
last') print firstKey print lastKey 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Not sure why though. On Thu, Mar 3, 2011 at 4:55 PM, Ian Jones wrote: > I tested mc.refresh() and mc.dgdirty(a=True) and both when placed i

Re: [Maya-Python] All file referencing commands buggy?

2011-03-12 Thread Ian Jones
Yeah that seems odd to me too, are you using a custom version of pymel or the one that shipped with Maya 2011? @Chad, It's not all that uncommon to use forward slashes in my experience on windows. Maya in particular doesn't seem to care. That said I haven't seen any issues come of it. Ian On Sat

Re: [Maya-Python] Subclassing and VirtualClass questions

2012-10-16 Thread Ian Jones
Can you post a specific example your stuck on? If you do I'll try and help you through it or provide solutions. Ian On Sat, Oct 13, 2012 at 1:23 AM, Morgan wrote: > Hey all, I've been using sort of a hacky method for extending pymel, and > I've just now been trying to get my head around subclas

Re: [Maya-Python] Re: Subclassing and VirtualClass questions

2012-11-02 Thread Ian Jones
You can also do your attribute setup (and establish what you need for the isVirtual test then just call virtualized = pm.PyNode(newNode) and continue on from there: @classmethod def _postCreateVirtual(cls, newNode): """ This is called before creation, pymel/cmds allowed.""" ne

Re: [Maya-Python] No module named - frustration

2015-04-19 Thread Ian Jones
On Sun, Apr 19, 2015, 1:46 PM Crest Christopher L H No lull kill LJ.lmkkhhng fog wrote: When I remove the Maya.env file, surprisingly a new Maya.env is created, now that is not the surprise, the surprise is, it loads a five month old Maya.env file, not a blank environment file, when I run th

Re: [Maya-Python] RMB maya menu

2015-06-03 Thread Ian Jones
Your likely talking about the dagMenuProc Which you can extend with the function signature (mel): global proc DagMenuProc(string $parentMenu) On Wed, Jun 3, 2015 at 3:35 PM, Todd Widup wrote: > no, the RMB context sensitive menus > > On Wed, Jun 3, 2015 at 3:24 PM, Joe Weidenbach wrote: > >> A

Re: [Maya-Python] RMB maya menu

2015-06-03 Thread Ian Jones
Err: global proc DagMenuProc(string $nodeName, string $parentMenu) Ian On Wed, Jun 3, 2015 at 5:58 PM, Ian Jones wrote: > Your likely talking about the dagMenuProc > > Which you can extend with the function signature (mel): global proc > DagMenuProc(string $parentMenu) > > O

Re: [Maya-Python] Re: setting preferences with pymel

2015-06-11 Thread Ian Jones
Are you looking for pymel.core.optionvar? On Thu, Jun 11, 2015, 11:17 AM Todd Widup wrote: > found a way to hack around what I needed to do..but still curious if there > is anything built into pymel to handle/manipulate the user prefs > > On Thu, Jun 11, 2015 at 10:51 AM, Todd Widup wrote: > >>

Re: [Maya-Python] Is it possible to freeze .ptns (tweaks) on a mesh using python?

2015-10-05 Thread Ian Jones
In the past one of the ways we've sanitized meshes like this is make a cube and combine it with the desired mesh then delete the first 6 faces (from the cube). That tends to force Maya to rebuild/reset everything. Ian On Mon, Oct 5, 2015, 2:17 PM Chad Fox wrote: > ​Thanks for the input, unfortu

Re: [Maya-Python] Is it possible to freeze .ptns (tweaks) on a mesh using python?

2015-10-05 Thread Ian Jones
wrote: > There's a risk however of changing vertex order ? > > > On Monday, October 5, 2015 at 11:23:35 PM UTC+2, Ian Jones wrote: > >> In the past one of the ways we've sanitized meshes like this is make a >> cube and combine it with the desired mesh then delete the fi

Re: [Maya-Python] How to get group node's object space bounding box

2016-02-22 Thread Ian Jones
try this: http://download.autodesk.com/us/maya/2009help/CommandsPython/exactWorldBoundingBox.html On Mon, Feb 22, 2016, 4:48 PM BWV 656 wrote: > For a regular geo I get the local bounding box by getting a bounding box > info from its shape node. > > pyobj = selected()[0] #py.nt.Transform > shpb

Re: [Maya-Python] Plugin slower than normal cmds execution??

2016-04-03 Thread Ian Jones
Hey Ben, That's because your plugin is built in Python. The native commands are implemented against the C API which is much faster. Your native example spends less time in python and more in C which is probably why your seeing those results. The good news is it's a relatively straight forward por

Re: [Maya-Python] Plugin slower than normal cmds execution??

2016-04-03 Thread Ian Jones
iteration. It's very much a case by case basis. Ian On Sun, Apr 3, 2016, 9:19 AM Ben Hearn wrote: > Ah I see, thanks for the tip. So is it advised to port from python to C++ > when you actually want to roll out the plugin? > > On 3 April 2016 at 17:53, Ian Jones wrote: > &g

Re: [Maya-Python] Find Ngons - How to optimize with OpenMaya?

2016-09-06 Thread Ian Jones
Two recommendations: One I would use selection lists as they'll be faster to interact with during your loops and you can convert them to strings if needed. Second I would recommend looking at the mesh iterators as there are convenient access to things like vertex count per face found there that wil

Re: [Maya-Python] Optimise this: Hierarchy from String

2016-09-16 Thread Ian Jones
It can be achieved without iteration if you solve the original problem in another way. If the problem originally is: I’m putting together a minor helper function for establishing a transform hierarchy within Maya but am not yet satisfied with the implementation. Then I might suggest something li

Re: [Maya-Python] How to change the width of the PyMEL informBox

2017-02-05 Thread Ian Jones
I believe you can cheat it by padding spaces in the message or title if you don't want to switch to QDialog. Ian On Sun, Feb 5, 2017, 9:15 AM Paul Molodowitch wrote: > It's based on maya.cmds.confirmDialog, which has no such setting. If you > need more explicit control, you'll have to make your

Re: [Maya-Python] This simple code is giving me a illogical result... Why?

2017-09-15 Thread Ian Jones
Your redeclaring the function printThis twice. Name thrm printA and printB. As your currently calling the second one twice. Ian On Fri, Sep 15, 2017, 10:47 PM jettam wrote: > From this function I m expecting this result: > printStack(2,3) > AAA number: 1 > AAA number: 2 > BBB number: 1 > BBB nu

Re: [Maya-Python] Re: Tagging MB files with metadata

2018-02-11 Thread Ian Jones
Well if you like your MB and your current json/xml file solution but just want them tied together so they don't get disconnected you may want to consider just using a .zip to bind them. Uncompressed they can be very fast and you can access files directly (to query your metadata etc) without having

Re: [Maya-Python] Can Maya plugins do any self-documentation?

2018-03-14 Thread Ian Jones
You can use mel. The Mel version of help does print out useful information. It's just not wrapped well by maya.cmds to expose to python. Ian On Wed, Mar 14, 2018, 3:00 AM Justin Israel wrote: > > > On Wed, Mar 14, 2018, 2:18 PM justin hidair > wrote: > >> I guess you can do a command with a

Re: [Maya-Python] Can Maya plugins do any self-documentation?

2018-03-14 Thread Ian Jones
That works for C++ command plugins too. I verified it on one specifically. Ian On Wed, Mar 14, 2018, 7:27 PM Michael Boon wrote: > That works for Python plugins! It won't be quite so simple for a C++ > plugin (which my exporter is) but I will give it a try and report back. > &g

Re: [Maya-Python] Returning a string from a command plugin?

2019-06-20 Thread Ian Jones
Believe you are looking for self.setResult(cam) Set the value of the result to be returned by the command. *Name:* setResult(value) *Parameters:* value - bool, int, float, string, sequence of numerics or sequence of strings *Returns:* None *Description:* Set the value of the result to be returned

Re: [Maya-Python] Re: Getting values from channels on Anim Layers using OpenMaya

2019-12-03 Thread Ian Jones
Sometimes it's helpful to understand what you are trying to do and what you are hoping to achieve along with the specific question, that can open up other solutions. By the looks of it you're trying to build up a list of animated nodes and a way to query their values over time. While I don't know

Re: [Maya-Python] Re: Getting values from channels on Anim Layers using OpenMaya

2019-12-09 Thread Ian Jones
Anytime, you can grab just a single frame by skipping the calls to om.MGlobal.viewFrame(frame) That's the bit that changes the frame to evaluate multiple frames. Ian On Mon, Dec 9, 2019, 5:07 PM kiteh wrote: > Hey Ian, sorry for the late response and thanks for getting back despite I > have r

Re: [Maya-Python] create a joint, but ignore selection?

2020-04-06 Thread Ian Jones
are you looking for cmd.createNode(type="joint",skipSelect=True)? On Mon, Apr 6, 2020 at 12:14 PM stephenkmann wrote: > I could have sworn there was an ignoreSelection flag for cmds.joint when > creating a joint. > > does anyone know off hand if something like this exists? > > thanks > > -=s > >

[Maya-Python Club:1427] Re: SVN for Maya

2008-12-30 Thread Ian Jones
I would highly recommend looking up an older project called mayasvn (http://mayasvn.sourceforge.net/) I thought it tackled this problem in a fairly elegant way (at least on the user side) as it implemented script hooks to BeforeOpen/AfterSave which allowed the svn handling to complement the standa

[Maya-Python Club:1461] Re: vxPython to create GUI in maya?

2009-01-14 Thread Ian Jones
And todays news that Qt is going LGPL may speed up a lot of other developers adoption. http://www.qtsoftware.com/about/licensing On Jan 14, 9:43 am, "Jamie Macdougall" wrote: > hey, > I don't know about vxPython, only wxPython. Autodesk is moving their > UIs over to QT though, so maybe that is

[Maya-Python Club:1641] Re: PyMEL 0.9 Release Candidate

2009-02-10 Thread Ian Jones
Thanks for the release - can't wait to play with it at home. Unfortunately we still user 8.5 at the studio (but not for too much longer I hope) Ian > > > On Tue, Feb 10, 2009 at 1:42 PM, Matt Estela   > > wrote: > > > Ha, go shaderboy go! > > > Now to get all of 3delights bindings in python...

[Maya-Python Club:1756] Re: some one can recommend on free diagram software ?

2009-02-19 Thread Ian Jones
I've used gliffy.com for this in that past On Feb 17, 8:52 am, Steve Wart wrote: > Inkscape is great > > On Tue, Feb 17, 2009 at 5:51 AM, barakooda wrote: > > > Thanx > > --~--~-~--~~~---~--~~ Yours, Maya-Python Club Team. -~--~~~~--~~

[Maya-Python] Re: PyMEL 0.9 Release Candidate

2009-03-03 Thread Ian Jones
Found one issue with RC4 (8.5SP1 x86): from pymel import * dup = PyNode('my_skinned_mesh') attrs = dup.listAttr(locked=True) for attr in attrs: attr.setLocked(False) results in: # Error: argument number 1: Unmatched paren in format # Traceback (most recent call last): # File "", line

[Maya-Python] Re: PyMEL 0.9 Release Candidate

2009-03-03 Thread Ian Jones
Sorry for the incomplete example. However both code snippets you gave me raise the same error (output below). I noticed this did not throw an error in 2009 - so I would expect it to be 8.5 SP1 bug. Ian from pymel import * s = polySphere()[0] s.tx.setLocked(True) attrs = s.listAttr(locked=True)

[Maya-Python] Re: PyMEL 0.9 Release Candidate

2009-03-03 Thread Ian Jones
(False) On Mar 3, 12:16 pm, Ian Jones wrote: > Sorry for the incomplete example. > > However both code snippets you gave me raise the same error (output > below). I noticed this did not throw an error in 2009 - so I would > expect it to be 8.5 SP1 bug. > > Ian > &

[Maya-Python] Re: Python IDE

2009-03-09 Thread Ian Jones
Same here, Been very happy with wing. Though I did try Komodo IDE ( http://www.activestate.com/komodo_edit/ ) and found myself rather impressed with it - thought it had better calltips,version control integration. I preferred wings debugger which ended up being what sold me. Ian On Mon, Mar 9,

[Maya-Python] Re: Production Practices

2009-03-10 Thread Ian Jones
1) Revision control or No? if yes, which? Yes - svn 2) Do developers work on live files (ie. files seen by general users) or in individual sandboxes? All developers work on a local checkout and commit to trunk when satisfied. All users run off a network mirror of /trunk Branches are used for la

[Maya-Python] Re: Problem using maya.standalone module

2009-03-11 Thread Ian Jones
With 2009 I've had to set the python current directory os.chdir to %MAYA_LOCATION%\bin before to avoid issues on some computers when using an interpreter other than mayapy.exe. Lemme know if it helps. Ian On Wed, Mar 11, 2009 at 3:16 AM, jens jebens wrote: > It's a dll (library error), so I t

[Maya-Python] Re: How to terminate maya running inside python idle?

2009-03-13 Thread Ian Jones
I asked a similar question on the autodesk subscription forums a while ago. There response follows: "Hi Ian, >From mayapy if you run help(‘maya.standalone’) you’ll see that it has only one function initialize(), so to restart Maya you need to exit the parent python process. I have opened a Ser

[Maya-Python] Re: PyMEL / Maya Python Meetup

2009-03-16 Thread Ian Jones
I can come out for Saturday-Sunday (28-29th). On Thu, Mar 12, 2009 at 9:31 AM, Paul Molodowitch wrote: > > Hum... well, I think I can actually come out for a day - Sunday, March > 29th, ideally, but possibly Monday, March 30th as well. > > I assume Sunday would be better? > > - Paul > > On Thu,

[Maya-Python] Re: list all skinned points to a joint

2009-03-18 Thread Ian Jones
Alternative in pymel via api: from pymel import * skin = PyNode('skinCluster1') influnces = skin.getInfluence(q=True) vert_list, values = skin.getPointsAffectedByInfluence(influnces[0]) vert_list = vert_list.getSelectionStrings() index = 0 for vtxs in verts: vtxs = PyNode(vtxs)

[Maya-Python] Re: list all skinned points to a joint

2009-03-18 Thread Ian Jones
err wt_values -> values so: index = 0 for vtxs in verts: vtxs = PyNode(vtxs) for vert in vtxs: print vert, values[index] index += 1 On Wed, Mar 18, 2009 at 11:56 AM, Ian Jones wrote: > wt

[Maya-Python] Re: PyMEL / Maya Python Meetup

2009-03-25 Thread Ian Jones
I fly in Saturday morning (10ish) and out Sunday night around 9pm. Ian On Wed, Mar 25, 2009 at 6:42 AM, Paul Molodowitch wrote: > > I, too, can work with any time on Sunday. > > - paul > > On Wed, Mar 25, 2009 at 1:25 AM, Sebastian Thiel > wrote: >> I personally am totally flexible and can ada

[Maya-Python] Re: maya.cmds memory leak (!!!)

2009-04-12 Thread Ian Jones
Yes this has been reported before and a known issue to Autodesk and claimed-fixed in 2009 and to my testing thus far it has been. On Sat, Apr 11, 2009 at 8:43 AM, Byron wrote: > > ... and I truly hope that whatever I found out is just my mistake, > already solved and not as terrible as it appear

[Maya-Python] Re: pymel vs. mel datatypes in mel.mag()... I think?

2009-04-13 Thread Ian Jones
You could also do a.length() to get he result. There are a bunch of useful functions built into the Vector class here is a link to the documentation where you can see a list of some of the other ones like unit() etc http://pymel.googlecode.com/svn/docs/pymel.core.datatypes.Vector-class.html On M

[Maya-Python] Re: Script memory leak. What to look for when debugging?

2009-04-23 Thread Ian Jones
There is a memory leak in 8.5/2008 so I would try running your script in Maya 2009 before you blame your script. If it's still leaking in 2009 I'd be glad to help you out. Ian On Wed, Apr 22, 2009 at 11:16 PM, Jakob Welner wrote: > I am writing this animation transfer tool that seems to be havi