installed pymel, now have an inoperable script editor..

217 views
Skip to first unread message

Zimm

unread,
Feb 4, 2008, 4:36:38 AM2/4/08
to python_inside_maya
I came across some posts in regards to pymel during some of my
searches on python scripting in maya. After looking it over, it
appeared be as stated, a very useful tool for developing tools. I
downloaded and unzipped it. I opened up the documentation to get an
idea on how to use this possible life-saving tool.
I opened my userSetup.mel file to add the import pymel line as
described in the documentation. I then also opened the Maya.env file
to add the PYTHONPATH line to it, also as described. I then copied the
pymel folder to my newly created scripts/python/ folder. Afterwards I
copied the scriptEditorPanel.mel to the scripts folder and the
pymelScrollFieldReporter.py to my 2008 plugins folder. As I already
had Maya open, I opened the Plug-in Manager to set the
pymelScrollFieldReporter.py to load and autoload.
As I clicked Load, it would automatically unclick. I figured this may
be because I hadn't updated the modified scripts folder in Maya's
mind, I typed rehash for a fresh look, but still could not get the box
to click. Thinking this was because I already had my script editor
open, I closed the editor and reopened the Plug-in Manager. This
resulted with the same thing, the inability to keep Load checked.
Since Autoload was still checked I decided I should just restart
Maya. After I restarted Maya, I ended up seeing some red flicker in
the command line but it cleared quickly. I figured I'd check out what
the error was by opening the editor and checking the history. Upon
opening the Script Editor I was shocked to see that I had an empty
window, all but the Help menu. At the same time I received this
error:
// Error: file: C:/Users/Zimm/Documents/maya/2008/scripts/
scriptEditorPanel.mel line 1070: Object not found:
After closing the Script Editor, I end up with this error:
// Error: file: C:/Users/Zimm/Documents/maya/2008/scripts/
scriptEditorPanel.mel line 1162: Cannot find procedure
"pymelScrollFieldReporter".
Now having received all these, I figured I'd go a remove the lines of
code that I added to the userSetup.mel and the Maya.env and restart
Maya, just in case I may have written them wrong. However, I still
end up with the same results.
Has anyone else had any problems along these lines? Or perhaps has
seen an error in what I had done here? I believe I downloaded the
most recent version. To think I ended up with all this after just
trying to figure out why my query of a world space translate using
xform was not giving me any values.. lol..

Zimm

unread,
Feb 4, 2008, 4:50:01 AM2/4/08
to python_inside_maya
Alright, here's an update.. yeah only a couple minutes after my
previous post, but hey I sometimes work quickly.. especially after
typing/venting a problem.. lol..
But, anyways. I went in, with Maya closed, and removed
pymelScrollFieldReporter.py from the plug-ins folder and also
scriptEditorPanel.mel from the scripts folder. After doing so I
reloaded Maya and low and behold the Script Editor looks exactly as
though I hadn't tried installing pymel.
Yes, this is helpful, because now I can get back to scripting and
developing. But, at some point I'd still like to be able to see and
use this tool. So if someone can help me figure out how to get this
working, I'd definitely be grateful. Or perhaps, and this is probably
a very small perhaps, the new version might have a small error in it
that the developer had no knowledge of, I'd like to at least get this
to them so that it can be quickly fixed for others that would like to
try this tool out.
Thanks again.

Farsheed Ashouri

unread,
Feb 4, 2008, 5:15:46 AM2/4/08
to python_in...@googlegroups.com
This is the working file. Chadrik sent it to me few days ago. It works nice.
Also notice you check autoload for plug-in.

Cheers.

scriptEditorPanel.mel

Zimm

unread,
Feb 4, 2008, 6:20:23 AM2/4/08
to python_inside_maya
Thanks for the file.
However, I'm still receiving an error when I try to click load:
// Warning: line 1: Failed to run file: C:/Program Files/Autodesk/
Maya2008/bin/plug-ins/pymelScrollFieldReporter.py //
// Error: line 1: (pymelScrollFieldReporter) //
Clicking autoload, checks it fine. However, if I restart Maya and try
to open the Script Editor I get a similar result as stated above.
But, with this file I get to see more options, such as the tool bar
below the menu bar.. but nothing else. It's really an odd situation.
The copy of pymel I downloaded was from Highend3d, and said that it
was updated on 02-01-08.

Farsheed Ashouri

unread,
Feb 4, 2008, 6:25:32 AM2/4/08
to python_in...@googlegroups.com
Update to pymel 0.77. I have pymel on 4 pcs. 1 windows and 3 linux and all work well.

Chadrik

unread,
Feb 4, 2008, 2:38:26 PM2/4/08
to python_inside_maya

since farsheed confirmed that script editor was working on windows and
linux i've posted a new version of pymel (0.7.8) with this fix plus a
few others. this replacement script editor is still not very
thoroughly tested, so please keep up the feedback.

-chad
Message has been deleted

Farsheed Ashouri

unread,
Feb 4, 2008, 3:04:44 PM2/4/08
to python_in...@googlegroups.com
And also  I should add that I haven't found any bug in it yet, just keep in mind that YOU SHOULD check autoload plug-in, restart maya and every thing will work amazing. Really thanks chadrik. I've learnt mel with script editor and I will learn python (pymel) with script editor as well.
 
Best Regards.
Farsheed.
 

Chadrik

unread,
Feb 4, 2008, 4:54:19 PM2/4/08
to python_inside_maya

yes, if the plugin isn't loaded you won't get the script editor at
all, which makes life difficult. i added a line to the newest version
of the scriptEditorPanel.mel which loads the plugin to be sure.

Zimm

unread,
Feb 5, 2008, 1:55:55 AM2/5/08
to python_inside_maya
Thanks for the replies and the updated version you guys. I'm really
looking forward to trying this out. However, I am for some reason
still getting the same results. I completely wiped away the old
version and did all that was required. I checked the AutoLoad first
then tried the Load, which still won't check. I restarted Maya, still
no workable Script Editor. I reopened the Plug-in Manager and the
plug-in isn't checked at all and still will only check for the
AutoLoad. This is really getting weird that it's not working out. I
doubt this is the reason but could it be because I'm running the all
that is unholy and evil, Vista? It seems a little odd that that's the
case, but just a thought.

Chadrik

unread,
Feb 5, 2008, 2:31:00 AM2/5/08
to python_inside_maya

i'm not sure what version of windows farsheed is running, but i'm sure
he'll chime in shortly. a vista-related problem is a possibility.
are you getting any useful feedback in the command output window?
here's two things you can do to try to get a little more information.
first, remove or rename the custom scriptEditorPanel.mel. restart
maya, try loading the plugin, and see if there's anything useful in
the scriptEditor output. another trick to get more feedback is to
place the pymelScrollFieldReporter in your PYTHONPATH and then import
it from within maya and see if you get any errors ( e.g. "import
pymelScrollFieldReporter"). in the meantime i'll look into getting a
vista machine running to test on.

-chad





Frederick Fowles

unread,
Feb 5, 2008, 3:51:02 AM2/5/08
to python_in...@googlegroups.com
What is the plugin everyone is mentioning I dont see any reference in
the thread to its name. I thought pymel was a set of libraries not a
plugin?

Fred

Zimm

unread,
Feb 5, 2008, 6:25:03 AM2/5/08
to python_inside_maya
Chad,

I left out the scriptEditorPanel.mel and tried loading the plugin. I
got no feedback when clicking AutoLoad, but received this when
clicking the Load:
// Warning: line 1: Failed to run file: C:/Program Files/Autodesk/
Maya2008/bin/plug-ins/pymelScrollFieldReporter.py //
// Error: line 1: (pymelScrollFieldReporter) //
and received this when restarting Maya with the AutoLoad checked:
// Warning: file: C:/Program Files/Autodesk/Maya2008/scripts/startup/
autoLoadPlugin.mel line 46: Failed to run file: C:/Program Files/
Autodesk/Maya2008/bin/plug-ins/pymelScrollFieldReporter.py //
// Error: file: C:/Program Files/Autodesk/Maya2008/scripts/startup/
autoLoadPlugin.mel line 46: (pymelScrollFieldReporter) //

I also went back in and removed the plugin from the plugin folder but
left it in the PYTHONPATH location.as you suggested. Then trying to
import it, there doesn't appear to be anything huge as above, but I
receive this:
import pymelScrollFieldReporter
# lex: Warning. no t_error rule is defined.
# yacc: Warning. Token 'COMMENT_BLOCK' defined, but not used.
# yacc: Warning. Token 'COMMENT' defined, but not used.
# yacc: Warning. There are 2 unused tokens.

-zimm

Farsheed Ashouri

unread,
Feb 5, 2008, 6:35:13 AM2/5/08
to python_in...@googlegroups.com
No, we are speaking about pymelScrollFieldReporter.py (python plug-in)
and scriptEditorPanel.mel. both are located in <pymel>/misc folder.
you should put them in your maya plug-ins and scripts folder. I test
it in 4 different pcs (1 windows xp sp2, maya 2k8 and 3 linux rhel5,
maya 8.5) and all works well.

what this plug-in do is simply great. normally what you do in maya
automatically appears in script editor in MEL format. this plug-in
convert them to python(pymel) format. simply great. You can leran and
write in pymel with this tool.

Cheers.

Zimm

unread,
Feb 9, 2008, 5:19:09 PM2/9/08
to python_inside_maya

Chad,

Went through the whole process on my roommates computer. Did
practically everything that I did with my own computer. I ended up
getting it to work perfectly fine, no problems with the Script Editor
or anything that I have seen so far. Though, I'm still having
difficulties in regards to my own computer. It is true, his computer
is XP and mine is Vista, so it kinda feels as though this may be OS
related. I'm not entirely sure why at the moment, but wanted to give
you the heads up in regards to this new situation.

Zimm

Chadrik

unread,
Feb 9, 2008, 7:08:15 PM2/9/08
to python_in...@googlegroups.com
thanks zimm,

i've started the process of getting a vista install working on my
mac. a few updates about compatibility:

8.5 - will not work on any platform
8.5 SP1 - tested and working on win32 (xp only thus far), osx, linux
32 and 64
2008 - tested and working on win32 (xp only thus far), osx, linux 32

2008 on linux64 does not work out of the box because autodesk forgot
to include a needed module, but i am working on a patch to get this
working.

zimm, your vista install, is it 32 or 64 bit? does anyone out there
have a 64-bit windows platform to test this on?


-chad


Zimm

unread,
Feb 9, 2008, 9:06:33 PM2/9/08
to python_inside_maya
my vista install is 32 bit. tried the plugin with 2008.

zimm

Chadrik

unread,
Feb 15, 2008, 1:53:44 AM2/15/08
to python_inside_maya

i got vista going on my mac. unfortunately (or fortunately?) i was
unable to reproduce the problem that you were having. i have made a
few minor updates since you first posted the problem, so there is a
slight chance that one of those fixed the problem, but i'm not getting
my hopes up. this version will be released shortly for you to try
out.

-chad

Zimm

unread,
Feb 15, 2008, 9:47:35 PM2/15/08
to python_inside_maya
well hopefully the demons of vista don't demolish your mac. but
thanks for the heads up on the update. looking forward to checking it
out.

-zimm

farsheed Ashouri

unread,
Feb 18, 2008, 9:50:54 AM2/18/08
to python_inside_maya
Just wana inform you that scriptEditorPanel.mel and it's plug-in dont
work in linux maya 2k8.

Chadrik

unread,
Feb 18, 2008, 12:40:52 PM2/18/08
to python_inside_maya

If you encounter an error loading the plugin in maya 2008 on 64-bit
linux, you may have to fix a few symlinks.
As root, or with sudo privileges do the following::

cd /lib64
ls -la libssl*

You might see something like the following returned::

-rwxr-xr-x 1 root root 302552 Nov 30 2006 libssl.so.0.9.8b
lrwxrwxrwx 1 root root 16 Jul 16 2007 libssl.so.6 -> libssl.so.
0.9.8b

The distribution of python2.5 that comes with maya2008 expects
libssl.so.4, but i have libssl.so.6. So, I have to
create a symbolic link to the real library (in my case libssl.so.
0.9.8b, but it may differ depending on your distribution)::

sudo ln -s libssl.so.0.9.8b libssl.so.4

The same thing must be done for libcrypto.so.4

the missing symlinks were causing maya to not be able to import the
md5 module.

are you using 64-bit maya? if not, the solution may be slightly
different ( cd /lib instead of /lib64 ). if you figure it out, pls
let me know how so that i can add it to the docs.

-chad

Farsheed Ashouri

unread,
Feb 20, 2008, 7:49:45 AM2/20/08
to python_in...@googlegroups.com
No I use 32-bit. I'll check your solution as soon as possible.
Thanks.

Jules Stevenson

unread,
Feb 28, 2008, 9:56:51 AM2/28/08
to python_in...@googlegroups.com
Hey Chadrick,

First up, brilliant stuff! Incredibly helpful to get my head around how maya
is treating python. Noticed one small possible bug, the script editor no
longer automatically scrolls down as the window fills up with information -
not a massive deal, but a bit annoying to constantly have to scroll it down
every time you need to see the output.

XP, latest build off google (28/02/08), maya 2008

Hth,

Jules

Chadrik

unread,
Feb 29, 2008, 1:34:11 PM2/29/08
to python_inside_maya

are you noticing this problem right away, or after the history has
filled up quite a bit? is new text being properly added to the bottom
of the window or is it being added in the middle somewhere?

is anyone else out there having a similar problem?

John Creson

unread,
Feb 29, 2008, 3:51:00 PM2/29/08
to python_in...@googlegroups.com
yes,

Love the translation - not getting the the window pushing down after
it fills up correctly from top to bottom.
new text is properly adding to the bottom.

John Creson

unread,
Feb 29, 2008, 3:51:42 PM2/29/08
to python_in...@googlegroups.com
also xp 2008 32bit

Jules Stevenson

unread,
Feb 29, 2008, 4:52:22 PM2/29/08
to python_in...@googlegroups.com
> Love the translation - not getting the the window pushing down after
> it fills up correctly from top to bottom.
> new text is properly adding to the bottom.
>
Noticed one more thing - right click menu functionality within the feedback
area seems to have disappeared.

Cheers, Jules

Chadrik

unread,
Mar 2, 2008, 1:25:21 AM3/2/08
to python_inside_maya

hey guys,
i tested this problem on osx, linux, and windows xp ( w/ maya 2008).
osx and linux work properly. the windows machine demonstrated the
problem -- as i create new cubes and lights i can no longer see the
output -- but as soon as i give focus back to the script editor it
pops back to the right place at the bottom of the history. jules, are
you seeing this behavior? i've also noticed that when reopening the
script editor on windows it does not go to the bottom of the history.
i'll see what i can do about this latter problem, but unless i can
reproduce the bug you are seeing it will be hard for me to
troubleshoot it. oh, and the popup menus should not be too difficult.


john, your message was a little unclear. are you getting the same
problem as jules?


-chad

Jules Stevenson

unread,
Mar 2, 2008, 2:36:07 PM3/2/08
to python_in...@googlegroups.com
> hey guys,
> i tested this problem on osx, linux, and windows xp ( w/ maya 2008).
> osx and linux work properly. the windows machine demonstrated the
> problem -- as i create new cubes and lights i can no longer see the
> output -- but as soon as i give focus back to the script editor it
> pops back to the right place at the bottom of the history. jules, are
> you seeing this behavior? i've also noticed that when reopening the
> script editor on windows it does not go to the bottom of the history.
> i'll see what i can do about this latter problem, but unless i can
> reproduce the bug you are seeing it will be hard for me to
> troubleshoot it. oh, and the popup menus should not be too difficult.

Hey Chad,

Just set it up on another machine to be sure, and same problem: the script
editor window does not scroll automatically at all (focus or no focus). To
clarify, no matter how much feedback you fill it up with it stays in the
same place, to see the content I have to scroll it down manually.

Not sure if this is relevant, but also get this in the output window when
starting up following installation of the plugin:

swig/python detected a memory leak of type 'MCallbackId *', no destructor
found.

Hth, Jules.

John Creson

unread,
Mar 2, 2008, 11:17:13 PM3/2/08
to python_in...@googlegroups.com
Hi Chad,

I'm getting the same problem as Jules.

Thanks,

JohnC

Robert Durnin

unread,
Mar 3, 2008, 2:52:03 AM3/3/08
to python_in...@googlegroups.com
I was looking at cygwin today and finding the same phenomenon inside of the cmd shell. I would guess that if there exists a work around to updating the window when it runs a sub shell for it that the technique can be shared. Ill look it up.

Robert

kproudfoot

unread,
Mar 6, 2008, 1:15:24 PM3/6/08
to python_inside_maya
Same exact behavior here as well (found this site searching for the
solution). I am running v 0.7.8

(I need my scrolling window back!!!) :)

Chadrik

unread,
Mar 6, 2008, 3:41:43 PM3/6/08
to python_inside_maya
hey all,
i have not been able to reproduce this problem myself yet, so i'm
going to have to rely on you all. here's an experiment to gather some
information.

use this code to create a scrollField:
w = window()
paneLayout()
tf = scrollField()
w.show()

here are several different ways of updating the scrollField:

#1
pos=0
for x in range(400):
text = str(x) + '\n'
pos += len(text)
tf.insertText( text, insertionPosition=pos )

#2
for x in range(400):
tf.insertText( str(x) + '\n', insertionPosition=0 )
#3
for x in range(400):
tf.insertText( str(x) + '\n' )
#4
tf.setText( '\n'.join( map( str, range(400) ) ) )


let's see if any of the four is more or less susceptible to creating
the no-scroll problem.
try testing in as many scenarios as you can think of. for example, try
running each in succession, and try closing and recreating the window
between each one.

i'm hoping that at least one recreates the problem, otherwise it is
particular to the API nature of the pymelScrollFieldReporter.

thanks,
chad



Ofer Koren

unread,
Mar 6, 2008, 7:50:37 PM3/6/08
to python_in...@googlegroups.com
None of them scroll the field for me, it stays stuck at the top...
(Autodesk® Maya® 2008 200708022245 08/02/2007, XP Pro x64 SP2)
--


- Ofer
www.mrbroken.com

Chadrik

unread,
Mar 6, 2008, 9:13:47 PM3/6/08
to python_inside_maya
hmmm... see if there is anything at all you can do to make it go
down... try resizing the scrollField, or resizing the paneLayout.
i'm running out of ideas. in the meantime, i'll post this as a bug to
autodesk. so far it goes down properly on linux, osx, and certain
installs of windows.... so it sounds like a bug. still, let's hope we
can come up with some workaround to this...

out of curiosity, those of you having this problem: what version of xp
are you using sp1, sp2?

-chad


Chris Mills

unread,
Mar 6, 2008, 9:17:55 PM3/6/08
to python_in...@googlegroups.com
Crazy question - this is with content in the scrollField to be able to
scroll through?

Regards,
Chris

Lizard Lounge Graphics, LTD.
Wellington, NZ
http://lizardlounge.com

VHF: ZL4CDM
Int'l: +644-977-5400 / +642-174-8770
NZ local: 04-977-5400 / 021-748-770

Chadrik

unread,
Mar 6, 2008, 9:48:35 PM3/6/08
to python_inside_maya

the problem is that as new content is added, the scrollField is not
scrolling down to reveal the newly added text at the bottom.

-chad

John Creson

unread,
Mar 7, 2008, 1:06:22 AM3/7/08
to python_in...@googlegroups.com
I need to try this with maya2008, (haven't yet) I've been using
maya2008extension2 and this may be where the problem lies.

Is anyone else who is having this problem using maya2008 (no service
pack or extension2?)
Is anyone having success with this in maya2008extension2?

That said... with ext2....

each of the tests above doesn't advance the window until that window
is selected.
So you set it off in the scriptEditor and the numbers fill up the
window, but it doesn't scroll down. When you select the window the
scroll jumps to the bottom of the window where it should be. You set
off a few of the others or the same one and the numbers go in, but the
window doesn't scroll until you select the window again.
The one that has a little different behaviour is #4. The first time
through it acts like the others. Subsequent times through it retains
the view it was left with when you select the window again.(If you
leave it at the bottom, it seems to stay at the bottom, if you leave
it in the middle, it seems to stay in the middle)

Something else I am noticing:

I couldn't drag and drop from the History into my input panel, and the
context sensitive rmb menu didn't show up when over the history,
though it does over the input panel. I could select edit=>copy from
the scriptEditor menubar and the cut/paste hotkeys did work.

-johnC

John Creson

unread,
Mar 7, 2008, 1:08:19 AM3/7/08
to python_in...@googlegroups.com
XP servicePack2

John Creson

unread,
Mar 7, 2008, 1:41:28 AM3/7/08
to python_in...@googlegroups.com
Try out this window with the buttons to add the texts

Just push buttons and the numbers add in and the window doesn't update for me.
click in the white window first and the window begins to update

1 adds to the top
2 and 3 add to wherever they left off
4 adds to the bottom and jumps there without scrolling visibly

###########

from pymel import *

def clearWindow(*args):
tf.setText( '' )

def number1(*args):


pos=0
for x in range(400):
text = str(x) + '\n'
pos += len(text)
tf.insertText( text, insertionPosition=pos )

def number2(*args):
for x in range(500):


tf.insertText( str(x) + '\n', insertionPosition=0 )

def number3(*args):


for x in range(400):
tf.insertText( str(x) + '\n' )

def number4(*args):
tf.setText( '\n'.join( map( str, range(600) ) ) )

w = window(w=300,h=400)
columnLayout()
button(label='clearWindow',command=clearWindow)
button(label='number1',command=number1)
button(label='number2',command=number2)
button(label='number3',command=number3)
button(label='number4',command=number4)
paneLayout(w=200,h=200)

tf = scrollField()
columnLayout()
button(label='#1',command=number1)
w.show()

John Creson

unread,
Mar 7, 2008, 2:03:43 AM3/7/08
to python_in...@googlegroups.com
If I right click in the History Panel without choosing a position in
the history somehow with the left mouse button - it updates!!!!!
It doesn't continue to update, but right click again in the history
and it updates again.

Close the scriptEditor and open it again and the scroll is back at the top.
Right click in the history and it jumps to the bottom.

Was looking for something like this before, but it was hiding, because
if you somehow (lmb) select a position in the history, then it thinks
you want to be there.

If you get stuck this way, scroll to the bottom and left click the
last line in the history, then the right click update starts working
again.

Also make sure maya can find your plugin when it auto re-loads
Seeing the scriptEditor all blank like that can be scary.
You'll have to manually load the plugin and then close and re-open the
scriptEditor to get it back.

John Creson

unread,
Mar 11, 2008, 6:55:01 PM3/11/08
to python_in...@googlegroups.com
Tried this in 2008gold and it behaves the same way, maybe there is
something to my setup...

John Creson

unread,
Mar 16, 2008, 10:48:18 PM3/16/08
to python_in...@googlegroups.com
###########################

from pymel import *

def clearWindow(*args):
tf.setText( '' )

#tf = scrollField()


columnLayout()
button(label='#1',command=number1)
w.show()

################################

w = window()
paneLayout()
tf = scrollField()
w.show()

#################################

Reply all
Reply to author
Forward
0 new messages