ECToo / pymel

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

Some aspects of the OutlinerEditor class don't work since Maya requires a short name. #271

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Describe the problem.
The OutlinerEditor class sends its long name to maya.cmds, which breaks when 
trying to use an instance of an OutlinerEditor since Maya only accepts a short 
name for them.

What Version of Maya are you using?
2012 x64

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

What Version of PyMEL are you using?
1.0.3

What is the expected output? What do you see instead?
Expected: no error?
Actual: # RuntimeError: outlinerEditor: Object 
'myWindow|formLayout59|outlinerEditor2' not found. # 

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.

---
from pymel import core as pm
with pm.window('myWindow') as myWindow:
    with pm.autoLayout():
        oe = pm.outlinerEditor(mainListConnection='worldList')
    myWindow.show()
print repr(oe)
oe.getMainListConnection()

Does maya.cmds exhibit the same problem?
No, and neither does pymel if used like the following:
pm.outlinerEditor('outlinerEditor2', query=True, ...)

Please provide any additional information below.
I can fix this by hacking the pymel.internal.pmcmds.addWrappedCmd.wrappedCmd 
function to check for an OutlinerEditor (and hack in its short name) right 
before the call to
res = new_cmd(*new_args, **new_kwargs)

Is there a better way?

Original issue reported on code.google.com by jdk...@gmail.com on 1 Mar 2012 at 1:41