ECToo / pymel

Automatically exported from code.google.com/p/pymel
0 stars 0 forks source link

apicls Error for dt.Unit classmethods #202

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the problem.
I'm trying to get the current maya units.
I found this classmethod in the Unit dataType.  Unfortunately it fails.

What Version of Maya are you using?
2011 x64

On what operating system? (be as specific as possible and include service
packs, 64bit vs 32bit, etc)
Win 7 x64

What Version of PyMEL are you using?
Git latest as of May some time

What is the expected output? What do you see instead?
Expect a dt.Unit() instance

If possible, provide a few lines of code to reproduce the problem. It helps
us if your code will reproduce the problem from a new scene.

import pymel.core as pCore
pCore.dt.Unit.getInternalUnit()
# Error: type object 'Unit' has no attribute 'apicls'
# Traceback (most recent call last):
#   File "<maya console>", line 1, in <module>
#   File 
"C:/ArtPipelines/App/Maya2011-x64/pymel/pymel\pymel\core\datatypes.py", line 
2438, in getInternalUnit
#     return cls.sUnit(cls.apicls.internalUnit())
# AttributeError: type object 'Unit' has no attribute 'apicls' #

Does maya.cmds exhibit the same problem?
NA

Please provide any additional information below.
NA

Original issue reported on code.google.com by squis...@gmail.com on 14 Jun 2010 at 8:49

GoogleCodeExporter commented 9 years ago
Unit is an abstract base class - to find out what internal units maya is using, 
query a specific type of unit - ie, Distance, Time, etc

import pymel.core as pm
pm.dt.Distance.getInternalUnit()

Original comment by elron...@gmail.com on 18 Jan 2011 at 11:28