: https://github.com/AKEric/skinner#donate-for-usage
On Wednesday, January 25, 2023 at 4:13:33 PM UTC-8 AK Eric wrote:
> Per
> "This would be my guess as well; there likely needs to be a version of
> Skinner for each version of Maya, possibly per platform."
>
> That's the sink
middle and putting it front and center would help.
>
> Best,
> Marcus
>
> On Thu, 2 Dec 2021 at 03:21, AK Eric wrote:
>
>> After two years of working on it in my spare time, I'm releasing my
>> custom skin weight import/export tool free to the public. Happy Holidays.
&
After two years of working on it in my spare time, I'm releasing my custom
skin weight import/export tool free to the public. Happy Holidays.
https://github.com/AKEric/skinner
Having built holistic art -> engine pipelines for multiple studios
(Visceral/EA, Sledgehammer Games/Activision, 31st
FWIW, I've always had trouble using pip to install python packages in
Python 2.7. I'm now on 2022 / Python 3.7 now, and installing packages via
pip amazingly, 'just works'. I can install matplotlib, numpy, scipy,
pandas, tensorflow, etc, all just via pip.
Run shell as admin and:
>
Thanks for the info: I've used deformerWeights successfully, but (like you
mentioned) it still requires a large amount of wrapper code to make it
functional in a real pipeline. Which I'll probably end up writing myself
if I can't find anything off the shelf ;)
--
You received this message
In general it's bad form to require a source of a mel script to trigger
execution. If you make a global mel proc in the script with the same name
as the script, you can just do:
mel.eval("test");
And that will execute it.
--
You received this message because you are subscribed to the Google
Yep, it's not "obvious". My notes are here:
http://mayamel.tiddlyspot.com/#%5B%5BHow%20can%20I%20query%20what%20is%20highlighted%20in%20the%20Shape%20Editor%3F%5D%5D
I use pymel simply because it makes optionVars convenient.
Snip:
import pymel.core as pm
selData = [item for item in
I've used this for a looong time:
import maya.cmds as mc
modelPanel = mc.playblast(activeEditor=True)
That's it: The playblast command always knows the last active panel it
could use, so querying that has always worked for me.
--
You received this message because you are subscribed to the
I got mGear in and working, thanks @HarshadB : I found the api docs online,
and the source, but is there any sort of overview on how the skinning
import\export works?
By default (at least via the ui), it seems to only import if the vert count
matches, which is pretty limiting. Appreciate the
Thanks Harshad, I'll give it a look!
On Sunday, June 23, 2019 at 8:20:27 PM UTC-7, HarshadB wrote:
>
> I feel ngSkinTools is more of a painting weights toolset plugin than a
> full-fledged tool to handle import/export skin-weights at a production
> level. It's more of a user tool than a
influences)
>
> result = cmds.confirmDialog(b=['OK','CANCEL'], m='You have %d missing
> influences...continue adding skin cluster from file with %d influences?' %
> (len(missing_influences), len(influences)))
>
> if result == 'OK':
> mc.skinCluster(influences,
I've recently changed companies and starting something from scratch. One
of the tools I need (and we had before) is a bulletproof solution for skin
weight export/import. I'm a bit out of touch with what's out there in the
community since I've not had to look into this for years. Maya's
It's non trivial (since Maya has nothing built in to do this), but you find
the 3 verts closest to your point, and their weights. If the point isn't
exactly on that tri the 3 verts define, you need to use the vector maths to
project it down to that plane. You can then use some (roll your own)
If you're applying the same worldpsace matrix to two nodes, but they give
different rot values yet have the same heading, I would infer that each of
the nodes *parent's *have different orientations, and you're seeing that
expressed as different rot values on the two nodes.
--
You received
I wouldn't say gimbal *lock *more as a function of how Euler rotations work
within the gimbal system that constrains them: You can have the exact same
"heading" of the local axis between to objects, but they got there by
rotating in completely opposite directions. For example, one rotated
"Python as CPython implements it simply isn't multithreaded ;-) "
Right, I should have been more specific ;)
--
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
Having been in touch with the Autodesk devs directly, I no longer use *any
*Python-base
scripted-plugin-based *nodes *since Maya 2015 (Maya 2016 introduced the
multithreaded evaluation graph): Per discussion above, from 2016-on,
they've confirmed (and I've seen first hand) they drop the
Another great solution, thanks!
--
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.
To view
I recently had to port all our stuff to support both PySide *&* PySide2,
ugh. Since this thread is along those lines, this is the solution I came
up with at the top of my modules since we have multiple versions of Maya
running:
Simple example import section:
> import maya.cmds as mc
>
Indeed there is: Python comes with the cPickle module, that lets you
serialize any builtin Python data to disk. It has a dump method that does
that writing to your filesystem, but it also had a dumps (dump string) that
writes it as a string.
In Maya, you can make string attrs on your
The first one: "serving Maya from a network filesystem mount and running it
as a local user process".
--
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,
We're researching using a Maya 'thin client' distro: Running Maya off a
server instead of standalone installs. I'm tired of finding out someone is
3 versions behind (or never installed the updates / patches) and *that's* why
they're having so many bugs...
The only major problem we've hit is
Have you tried the colorEditor command? The results of the selection can
be easily queried in rgb(+a) and hsv.
--
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
Right on, credit :)
FYI, I figured out you can use cpickle.dumps to embed arbitrary python data
straight into the value of fileInfo, allowing you to query it outside of
Maya, powerful.
However, on large files (200+megs) it can still take a good 20 seconds to
parse. I may end up just storing
Thanks Alok & Marcus: I tried that code and it does indeed work. Nice job
on the scenefile parser Marcus!
--
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
Marcus: MA not an option, so no comment blocks, but thanks, good idea.
However, I like your idea of just writing data to somewhere on the server
that corresponds to the Maya file in question. That could be a legit
answer. not tagging the file with metadata itself, but the data isn't
living
When I can't figure these out, I save one version of the file as an ma,
then make the change and save a different version as an ma, then diff the
files: This usually exposes the setAttr line that does the change, and
you'er good to go.
--
You received this message because you are subscribed
It would be of great use if I could (somehow) tag mb files with metadata
that could be read at system level, never having to open the mb itself in
Maya.
I already have a solution that will save out a json/xml next to the file
whenever the users saves, with queryable info. But this is lossy,
Thanks, I'll take a look at that too. I'm on 2016, so yah, maybe the file
format has changed since then. This is actually related to another issue,
I'll start a new thread for it.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk
Revive this old thread: I tried using the mayabinary module, and, I'm
getting no love, just running the built in example. It seems like the
mayabinary reader actually expects an *iff *(image) file instead.
> python mayabinary.py metaTest.mb
> ValueError: The file "C:\temp\maya\metaTest.mb" is
It's also worth noting you can call to meshlab on the commandline, via
meshlabserver. It has it's own internal convex hull filter that's super
easy to use via the gui or commandline if as a saved filter script. Some
examples here:
https://www.mankier.com/1/meshlabserver
I have my own Python
Disregard, guess I had a typo in my code, this actually works:
from PySide2.QtGui import QStringListModel
--
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,
I've done something similar that has worked well:
curves = mc.ls(mc.listHistory(myNodes), type = 'animCurve')
--
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
Asking for an engineer, since this isn't something I've ever tried:
He wants to integrate some custom (non-Maya) c++ code into a Maya plugin.
I have experience doing scriptedPlugins in Python, but not c++ ones.
Obviously if you make a c++ plugin it'd be easy to integrate this other
code. So
Thanks everyone, I'll pass that along.
--
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.
Just exported some high-res scan mesh via the GPU Cache menu, then had a
modeler import that back into their scene as a GPU cache for modeling
reference.
They moved it in worldspace, and now want to to 'turn it back into normal
(editable) mesh' at that new location. I figured this would be a
t", reparent=transform)
>
> # Hide the original gpuCache shape?
> mc.setAttr(gpuCacheShape + '.visibility', 0)
>
> #(Or delete it?)
> #mc.delete(gpuCacheShape)
>
>
>
> On Thursday, October 29, 2015 at 9:34:45 PM UTC+1, AK Eric wrot
tl;dnr this whole thread. But you'd need to:
import SuperScript.myModule
SuperScript.myModule.myFunc()
That's executing the myFunc function in the my myModule.py module living
under /SuperScript dir.
x:/../../pythonscripts/SuperScript/myModule.py
Generally, I don't often put any code in the
I use Wing, like Joe mentioned above. I have a # of examples showing how
you can use it as a Script Editor replacement: Highlight code in it, it
executes in Maya, just like the Script Editor, either mel or Python. A
'very live' coding environment. Same functionality as the SE, + s much
If you're trying to export stuff per frame over a long sequence, then you
want the calling code to control the frame step, not Maya's playback
mechanism. I've authored tools that export a .obj per frame over a
framerange for the selected mesh. In that case, you pass your min\max
frame-range
So I gave it a shot myself, and I realized the scriptJob only fires when
the playback is *over*, not during playback. That being said, scriptJobs
have both a python cmd and pymel implementation, so there'd be no reason
you'd need to call to the mel version.
It's possible you could get away
Off the cuff: Make a method that prints the current frame (like you've
done). The on button of your ui calls to a *new *method that creates a
scriptJob and passes the printer method to the *timeChange* arg. The
off button deletes the scriptJob. You'd want to put checks in so no more
than
Thanks Justin : lol, I'd forgot I'd posted this and ended up coming up with
the exact same solution. Which works great by the way.
I'm still pretty new to the whole let's load a .ui file and play with it
thing, but I've done tests where in QtDesigner I will create say, a QPush
button with a
Created a .ui file in QtDesigner, it shows up happily in Maya via loadUI.
I have other Maya code (based on lsUI) that can search through controls
related to buttons, and report stuff like their label, annotation, command,
etc.
However, it *appears *that lsUI ignores anything created from a .ui
I tend to prototype in PyMel, just since doing stuff is easy, less typing.
But like Justin said, can be slow depending on what you're doing. If I
found it this is a performance critical application I move it into cmds,
and if not suitable, the API. Over time you sort of learn at which point
Nearly everything you need can be accessed by importing pymel.core
When running this:
myname = loop_anim_v001:master_ctrl
pmc.objExists(myname)
# True
You're passing the string name to the PyMel command. Note most of their
commands take either strings, or PyNodes.
The reason your getPosition
How about one more way? :)
import pymel.core as pm
curves = map(lambda x:x.firstParent().nodeName(), pm.ls(type='nurbsCurve'))
This returns the string names of the parent transforms. If you want the
actual PyNodes, just get rid of the nodeName() method.
--
You received this message because
You can also use the API's MUiMessage_addUiDeletedCallback. Example of
that + scriptJob here:
http://mayamel.tiddlyspot.com/#%5B%5BHow%20can%20I%20execute%20code%20when%20a%20window%20is%20deleted%3F%5D%5D
If the window is closed, that callback is triggered, and then you can do
anything you
I've been making maya ui's forevers (via mel at first and now python), but
never really messed with docking. This is really my first attempt at doing
*PySide*, and *docking* PySide, so I have on doubt that maybe some part of
my setup is wrong ;)
--
You received this message because you are
I've authored a window in PySide (via QDialog), and recently made it
dockable by inheriting from
maya.app.general.mayaMixin.MayaQWidgetDockableMixin (in 2015).
Surprisingly easy.
In the QDialog's closeEvent method, I do a bit of cleaning up of API
callbacks. What I've found is: If the
Timm: This is how my inheritance looks:
class App(MayaQWidgetDockableMixin, QDialog):
So I am overriding the closeEvent in that class with my cleanup code, but
like mentioned, it's not being called when *docked*. Also: closeEvent
hides the widgets instead of deleting them by default : That's
Tracked it down: The MayaQWidgetDockableMixin class has a
dockCloseEventTriggered
method: I can call to my cleanup code in there, and all is happy now.
Thanks for the help!
--
You received this message because you are subscribed to the Google Groups
Python Programming for Autodesk Maya
I've written a wrapper for the ol' Maya .anim format: The Maya tool by
default is selection order based. But with a bit of metadata and coding
our solution fully name based, supports namespaces, missing nodes on
import, stores/writes non-keyed data, etc. And since the heavy lifting
Optionally you can cut out a lot of cruft using PyMel:
def redWireColour():
sel = pm.ls(selection=True)
for item in sel:
item.overrideEnabled.set(1)
item.overrideColor.set(4)
One of the nice things it does is, if it can't find an attr on the
transform, it'll auto look to
d'oh, I forgot the :
import pymel.core as pm
part... ;)
On Thursday, January 8, 2015 11:04:29 AM UTC-8, AK Eric wrote:
Optionally you can cut out a lot of cruft using PyMel:
def redWireColour():
sel = pm.ls(selection=True)
for item in sel:
item.overrideEnabled.set(1
Most of the UI's I write are interacting with *other* legacy ui's (whether
authored via mel, Python cmds, or PySide) , or parts of the DAG. If the
only access I had to them was through the c++ api I'd probably shoot myself
:P Having access to PySide (for me) makes the actual interaction part
Glad you like the site ;) FYI You can permalink to any of the tiddlers
(individual subjects) via:
Open the tiddler in question.
Press Close Others in it's menu. Now it's the only one active
Press the permaview button on the top right: The URL in the address bar
will now be the full path to
This is my first real shot at dealing with attrs and plugs in the
API. I'm trying to do something pretty simple: If an attr is type
string, query and print the value. I have this working with just
about every other attr type, but string is causing the code to crash
\exit with no errors or
I'm not expert on this subject, but I tried the same thing in the past
without any luck. My guess is you need to create an actual
'node' (like you said you didn't want to do) to pull this off. I was
recently looking at Coral, and that's an external app that does all
sorts of custom drawing inside
I've found that a very precarious way to work :) Whenever I'm working
on scripted plugins, I just unload\reload them between each
iteration. Here's a code chunk I use to do that, that I save in the
physical scripted plugin module itself:
import os
import maya.cmds as mc
def pluginLoader(load):
I wrote a tool (Python function, not scripted plugin) that assigns
vert colors via the API, through MFnMesh.setVertexColor(). Works
great, really fast. Problem is, it won't undo.
Unless I'm missing something, I've deduced that when API calls modify
the DG (add\delete nodes\connections, color
On Fri, Feb 5, 2010 at 10:43 PM, AK Eric warp...@sbcglobal.net wrote:
Unless I'm missing something about your question, you can just copy-
paste them from my wiki link above. The full source is right on that
page. And if you're using Wing Pro, then yes, you can use that code
per the wiki
Unless I'm missing something about your question, you can just copy-
paste them from my wiki link above. The full source is right on that
page. And if you're using Wing Pro, then yes, you can use that code
per the wiki to have Wing talk to Maya.
On Feb 4, 10:54 pm, Subbu.Add subbu@gmail.com
works fine for sending my Mel or Python scripts to
Maya from my IDE.
I thought it would be nice to remove the need to format my Python using Mel
when sending it to Maya.
My method is similar to AK Eric.
Thanks again for all the input, definitely gives me some ideas to play with.
-Original
To my knowledge, Maya intercepts incoming commands as mel,
irregardless of send methodology. You can send any type of data you
want to Maya over the socket... but Maya will expect it to be mel when
it receives it. I've not used MayaPad, but maybe it does something
similar to what I do to work
Interesting, thanks for the tip, I'll give that a shot. I'm the first
to admit I'm no socket expert ;)
On Feb 1, 9:41 am, Marc Downie m...@openendedgroup.com wrote:
As an aside: While you can open a socket with both mel and Python...
I've found that no matter what I do, if I open a socket
Not the API, but I've used this in the past:
string $inf[] = `listConnections mySkinCluster.matrix`;
On Jan 27, 2:15 am, Subbu subbu@gmail.com wrote:
Hi,
Any one has faced this situation to select one object from it's known
or selected skinCluster.
There should be some option to
Years ago someone wrote a plugin to do this, it *was* here:
http://www.3dhornet.eu/index.php?main_page=document_general_infocPath=63_67products_id=194
You can still download it from CreativeCrash here:
Just to add a bit more: The below block of code is one I just stick
on my shelf, and drag it down to the script editor any time I want to
start a new window. Like Seth, I just modified it to add a button to
close the window as well.
The finicky bit are button commands, or any command executed
NaughtyDog Inc.
On Jan 21, 8:34 am, AK Eric warp...@sbcglobal.net wrote:
Just to add a bit more: The below block of code is one I just stick
on my shelf, and drag it down to the script editor any time I want to
start a new window. Like Seth, I just modified it to add a button to
close
Hey, nice! Mystery solved ;)
On Jan 21, 3:04 pm, damon shelton damondshel...@gmail.com wrote:
sorry, y = i not y == i
On Thu, Jan 21, 2010 at 3:02 PM, damon shelton damondshel...@gmail.comwrote:
Eric,
here is how you can handle the looping lambda issue
set one of your lamdas (eg. y in
I don't use pymel, but I do use Python and pickle in Maya ;) From
your above example, it looks like x is a tuple with two strings in
it? Or is pymel storing more complex objects as the name
representation of the nodes rather than strings? I'm not sure why
this would choke (if it's just a tuple
In Python external to Maya, I'm used to doing this in a module, which
is a really convenient way to know the location the module is being
executed in. For a module living here:
#--
# c:/temp/spam.py
import os
import sys
print Module Save Location:,
I'm trying something I've used for years, on Maya2008\win2k:
In maya:
commandPort -n :6000 -echoOutput;
In Python (external to Maya):
import socket
maya = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
maya.connect((127.0.0.1, 6000))
But I now get his error in Maya2010 64bit \ Vista
74 matches
Mail list logo