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

Return to Code Snippets

Postby ynjh_jo » Mon May 18, 2009 8:25 pm

[_v0.2.3_]
[X] removed the no longer exist 'shadowCollisionLoop' task name from PauseResume module, looks like it's a leftover of some Disney-related projects
[X] added TD.dll for P3D 1.6.2
[X] added -Dvolatile to interrogate call on Linux, since threading is enabled in 1.6.2
[X] added motion path and myMessenger module to the test scene
[X] updated test scene's PauseResume module to the latest

I've put a warning in my first post about the text drawer extension.
Last edited by ynjh_jo on Mon May 18, 2009 8:31 pm, edited 1 time in total.
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

y

Postby jbskaggs » Mon May 18, 2009 8:29 pm

Yes python 2.6

sys.path[0] returns ' '

JB
That's the last time I use peanut butter nougat for the neuron processors in my robot!

JB Skaggs
User avatar
jbskaggs
 
Posts: 235
Joined: Thu May 07, 2009 11:10 pm
Location: kansas

Postby ynjh_jo » Mon May 18, 2009 8:32 pm

@ Skaggs :
try to replace it with os.getcwd()
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

ok

Postby jbskaggs » Mon May 18, 2009 9:02 pm

Alright I have worked thru several other erros and finally got it to run and now it will not load files-

I beleive this is a python version problem as you mentioned earlier I will need to wait until I have more time to try and upgrade this to 2.6- I do have 2.5 on my sys as well but I need to figure out how to point my Ide to use it instead of 2.6.

BTW Have you tried this on any SLackware Based Linux? I support Wolvix and would love to see a panda3d ide become a part over there.

JB
That's the last time I use peanut butter nougat for the neuron processors in my robot!

JB Skaggs
User avatar
jbskaggs
 
Posts: 235
Joined: Thu May 07, 2009 11:10 pm
Location: kansas

Postby ynjh_jo » Mon May 18, 2009 9:17 pm

So, have you built the extension ?
No slackware, just debian.
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

n

Postby jbskaggs » Mon May 18, 2009 9:47 pm

NO not till I get it working first. But Wolvix is very fast and very small memory- it is good for programming once setup.

JB
That's the last time I use peanut butter nougat for the neuron processors in my robot!

JB Skaggs
User avatar
jbskaggs
 
Posts: 235
Joined: Thu May 07, 2009 11:10 pm
Location: kansas

Postby koryrok » Tue May 19, 2009 3:34 am

I've got it semi working now however there are still several bugs. I really like the idea of this dynamic IDE and I hope you continue to improve it. I'd be more than happy to report bugs once I can figure out what is and isn't a bug :) (still new to all of this)

Thanks
koryrok
 
Posts: 23
Joined: Sat May 16, 2009 7:35 am

Postby ynjh_jo » Tue May 19, 2009 6:52 am

Bugs or not, you still have your rights to spit it out. I'd like to hear any comment.
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Tue May 26, 2009 1:22 am

[_v0.2.4_]
[X] improved myFinder.removeItem to check if the item is already processed, to prevent recursion
[X] included the remaining of write errors if unable to save a file, not just permission error
[X] IDE shutdown is canceled if file save fails when there are unsaved files and user chooses "Save and Exit"
[X] changed the dialog's message screen color to red if displaying an error
[X] filled sys.path[0] with os.getcwd() if empty
[X] separated "set as main module" and "set CWD", because usually I don't need to set the CWD elsewhere
[X] added wx step call to the while loop in exit function when there are unsaved files, or else it would stuck since the full taskMgr.step is no longer used
[X] added IDE version to the welcome screen
[X] added Panda3D version to TextDrawer, so I can tell if the extension is compatible with the whole Panda libs, and if not so, give a message instead of hard crash
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby MentalDisaster » Tue May 26, 2009 1:34 pm

Request:
Update code+ loaded Textures(F10) or loaded models(F11) or models and tex(F12)
Image
Image
Greetz -- Europe!
RIP Michael Jackson
MentalDisaster
 
Posts: 170
Joined: Mon Apr 27, 2009 12:46 pm

Postby ynjh_jo » Tue May 26, 2009 8:52 pm

Do you mean clearing model/texture pools, as done by Ctrl-F12 ?
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Tue Jun 02, 2009 9:34 pm

[_v0.2.5_]
[X] fixed a tiny bug of brackets content selection for nested brackets, forgotten to pass bracket type override
[X] fixed a not-defined FrameworkComponents bug in instance crusher by inserting FrameworkComponents to myFinder as soon as ShowBase is instantiated
[X] removed unneeded deletion before inserting code from completion list, if the word was blank
[X] changed "Insert command" listbox items in macro manager to use their description text instead
[X] removed blank items from available codes list
[X] separated NodepathCollection->list call for pre-1.6 and 1.6+, to minimize deprecation warnings
[X] improved Menu : now uses doMethodLater to run menu's command, to prevent shortcut key event bleeds to the IDE, since taskMgr.step is no longer used
[X] improved code completion for class instance
[X] added a message dialog if user runs IDE.py directly
[X] added a skin to page bars and 5 skins to slider bar
[X] added Dany's request
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Sun Jun 07, 2009 8:38 pm

[_v0.2.6_]
[X]
turned the "last main file not found" warning at the welcome screen into an info dialog, and added file exist check each time the main file is set
[X] removed foreground window property request after closing any wxwindow, since python hard crashes on Linux if P3D window was minimized
(:display:glxdisplay(error): BadMatch (invalid parameter attributes))
[X] packed 3 color picking modes into submenu
[X] added RESET-CAM-TRANSFORM config, and changed "clear camera transform" command to toggle it instead
[X] added set and frozenset to be processed too by instance crusher
[X] added Save to Snippets, snippet completion, and its manager
[X] added ParticleEffect destructor

Snippets Manager :
Image
Snippet Completion :
Image
Once inserted :
Image
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Wed Jun 10, 2009 8:33 pm

[_v0.2.7_]
[X]
fixed dialog cleanup
[X] fixed switch to code completion display if currently displaying snippets list
[X] fixed snippet insertion position, if there is no match, ie. all snippets are displayed
[X] snippet wxEditWindow's caret is always shown, not only when it has focus
[X] added column to bookmark, previously it's just the line
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby bigfoot29 » Mon Jun 15, 2009 7:51 am

Heya.

Just a short "cheer up" on this one. ynjh_jo, great work. :-)

Regards, Bigfoot29
User avatar
bigfoot29
 
Posts: 617
Joined: Thu Jun 30, 2005 4:22 am
Location: Germany

Postby ynjh_jo » Tue Jun 23, 2009 9:11 pm

[_v0.3_]
[X] fixed selection stop at temporarily document switch, ie. updating log (if displayed)
[X] fixed indentation-notch closeup-viewport size, scale, and pos wrt. window size change
[X] fixed fixed-space unindent bug for larger than 1 space value
[X] fixed caret wrong position after undo delete previous chars
[X] fixed start point of snippet insertion
[X] dropped the ridiculous double modifier key presses and changed some related keymaps
[X] improved bookmark wrap delay management, without relying on any key-up event
[X] added wx navigation event handler to OpenRecentFiles and MissingFiles on Windows
[X] added jump back to IDE to respond SystemExit from the scene instead of doing nothing
[X] added background opacity adjustment to workspace, codes list, and code docs
[X] added key repeats immediate stopper to the paste function
[X] added ESCAPE key to abort slider drag
[X] added Preferences GUI, features :
[_1_] almost all parts (visual and behavior) are customizable
[_2_] any value change instantly takes effect, except keymap, which is applied after Preferences window is closed
[_3_] if you discard changes, the last settings are restored
[_4_] Preferences window is non-blocking, so you can easily find out / activate the affected part to see the changes
[_5_] some important parts can be restored, loaded, and saved independently : keymap, color scheme, and highligher colors
[_6_] you can accept or discard only some changes, not entirely, by using the checkboxes at the bottom
[_7_] you won't lose or accidentally accept changes if at IDE shutdown, the Preferences window is still open
[_8_] at Keymap panel, not only keyboard keys, you can catch and hook mouse buttons and wheels too to an action

shots :
Image Image Image

Image Image Image

Note : I've removed keymap list in my first post, so you can get it by pressing "List" button at Keymap panel.
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Sun Jul 19, 2009 7:52 pm

[_v0.3.1_]
[X] fixed dialog's button delayed execution on keypresses to prevent multiple executions
[X] fixed accidental clear of temporary imported objects on paste
[X] fixed selection by mouse to expose column at caret
[X] no longer using RTT for completion description, its text now is as clear as the rest
[X] faster text update and undo/redo
[X] faster scene cleanup, now instance crusher works less aggresively
[X] undo/redo are now also available during completion
[X] improved instance method completion
[X] added class' __init__ docs to completion description if the class doesn't have it
[X] added object's file to completion description so it's easy to see where it comes from
[X] added max. size config of source completion if no documentation
[X] added scroll to top/end of completion description
[X] added import completion, it scans modules under paths in sys.path + current file's location, and builtin ones (the deprecated ones are excluded by default)
[X] added call tips (or documentation if none found), features :
[_1_] the text is wrapped (set its width in Preferences)
[_2_] it's also displayed if there is no available completion
[_3_] you can insert the arguments into your script by clicking the insert button on the left, or pressing the assigned key (if you press it multiple times while keeping the selection, the inserted arguments-set are cycled, in case of multiple overloaded functions declaration)
[_4_] multiple declarations are sorted
[_5_] to save a lot of space and minimize confusion, P3D C++ functions' arguments are stripped down by removing its first argument(class instance) and some useless keywords, leaving only type and name, and trailing same types are removed
[_6_] it's taken away only by switching documents, changing window size, or pressing IDE-shutdown key, so you won't accidentally lose it and need to bring it up again
[_7_] it fades out if the caret is behind it
[_8_] you can drag it around :P


python import :
Image
panda import :
Image

panda python functions call tips :
Image
panda C++ functions call tips :
Image

the raw docs and the stripped-down-to-half result :
Image
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby rdb » Sun Jul 19, 2009 10:58 pm

Very nice, great job!
I rarely respond to PMs
rdb
 
Posts: 8565
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby Nemesis#13 » Mon Jul 20, 2009 12:28 pm

Code: Select all
python IDE_STARTER.pyw

Traceback (most recent call last):
  File "IDE_STARTER.pyw", line 1026, in <module>
    if len(lastFs):
NameError: name 'lastFs' is not defined

:-(
User avatar
Nemesis#13
 
Posts: 1041
Joined: Mon Aug 04, 2008 8:09 pm
Location: Germany

Postby ynjh_jo » Tue Jul 21, 2009 6:07 am

Ow, crap, that thing again.
It happens on fresh install.

Just define "lastFs = []" right before line 1007.

EDIT :
sorry, there is 1 more error.
Insert this line instead : "lastFs = mainNcurrFile = []"
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Tue Jul 21, 2009 10:23 pm

[_v0.3.2_]
These are just some quick fixes :
[X] fixed fresh install bugs
[X] fixed connection to PStats server due to too short sleep time of its doLater task after run()
[X] fixed settings (general colors, highlighter colors, key map) Save As to append the extension to the filename, if it lacks one
[X] fixed harmless bug after closing Preferences
[X] moved some configs from General panel to Editor panel
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Mon Jul 27, 2009 4:44 am

[_v0.3.3_]
[X]
fixed text X offset if it was indented before further edited and not regenerated yet by page manager
[X] fixed the accidentally commented select all code of missing files interface when I switched to wxListCtrl
[X] fixed the changed lines update on toggle comment if selection's first line is off top
[X] any error in your main module doesn't halt the IDE anymore at start up, and if the error is before importing DirectStart, it will be imported
[X] call tips : I forgot that the C++ arguments name are not converted to camel case
[X] call tips : now you can insert individual argument by clicking it, and a comma will be automatically appended
[X] added call arguments highlight background color config

very late shot :
Image
Last edited by ynjh_jo on Mon Aug 03, 2009 5:08 am, edited 1 time in total.
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby rdb » Mon Jul 27, 2009 5:58 am

Getting an error on 64-bits linux:
Code: Select all
Traceback (most recent call last):
  File "IDE.py", line 3422, in <module>
     base.frameRateMeter.getDisplayRegion().setSort(sys.maxint)
OverflowError :  signed integer is greater than maximum


When I run some files, I get this instead:
Code: Select all
Traceback (most recent call last):
  File "IDE.py", line 1568, in <module>
     APP_cursorHidden=base.win.getProperties().getCursorHidden()
AttributeError :  'NoneType' object has no attribute 'getProperties'
I rarely respond to PMs
rdb
 
Posts: 8565
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby ynjh_jo » Mon Jul 27, 2009 8:04 am

1. Isn't it a known issue of 64b python ?
It's so unimportant, you can hardcode a large value yourself.

2. Does that module set window-type to non-"onscreen" ?
I should've checked it first.
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Thu Sep 17, 2009 12:49 am

[_v0.3.4_]
[X]
broke edit-history grouping if caret is moved by mouse
[X] canceled join lines if the selected line is exactly 1
[X] exponential numbers are also highlighted as float
[X] completion list's X pos is not fixed anymore
[X] replaced sys.maxint with 2**31-1
[X] the IDE starts DirectStart framework and opens a default window if user's main module doesn't
[X] faster undo & redo for some trailing actions types (break line, del line, duplicate line) by replacing loops with [selection + single delete/paste call]
[X] added Auto-Complete active-status-at-start config

Sorry for the delay, my job is sucking me. Plus my entire projects volume on my HDD was wiped out, its FAT and directory entries were destroyed due to lost clusters error during partition resize, so I had to manually restore each important files and source codes, simply by python+win32file.
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby ynjh_jo » Sun Oct 25, 2009 1:40 am

[_v0.3.5_]
[X] fixed import checker to exclude comments and (doc)strings correctly
[X] fixed workspace width adjustment upon line deletion, if there is no marker
[X] at start, if the last main file doesn't exist, the first available file will be used instead of the first one on the list
[X] welcome screen is not resizeable anymore
[X] all sounds are stopped by sfx manager upon scene cleanup
[X] the IDE now refuses to load binary files instead of crashing hard
[X] improved file loader by scanning for null byte as per-line-reading, not after the whole file is fully loaded to RAM, to cut down load time if the file is a huge binary one
http://ynjh.panda3dprojects.com | http://ynjh.p3dp.com
Intel P4Prescott 2.8GHz HT | ATI Radeon HD4670 1GB GDDR3
User avatar
ynjh_jo
 
Posts: 1795
Joined: Tue Apr 18, 2006 12:41 am
Location: Malang, Indonesia

Postby rdb » Thu Nov 05, 2009 10:52 am

I've ran into an annoying issue. When I open a single python file in the IDE, and close it, I seem to be flooded with this error on the console:
Code: Select all
Traceback (most recent call last):
  File "IDE.py", line 1203, in IDE_safeRun
    taskMgr._origRun()
  File "/usr/share/panda3d/direct/task/Task.py", line 482, in run
    self.step()
  File "/usr/share/panda3d/direct/task/Task.py", line 440, in step
    self.mgr.poll()
  File "/home/pro-rsoft/Projects/NotMine/OnscreenIDEdynamic/IDEMenu.py", line 899, in __doRunCommand
    f(*args)
  File "IDE.py", line 7777, in IDE_closeDoc
    IDE_doCloseDoc(doc)
  File "IDE.py", line 7812, in IDE_doCloseDoc
    doc.tabBlink.pause()
AttributeError: IDE_document instance has no attribute 'tabBlink'

Another annoying bug is that I can't seem to type single-quotes or double-quotes in the editor. I have to put it in my clipboard and use Ctrl+V everytime.
(On a sidenote, why are keypress events printed on the console? I guess it gets kinda annoying.)

Also, may I request a simple feature that would make this tool a hundred times more useful for me: when python files are specified on the command-line, instead of showing the welcome window, the IDE should open all python files directly as tabs.
As I use the command-line more often than a GUI, such a feature is essential for me.
The second feature request, which is probably trickier, when I call the IDE for the second time with python files as arguments, they should be added as tabs to the existing instance of the IDE (it shouldn't be opened a second time).

Other than that, I'd like to point out once again that this editor is really amazing. I'm really wondering why I haven't heard of too many people using it. Great job, and keep up the good work!
Last edited by rdb on Thu Nov 05, 2009 11:04 am, edited 2 times in total.
I rarely respond to PMs
rdb
 
Posts: 8565
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby rdb » Thu Nov 05, 2009 11:00 am

Also, here's a patch for the 64-bits unix users to compile the TextDrawer: (basically, it just adds -fPIC to the compiler command-line)
Code: Select all
--- TD/linux/compileTD.sh.orig   2009-11-05 16:57:52.000000000 +0100
+++ TD/linux/compileTD.sh   2009-11-05 16:58:12.000000000 +0100
@@ -3,7 +3,7 @@
 
 echo '
 #### COMPILING TextDrawer.cxx ####'
-g++ -I/usr/include/panda3d/ -I/usr/include/python2.6/ -O1 -g3 -Wall -c -fmessage-length=0 -MMD -MP ../TextDrawer.cxx
+g++ -I/usr/include/panda3d/ -I/usr/include/python2.6/ -O1 -g3 -fPIC -Wall -c -fmessage-length=0 -MMD -MP ../TextDrawer.cxx
 echo '#### TextDrawer.cxx compiled ####'
 ls ./TextDrawer.o -hug --color=always
 
@@ -14,7 +14,7 @@
 
 interrogate_module -python-native -module TD -library TD -oc TextDrawer_module.cxx TextDrawer.in
 
-g++ -I/usr/include/panda3d/ -I/usr/include/python2.6/ -O3 -g3 -Wall -c -fmessage-length=0 -MMD -MP TextDrawer_ig.cxx TextDrawer_module.cxx
+g++ -I/usr/include/panda3d/ -I/usr/include/python2.6/ -O3 -g3 -fPIC -Wall -c -fmessage-length=0 -MMD -MP TextDrawer_ig.cxx TextDrawer_module.cxx
 
 g++ -L/usr/lib/panda3d -shared -o"TD.so" ./TextDrawer.o ./TextDrawer_ig.o ./TextDrawer_module.o  -lpanda -lpandaexpress -lp3dtool -lp3dtoolconfig -lp3framework -lp3pystub -lpandafx
 
Last edited by rdb on Thu Nov 05, 2009 12:57 pm, edited 1 time in total.
I rarely respond to PMs
rdb
 
Posts: 8565
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby GrizzLyCRO » Thu Nov 05, 2009 12:00 pm

Now i ran this thing for the first time, i am completely amazed with it.

/me removes pydev from taskbar
User avatar
GrizzLyCRO
 
Posts: 301
Joined: Tue Dec 16, 2008 4:03 pm
Location: Croatia

Postby rdb » Thu Nov 05, 2009 12:56 pm

Two more issues. In IDE.py, there's this line:
Code: Select all
sys.argv[0]=APP_mainFile

This passes some weird arguments to the python file, which breaks some of my apps. I had to replace it with this instead:
Code: Select all
sys.argv=[APP_mainFile]


Secondly, most of my more-advanced games use late-window-opening (I don't open the window right at the beginning of the main file, but instead I set the window-type to "none" before the DirectStart import. Then I open it later.)
This breaks your editor though, as it wants to access the window properties right away. Replacing the "renderFrame" function in IDE.py with something that calls base.taskMgr.step a hundred times works in some cases, but not everywhere.
You might want to add a hook somewhere that your IDE stuff is only created once the window has been opened, or something like that.
I rarely respond to PMs
rdb
 
Posts: 8565
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

PreviousNext

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 0 guests