ECToo / pymel

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

pm.Vector doesn't work. must be pm.datatypes.Vector #174

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
pm.Vector used to work in previous versions to cast a vector.
now it's pm.datatypes.Vector.
same for pm.datatypes.VectorN

What Version of Maya are you using? 2009

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

What Version of PyMEL are you using?
ver 1.0.0 rc

What is the expected output? What do you see instead?
that you can cast a vector with pm.Vector as in previous version. I would
expect that even though the code is nested in pymel.core.datatypes.Vector
that if you imported pymel.all you would have a pointer for Vector that
linked to the module 'all'

Vector = pymel.core.datatypes.Vector

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.
you can see it in this code:

http://www.negative13.com/scripts/phyllotaxis.py

Does maya.cmds exhibit the same problem?
I don't use maya.cmds anymore. it's bad. pymel is good.

Please provide any additional information below.

Original issue reported on code.google.com by geordiem...@gmail.com on 20 Mar 2010 at 9:10

GoogleCodeExporter commented 9 years ago
the idea of pymel.all is to provide some backward compatibility with the 0.9 
line in 
terms of the layout of automatically imported modules.  in 0.9 the vector class 
was 
accessed like so:

import pymel as pm
pm.datatypes.Vector

in 1.0:

import pymel.all as pm
pm.datatypes.Vector

OR

pm.dt.Vector

both of these namespaces are also available in pymel.core, so i see your point 
that 
pymel.all does not really save you anything here. i'm hesitant to add this 
thought, 
because as i mentioned the idea here is to provide an safe and easy upgrade 
path for 
users of 0.9, and adding pymel.all.Vector could cause trouble.

-chad

Original comment by chad...@gmail.com on 20 Mar 2010 at 9:54