I think what you are wanting can be found here.
https://forums.autodesk.com/t5/maya-programming/maya-python-api-2-0-ide-code-complete/td-p/6239681
I have not set it up in Code, but have it setup in Pycharm.
I hope that is helps
Cheers,
Si
On Friday, September 13, 2019 at 7:47:41 AM UTC+12, Mar
Hi Micheal,
I was just having a read over what the method does, and trying it out on a few
different type of objects.
on an group, it just seems get the world matrix and apply it to the groups
pivot.
on geo, it offsets all the points by the world position of that object and then
sets the pi
Can I ask why use pyMel, when you have a much faster and more pythonic API,
om2?
On Sunday, 19 November 2017 06:11:28 UTC+11, Tom Whitzer wrote:
>
> I am curious if anyone could provide me with an example of the the
> orientJoint() function in PyMel. I have been searching online to see how to
>
Hi Isai,
I would suggest looking at Om2
http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__py_ref_index_html
http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__files_GUID_AC9B3C66_90FE_493F_A7B2_44ABBA77CED2_htm
I find the best way is set up some small projects that test specific areas
and
Ahoy Isai,
Nice implementations.
For Solution 1, you could add two events one for the "click"
mousePressEvent and another for the "release" mouseReleaseEvent. That way
when the user clicks on the slider it stores the initial position if timer
is 0, and then when the user releases the mouse it
Hi Isai,
Sounds like a tricky situation, as when would the code know the user is
done "tweaking" the slider and happy with the result, as you are
continuesly apply the command. if you store the original state before a
tweak, you will end up with a ton of undos, which is the situation you are
i
This usually works for me when setting a size of a dialog.
self.resize(QSize(500,300))
Try and call this inside the init method, before you call show().
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe fr
I took a look at the file.
It was build using pyside 1, and Maya 2017 uses pyside 2. So in order to
get this to work in maya, you will have to update the file, and migrate all
the pyside 1 modules and calls to pyside 2.
It can be a good task, as you learn about the changes in the API.
Here i
Looks like in you are importing the wrong module, for the version of Maya
you are using.
you need to import PySide2, like you do in your code snippet. In one of
your modules you are importing PySide.
a good rule of thumb is to implement a try, where you try import pyside2,
and then if that fai
looks like your Long is meant to be long
Take a look at the Qt example here, it is quiet helpful.
http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__files_GUID_66ADA1FF_3E0F_469C_84C7_74CEB36D42EC_htm
On Saturday, 14 October 2017 16:40:11 UTC+11, jettam wrote:
>
>
> I am using maya2017. I a
+1 :)
On Thursday, 12 October 2017 11:50:02 UTC+11, damonshelton wrote:
>
> I would suggest utilizing keywords rather than order - also a nice trick
> is expanding locals to keep from having to specify the keywords repeatedly
>
> def sayHello(name=None, age=None, weight=None ):
> print( "name
missing the last close bracket
print( "name: {0} age:{1} weight:{2}".format(sayHello))
outputString = "name: {0} age:{1} weight:{2}".format(sayHello)
print( outputString )
On Thursday, 12 October 2017 11:11:54 UTC+11, jettam wrote:
>
> Can someone help me with this string formatting.
>
> def sa
you need to assign the variables into the format method.
def sayHello (name=None, age=None, weight=None ):
print( "name: {0} age:{1} weight:{2}".format(name, age, weight)
sayHello ("Allen", 20, 150)
On Thursday, 12 October 2017 11:11:54 UTC+11, jettam wrote:
>
> Can someone help me with this
I think its been moved to QWidgets in QT v5
On Wednesday, 11 October 2017 15:54:51 UTC+11, jettam wrote:
>
> Can someone tell me why I am getting this error.
> I am running maya2017. It appears the QtGui.QDiaLog doesn't exist. Can
> someone suggest what I should be looking for here instead.
I would recommend pyCharm, and the MayaCharm plugin. Allows you to send
code directly to maya and get logs directly in pycharm. I would recommend
giving it a try
On Thursday, 5 October 2017 18:01:03 UTC+11, Jeremy Beauchamp wrote:
>
> I'm fairly new to coding in Maya, but Atom has been recommend
you can do the following.
keys = ['k1', 'k2', 'k3']
data = ['d1', 'd2', 'd3']
newDict = {k:d for k,d in zip(keys, data)}
--
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
>From my understanding, str is a string representation, that one uses if
they want to perform comparisons with other strings.
If you create the str method it will trump the repr method when printing.
repr is usualy used to show what the object represents, but wont be used in
evaluations.
*clas
That is correct. From my understanding, print will query each objects
_repr_ which it stores in a tuple and then prints that tuple out.
The reason why the single value is not a tuple, is that you cannot create a
tuple with one value.
ie variableA = (), or variableA = (1) should both fail
if you
Hey, the only thing that looks a bit suspect to me is the way you are
setting a variable that is outside of the method. The scope of the variable
may be incorrect.
Can I suggest that if everything runs correctly in your makestairs() then
you return True, and then check against the returned vari
Like Marcuss mentioned, its gone for good. I try dev in an IDE and then
just import and refresh the module in Maya. That way you dont get caught
out by Maya not playing nice.
On Thursday, 14 September 2017 15:24:38 UTC+10, jettam wrote:
>
> Well since I'm learning, this will only make me stronge
Just gave it a try on a Windows machine, it works with only the single '/'
On Wednesday, 13 September 2017 12:23:15 UTC+10, Simon Anderson wrote:
>
> Will have to give that a try when I get home. At the moment I'm on a Linux
> box, and just double checked, single
Will have to give that a try when I get home. At the moment I'm on a Linux
box, and just double checked, singles dont seem to play fair
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and s
Hi Aren,
Just from first glance, it looks like your path is incorrect. Remember to
use \\ when using strings in Python.
ifl='P:\\BsMaps\\half_l.tif'
in the code above you have pm, not sure what that variable is meant to be
in your example
Tests I got working:
# export
# I had the UI tool op
Q1. I have not tried this before, If there any reason why you have both,
when you could have the python file call what ever is in the mel file?
Q2. Have you added the see module path to your Python Path system
environment variables?
On Tuesday, 12 September 2017 09:01:01 UTC+10, jettam wrote:
>
Totally agree with Cesar
On Wednesday, 6 September 2017 22:29:30 UTC+10, Cesar Saez wrote:
>
> Just a small note on Simon comments: please do not use import * (aka from
> x import *) it pollutes the name space with all sorts of things and the
> risk of name collisions/shadowing is very high. Als
Hi Ruchit,
I am not sure exactly what you are asking for. Do you want to create a Qt
UI that performs some maya command. Here is a small snippet that creates a
label and a small window.
Everything you see in the videos is all custom layouts built in Qt.
from maya import OpenMayaUI as omui
fro
Have you tried connecting the shapes together using the node editor?
On Wednesday, 30 August 2017 15:18:37 UTC+10, justin hidair wrote:
>
> I basically need the Smooth Mesh Preview of a object A to drive the one of
> an other object B, .. While it's just a matter of connection for the
> smoothin
You need to increment your names. I would also suggest you use the string
format command, its much easier to read and handle variables
name = "What ever you want to call it"
instanceName="{0}s_{1}_inst".format(name, i)
https://docs.python.org/2/library/stdtypes.html#str.format
On Wednesday, 30
Hi jettam,
the piece of code that is making your objects move incrementally is the:
for i in range (0,10):
cmds.move(x,i,z, instanceResult)
if you want each block to move a specific amount per a loop:
offsetPerIndex = 2
for i in range (0,10):
y = i * (offsetPerIndex + 1) # 1 represents
As Justin mentioned above, it is also better to use xrange then range, as
it is more efficient in memory. As it doesn't actually create a list list
in memory like range() does, xrange is a generator.
On Sunday, 20 August 2017 08:27:32 UTC+10, Johnathan Scoon wrote:
>
> Thanks Justin, you're a ro
30 matches
Mail list logo