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

Return to Code Snippets

Postby ynjh_jo » Fri Jan 30, 2009 2:00 pm

[_v0.1.5_]
[X] fixed ScrolledList class to respect 1.6.0's messenger
[X] added set as main module command to file tab's context menu
[X] localized, added, and changed some images
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 Feb 01, 2009 9:03 am

[_v0.1.6_]
[X] fixed wrong image name (clear.png)
[X] fixed scale of message at screen center to be more consistent across different resolutions
[X] changed toggle comment's old text generation method to the new one (how could I miss this ?)
[X] changed last macro command text displayed in status bar to its description
[X] removed delete prev/next character macro command count argument exposure
[X] added a clip plane to cut long message at status bar
[X] added expand and shrink selection
[X] added "save duplicated file as"
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 » Sat Feb 21, 2009 10:04 pm

[_v0.1.7_]
[X] fixed context menu item and myPolyButton text with respect to the new panda text generation method
[X] fixed context menu's default minZ value so it won't exactly touch screen edge
[X] fixed context menu removal when clicking file tab with LMB or MMB
[X] fixed myFinder.py and ScrolledList class to respect the latest 1.6.0 messenger's packed-into-tuple receiver class name & _messengerId value
[X] fixed selection range of Find operation, if the searched string ends with EoL
[X] fixed cursor placement bug in toggle comment
[X] fixed updated page lines range
[X] history grouping of 1-by-1 character delete operation now includes all deleted subsequent characters, and is no longer broken by EoL
[X] replaced dt-based stupid halts (for preventing continuous process when the keypress repeat is so short and the key is already released) with the whole framework step (not just a render frame call), so a new frame is rendered to see the result immediately, plus the key down/up status get a chance to be updated, so the repetitive process will stop immediately after the key is released.
[X] added missing current line exposure call in break 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 ynjh_jo » Wed Feb 25, 2009 12:30 am

[_v0.1.8_]
[X] fixed scrambled order of the recent and opened files
[X] fixed open-missing-files-interface to use listview so can be processed by recent files loader
[X] undo and redo now using whole framework step
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 MonkeyLord » Fri Feb 27, 2009 12:08 am

First off, I just want to say, I love where this application is going. This is really awesome stuff, ynjh_jo. The code completion alone has be giddy. :)

What I would like to see is a feature that allows me to rescale the window, yet the IDE elements remain fixed in size. My only real complaint so far is that resizing the window stretches and scales the IDE text and menus. :P

Keep up the good work!
MonkeyLord
 
Posts: 7
Joined: Fri Feb 20, 2009 2:18 pm

Postby ynjh_jo » Mon Mar 02, 2009 10:30 pm

MonkeyLord wrote:This is really awesome stuff, ynjh_jo. The code completion alone has be giddy. :)

MonkeyLord, do you think giddy is awesome ? Help me here, my english sucks.
Which meaning of "giddy" did you intend to express ? Does it have any good meaning ?

I've never found any need to change window size, that's why.
Why don't you complain about "why doesn't it work with image post-processing samples" instead ?
That'd be easier to fix than retaining gui items scale, since there are alot of them. Moreover, they should have different behavior if the window size is changed, so it's not as simple as setting counter scale at a couple of places.


Anyway, both are
DONE. :P

Even the framerate meter has consistent fixed scale now (unlike the default behavior, which depends on the window size). The only thing I didn't touch is the sceneshot card, so expect stretched and shifted background if the scene is PAUSED when changing window size.
And for the first time, it works with post-processing samples (glow, toon, etc.).

[_v0.2_]
[X] disabled history grouping when inserting the selected code from available codes list
[X] separated missing files loader from recent files loader
[X] fixed main module's global dictionary items destruction, now also works without having World class in it
[X] fixed cameras removal to be done after scene cleanup, so FilterManager can be used repetitively without any trouble in finding the camera-displayregion relationship
[X] fixed menu placement if it's scaled
[X] fixed ScrolledList items to have consistent scale against each other, no more fixed values
[X] added ScrolledList slider minimum height, so it won't be visually gone
[X] added CommonFilters and FilterManager destructors
[X] added bufferviewer default sort, layout, and position restoration upon scene cleanup
[X] added default cameras' lenses default parameters restoration upon scene cleanup
[X] added write access error notification upon file save
[X] now directly tries to create offscreen buffer to check if it's ParasiteBuffer for determining code description's texture size
[X] code completion is canceled before updating scene
[X] improved code completion
[X] improved the remaining of gui items to have consistent scale at different resolutions, so if you change your window size, all gui items scale is retained. Code completion's list is shrunk/expanded vertically, while its description is horizontally. They occupy 60:40 of the workspace.

[X] now the main module seen by python is your module, not the IDE module.
The good point of this are :
[_1_] whatever you do in python prompt happens in your main modules' global namespace, not in the IDE's.
[_2_] everything in your "if __name__=='__main__':" block will be executed, so now you can run a module's test codes. So far, it can't be done, since the module's __name__ is taken from its filename, not __main__. One exception, you still have to block your World class instantiation so it won't be done again by the IDE.
This is how you should block it :
Code: Select all
if __name__=='__main__':
   print '\n', '@'*10, "\n  I'M PROCESSED !!!\n", '@'*10
   if not hasattr(help,'IDE'): # <--- to block World class instantiation
      World()
   run()

You don't need to block run(). It's already redirected by the IDE.
As you can see, I did it simply by abusing help, so if you define help in your running module, your World class will be instantiated twice. I can't use __builtins__, due to the fact that your module is an imported one (not the main), in your module, __builtins__ is a dictionary, not __builtins__ module, so I can't have exactly the same testing way which is evaluated correctly both inside and outside the IDE without any change necessary.
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 Robbson » Sun Apr 05, 2009 12:16 pm

Nice work.
But I don't think it's very usable for beginners of Panda3D and Python because of all those keyboard shortcuts you have to learn first and the whole IDE as it is. Looks rather like a debugging app. :?
I'v also problems reading the blurry font and I get a headache from all those pandas dancing in the background including the weired audio.

Well the best feature (beside on the fly coding) is the auto completion with Panda3D. How did yout get it to work? Is there an easy way to get this to work in other editors, too?
Because without auto completion the big rapid prototyping bonus of Python is absolutely gone so I would rather prefer C++ when using the engine.

Robbson
Robbson
 
Posts: 5
Joined: Sun Apr 05, 2009 11:47 am

Postby ynjh_jo » Sun Apr 05, 2009 1:25 pm

Robbson wrote:I don't think it's very usable for beginners of Panda3D and Python because of all those keyboard shortcuts you have to learn first and the whole IDE as it is.

I think I already use common shortcuts as in most editors. There is always adaptation when trying new editor.
Too bad, I just don't have time to write a manual. Maybe a volunteer, Shaba1, is currently writing it as we speak. I don't know its status.

Robbson wrote:Looks rather like a debugging app.

It doesn't do any debugging at the moment. Maybe someday.

Robbson wrote:
I'v also problems reading the blurry font

I believe it's already pixel perfect, no matter resolution I use, no matter how I resize the window. It's fine on Windows and Linux.
What's your OS ?
What's the renderer you use ?
Could you post some screenshots ?

Robbson wrote:and I get a headache from all those pandas dancing in the background

You can simply toggle pause/resume the scene at any time, or even clear the scene altogether.
See-through is one of the most important feature to me, so I can maximize the desktop size usage without switching windows just to see my scene.
I just can't simply apply transparency to any editor to see through it, because the hardware continuous rendering always wins over the editor's refresh rate, no matter how high it is, it only gives me flickering screen.

Robbson wrote:including the weird audio.

What audio ? Is it when an error occur ?
I don't think I use sound in the test scene. The IDE uses some sounds at some points when you need to pay attention.


Robbson wrote:the auto completion with Panda3D. How did you get it to work?

I built everything from scratch, including the completer.

Robbson wrote:Is there an easy way to get this to work in other editors, too?

It depends on the editor, of course. Some big and famous ones should be able to do it.
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 » Fri Apr 17, 2009 7:53 pm

[_v0.2.1_]
[X] Menu : fixed menu item's lower Z bound of multi-lines item text
[X] Menu : added grayed/disabled menu item images cache, so it won't be converted to grayscale everytime the menu is created
[X] Menu : added shortcut key text support to menu item text, just append the key text to the end of menu item text, separated by "more than" sign (>). The shortcut key doesn't do anything upon key event, so handle it yourself normally.
[X] fixed code completion description to be displayed immediately without delay if not currently navigating through the list, ie. when it's displayed for the first time
[X] now you can choose to instantiate your World class by yourself if needed (in case you need to pass some arguments to it), just save it as "winst" in global namespace, like this :
Code: Select all
if __name__=='__main__':
   winst = World( arg1,arg2,etc )
   run()

[X] renamed IDE's modules name (because it's too common and maybe used in user's scripts), so if user does, say "import Menu", the Menu module imported to user module's namespace won't be the IDE's Menu, but user's own Menu module. I recommend to remove all .py* files of the old installation.
[X] 1.6 compatible : removed taskMgr.step() calls in some modules
[X] 1.6 compatible : improved exception handling to respect 1.6's C++ TaskManager and the new Messenger.__dispatch.
[X] 1.6 compatible : improved PauseResume
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 May 13, 2009 7:39 pm

[_v0.2.2_]
[X]
improved PauseResume again
[X] scene is cleaned up upon error during update/restart
[X] fixed mouse reposition upon update & auto jump to scene, since no longer using taskMgr.step
[X] cleared mouse reposition and cursor visibility status upon scene cleanup
[X] PStats's server process on Windows is now killed upon exit
[X] now you can open PStats from within the IDE at any time
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 » Thu May 14, 2009 8:21 am

Reporting 1.6.1. error:

IDE.py(direct opening):
Code: Select all
Traceback (most recent call last):
  File "F:\Users\Dany\Desktop\OnscreenIDEdynamic\IDE.py", line 35, in <module>
    sys.executable=sys.argv[4]
IndexError: list index out of range

IDE.py(launched py IDE_STARTER.py):
Image
Image
Image
Greetz -- Europe!
RIP Michael Jackson
MentalDisaster
 
Posts: 170
Joined: Mon Apr 27, 2009 12:46 pm

Postby ynjh_jo » Thu May 14, 2009 11:32 pm

You shouldn't run IDE.py directly.

I use 1.6.0.
The PauseResume.py error means that any of the 3 tasks with names in line 233 doesn't exist. It could possibly renamed in 1.6.1. Go check their current names in ShowBase.py, in restart() and tell me if any of them is renamed.
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 » Fri May 15, 2009 1:53 am

I've just installed 1.6.2. I'll configure it and check your great work.
Image
Image
Greetz -- Europe!
RIP Michael Jackson
MentalDisaster
 
Posts: 170
Joined: Mon Apr 27, 2009 12:46 pm

Error on 1.6.2

Postby koryrok » Sat May 16, 2009 6:44 pm

Hi,

I cant get this to work on Panda 1.6.2 I am also using wxPython 2.8

Image

Basically the screen just freezes and all I can see is this:

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

Postby ynjh_jo » Sat May 16, 2009 9:20 pm

That's the same error. Help yourself up, do as I requested in my previous post.

As to the doubled everything in the sample scene, I intentionally didn't update the sample with the World instantiation blocker, just to whip you a little, so next time you know what to do.
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 koryrok » Sun May 17, 2009 1:56 am

Im not sure what you mean by saying " I intentionally didn't update the sample with the World instantiation blocker, just to whip you a little, so next time you know what to do."

Code: Select all
if __name__=='__main__':
   print '\n', '@'*10, "\n  I'M PROCESSED !!!\n", '@'*10
   if not hasattr(help,'IDE'):
      World()
   run()


The blocker is here in the sample, so what do you mean??
koryrok
 
Posts: 23
Joined: Sat May 16, 2009 7:35 am

Postby ynjh_jo » Sun May 17, 2009 2:28 am

I mean the test scene (dyn1.py).

So, what're those 3 tasks names now in 1.6.2 ?
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 koryrok » Sun May 17, 2009 10:46 pm

I am running dyn1.py

Here is the new code in restart()

Code: Select all
    def restart(self):
        self.shutdown()
        # __resetPrevTransform goes at the very beginning of the frame.
        self.taskMgr.add(
            self.__resetPrevTransform, 'resetPrevTransform', priority = -51)
        # give the dataLoop task a reasonably "early" priority,
        # so that it will get run before most tasks
        self.taskMgr.add(self.__dataLoop, 'dataLoop', priority = -50)
        self.__deadInputs = 0
        # spawn the ivalLoop with a later priority, so that it will
        # run after most tasks, but before igLoop.
        self.taskMgr.add(self.__ivalLoop, 'ivalLoop', priority = 20)
        # make the collisionLoop task run before igLoop,
        # but leave enough room for the app to insert tasks
        # between collisionLoop and igLoop
        self.taskMgr.add(self.__collisionLoop, 'collisionLoop', priority = 30)
       
        # give the igLoop task a reasonably "late" priority,
        # so that it will get run after most tasks
        self.taskMgr.add(self.__igLoop, 'igLoop', priority = 50)
        # the audioLoop updates the positions of 3D sounds.
        # as such, it needs to run after the cull traversal in the igLoop.
        self.taskMgr.add(self.__audioLoop, 'audioLoop', priority = 60)
        self.eventMgr.restart()


So, I tried changing line 233 to:
Code: Select all
unneededTasksName+=['resetPrevTransform','collisionLoop','dataLoop', 'ivalLoop', 'igLoop', 'audioLoop']


I still cant get it to work. It now atleast tries to load the IDE but then crashes python.
koryrok
 
Posts: 23
Joined: Sat May 16, 2009 7:35 am

Postby ynjh_jo » Mon May 18, 2009 12:44 am

I see, shadowCollisionLoop is no longer there, right ?
FYI, unneededTaskNames in line 233 collects collision-related tasks.
So, just bury the dead, remove shadowCollisionLoop from that list.
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 koryrok » Mon May 18, 2009 2:47 am

Im new to Panda and Python but If I understand you correctly I need to change line 233 to:

Code: Select all
          unneededTasksName+=['collisionLoop','resetPrevTransform']


I tried this and it still crashes python. Has anyone been able to get this working with 1.6.2?

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

Postby ynjh_jo » Mon May 18, 2009 3:43 am

Is it still the same error ?
Could you "print taskMgr" before that erroneous line ? Then post all running tasks names.
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

Found a name

Postby jbskaggs » Mon May 18, 2009 4:18 am

Found a cute name for this app by accident:

I unzipped it into a folder called Panda Ide but I left the space out and got Pandaide. I think Ill use a RedCross and a Band-Aid for the icon in Ubuntu on my system

Well nobody else will probably think its funny so Ill slink away now.

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 » Mon May 18, 2009 4:42 am

ynjh_jo wrote:Is it still the same error ?
Could you "print taskMgr" before that erroneous line ? Then post all running tasks names.


I am new to both Panda and Python so I don't know what you're suggesting. Basically Python just crashes when I load dyn1.py example.

Image

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

Postby ynjh_jo » Mon May 18, 2009 5:07 am

WT*.... :o
I'm downloading 1.6.2 now.
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

cant

Postby jbskaggs » Mon May 18, 2009 6:15 am

Cant get past first window screen- when I push open file the IDE screen greys out then python hangs. No error message- Ill look at it more later.

ubuntu 9.o4 64bit, panda 1.6.2, Nvidia video 512mb, 3 gb process, 2gb mem.


To make sure I am loading it correctly what is the command to start this in LInux?

JB Skaggs
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 AAKN » Mon May 18, 2009 6:36 am

i also havethe same poblem when istart the any test file itwonn't open the ide , sofar i didn't saw the ide yet
AAKN
 
Posts: 8
Joined: Wed Apr 22, 2009 7:35 am
Location: India

Postby ynjh_jo » Mon May 18, 2009 6:39 am

To make sure I am loading it correctly what is the command to start this in LInux?

python IDE_STARTER.pyw
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 May 18, 2009 8:45 am

Ok, I have 1.6.2 running here.

I thought it's something serious, eg. threading issue, but it's NOT. You just need to build the C++ text drawer extension (in /TD).

On Windows, use VS2008. If you don't have it, just wait, I'll upload it tomorrow. Meanwhile, simply remove your TD.dll, or change "USE-C++-TEXT-DRAWER" config to False (near the top of IDE.py), and temporarily live with 3-4x slower text generation.
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

Okay

Postby jbskaggs » Mon May 18, 2009 6:18 pm

Okay I reran the program and same error screen turns grey then locks.

SO I ran it in my debugger and this is the error:

Code: Select all
The debugged program raised the exception unhandled OSError
"(2, 'No such file or directory')"
File: /home/skaggs/Desktop/pandaide/IDE_STARTER.pyw, Line: 50
Break here?


JB SKaggs
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 7:06 pm

Not sure what file python failed to find, but line 50 is os.chdir(sys.path[0]), isn't it ?
So, what's your sys.path[0] ?
You're using python 2.6, right ? Perhaps it's 2.6 issue.
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

PreviousNext

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 0 guests