Funny enough I actually have written those helper scripts since it was
pretty simple as their JSON files are quite well formatted. Honestly I
never really looked further than ngSkinTools as they're the most complete
and functional skinning toolset I've come across and used for many years.
In theory you could make everything easier for you by lowercasing the
entire queried string pre-parsing/checking.
On Thursday, February 21, 2019 at 5:45:19 PM UTC-5, Francesco wrote:
>
> Hi Alberto!
>
> I tested it out and it works! Thank you so much!! I have a followup
> question: what if the
The solution I'm going to suggest is probably a bit too brute force as it
would be not using a lib for quicker or more elegant comparisons however
something like:
filtered = [selected for selected in selection if all([exclusion not in
selected for exclusion in exclusions])]
That would very
Yeah they recently moved it from it's normal download location on the
actual autodesk app store to here:
https://www.autodesk.com/developer-network/platform-technologies/maya?_ga=2.21243515.1545365283.1528834929-709237566.1528834929
You'll find the download links near the bottom of the page.
What are some of the capabilities you're looking to expand upon? Is there
a specific area of your code that you'd want to be investigated for
stability/improvements or any specific issues you ran into during
development? Is there a github page for it?
On Saturday, May 26, 2018 at 7:21:52 AM
It recently moved to its own space here:
https://www.autodesk.com/developer-network/platform-technologies/maya
You'll see the download links down below near the bottom. I'm very happy
about this change since it was pretty annoying to get something so trivial!
On Wednesday, May 30, 2018 at
I usually make a venv out of a matching Python version and then just inject
the path into Mayapy...not what you're looking for I know but it was the
compromise I found was easiest.
On Thursday, March 8, 2018 at 3:09:22 PM UTC-5, Robert White wrote:
>
> The only time I've gotten virtualenv to
Whoa I didn't know about the runTimeCommand -q -command flags. Learn
something new every day!
On Wednesday, December 20, 2017 at 10:42:34 AM UTC-5, David Mwangi wrote:
>
> Thanks Tim,
>
> I will. I found a "brute force" workaround but I need to know what it
> does.
>
> Thanks again.
>
> On
Near the bottom of this PEP you'll see it and maybe it will clear up a few
others you might not know about!
https://www.python.org/dev/peps/pep-0008/#descriptive-naming-styles
On Saturday, December 9, 2017 at 12:53:31 PM UTC-5, elrond79 wrote:
>
> Underscores at the start of a variable name are
It just depends on what you want to do and how you want to automate the
selection (every nth edge, following a pattern, only edge loops, edge loop
segments etc)
To select multiple edges you can use slices:
import maya.cmds as mc
start_edge, end_edge = 1, 40
helix, helix_shape = mc.polyHelix()
Sounds like you might have corrupted your installation of Maya to be honest
if it can't import the standalone module, but there's a lot more
information I'd need to know before actually believing it. If you open
maya, go to the script editor, open a python tab and then type:
import maya
import
Always appreciate these, I've forwarded it to some friends.
On Wednesday, November 29, 2017 at 1:46:30 PM UTC-5, Justin Israel wrote:
>
> Hi All,
>
> Sorry to make this a second job post in such a short time but this one is
> specifically on my own team, at Weta Digital in New Zealand.
>
>
y args
> matches.append([locator,vray_shader_target])
> # We stored the matches in the format list(list(locator, shader)) so now
> you can run through that list like this if you wanted to use it later:
> for locator, vray_shader_target in matches:
> print(locator, vray_shade
To do matching like this at a more basic level usually people do some sort
of token within the name of each object that represents the object type.
For example:
target_locator
target_shader
target2_locator
target2_shader
something like that. This way you can do really quick string
Something that will help you immensely is not to rely on Maya's current
selection and the fact having your code only work with the current
selection. That kind of information gets very hard to rely on as code gets
more complicated. So what you need to do is actually store the return
value
The thing that was always a grey area in my head is when you're coding your
own C++ Maya deformer or something like that. In my mind that's
programming since it is a compiled/built process that ends up in a plugin
file...but that's always been the one I have a hard time discerning. In my
I don't have an answer for the stylesheet issue which seems like an
interesting formatting problem...however I found a workaround (that I
haven't tested really) that does not involve stylesheets but keeps the
existing stylesheet rules intact:
app = QtWidgets.QApplication.instance()
font =
Love how many ways Maya/Pymel includes to solve a problem! It's a bit more
verbose and seems to have some paths it might not go down (did you find it
was actually going to the error catching section?) but if it works for you,
that's great.
Just a tip, there's a few I could mention but this
There's probably a hundred ways to do this but here's one:
import pymel.core as pm
sel = pm.ls(sl=True)
sel[0].getShape().getUVs()
>>> ([], []) # This is empty/no UVs
# Or you could do
sel[0].getShape().map
# or
sel[0].map
# Empty objects should just return something like (depending on object
This one liner seems to work
unloaded_reference_files = [file for file in cmds.file(reference=True,
q=True) if not cmds.referenceQuery(file, isLoaded=True)]
On Tuesday, July 18, 2017 at 7:25:41 AM UTC-4, Neil Roche wrote:
>
> Off the top of my head I think the referenceQuery command will only
Finally, consulting we Maya Python users can count on.
On Friday, June 9, 2017 at 2:22:16 PM UTC-4, Marcus Ottosson wrote:
>
> You haven't!? We're all having a good time here, don't miss out!
>
> On 9 Jun 2017 19:05, "Ravi Jagannadhan"
> wrote:
>
>> Anyone called that phone
Okay so there's lots of things wrong with this code. I'll start with the
fact that every single call to selection (with the replace flag) updates
your viewport and slows down your operation due to a screen refresh.
Secondly there's lots of redundant work with lists going on. Lastly pymel
is
ing method setVertexColors()
> <http://help.autodesk.com/cloudhelp/2016/ENU/Maya-SDK/cpp_ref/class_m_fn_mesh.html#ac87fe328d734133476d0ae30796c7400>
> instead.
>
> So you could build the color and vertex arrays up front, and then make one
> call to set the colors.
>
>
&g
A bit of a tricky one:
Go to Layout UVs [Option box]:
1. Toggle Shell Layout: None
2. Toggle Rotate None
3. Toggle Scale Mode: None
4. Toggle on Flip reversed
Now hit Layout UVs and it should flip and reversed UVs without affecting
the current UV layout except for the flipped sections.
On
Just to add onto this topic: you'll find that many ways that you're
thinking about doing things have been codified already into design patterns
that might be more effective or efficient at getting the job done while
maximizing reusable code that isn't brittle or hard to recycle/monolithic.
It
Is PL_ also supposed to be a string? Seems like you just missed your
quotation marks at the beginning and post string that surround the
arguments. Also...I'd recommend not hard baking these sorts of things in,
but passing as an argument...
Aka:
lookThroughModelPanel ("PL_" + $SceneName +
You could also just cast to a string using str() around your EpisodeName
but honestly the removal of back ticks makes more sense (in the future if
you ever find you can't remove the leading 'u' otherwise). Also since
you're already using the os module you should be using os.path.join instead
Sorry, just realized you're using API 1.0. I doubt that helps your
situation and I can't recall the differences in those calls.
On Wednesday, March 15, 2017 at 12:16:31 AM UTC-4, Andres Weber wrote:
>
> I commented on your gist but I'll add here just in case you don't check
> t
I commented on your gist but I'll add here just in case you don't check
that often:
The problem with this code is specifying your world space as a string
value. It requires an integer and for maximum future proofing you should
use the pre-defined one from the api:
OpenMaya.MSpace.kWorld
Feed
still runs
so...unless anyone knows why this is a horrible idea I'm going to consider
this complete...
On Monday, March 6, 2017 at 7:01:16 PM UTC-5, Andres Weber wrote:
>
> Hey Everyone,
>
> So I recently have been trying to collect and compile information on
> setting up PyCharm p
Hey Everyone,
So I recently have been trying to collect and compile information on
setting up PyCharm properly for use as an IDE for Maya. This is all well
and good and the instructions are fine, however currently when trying to
get the code completion working it doesn't seem to be
ealised my mistake, I didn't need to catch it anymore.
>
> On Thursday, 2 March 2017 08:52:27 UTC+11, Andres Weber wrote:
>>
>> So I have been trying to google it to no avail...probably just haven't
>> figured out the magical one word I haven't thought of, but I was trying t
So I have been trying to google it to no avail...probably just haven't
figured out the magical one word I haven't thought of, but I was trying to
write some API 2.0 code and couldn't figure out how to
catch kInvalidParameter errors properly instead of just doing broad excepts
which are
Hey guys,
Tough one to search on the list since I'm not sure of the right way to put
it...but I was trying to setup a button that would toggle shaders to
"Generate Preview" for UDIM textures. I wasn't able to finalize exactly
what the command is that the button is running since echo all
Pretty succinct explanation over here which covers it nicely. Mainly one
is just actual equality versus class/instance identity. Try not to use is
not for things where you're trying to compare direct values.
http://stackoverflow.com/questions/2209755/python-operation-vs-is-not
On Monday,
Oh man I didn't know there was a container for this. Thanks Marcus, this
is gonna save me a lot of time!
On Wednesday, July 13, 2016 at 8:11:45 AM UTC-4, Cesar Saez wrote:
>
> I would like to point out that while Marcus suggestion is totally valid,
> docker is not absolutely necessary to run
I'm assuming Format is a custom class that you've created?
In either case what Cesar mentioned is still applicable in this instance.
You need to hardcore a look up dictionary based on the format names for
each preset film back:
format_lookup_table = {'16mm Theatrical': [0.404, 0.295],
I'm not sure I understand you right in regards to the delivery/default
thing...but accessing film back is easy:
*cmds:*
import maya.cmds as cmds
cmds.getAttr("myCameraShape.horizontalFilmAperture")
cmds.getAttr("myCameraShape.verticalFilmAperture")
*pymel:*
Hi Rudi,
Just because I believe I understand where those two confusion points were
coming from (I'm a rigger myself): The stretchy IK flag to the "makeIK"
method would make sense to keep as a flag (with either an if statement
depending on the flag OR another additional method in your class
port.
See the AtNodeEntry page of the Arnold API for the available node types.
On Wednesday, May 4, 2016 at 3:52:40 PM UTC-4, Andres Weber wrote:
>
> I didn't test this at ALL but after reading the documentation and checking
> out the API very briefly I think you could access the int values vi
ot;mask 8" etc.
> Only logical way I can think of is check out each option individually and
> figure out the digits for that export combination.
>
> On Wednesday, May 4, 2016 at 1:06:56 AM UTC+5:30, Andres Weber wrote:
>>
>> Forgive me if I'm misunderstanding what exactl
Forgive me if I'm misunderstanding what exactly you're looking to solve but
it just seems like a string format?
let's assume "buttons" is a dictionary with keys relating to the option
name with the value of the given buttons in relation to the state that you
mentioned in your GUI that you'd
Oh and sorry, I forgot to point out that this is ONLY in the case that
you've created layer overrides per render layer (which is what I figured
you did since you'd just simply check defaultRenderGlobals.currentRenderer
otherwise).
On Tuesday, March 8, 2016 at 2:53:32 PM UTC-5, Andres Weber
Also on top of what Marcus is saying (which is all GOLD you should be
paying good attention to) I would like to mention that as you abstract all
of these rigging processes, you get greater extensibility on your rigs with
the ability to "plug and play" modules of control setups/styles and to be
You've piqued my interest now if there's another (seemingly simple) way of
doing it without doing some API sort of stuff for draw calls/shaders etc.
Do you have a link to the rig?
On Thursday, January 22, 2015 at 4:01:01 AM UTC-5, Marcus Ottosson wrote:
If you click on the controller with
From my understanding you HAVE to have overrideEnabled set on in order for
it to pay attention to those settings. You can control that attribute just
like any other by connecting your display override attribute to it with an
SDK (or some node combination of your own) to control it however you
This is the code I wrote a little while ago for getting component
islands/shells...it's not the most efficient but it works. Oh well...
Aside from that you could just cheat and create a cluster based on those
verts and use that. or replace it with a locator after.
def getShells(objs):
I've actually been looking for a solution to this myself. You can always
use expressions or plugins, but I'm not sure about how to do it purely with
nodes.
openMaya way of doing it
http://mayastation.typepad.com/maya-station/2011/03/how-to-sample-a-3d-texture.html
Soup can do it with
Also:
https://groups.google.com/forum/#!topic/python_inside_maya/ZhEQ76eQ7pc
On Monday, June 9, 2014 9:01:24 PM UTC-4, Brian Eyre wrote:
Thanks Kurian,
Works a treat :-D
On Monday, June 9, 2014 5:42:53 PM UTC-7, Kurian wrote:
cmds.channelBox('mainChannelBox', q=True, sma=True)
On Mon,
(child, len=len+dist(obj,child))
lenJointChain(mc.ls(sl=True)[0])
Thanks.
On Wednesday, May 28, 2014 5:15:12 PM UTC-4, Andres Weber wrote:
I'm not really sure why you're doing it the way you're doing it...
This is how I solved it quickly (There's better ways but I'm lazy and I
I'm not really sure why you're doing it the way you're doing it...
This is how I solved it quickly (There's better ways but I'm lazy and I
didn't want to keep working on it.) Just a simple recursive function.
def dist( objA, objB ):
Ax, Ay, Az = objA.getTranslation(space=world)
Bx, By,
You could do a few things...if your rig is wonky and you cheated a bit to
fit something in there then you can just make a new duplicate mesh,
transfer the UVs to that and then delete history. Then match the binds
between the two objects and transfer weights. Now delete your old mesh and
your
Just gonna say a couple things that I noticed right off the bat (there's a
TON of things wrong with this...but it's more of how it's organized that
isn't necessarily great rather than syntax.
First thing is:
sourcePeg = [discList] should be sourcePeg = discList (then the two lists
are the same
import pymel.core as pm
pm.fileDialog2 (or pm.fileDialog, but I'm pretty sure that's antiquated)
Writing a plugin is actually deceivingly simple. There's TONS of tutorials
online if you just google it. First thing I googled (not necessarily the
best at all):
You might want to take a look at Chad Vernon's cvShapeInverter. It creates
a node that updates correctives based on the basemesh+pose. I THINK this
is what you're looking for but I may be wrong...
http://www.chadvernon.com/blog/resources/cvshapeinverter/
On Monday, December 2, 2013 2:00:20 AM
I'm a little confused. I tried running your script and it most definitely
didn't work (for more than a few reasons) but it seems like you're very
confused about what functions to use and where. I've converted your script
to PyMel (just to show, and also modified the cmds version). Seems
I'd also add a percentage for tolerance just in case the model is the same
but ever so slightly changed.
On Wednesday, October 23, 2013 12:40:18 AM UTC-4, Jakob Kousholt wrote:
I'd also compare the UVs if the models has any.
Sent from my iPhone
On 23 Oct 2013, at 05:31, Jason Barnidge
57 matches
Mail list logo