Onscreen IDE & dynamic instant update [_v0.5.4_]

[X] completion codes list text : the last update is bad, I don’t know what I was thinking. All text items were strongly flattened at generation time, which took longer generation time (1+ second, previously only 0.15 sec).
To improve that, I managed to flatten them upon their 1st appearance in the scrolled window. This way, the rest of them (invisible ones) will be flattened (if not already has 1 child) as you scroll.
Result : you can get the codes list generated ASAP (it’s back to 0.1+ sec), lightweight for rendering, and the flattening time isn’t noticable.
[X] I used that trick too for the script text as well. It’s great to cut down the loading time, e.g. IDE.py (4460+ lines, 166 KB) is cut from 50 secs down to 10 secs. At last, it can keep me from falling asleep during loading time. :laughing:
[X] update/restart : added events hook release for objects which use PauseResume extension, and all objects except the IDE and everything under /direct
[X] update/restart : the preserved cameras now only the default ones
[X] update/restart : now the main module is always re-imported, so you can do anything outside World class and it will be updated. Done by unloading it from sys.modules to force import.
[X] improved unindent, now supports fine tune (1 space) unindent
[X] indentation is EVERYTHING : added alignment helper line to easily see to which notch you’re currently aligned. If the notch is offscreen, a viewport will be created to let you see that distant spot, so you don’t have to do some weird scroll just to see it. How many IDEs out there implement this ?

Great work, one thing you could add (some engines do that indentation thing already) is a code-line hider (you can hide lines inside a for loop):


ynjh_jo this is really awesome.
i’m really impresive with your tool.
Easy to use and really usefull to prototype some quick thing and show what we do.


Glad you like it.

Yes, I know about code folding. I’ve already implemented it for my scenegraph browser, but that’s another story and not good enough. I’ll build it again from scratch (so it’d be compatible with line wrap too) if I have more time.

A problem to concern :
if you notice that you made alot of typos while using it, it’s NOT your fault. Some keystrokes sometimes evaporate into the air, though according to keydown, they were caught. It’s when I press more than 1 buttons at the same time, only the 1st one survives, the others are dead.
[EDIT] :
I found the source of the problem, it’s wx’s Dispatch() call. It’s currently handled by a continuous task. I guess if I enable it only when needed, that could take the problem away.

[X] I’ve busted that keystrokes thief. Wx event loop is very weird.
On Linux, it’s very important. The clipboard doesn’t even work without it.
On Windows, wx still works without it. Enabling the loop on Windows only makes it worse !
So, I enable the loop only on other OSes, except Windows.
Now I can go with my full typing speed without any worries.
[X] all wx interfaces always spawned in the main thread on Linux. I don’t know how (wx + threads) would behave on OS X.
[X] the last edited files list is saved in separate files, based on the OS (OS is used for the extension). So, I can switch OSes without losing the last session files list.
[EDIT] :
[X] bugfix : vanishing line due to the newly implemented text rendering optimization
[X] selection indent/unindent : the aligned column now always kept onscreen

[X] Panda’s default values (background color, mouse interface) and default scenegraphs attributes (fog, effects, lights, material, rendermode, shader, 2sided, etc.) correctly restored upon update
[X] added open recent files. The displayed recent files are not including the already opened ones, and you can multiselect them, unlike in most editors. The limit is 150 files. It’s adjustable, but I haven’t implemented config file yet, so if you want to edit it, find it near the top of IDE.py.
[X] the currently opened files and recent files list also saved upon opening & closing any file
[X] added missing files retry open
[X] added main module switch. You can set any file as the main module, so theoretically, upon update it will be ran instead of the main module set in the first place. But that won’t let you get some changes which involve different window or framebuffer properties, since those changes require me to recreate the window and/or graphics state guardian, which isn’t possible at the moment.
Before the switch happens, you need to choose the prefered CWD, as at the startup screen. You can use this mean to reset it if you accidentally chose the incorrect one. The CWD change affects config variable search path (model & sound paths) used by Panda loader.
[X] added auto jump to scene upon update

ynjh_jo, you the man!!! I am really exited about your work. Fantastic!

Am, can you give me or point me for a “How to install…” tut, I juts downloaded the binaries of the program for python 2.5 ansi, and the whole thing was installed on the python\lib\site-packages, and I can’t seem to fin the executable, or the way to compile this and run. I already looked on the Build Instrucctions, but the setup.py is not in the wxPython directory either

If you already have wx installed, you’re good to go. Just extract all the zip files, put the sounds, fonts, and images directories at the same level with the IDE files. There isn’t executable to start the IDE, they’re simply python files. So, just locate IDE_STARTER.pyw and run it with your pythonw.exe.

The screenshots look amazing. I’d love to try the IDE. I downloaded wxPython and when I went to install it I got this message:

Also when I start Blender I see,

I think the two problems are related. Any help?

Well, do you have your PYTHONPATH variable set?

If not, what operating system are you using?

If you know how to set environment variables, you should be safe in ignoring the rest of this post. I include it in case you don’t. :wink:

If it’s Windows XP, and you don’t know how to set environment variables, go to Control Panel, open System/System Properties, go to the “Advanced” tab, and click on the “Environment Variables” tab.

In the panel that should show up, look at the panel labelled “System variables” (it should be the lower one). If you find a variable named PYTHONPATH there, then select it and click on “Edit”, otherwise click on “New”.

In the dialogue that should appear, set the “Variable name” to PYTHONPATH (all upper-case, no spaces) if applicable, and set the “Variable value” appropriately. In my case, it reads:
(Without the inverted commas or the line break.)

Note the semicolons between entries, and the various paths included: one each for python.exe, the DLLs folder, the Lib folder, and the lib-tk folder.

I don’t have standard python2.5 installed. So, the one set in registry is Panda’s. All python libs can detect it at installation, but yes, blender can’t.
Can’t you just create its registry entry manually and point it to your Panda3D\python ?

I’m hoping so, but I don’t know how. Any pointers?

The path is saved in HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.5\InstallPath

Create the needed keys if it’s not exist. Or if you want an easy way, just google for “python to registry”.

I downloaded python 2.5.2, then I installed wxPython with no problems and even Blender is happy. I downloaded the IDE zip files. I tried to run the IDE START.py but it didn’t find wx. Do I need to move some files/folders around ? Do I need to move some wx files to the panda/python folder?

Where did you install it ? I guess it must be in python25. Don’t move it around, copy it instead to p3d’s python site-packages.

I copied the Site Package folder from Python to Panda/python. That helped alot. Another question, do I place the IDEfonts folder (which contains a font folder) into the OnscreenIDEdynamic folder or do I just place the font folder into the OnscreenIDEdynamic folder.

I opened the IDE_STARTER.pyw file in PyPE and ran it. I got the start screen to open a file. I choose to open the dyn1.py. Now I have just a blank black Panda window, I think its locked up. I also tried to open dyn1.py then the smileyClass.py. That didn’t work. I also noticed there are 2 dyn1.py files.

I’m pretty sure, I don’t understand what the files do and in what order I should open them.

I believe IDEfonts folder was created by your unpacker. Move the zip contents at the same level with the IDE codes.

2 dyn1.py files ? There is only 1 in the zip.

I tried to follow along with the steps outlined in the original post but had no luck. What steps do I need to follow to get the IDE working once all the files are installed and I can get the open file/new file screen running (thats as far as I’ve gotten)?

Do I need to load the dyn1.py file even when I make a new file? If so, why?

If you have time, can you give a one or two sentence summary of what the different py files do and outline their dependencies.

BrianInSuwon: No, you don’t have to load dyn1.py or any other files. Simply run IDE_STARTER.pyw, and click either Open Files or Create New File. It should work without any problems.