[Maya-Python] Re: maya mel command check

2009-08-28 Thread Dean Edmonds
On Thu, Aug 27, 2009 at 22:13, Taylor Carrascocrackerbu...@gmail.com wrote: Is there a way to validate a mel command is valid (not necessarily that it will execute properly) before running it? Something like . cmdValid(setAttr PUP1:root_ctrl.extraRotY 20;) returns true cmdValid(3etAttr

[Maya-Python] Re: unique object id

2009-08-19 Thread Dean Edmonds
On Tue, Aug 18, 2009 at 21:35, Chad Dombrovachad...@gmail.com wrote: thanks for clarifying.  do MObjectHandles have a properly implemented __eq__ and __ne__?   i've come across some bogus ones on api classes ( MDagPath.__ne__ was one offender, if i remember correctly ) Yup. SWIG maps a

[Maya-Python] Re: hide selected faces / invert selection

2009-08-18 Thread Dean Edmonds
On Tue, Aug 18, 2009 at 02:16, Dimitrydima.archit...@gmail.com wrote: it is possible to hide selected faces, by using pymel? Maya does not currently provide a way for hiding just specific faces of a mesh. The best you can do is to assign those faces to shader which is fully transparent and

[Maya-Python] Re: Get attribute this way

2009-08-16 Thread Dean Edmonds
On Sun, Aug 16, 2009 at 05:15, Kinganimator...@gmail.com wrote: def getNodeAttribute( nodeName=, attributeName= ):    node = PyNode( nodeName )    cmnd = (node.+attributeName+.get())    result = python(cmnd)    return result Pymel way of getting an attribute's value is much easier. The

[Maya-Python] Re: API Attribute question

2009-07-31 Thread Dean Edmonds
On Thu, Jul 30, 2009 at 18:52, Serguei Kalentchoukserguei.kalentch...@gmail.com wrote: When I add attributes to a custom node written Python API I am having trouble having them show up in Hypershade as possible input connections. This only seems to be an issue with incoming connections as the

[Maya-Python] Re: components in the selected order

2009-07-29 Thread Dean Edmonds
On Tue, Jul 28, 2009 at 17:49, Paul Molodowitchelron...@gmail.com wrote: Wilsimar - in short, maya simply doesn't keep track of that.  If you want to, you have to do it yourself, by setting a callback for whenever the selection is changed, using scriptJob. Depending upon the situation, it

[Maya-Python] Re: hacking maya script editor output

2009-07-19 Thread Dean Edmonds
On Sat, Jul 18, 2009 at 17:40, Chad Dombrovachad...@gmail.com wrote: in the script editor i get this: from pymel import * ls()[0] # Result: time1 # but in the interpreter i get this:   from pymel import *   ls()[0] Time(u'time1') there's a big difference between time1 and

[Maya-Python] Re: render callback for mental ray

2009-07-16 Thread Dean Edmonds
On Tue, Jul 14, 2009 at 15:48, Chad Dombrovachad...@gmail.com wrote: am i right in my memory that there is no way to get an api callback for render start/done for any renderer other than maya software? That's correct, however in the 'Render Options' section of the 'Render Settings' window you

[Maya-Python] Re: M3dView

2009-07-10 Thread Dean Edmonds
On Thu, Jul 9, 2009 at 14:07, Matthew Chapmanchapman...@gmail.com wrote: How do you set the M3dView::DisplayObjects shown in the current M3dView?  I cannot seem to find the method. The necessary method is missing. Looks like an oversight to me. That means that you're stuck using the

[Maya-Python] Re: Color

2009-07-07 Thread Dean Edmonds
On Mon, Jul 6, 2009 at 05:10, Omar Agudoomar.ag...@gmail.com wrote: I have tried what you said me but it doesn´t work. I have some questions, If you want to render a mesh that have different colors you need to assign different shaders to the mesh? There are several ways to do it. That's one

[Maya-Python] Re: Color

2009-07-05 Thread Dean Edmonds
On Thu, Jul 2, 2009 at 09:33, Omar Agudoomar.ag...@gmail.com wrote: I have used the API command for coloring per vertex, but this command doesn´t work properly, maybe I am doing somethig wrong, but I don´t see what I am doing wrong. Have someone have the same problem?? Let's assume that you

[Maya-Python] Re: Color

2009-07-05 Thread Dean Edmonds
Whoops. There was an error in the commands that I gave you. This:    # Set the color of vertex 2 to be red.    mc.select('myMeshShape.vtx[2]', r=1, g=0, b=0) should be this: # Set the color of vertex 2 to be red. mc.polyColorPerVertex('myMeshShape.vtx[2]', r=1, g=0, b=0) -- -deane

[Maya-Python] Re: How To Use shave And Haircut's Command In Python ?

2009-06-26 Thread Dean Edmonds
On Fri, Jun 26, 2009 at 04:17, prabu praburaj.rathi...@gmail.com wrote: Hi all, Do anybody tried using shave and haircut command shaveWriteRib in python... Is there any way to use it in python How to use custom developed MEL command (ie user defined mel command (or) mel command

[Maya-Python] Re: get a plugin MObject? (aka, dynamic node/command registration )

2009-06-11 Thread Dean Edmonds
On Thu, Jun 11, 2009 at 01:55, Chadrikchad...@gmail.com wrote: just thinking out loud, here:  is it possible to do create a command outside of the context of a plugin? At this point I was going to tell you how I thought it unlikely to work. # get it's mobject and register the new command

[Maya-Python] Dead email address on the list

2009-06-11 Thread Dean Edmonds
Whenever I post a message to this list I get a failure from 'nostradamusf...@hanmail.net'. It looks like that email is dead. Does this happen to the rest of you as well? If so, could one of the list administrators remove that address from the list? Thanx. -- -deane

[Maya-Python] Re: Making an empty kSurfaceFaceComponent MObject

2009-06-07 Thread Dean Edmonds
On Sat, Jun 6, 2009 at 17:31, barnabas79elron...@gmail.com wrote: Hey - I was wondering if anyone here knew of a way to make an EMPTY kSurfaceFaceComponent MObject? Normally, I would use MFnDoubleInexedComponent.create - but there seems to be a bug - it's not compatible with

[Maya-Python] Re: Bug with MSyntax?

2009-06-03 Thread Dean Edmonds
On Tue, Jun 2, 2009 at 18:49, AK Eric warp...@sbcglobal.net wrote: If I re-order the .addFlag's, whichever one is listed first won't be captured.  So if I list the radius first, anything I pass in via -r or -radius simply won't be seen. How are you determining that is it not seen? Does Maya

[Maya-Python] Re: Bug with MSyntax?

2009-05-31 Thread Dean Edmonds
It works fine for me in both 2008 and 2009. How do you know that it's skipping the first flag. Does the 'help' command not display it? On Fri, May 29, 2009 at 17:09, Eric Pavey warp...@sbcglobal.net wrote: This is probably a long shot, but I thought I'd ask in case anyone else has ran into

[Maya-Python] Re: More MScriptUtil fun...sigh

2009-05-11 Thread Dean Edmonds
On Mon, May 11, 2009 at 14:54, hapgilmore hapgilm...@hotmail.com wrote: #get shell uv floatArray = OpenMaya.MScriptUtil() floatArray.createFromList([0.0,0.0],2) shellUVptr = floatArray.asFloat2Ptr() [...] shellU = OpenMaya.MScriptUtil().getFloatArrayItem(shellUVptr,0) To Python an array of

[Maya-Python] Re: python - mental ray option

2009-04-02 Thread Dean Edmonds
Maya does not come with a standalone version of mental ray. mental ray has two APIs: the shader API, which is used for writing custom shaders, and the integration API, which is used to embed the mental ray renderer inside other applications. Maya comes with a plugin called 'Mayatomr' which uses

[Maya-Python] Re: python - mental ray option

2009-03-31 Thread Dean Edmonds
On Tue, Mar 31, 2009 at 10:22, Omar Agudo omar.ag...@gmail.com wrote: I want to use Mental ray stand alone. The question is if I can have access to these options:  * Placeholders - Reuse memory for source geometry  * Approximation - Reuse memory with fine approximation  * Texture cache -

[Maya-Python] Re: using isInstanced()

2009-03-25 Thread Dean Edmonds
On Tue, Mar 24, 2009 at 19:11, Justin Ball justin.c.b...@gmail.com wrote: I was using the line ls(type='mesh', ap=1) and yes I get all the meshes... but I need their transform information. and if I have instanced meshs, I am getting just the translation information from the transform node.

[Maya-Python] Re: using isInstanced()

2009-03-25 Thread Dean Edmonds
Whoops. Forgot a line: On Wed, Mar 25, 2009 at 01:04, Dean Edmonds dean.edmo...@gmail.com wrote:    import maya.OpenMaya as om    meshPath = om.MDagPath()    iter = om.MItDag(om.MItDag.kDepthFirst, om.MFn.kMesh)    while not iter.isDone():        iter.getPath(meshPath

[Maya-Python] Re: Dynamic attributes marked as NOT storable are saved

2009-03-21 Thread Dean Edmonds
On Fri, Mar 20, 2009 at 17:23, barnabas79 elron...@gmail.com wrote: Dynamic attributes created with addAttr that have the storable flag set to false are still written out to the file - see: http://pastebin.com/f3b83af36 [...] # Now, re-open that scene we just saved

[Maya-Python] Re: Undocumented API methods

2009-03-21 Thread Dean Edmonds
On Thu, Mar 19, 2009 at 09:58, barnabas79 elron...@gmail.com wrote: Hi all - so, I ran across an undocumented method of MFnMesh, getUvShellsIds, which is used in    /docs/Maya2009/en_US/API/flip_u_v_cmd_8cpp-example.html Might anyone know if undocumented function such as this are

[Maya-Python Club:1716] Re: Maya Api Docs Demystified

2009-02-16 Thread Dean Edmonds
On Sun, Feb 15, 2009 at 22:40, Adam Mechtley adam.mecht...@gmail.com wrote: I would like to point out by the way that although almost all friend functions are listed as having no script support, the first version of slerp

[Maya-Python Club:1712] Re: Trying to build a reference up of what an argument needs

2009-02-15 Thread Dean Edmonds
On Sun, Feb 15, 2009 at 14:16, jasonosipa jason.os...@gmail.com wrote: What do const, , and * each mean? When you look at documentation for an object, each argument can have a lot of different markup, and I'm not confident with guesses at what those mean, so I'll just ask: What do const,

[Maya-Python Club:1620] Re: Calling up a node's own name

2009-02-08 Thread Dean Edmonds
On Sun, Feb 8, 2009 at 14:48, jasonosipa jason.os...@gmail.com wrote: I want to throw a specific print statement up if a node failed to do something. I'm finding it easy to just print a generic message, but how would I use a node's own name to make it easier to know which specific one is

[Maya-Python Club:1581] Re: Set/Get values from a multi attribute

2009-02-06 Thread Dean Edmonds
Ignore this second copy of the message as it contains misinformation. Something weird happened to me in gmail and it sent both the good version and the bad. The other version of this message is the good/correct one. On Fri, Feb 6, 2009 at 00:01, Dean Edmonds dean.edmo...@gmail.com wrote: Before

[Maya-Python Club:1571] Re: Set/Get values from a multi attribute

2009-02-05 Thread Dean Edmonds
On Thu, Feb 5, 2009 at 13:42, jasonosipa jason.os...@gmail.com wrote: where do you see that/learn that? Where would someone like me get better equipped to have figured that out on his own? Is it a matter of understanding how to translate the c++ api stuff? If so, what page would I look up

[Maya-Python Club:1170] Re: equivalent of colorAtPoint?

2008-10-06 Thread Dean Edmonds
On Mon, Oct 6, 2008 at 2:48 PM, [EMAIL PROTECTED] wrote: Anyone have a clue why checkers don't work? I don't know about the specific method used in the cgtalk since I haven't read it, but I've had no problem using sampleShadingNetwork() to sample checker textures in the past. One thing you do

[Maya-Python Club:1137] Re: Query fluid voxel information

2008-09-27 Thread Dean Edmonds
On Fri, Sep 26, 2008 at 7:59 AM, Horvátth Szabolcs [EMAIL PROTECTED] wrote: I'm writing a command to query and modify fluid voxel data and having some difficulties understanding a python data type. MFnFluid.density is supposed to return a pointer to a float array but the Python API returns a

[Maya-Python Club:1132] Re: Reading info from the MFnMessageAttribute

2008-09-25 Thread Dean Edmonds
On Thu, Sep 25, 2008 at 5:42 AM, Mario Dubec [EMAIL PROTECTED] wrote: I used this ccecking in compute while I was translating one C++ node from devkit (particleAttributeNode I think). I would still recommend moving that code out to either the legalConnection/legalDisconnection methods or