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

Return to Code Snippets

Postby BrianInSuwon » Fri Jul 25, 2008 4:08 pm

Thanks. Its working now. I needed to run the file from the command prompt. It didn't work when I used PyPE. It will take awhile to get use to it. Not being about to highlight lines/text with the cursor is harsh and I don't seem to be able to copy and paste from other files. And when I hit F9 I got a Syntax Error pointing to the if name == main line of code.
BrianInSuwon
 
Posts: 98
Joined: Wed Jun 18, 2008 1:25 am

Postby ynjh_jo » Fri Jul 25, 2008 4:12 pm

The installation structure should be like this :

IDE_STARTER.pyw
IDE.py
<the rest of IDE's .py files>
fonts
images
sounds

dyn1.py is just the test module, you can use your own.
http://ynjh.tk
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 Jul 25, 2008 5:00 pm

Nothing is wrong with the clipboard here, both on Windows and Linux.
Which version of wx are you using ?
Where did you copy the text from ? Was it from PyPE ?

Or perhaps it's related to your OS, or your wx ANSI version. Which version is yours ? I tried it on XP SP2.
That syntax error is funny. How does your main module look like ?
http://ynjh.tk
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 27, 2008 11:30 am

UPDATE :
[X] bugfix : auto-indent was accidentally broken
[X] startup:open file : add new file action now really appends files instead of replaces the old ones on the list.
[X] the recently closed files now inserted to the top of recent files list. So, if you accidentally close a file, it's easier to load it back in.
[X] Panda's default scenegraphs' and main camera's render state now correctly cleared. I tried it with the shadow sample, and then changed main module to no-light scene, and it works.
[X] the crusher now works too for classes derived from object type.
[X] all cameras (except Panda's default and IDE's code description RTT ones) and their graphics outputs will be removed. This works too for cameras which are not attached to Panda's default scenegraphs. Once again, I did it by extending Camera class at runtime, so I can remove them simply by yelling at them using messenger.
[X] added buffer viewer toggle
[X] added jump to main module file
[X] added output redirection to a StringStream, displayed as log.txt in the IDE workspace. Use Ctrl-L to create/jump to it. It's not created by default, but there is a config var you can change.
Here are its behavior :
_+_ if it's already created and opened, but you're editing other file, the log is still updated without interrupting anything you're currently doing.
_+_ if you close it, its text display won't be updated (until you open it again), though the output still fully recorded.
_+_ its scrolling behavior is similar to Linux's terminal. If it's scrolled to the end, upon output update it will be auto-scrolled, otherwise it's not scrolled at all, so you can peacefully investigate the output without being annoyed by stupid auto-scroll as of Windows command prompt.
_+_ you can have it displayed too when you jump to scene. Not much you can do there, I only equipped it with the slider bar. I just don't want to overwhelm your scene with more controls.
Unlike in IDE workspace, it's displayed without the background layer, so you can see your scene's real colors. And I don't leave it rendered with only 1 color, that would make you hard to see it clearly over your colorful/dark/bright scene part. So, I created black halo around the white foreground color. This way, it remains readable no matter how your scene looks like. You can toggle show/hide it using F9.
The halo is created using PNMImage and the result is saved to disk and will be used at next runtime instead of creating it again.
The log file always saved to disk upon IDE shutdown.
[X] the files tab is skinned now.
The main module file tab label is colored green. I only created 5 skins, the 6th is only a combination of the others, showing that you can have asymetrical left-right edges. You can create your own skins, if you want.
The behavior of tab border :
_1_ if IDEtab_Rcorner.png exists, it will be used for right edge instead of the horizontally auto-flipped IDEtab_Lcorner.png
_2_ if IDEtab_mid.png exists, it will be used instead of U=1 (rightmost column) of IDEtab_Lcorner.png
The tab label skin has only behavior _1_.
At runtime, you can cycle those skins using Ctrl-tilde. There is a config var for the default skin.

Possible problems :
[?] I couldn't remove any shader, no matter what I tried. ShaderPool.releaseAllShaders() doesn't work. So if I change a shader file, I couldn't force it to be reloaded and compiled. I'm clueless, so I did it by hacking loader.loadShader. So, before sending the shader to ShaderPool, I temporarily alter its filename so it will be considered as new shader. That works great, but I believe it lets all old shaders floating around uselessly. I don't know what to do about them.
[?] I couldn't intercept Notify output in realtime. I monitor the output change only in a task, so all Notify output are accumulated at the end of frame, while Python's print can be caught in realtime.

Image Image
Last edited by ynjh_jo on Tue Oct 29, 2013 5:25 am, edited 2 times in total.
http://ynjh.tk
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 Jul 31, 2008 11:07 am

UPDATE :
[X] bugfix : I forgot to clear Ctrl down status when go back to IDE
[X] bugfix : I forgot to hide buffer viewer before shooting the scene
[X] the log over scene texture is saved per OS, since the letters arrangement is different on each OS.
[X] a buffer which doesn't have a camera will be destroyed too, i.e. when an error occurs after buffer creation but before setting the camera for it.
[X] upon IDE/scene switch, the cursor hidden status is preserved.
[X] programmatic pointer movement is disabled when you go back to IDE. It will be repositioned to the last recorded resting coordinate at your next jump to scene, so you won't get sudden movement if you use e.g. FPS camera controls. I do FPS all the time myself.
[X] the status bar is simple skinned and exploited a bit further to display some infos : errors count (per file), and the usual messages displayed at screen center are also displayed here too.
[X] better appearance consistency of tabs and status bar at different window resolutions.
http://ynjh.tk
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 Aug 02, 2008 11:31 am

UPDATE :
[X] if the last edited main module file doesn't exist, a warning will be displayed at startup screen and the open last edited files button will be disabled.
[X] if some other files don't exist, the retry open window will be displayed instead of silently left unloaded.
[X] the realtime clock in the test scene is not activated during loading to avoid waking up scheduled stuff too early. This fixes weird errors if you use render frame call or framework step during loading, so the loading time is longer than those stuff's time schedule, especially if you're not using model cache.
[X] fixed code description RTT for GPU which only able to create ParasiteBuffer, done by laying out more cards and cameras.
[X] the code description text is much clearer now.

This is on Linux, which I only get ParasiteBuffer :
Image
Last edited by ynjh_jo on Tue Oct 29, 2013 5:24 am, edited 2 times in total.
http://ynjh.tk
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 ThunderZ » Sat Aug 02, 2008 12:24 pm

Really impressive.

One of the most active and impressive project for the dev of Panda i see on this community.

Really thx
User avatar
ThunderZ
 
Posts: 57
Joined: Mon May 12, 2008 5:41 am

Postby dual » Sun Aug 03, 2008 6:25 am

When I run the IDE_STARTER.pyw, I get this error:
Traceback (most recent call last):
File "IDE_STARTER.pyw", line 1015, in <module>
topSizer.Add(wx.StaticText(welcomeScreenPanel, -1, lastFs[0]),
NameError: name 'lastFs' is not defined


I was able to use one of the earlier version, but this one doesn't work.
dual
 
Posts: 6
Joined: Sun Jul 20, 2008 10:39 am

Postby ynjh_jo » Sun Aug 03, 2008 7:26 am

I guess you must removed all files in your installation. This won't work for fresh install, I just noticed. :o :o
I can't upload the whole thing, there are some not-ready stuff going on.
NOTE: this is already fixed in the latest update.
Last edited by ynjh_jo on Sat Aug 30, 2008 11:31 pm, edited 1 time in total.
http://ynjh.tk
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 dual » Mon Aug 04, 2008 12:49 pm

Thank you very much :)
dual
 
Posts: 6
Joined: Sun Jul 20, 2008 10:39 am

Postby ynjh_jo » Wed Aug 06, 2008 4:59 am

UPDATE :
[X] bugfix : 1 more vanishing line bug is gone
[X] to avoid halt, globalClock will be reset to normal mode if there is an exception and after rebinding main module upon save
[X] arguments count/type mismatch error tracking now works at messenger level too, as demonstrated in the test scene by adding 3 more events to trigger the errors.
[X] the main module and the currently running module are correctly distinguished to be able to catch the errors, which are obviously belong to the running one.
[X] I guess I forgot to mention that you're not necessarily have a World class to instantiate, in case you just need to try something very simple. It's good I forgot about mentioning it afterall, since I just got the crusher work too for crushing main module's global namespace. The needed framework components are not destroyed of course : base, bboard,directNotify, eventMgr, giveNotify, ivalMgr, jobMgr, loader, messenger, onScreenDebug, taskMgr. To demonstrate this, I created a DirectObject instance outside World class in dyn1.py, which accepts an event. Upon update, the event hook remains only 1, or if you comment it out, it will be gone. The consequence is the cleanup procedure is a bit longer, but it's good for ensuring environment cleanliness.
Warning: this module global namespace cleanup doesn't happen yet for the imported modules though, especially if those stuff in the imported modules are not meant to be exported, so they don't exist in the importer module's global namespace.
[X] updated PauseResume module to pause tasks which aren't bound to any class
[X] the IDE now uses independent button thrower, so you can freely use the default button throwers. You can also create some more as you need, and the custom ones will be removed upon update. I only remove the ones parented under the default data root node, though. The default and custom ones are disabled when you're in IDE workspace, and enabled when you jump to scene.
http://ynjh.tk
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 Aug 17, 2008 5:44 am

UPDATE :
[X] improved text rendering optimization trick. Previously, for thousands of lines, when a document is displayed for the 1st time after starting the IDE, there is a little halt. It's because I used 1 huge bulk of display scenegraph and used stash/unstash to display the onscreen text lines, so I had to operate on a large number of nodes. There is a bit halt for lines insertion/deletion operation too, since I had to shift the lines' Z below the inserted/deleted ones. I found this halt too annoying, so I decided to go further in optimizing it.
Now the text lines are parented to a floating parent (not attached to the display scenegraph). Each onscreen text line is instanced to display scenegraph and placed at its Z as you scroll, or whenever needed, which only takes 0.001 second to complete. This way, I need to adjust the Z only for the onscreen ones, not the rest of them. ....sayonara halt....
[X] added bookmark
What's special :
_1_ the bookmarks are saved. Some IDE don't do this. KomodoEdit does this, but if I don't save the file, the marks will be saved anyway, resulting in incorrect position. I guess the authors forgot to make copy of the marks, and end up modifying the stored marks list, which is intended to be updated upon file save only.
_2_ some IDEs always allow navigation cycle, which I dislike since I can't stop cycling at the 1st/last one. Some use config variable to enable/disable it, but don't provide a way to jump/wrap to the opposite end.
What I like are, I can stop at the 1st/last one, and also able to wrap to the 1st/last one, without using config var to toggle this behavior, or using additional keymap (I'd like to spend my brain surface to store more important stuff). So, I did it this way : if the cursor is at the 1st/last mark, it'll stop there. If you want to wrap to the opposite end, keep holding down the keys for at least 0.75 second. Once the cursor is teleported there, there'll be another 0.75 sec delay to give you a chance to release those keys, so it won't start jumping around aggresively.
[X] the cursor position and page scroll are also saved too
[X] added bam cache for the text. This works best with OPTIMIZE-TEXT-AT-LOADING set to True, since the memory consumption is linear to the nodes count. If you have alot of RAM, I guess you'll be fine setting it False. For 5000+ lines, without bam cache, generating the text takes 12+ secs (50 secs if O-T-A-L is True). With cache, it's loaded in < 1.5 secs. The text display is saved to bam on disk upon manual file save. Upon scene update, the saved files' text display are only saved to bam stream in RAM, and will be written to disk at exit or upon file close, it's just to minimize HDD hit. The file's bam cache will be removed if you change the file outside the IDE.
[X] PauseResume module : now doesn't pause IDE's tasks, e.g. wxPython loop on Linux.
http://ynjh.tk
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 ditus » Sat Aug 30, 2008 9:36 pm

:D WOW !!! :shock: genuis!

but one thing ;) , you need to know that the download link from 3th august isnt working.
is the idea of the lenov diing? no!
the aries is already on build :)
User avatar
ditus
Troll
 
Posts: 277
Joined: Mon Oct 15, 2007 2:15 pm
Location: moon

Postby ynjh_jo » Sat Aug 30, 2008 11:29 pm

Thanks for your appreciation, all.

Dirk, did you mean this one : http://ynjh.panda3dprojects.com/OIDE/IDE_STARTER.pyw ?
It was just a temporary fix. The latest update already covers that bug, of course, so I removed it. I should've put that link away. Now it's gone, so it won't confuse anyone else again.
http://ynjh.tk
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 Azraiyl » Tue Sep 02, 2008 7:09 am

Not tested your IDE but read your note about ShaderPool.releaseAllShaders. Do you already have a solution. So far I discovered the following fancy thing (I don't understand it, but maybe it has something to do with a RefCount).

If I write my shader reload snippet like this, I can reload shaders without restarting the appliaciton, by first pressing "2" and than press "1".

Code: Select all
def clearShader():
    world.clearShader()
    ShaderPool.releaseAllShaders()
def loadShader():
    shader = loader.loadShader("shader.sha")
    world.setShader(shader)
base.accept("1", loadShader)
base.accept("2", clearShader)


If I rewrite loadShader:

Code: Select all
def loadShader():
    clearShader()
    shader = loader.loadShader("shader.sha")
    world.setShader(shader)


Then pressing only "1" won't reload the shader.
Azraiyl
 
Posts: 113
Joined: Wed Sep 12, 2007 12:41 pm

Postby ynjh_jo » Wed Sep 03, 2008 2:11 pm

Wow, you've just saved the day, Azraiyl. Great experiments. Thanks for opening my eyes.
So the refcount must be entirely dropped to 0 at the next frame after the clearing process. You need to advance the frame, either by base.graphicsEngine.renderFrame() or taskMgr.step() before reload.
http://ynjh.tk
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 Sep 30, 2008 3:57 am

MINOR UPDATES :
[X] since 1.5.3, DirectScrolledFrame uses ScissorAttrib (DisplayRegion) (which can't be overriden at descendant level) instead of clip planes, so the linemarks were clipped. It's fixed by parenting them directly to the DSF instead of the canvas, and scrolled separately as the canvas scrolls.
[X] fixed inefficient shader reload
[X] smart paste : the pasted multiple lines now auto-indented following the 1st line
[X] added repeated character(s) insertion

[EDIT] (repeated characters interface) :
[+] simplified, no longer using "insert" buttons. Replaced by pressing ENTER/RETURN at the "Counts" or "Fill until column" textbox.
[+] the textboxes values are preserved
http://ynjh.tk
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 Oct 29, 2008 8:39 am

UPDATES :
[X] repeated characters interface : pressing ESCAPE cancels it
[X] exit & save files window : widgets navigation (TAB & ENTER) is now active and handled manually on Windows, since wx eventloop is not used on Windows because it steals P3D keystrokes. Temporarily enabling that loop doesn't help.
[X] changed keys for "change case" commands
[X] fixed CWD update at "open last files" screen
[X] added brackets & quotes pair completion
[X] finally, edit history is available, so it's pretty safe to use, and I consider the status is now alpha
[X] added macro recording, replaying, and editing
features :
(_+_) unlike some editors, mine respects undo & redo operations while recording. The currently recorded commands are synchronized accordingly to edit history, so you neither have to be very careful when recording, nor need to edit it later if you made mistakes.
(_+_) unlike some editors, in which a paste command always injects whatever clipboard content at macro replay time, you can choose to inject clipboard content statically or dynamically, per paste recording. So, you don't have to type it by hands if you want to use it only as fixed text.
(_+_) I don't save every macro to an independent hand-editable text file. Instead, I simply pickle *all* macros to disk. In case you need to edit any macro, there is graphical macro editor, integrated to macro manager. Its usage is simple, just change any options and save it. All exposed command arguments are associated accordingly to the widgets.
Image Image
Last edited by ynjh_jo on Tue Oct 29, 2013 5:24 am, edited 2 times in total.
http://ynjh.tk
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 » Wed Oct 29, 2008 8:57 am

I just got the chance to try it out. It's really neat! Thanks alot for making this.
Although, it has some issues with the 1.6 branch of Panda3D:
* Please get those "thread" and "threading" imports out! In the new 1.6 branch which enables threading by default, Panda will crash and burn in a horrible cloud of black smoke when using python's threading modules, so get them out. At least don't have them checked by default.
* You are using task._priority, although, interrogate doesn't support direct access to data members. Please use getPriority() instead. I had to change it before I was able to run it.

Other than that, keep up the good work!
rdb
 
Posts: 9450
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby ynjh_jo » Wed Oct 29, 2008 9:17 am

pro-rsoft wrote:* Please get those "thread" and "threading" imports out! In the new 1.6 branch which enables threading by default, Panda will crash and burn in a horrible cloud of black smoke when using python's threading modules, so get them out.

how to check if threading is enabled ?

pro-rsoft wrote:You are using task._priority, although, interrogate doesn't support direct access to data members. Please use getPriority() instead. I had to change it before I was able to run it.

that's the new C++ task mgr, right ?
I haven't looked at it at all.
http://ynjh.tk
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 » Wed Oct 29, 2008 9:28 am

Am not sure. I found Thread.isThreadingSupported() (import it from PandaModules), but that returns False here too. I believe SIMPLE_THREADS is enabled though, and fear that you can't check that so easily. But I would really have no clue.
It's best to disable it anyways, since you'll run into race conditions when threading isn't enabled also.
rdb
 
Posts: 9450
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby drwr » Wed Oct 29, 2008 10:53 am

I've provided a safe replacement for Python's threading:
Code: Select all
from direct.stdpy import threading

instead of:
Code: Select all
import threading

will import a Panda-friendly threading module that also happens to have a similar interface to Python's. It's safe to use it in any of Panda's threading models. It is, of course, only present on the CVS trunk right now.

For the record, though, Threading.isTrueThreads() will return True if Panda has been compiled with true threading enabled, which is the only case in which it's safe to use ordinary Python threads. (But the new stdpy implementation is still a fine choice to use in this case as well.)

task._priority is intended to be a private data member, and is not meant to be accessed directly. The leading underscore is supposed to clue you in to that. :) In the new world, this will be accessible via task.getSort(), since I have boldly renamed what used to be called "priority" to what is now called "sort" in the future. (I needed to do this to make room for a new parameter called "priority" which is more akin to thread priority.)

Edit: if Thread.isThreadingSupported() is returning false on your SIMPLE_THREADS branch, something's wrong. That's supposed to return true in this case.

David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA

Postby rdb » Wed Oct 29, 2008 3:39 pm

Ah, that sounds really useful. We really ought to put that on the manual sooner or later.

I just checked my dtool_config.h and SIMPLE_THREADS is undefined. Sorry, I thought ppremake enabled it by default; so it was correct after all.
rdb
 
Posts: 9450
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby ynjh_jo » Wed Nov 12, 2008 12:26 pm

UPDATES :
[X] fixed EoL deletion redo bug
[X] fixed document's changed status upon indentation undo/redo
[X] added join lines ability
[X] now you can change files tabs order, drag it with LMB
[X] removed wx modal dialog usage, so I don't have to use multiple threads at all.
It's replaced by my own dialog & polygonal buttons module :
Image
Thus, it also minimizes the annoying window switch when going fullscreen on Windows.

Note : it's still using python only task[Mgr]
Last edited by ynjh_jo on Tue Oct 29, 2013 5:24 am, edited 2 times in total.
http://ynjh.tk
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 Nov 18, 2008 3:47 pm

UPDATES :
[X] fixed document's changed-after-saved status upon undo/redo
[X] improved "welcome screen" interface on Linux, so you can keep holding down ENTER/RETURN for 1 second to open the last edited files.
[X] improved "open recent files" interface :
_1_ added files removal
_2_ now uses report-view wx.ListCtrl, so you can multi-select its items easier than using wx.CheckListBox and you can sort it by name or location
[X] 1.6.0-messenger ready : fixed myFinder.crushInstance and myFinder.cleanup for not removing "_messengerId" attribute, so all unneeded events are correctly ignored.
http://ynjh.tk
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 Nov 23, 2008 10:22 am

CRITICAL UPDATES :
[X] this is embarassing, I didn't correctly fix document's changed status after saved. Now it's correct.
[X] improved exception handling : 1.6.0-Task[Orig/New] ready, but the rest of it is not ready.
[X] added sort order indicator image to "open recent files" list interface
http://ynjh.tk
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 Dec 09, 2008 2:14 am

UPDATES :
[X] fixed IDE mode restoration upon closing "new macro name setting window" by clicking window's 'X' button or ALT-F4.
[X] fixed screen capture upscale resolution
[X] fixed redo delete previous EoL
[X] fixed missing hyphen in "change to lower case" event name
[X] fixed another issue about document's changed status after saved, the history grouping must be cut to avoid after saved status "bleeding" across the saved "border".
[X] improved loading gauge and dialogs for better scale consistency across different window resolutions
[X] moved the framerate meter in IDE workspace to lower right corner
[X] adjusted framerate meter's and IDE's display regions sort order to the highest 2 maximum integer values
[X] any user-created display regions are removed on update by matching the camera
[X] base.a2d*'s children are also removed on update
[X] now you can explicitly cleanup your scene, not necessarily automatically paired with scene update
[X] now you can clear default cameras transforms, the default behavior on update is leaving its transform untouched
[X] added selection by mouse, works at character, word, and line modes. Word and line modes are triggered by double and triple clicks, respectively. Multiple clicks delay threshold is .3 second each. No column mode yet.
[X] added context menu for document's tab.
http://ynjh.tk
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

Mac build error

Postby fprimex » Thu Dec 11, 2008 6:26 pm

I'm trying this on a development version of 1.6.0 on the Mac, so I'm not sure if this even should work... I'm very interested in trying this out since it is similar to something I wanted to do. At any rate, I get two different errors:

[edit: I see now that the difference between the two errors is whether brokenClass.py is included in the list of files]
Code: Select all
$python IDE_STARTER.pyw
########################################'
STARTING.....
########################################
Warning: DirectNotify: category 'Interval' already exists
Warning: DirectNotify: category 'Messenger' already exists
############### YOUR FILES ###############
/Users/brent/code/panda3d-ide/testDynScene/dyn1.py
/Users/brent/code/panda3d-ide/testDynScene/jackClass.py
/Users/brent/code/panda3d-ide/testDynScene/pandaClass.py
/Users/brent/code/panda3d-ide/testDynScene/PauseResume.py
/Users/brent/code/panda3d-ide/testDynScene/smileyClass.py
##########################################
CWD :   /Users/brent/code/panda3d-ide/testDynScene
##########################################
DirectStart: Starting the game.
Known pipe types:
  osxGraphicsPipe
(all display modules loaded.)
:display(warning): FrameBufferProperties available less than requested.
:util(warning): Adjusting global clock's real time by 3.36406 seconds.
Couldn't create QTNewDataReferenceFromFullPathCFString().
OpenCV ERROR: Internal error (invalid Movie handle)
   in function icvClose_QT_Movie, cvcap_qt.cpp(259)
Terminating the application...


Then, if I run it again I get a different error:
Code: Select all
$python IDE_STARTER.pyw
########################################'
STARTING.....
########################################
Warning: DirectNotify: category 'Interval' already exists
Warning: DirectNotify: category 'Messenger' already exists
############### YOUR FILES ###############
/Users/brent/code/panda3d-ide/testDynScene/brokenClass.py
/Users/brent/code/panda3d-ide/testDynScene/dyn1.py
/Users/brent/code/panda3d-ide/testDynScene/jackClass.py
/Users/brent/code/panda3d-ide/testDynScene/pandaClass.py
/Users/brent/code/panda3d-ide/testDynScene/PauseResume.py
/Users/brent/code/panda3d-ide/testDynScene/smileyClass.py
##########################################
CWD :   /Users/brent/code/panda3d-ide/testDynScene
##########################################
Traceback (most recent call last):
  File "/Users/brent/code/panda3d-ide/OnscreenIDEdynamic/IDE.py", line 1004, in <module>
     renderFrame() # must be done to get the correct properties
  File "/Users/brent/code/panda3d-ide/OnscreenIDEdynamic/IDE.py", line 686, in renderFrame
     base.graphicsEngine.renderFrame()
NameError :  global name 'base' is not defined
fprimex
 
Posts: 10
Joined: Wed Jan 02, 2008 9:42 pm

Postby ynjh_jo » Thu Dec 11, 2008 8:59 pm

In the 2nd attempt, did you set dyn1.py as the main module ?
The IDE doesn't import DirectStart, it's the responsibility of one of the user's main modules, to let user's app run naturally.

About the 1st attempt, what is QT doing there ?
Did you edit the test files to import QT ?
http://ynjh.tk
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 fprimex » Thu Dec 11, 2008 11:51 pm

Yes, dyn1.py is set as the main module in each run.

QT isn't related to the QT GUI toolkit; it is referring to Quicktime components required to play the avi on this platform I guess. This must be a problem with the build I have. I commented out lines 167 to 191 in dyn1.py and now get much further, but I think the error is deeper in the library than the IDE code.

Code: Select all
$python IDE_STARTER.pyw
########################################'
STARTING.....
########################################
Warning: DirectNotify: category 'Interval' already exists
Warning: DirectNotify: category 'Messenger' already exists
############### YOUR FILES ###############
/Users/brent/code/panda3d-ide/testDynScene/dyn1.py
/Users/brent/code/panda3d-ide/testDynScene/jackClass.py
/Users/brent/code/panda3d-ide/testDynScene/pandaClass.py
/Users/brent/code/panda3d-ide/testDynScene/PauseResume.py
/Users/brent/code/panda3d-ide/testDynScene/smileyClass.py
##########################################
CWD :   /Users/brent/code/panda3d-ide/testDynScene
##########################################
DirectStart: Starting the game.
Known pipe types:
  osxGraphicsPipe
(all display modules loaded.)
:display(warning): FrameBufferProperties available less than requested.
:util(warning): Adjusting global clock's real time by 1.48053 seconds.
CC_TEMP CLEARED !!
TextNode  (0 geoms)
  with font Nimbus Sans L Regular
  alignment is A_left
  text color is 0 0 0 1
  transform is: T:m(pos 0.066 0 0.0158333 scale 0.0395833 1 0.0395833)
  in coordinate system default
  text is
:TaskManagerwarning: frame 1: task resetPrevTransform ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task dataLoop ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task doLaterProcessor ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task eventManager ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task asyncLoad ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task shakeMe ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-1-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-2-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-3-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-4-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-5-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-6-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-7-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-8-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-9-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-10-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-11-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task LerpFunctionInterval-12-play ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task unstoppable-moveLilsmi ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task move arrows ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task checkNotify ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task IDE_TASKS_handleWx ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task ivalLoop ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task collisionLoop ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task shadowCollisionLoop ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task igLoop ran for 0.04 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task audioLoop ran for 0.00 seconds, avg frame duration=0.00 seconds
:TaskManagerwarning: frame 1: task allowGarbageCollect ran for 0.00 seconds, avg frame duration=0.00 seconds
Assertion failed: do_has_ram_mipmap_image(n) at line 2802 of panda/src/gobj/texture.cxx
:ExceptionVarDump:info: printing traceback in case variable repr crashes the process...
Traceback (most recent call last):
  File "IDE.py", line 2237, in <module>
    IDE_toggleSceneActive()
  File "IDE.py", line 863, in IDE_toggleSceneActive
    IDE_pauseScene()
  File "IDE.py", line 918, in IDE_pauseScene
    shootScene()
  File "IDE.py", line 900, in shootScene
    cardTex.store(oimg)
AssertionError: do_has_ram_mipmap_image(n) at line 2802 of panda/src/gobj/texture.cxx

Traceback (most recent call last):
  File "/Users/brent/code/panda3d-ide/OnscreenIDEdynamic/IDE.py", line 2237, in <module>
     IDE_toggleSceneActive()
  File "/Users/brent/code/panda3d-ide/OnscreenIDEdynamic/IDE.py", line 863, in IDE_toggleSceneActive
     IDE_pauseScene()
  File "/Users/brent/code/panda3d-ide/OnscreenIDEdynamic/IDE.py", line 918, in IDE_pauseScene
     shootScene()
  File "/Users/brent/code/panda3d-ide/OnscreenIDEdynamic/IDE.py", line 900, in shootScene
     cardTex.store(oimg)
AssertionError :  do_has_ram_mipmap_image(n) at line 2802 of panda/src/gobj/texture.cxx
fprimex
 
Posts: 10
Joined: Wed Jan 02, 2008 9:42 pm

PreviousNext

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 0 guests