shfury
shfury

Reputation: 389

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

Question in title

Example code:

>>> j.type()
u'joint'
>>> type(j)
<class 'pymel.core.nodetypes.Joint'>

Upvotes: 3

Views: 221

Answers (1)

ndpu
ndpu

Reputation: 22561

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'>

Upvotes: 2

Related Questions