code-google-com / pymel

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

Fix slow component creation issues #284

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
ie, if you do:

import pymel.core as pm
cube = pm.polyCube()[0].getShape()
pm.polySmooth(cube, dv=4)  # maya doesn't let you smooth more than 4 steps at 
once
pm.polySmooth(cube, dv=2)

import datetime
s = datetime.datetime.now()
v = cube.vtx
len(v)
e = datetime.datetime.now()
print e - s
print

import datetime
s = datetime.datetime.now()
v = pm.PyNode('%s.vtx[*]' % cube.name())
len(v)
e = datetime.datetime.now()
print e - s
print

... then the first method - PyNode('pCubeShape1').vtx - will be significantly 
slower than the second - PyNode('pCubeShape1.vtx[*]')

Make it so that method1 will create it's MFnComponent in a way similar to 
method2 (when possible)

Original issue reported on code.google.com by elron...@gmail.com on 25 Sep 2012 at 2:05

GoogleCodeExporter commented 9 years ago
fixed in 39a9a4dd00caa33d0fbf00b9feb33866f92c6850

Original comment by elron...@gmail.com on 27 Sep 2012 at 12:28