Simple sinppet that gives you keyframe data for each blendshape target
for attr in cmds.listAttr('blendShape1.weight', multi=True):
print attr, cmds.keyframe('blendShape1', attribute=attr, q=True, tc=True
, vc=True)
On Thursday, March 17, 2016 at 11:48:28 AM UTC-7, Paul Thurston wrote:
>
>
1
>
> That spyderlib link also points to the cpython changeset that caused the
> bug (http://hg.python.org/cpython/rev/f1509fc75435/).
>
> Perhaps Chad can get an updated path.py pushed into PyMel for a future
> release of Maya.
>
>
>
> On Thu, Jan 9, 2014 at 3:24 PM,
ports forwards slashes on windows,
>> so maybe try that?
>>
>> Otherwise I would just make an isdir wrapper instead of passing it
>> through like that. That should work.
>>
>>
>> On Thursday, 9 January 2014 14:26:04 UTC-8, Jesse Capper wrote:
>>>
hat style of implied argument passing.
>>> The only issue I can think of is that I had weird bugs sometimes with
>>> using backslashes on Windows. Python supports forwards slashes on windows,
>>> so maybe try that?
>>>
>>> Otherwise I would just make
es with
> using backslashes on Windows. Python supports forwards slashes on windows,
> so maybe try that?
>
> Otherwise I would just make an isdir wrapper instead of passing it through
> like that. That should work.
>
> On Thursday, 9 January 2014 14:26:04 UTC-8, Jesse Capper
t os.path.isdir(path)
# 2.6.4 # True
# 2.7.3 # True
On Thursday, January 9, 2014 2:01:17 PM UTC-8, Kurian wrote:
>
> path = 'path/to/file'
>
> if os.path.isdir(path):
> print "Yes it is ! "
>
> This didnt work for you ?
>
>
> On Thu, Jan 9, 2
Loading the same path.py module into a 2.6.4 and 2.7.3 session produces
different results when calling Path(path/to/file).isdir()
2.6.4 works as expected - outputs True or False
2.7.3 raises a TypeError: *TypeError: _isdir() takes exactly 1 argument (0
given)*
Anyone know why the behavior chang
Am I looking in the wrong section? I see no "image" checkbox
(http://imgur.com/8RZmijS)
On Sunday, August 11, 2013 3:36:58 AM UTC-7, Ævar Guðmundsson wrote:
> You can try selecting your "default" persp camera and under display options
> untick the "image" checkbox, that should stop it.
--
You
Running Maya 2013 x64 Service Pack 2.
Whenever I open a maya file (binary or ascii), I get this error:
// Error: line 1632: The default image may not be modified. Use the -i/image
flag instead. //
I've narrowed this down to being a command that gets executed in the
uiConfigurationScriptNode. I
Get the submeshes as what? Objects? As stated, maya (and pymel) doesn't treat
different poly shells as different objects.
If you want to get the faces that comprise each shell (subobject) of an object,
Justin Israel's script shows a simple way of doing so:
https://gist.github.com/justinfx/37385
Why don't you just store all the data you want into a dictionary and serialize
it with json or pickle?
import pickle
def write_data(data, path):
with open(path, 'w') as f:
pickle.dump(data, f)
def read_data(path):
with open(path, 'r') as f:
data = pickle.load(f)
ret
That's not quite right.
When you do
module = __import__('pkg.mod')
the left-most package/module will be assigned to (in this case 'pkg'),
and it will have the attribute mod. This means that members of mod aren't
directly accessible from . So in order to access a member of mod, you
would still
11:47:45 AM UTC-7, Jesse Capper wrote:
> Whoops, typo in that code.
>
>
>
> http://pastebin.com/5gtdjk3E
>
>
>
> And just as an overview, this takes , which I'm assuming is the current
> scene name, and splits that into basename, ext. Then it goes through
that
version number.
On Monday, May 20, 2013 11:42:06 AM UTC-7, Jesse Capper wrote:
> Firstly, os.listdir can't be guaranteed to return an alphanumerically sorted
> file list. You're making the assumption that the latest processed file will
> be the highest version number (when y
Firstly, os.listdir can't be guaranteed to return an alphanumerically sorted
file list. You're making the assumption that the latest processed file will be
the highest version number (when you use backups[-1]). I'd guess it uses the
way the files are index on your file system, so if you want to
Why is my unkle bobo broken? Windows works with mixed slashes and that filepath
should resolve fine. os.path.isdir(os.path.join( scenepath , 'my uNkle Bobo' ))
should be True (assuming the directory exists).
You're getting mixed slashes because \ is the windows separator (os.path.join
uses os.s
I'm assuming that has something to with the fact that there is no MFn/MIt class
for UVs.
Just pass the MeshUV to the polyEditUV command.
pm.polyEditUV(meshuv, q=True, u=True, v=True)
On Wednesday, May 1, 2013 3:04:13 AM UTC-7, Joss Gray wrote:
> Is there any way to get the UV coords from a Mesh
>
> >
>
> >
>
> >
>
> > http://pastebin.com/FZsqhGVb
>
> >
>
> >
>
> >
>
> > Thanks for help again, bye.
>
> >
>
> >
>
> >
>
> > On Tuesday, 11 December 2012 22:01:09 UTC, J
Database error!
On Thursday, March 21, 2013 8:04:10 AM UTC-7, Count Zer0 wrote:
> OK. Got the full answer done. Check it out here:
>
> http://www.jason-parks.com/artoftech/?p=520
>
> Hope this helps.
>
> -jason
>
> On Tuesday, March 12, 2013 1:35:08 PM UTC-7, Count Zer0 wrote:
> > On Tuesday,
You need to delete the dockControl if it exists as well.
http://pastebin.com/J0K5pqRp
On Tuesday, March 19, 2013 8:10:01 AM UTC-7, Daz wrote:
> Heya
>
> I'm trying to figure out how to tweak my UI so I can dock it. I basically got
> it more or less to work, the only problem is that I cant figur
Is there a way to listConnections and only return shaders? Or 2d textures? I
know I can specify an exact type like 'surfaceShader', but can I do something
like 'material', or 'shader'? Or do I just have to get all the connections and
filter them afterwards?
Desired use would be something like:
:
> Doesn't the Node Editor let you do creation completion when hitting the Tab
> key? You could use that.
>
>
>
>
> On Fri, Mar 15, 2013 at 3:03 PM, Jesse Capper wrote:
>
>
> As a side project I'm seeing if I can create a node-creation popup for
As a side project I'm seeing if I can create a node-creation popup for the
hypershade similar to what Nuke has in it's node graph. The idea is that
hitting tab in a workArea/hyperShadeGraphPanel will popup something like a
combobox with completion and you can type in a node to create.
If I atta
asDouble() returns the first item added to the MScriptUtil, not the value of
the pointer. Your call to createFromDouble(0.0) is adding the value 0.0 to the
MScriptUtil, so when you call asDouble, it's returning that value. If you did
createFromDouble(10.0), and called asDouble(), you'd get all 1
nd of
> like print statements that trigger some UI color coding. If catch can see
> them then that's probably the way, since they aren't exceptions.
>
>
> On Mar 14, 2013 7:41 AM, "Jesse Capper" wrote:
>
> You can use try/except statements to catch Ma
You can use try/except statements to catch Maya errors. For example:
cmds.select(cl=True)
try:
cmds.extrude()
except Exception, e:
print "There was an error and it said", e
I don't know of any way to tell if a warning is raised, only that you can catch
(suppress) them using mel.eval('cat
Are you sure your variables are correct?
If I run this it works fine and has the same result as entering the values
manually (as expected):
a1, a2, a3 = (18.146, 61.885, -0.592)
b1, b2, b3 = (20.579, 36.152, -1.014)
c1, c2, c3 = (20.079, 16.312, -5.432)
cmds.polyCreateFacet( point=[(a1, a2, a3
s a pain I think.
>
> On Tuesday, March 5, 2013 3:40:17 AM UTC-6, Jesse Capper wrote:
> > So I did some more tests and think I may have found a way to use
> > polyChipOff and polySeparate and reliably get the chippedOff polys in the
> > order they were selected.
> &g
d one.
On Monday, March 4, 2013 10:28:06 PM UTC-8, Jesse Capper wrote:
> What exactly are you trying to accomplish here? Splitting a ribbon of polys
> from an ordered edge selection and retaining the resulting meshes in the
> order the edges were selected? What problems were you running int
What exactly are you trying to accomplish here? Splitting a ribbon of polys
from an ordered edge selection and retaining the resulting meshes in the order
the edges were selected? What problems were you running into with polyChipOff?
On Saturday, March 2, 2013 3:36:54 PM UTC-8, Bradon Webb wrote
2, 'foo', 'bar', 'biz', 3, 4] # surrounding content preserved
>
>
>
> Pretty neat stuff for treating a list like a buffer, where you aren't
> inserting anything bigger than the list, but just replacing sections of it.
> It is almost like the bytearray
On Friday, March 1, 2013 8:33:02 AM UTC-8, Panupat Chongstitwattana wrote:
> for a in arrays:
> and
> for a in arrays[:]:
> seem to do exactly the same thing. Is there any difference made by the [:] ?
Use array[:] when you want a copy of the list. It has the same result as doing
list(array).
--
I don't know of any way to get defaults for non-numeric attributes without
using the API.
As for the .ma file syntax, there is a method of MPlug called getSetAttrCmds()
which returns a list of setAttr commands in the format that they appear in a
mayaAscii file. It has three filters for selectin
You can't do it using polyList, but you can flatten the result with
ls(flatten=True)
newFaces = mc.polyListComponentConversion(edge, fromEdge=True,
toFace=True,)
print 'Flattened Faces: ', mc.ls(newFaces, fl=True)
--
You received this message because you are subscribed to the G
> xAverage = float( decimal.Decimal (sum(xValue) ) /
> decimal.Decimal(str(float(len(xValue )
> yAverage = float( decimal.Decimal (sum(yValue) ) /
> decimal.Decimal(str(float(len(yValue )
> zAverage = float( decimal.Decimal (sum(zValue) ) /
> decimal.Decimal(str(float(len(zV
Typo at the start:
You can get vertexFace normal directions from the polyNormalPerVertex command.
On Friday, January 25, 2013 2:26:39 PM UTC-8, Jesse Capper wrote:
> You can vertexFace normals from the polyNormalPerVertex command.
>
> So something like:
>
> # Get the face vertice
You can vertexFace normals from the polyNormalPerVertex command.
So something like:
# Get the face vertices from the face
vtxfaces = cmds.polyListComponentConversion(my_poly_face, ff=True, tvf=True)
# Get a flattened list of the normals (the length of this list is: number of
vertexFaces * 3[for
Using python? Like just walking down directories looking for maya.exe?
If that's all you want to do, something like this should work:
http://pastebin.com/vnGZUNj2
On Friday, January 4, 2013 10:02:58 AM UTC-8, Sakthi Vin wrote:
> It can be any file. But my requirement is to get the list of all the
Yeah, the offset value is in pixels and the "position is given as a fixed
fraction of the -nd/numDivisions value and as this value defaults to 100 it is
easiest to think of it as a percentage of the form's size"
On Tuesday, December 18, 2012 2:08:33 PM UTC-8, Bradon Webb wrote:
> ah ok great. Th
widgets evenly in a row in a formLayout) into a function
that makes setting up sets of buttons/radioButtons/etc a lot simpler.
On Tuesday, December 18, 2012 1:27:22 PM UTC-8, Jesse Capper wrote:
> radioButtonGrps can only have a single column adjustable, so you'll have to
> use
radioButtonGrps can only have a single column adjustable, so you'll have to use
individual radiobuttons.
When you want to have multiple ui elements in-line, be evenly spaced, and scale
with the window there are a few things you need to do:
- Attach the outside edges of the outer widgets to the
As a bit of an aside, I wish cmds.listConnections had an option to return
connections in source/destination pairs or ordering like pymel does. Is there a
better way to handle disconnecting attributes with an unknown direction than
querying twice like so?
for attr in attrs:
src_conns = cmds.
I've been playing around with attributes using the API and can't figure out
how to determine the data types that a generic attribute accepts
(specifically in this case a renderLayer's adjustment.value attribute).
MFnGenericAttribute has add/removeAccept methods (and their variants) but
no way o
Excluding attributes from reference locking only affects which attributes
don't get locked when you lock a referenced file already in your scene.
If you right click on a reference in the reference editor and select
Reference > Lock Reference, it locks (almost) all attributes for the nodes
in th
You don't even need to use str.join() to remove leading or trailing split
elements. split() has a *maxsplit *argument which limits the number of
splits. rsplit() does the same as split but it starts at the end (right) of
the string.
Also it's a good practice not to use python builtin types/meth
Have you tried passing OpenMaya.MFnArrayAttrsData.kVectorArray in directly
instead of passing it through MScriptUtil?
On Wednesday, October 24, 2012 9:46:29 PM UTC-7, Anthony Tan wrote:
>
> Just building a custom force node and one of the things I'm trying to do
> is patch in some dynamic PP var
ed by pymel on the Mesh*
> component classes. Be warned though - the exact definitions maya uses for
> "connected" for the various components can be somewhat inconsistent /
> confusing...
>
> - Paul
>
> On Wed, Oct 24, 2012 at 2:17 PM, Jesse Capper
>
> >
Ah, I was thinking he meant along an edge loop.
How would you generate the initial list of potential paths/find all other
edges that connect to an end vert?
On Wednesday, October 24, 2012 1:47:56 PM UTC-7, elrond79 wrote:
>
> Interesting that polySelect(shortestEdgePath=1) doesn't, in fact, sele
This is also assuming that the shader's you're looking for connect to geo
through the shadingGroup. If it doesn't you'll have to check against
whatever that connection is.
On Wednesday, October 24, 2012 12:31:24 PM UTC-7, Jesse Capper wrote:
>
> Try listing connect
Try listing connections to the shape, not the transform.
http://pastebin.com/TjjW3ze9
On Wednesday, October 24, 2012 12:07:19 PM UTC-7, Berg Jones wrote:
>
> Hmmm perhaps I havent been clear enough:
>
>
>- I have a 1,000+ line renderman rsl surface shader as well as a
>separate uber sha
e3.iorFr', u'uber_surface2.iorFr', u'uber_surface1.iorFr']
>
>
> if I do this and try to drill down to the selected obj in the list
>
> import maya.cmds as cmds
>
> objNames = cmds.ls(sl=1)
>
> for i in objNames:
>
> print i
>
> sele
Is the uber_surface a plugin node? Does it have a unique nodeType? If so
you can look up nodes of that nodeType.
You wouldn't want to use .diffuse in that ls lookup since it's a common
attribute shared by multiple materials. You can add your own attribute to a
shader though, like .myUberSurface
pymel.core as pm
>
> pm.polySelect( 'pSphere1', shortestEdgePath=(274, 260) )
>
>
>
> You'll see shortestEdgePath finds a route that isn't a straight line
> between the two verts.
>
>
>
>
>
>
>
> On Tue, Oct 23, 2012 at 3:10 PM, Jesse Capper
>
How is the calculation of shortestEdgePath flawed? It's worked in the
situations I've tried it, though they certainly haven't been exhaustive.
On Tuesday, October 23, 2012 6:35:12 AM UTC-7, charles le guen wrote:
>
> Hi guys
>
> Any idea how to select and store an ordered list of verts along a po
Interesting, I didn't realize that; still on 2012.
On Monday, October 22, 2012 8:10:09 PM UTC-7, JP wrote:
>
> Actually in Maya 2013 they have been changed to DAG nodes, just to throw a
> fun little curveball at ya...
>
> On Mon, Oct 22, 2012 at 1:55 PM, Jesse Capper
>
As an aside, image planes aren't DAG nodes and thus don't have
shapes/transforms associated with them. When you select an image plane in
the viewport you're actually selecting that image plane's camera.
On Friday, October 19, 2012 10:38:09 AM UTC-7, San Luthra wrote:
>
> I am trying to get the i
What skill level is this video targeted to? Does it cover anything with
QGraphicsScene and building something like a node graph?
I've built a few tools in Qt picking stuff up from the docs and various
blogs I've found. Is it targeted to people that have little Qt experience
or is something that
s wrote:
>
> Or this:
>
> cmds.ls(selection=True, type = "dagNode")
>
> O
>
> On 11 October 2012 07:52, Justin Israel
> > wrote:
>
>> How about this?
>>
>> cmds.ls(sl=True, assemblies=True)
>>
>>
>>
>> On Oct 10, 2
Is there a way to only return selected DAG nodes through maya.cmds? The
-dag flag of cmds.ls also returns children of any selected DAG nodes which
isn't what I want. Or is the only option to filter the selection list with
something like [i for i in cmds.ls(sl=True, l=True) if i.startswith('|')]
Thu, Sep 27, 2012 at 1:42 PM, Jesse Capper
>
> > wrote:
>
>> I'm very new to maya's API so this may be an obvious question.
>>
>> Given an MObject of selected components, what is the most efficient way
>> of getting an MPointArray of their p
gt; The fastest would probably be just to get the full point array and loop
> through and pick out the ones you want. There's no one function to call to
> get a subset of points.
>
> On Thu, Sep 27, 2012 at 1:42 PM, Jesse Capper
>
> > wrote:
>
>> I
I'm very new to maya's API so this may be an obvious question.
Given an MObject of selected components, what is the most efficient way of
getting an MPointArray of their positions? For all points on an object I'm
using MFnMesh.getPoints(MPointArray), but I haven't been able to find a
function t
it is not based on visibility. Just the fact that
> the object exists:
>
> cmds.OutlinerWindow()
> print cmds.getPanel(typ='outlinerPanel')
>
>
> On Fri, Sep 21, 2012 at 4:30 PM, Jesse Capper
> >
> wrote:
> > I was checking out a question someone h
I was checking out a question someone had on tech-artists and came across
some behavior that I don't understand and hoped someone could enlighten me.
With the outliner closed, if I run:
*cmds.OutlinerWindow()*
*print cmds.getPanel(vis=True)*
cmds.getPanel doesn't contain the newly visible outlin
I was using closestPointOnMesh in a script to try and get UV values from
particle positions and noticed some funniness with it. I get the same
results if I set it up manually or use Constrain -> Closest Point
I create a polyPlane, delete history, and scale it some arbitrary amount.
Constraint ->
I just started trying out sublimetext, mind sharing the addons that
you find useful?
On Jul 2, 7:55 am, Justin Israel wrote:
> I don't think SublimeText is new. Its been out for a while and is at ver 2.
> But ya, I use it as well and think its great. Went from Eclipse to this.
> There are a hand
I tried your script out on a simple scene with a cylinder parent
constrained to an animated locator, and the cylinder added to a set,
and it baked out fine.
I threw the scene I used in a pastebin: http://pastebin.com/DduyZz1L
If you feel like it try that out and see if it works for you (I had to
a
I have used bakeResults in maya.standalone without issue on parent/
point/orient constrained attributes, so I know it can work (I know
that doesn't help much).
Is the animation not baking for the full range on the constrained
attributes? Or is it just not copying for the full range?
Re your concer
bject is available.
>
> On Thu, Apr 12, 2012 at 5:14 PM, Jesse Capper wrote:
>
>
>
>
>
>
>
> > It seems like at the time of the childAdded event filter, that the
> > hypershade hasn't been fully constructed (My knowledge of how the Maya
> > UI/layou
example.
>
> Unwrap the qobject with sip:
>
> child = event.child()
> mayaName = MQtUtil.fullName(long(sip.unwrapinstance(child)))
>
> On Thu, Apr 12, 2012 at 2:41 PM, Jesse Capper wrote:
>
>
>
>
>
>
>
> > Awesome, that helps.
>
> > I'm having
vent.child()
> # set up stuff on the hyperWidget QWidget
>
> return False
>
> On Thu, Apr 12, 2012 at 10:53 AM, Jesse Capper wrote:
>
>
>
>
>
>
>
> > Related question:
> > Can you attach a persistent filterEvent to a panel like the
&g
changeCommand is executed when the value is changed, and only once
after a drag of the slider.
dragCommand is executed repeatedly during the drag of the slider.
---
Code sample:
def slider_drag_callback(*args):
print 'Slider Dragged'
def value_change_callback(*args):
print 'Value
Related question:
Can you attach a persistent filterEvent to a panel like the
hypershade? Or maybe attach a callback to the hyperShadePanel type to
create a filterEvent every time the panel is created?
I can get the QWidget for the hypershade if it already exists:
hypershade_panel = cmds.getPanel
You may find this a helpful:
http://groups.google.com/group/python_inside_maya/browse_thread/thread/f5610cbfe466c07e/8b7d6a2ecbb6032d?lnk=gst&q=reference#8b7d6a2ecbb6032d
On Dec 16, 8:50 am, Pierre A wrote:
> Hi list,
>
> I'm facing an issue regarding references which are deleted on load
> when
t adds that attribute=0 or
> attribute =1 to the attributeOverrideScript attr which is a string attribute
>
> On Fri, Sep 3, 2010 at 10:31 PM, Jesse Capper wrote:
>
>
>
> > Damon, I've never been able to get the attributeOverrideScript
> > attribute to return an
Damon, I've never been able to get the attributeOverrideScript
attribute to return anything but a None type :/
Dave, check out the renderLayer attribute 'adjustments'. It's a
compound attribute with two child (is that the right word?) attrs
'plug' and 'value':
'plug' will return the connecte
76 matches
Mail list logo