Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between the Python type method and the type function on a Maya Transform Node?

Tags:

python

maya

pymel

Question in title

Example code:

>>> j.type()
u'joint'
>>> type(j)
<class 'pymel.core.nodetypes.Joint'>
like image 275
shfury Avatar asked Jul 19 '26 06:07

shfury


1 Answers

Look at this simple example. You are trying to compare two different things - Joint class method type and python built-in function type - they have same names, that all:

class Joint():
    def type(self):
        return u'joint'

>>> j = Joint()
>>> j.type()
'joint'
>>> type(j)
<class '__main__.Joint'>
like image 81
ndpu Avatar answered Jul 21 '26 20:07

ndpu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!