panda3d-editor

Ah, sorry, seems I was not reading carefully ^^
It’s that one mentioned above.

Ok, thank you! :wink:

Ciao!

I now did copy the file as described above but after the gui shows up error messages flood the command window for a while stating that some table is empty or something (can’t recall exactly & can’t reproduce at the moment)

Anyway I think I should try current CVS release…

jan

If you think about addint stuff to the editor, please keep in mind that it’s still in early dev. i am currently changing some basics in the modules. (like how the loading goes)

there are 2 ways of creating a object:

  • creating by the interface
  • loading from a file
    • the current problem that may arise is that: when loading a light, and applying it onto a special node, that is not yet loaded the loader will not work.

my concept is to create the whole node-structure, and after this has been created applying special settings on them. that means that for every nodepath that is in the scene, there will be another nodepath-dummy. but i think that is bearable.

  • onCreateInstance is called when creating a object by the interface
  • loadFromEggGroup is called when loading the object
  • init creates a dummy (not any real content)
  • loadFromData actually calls the creator (not init, see the next line) of the object when loading
  • for example setModel in NodePathWrapper actually loads the model (this function may vary depending on the type of object)

@jetiAlk3: Hmm, it should have been working after you copied that file. What are the exact error messages you’re getting?

I’m just compiling panda cvs on linux now. I have the better graphics board on the linux machine anyway.
I was just using win because I was creating models with OpenFX (my favorite open source modeller) and Milkshape3D

this are the last error lines from command window when running on win vista

"C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pSceneGraphT
ree.py", line 62, in reload
    self.onSelChange(renderId)
  File
"C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pSceneGraphT
ree.py", line 41, in onSelChange
    modelController.selectModel(self.GetItemPyData(item))
  File
"C:\streetboarding\editor\panda3d-editor-read-only\src\core\pModelControl
ler.py", line 236, in selectModel
    messenger.send( EVENT_MODELCONTROLLER_SELECT_MODEL, [model] )
  File "C:\Panda3D-1.5.4\direct\src\showbase\Messenger.py", line 240, in send
    method (*(extraArgs + sentArgs))
  File
"C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pPropertyGri
d.py", line 46, in viewForNodePath
    self.reset()
  File
"C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pPropertyGri
d.py", line 42, in reset
    self.DeleteRows(0, self.GetNumberRows())
  File
"C:\Panda3D-1.5.4\python\lib\site-packages\wx-2.8-msw-unicode\wx\grid.py"
, line 1224, in DeleteRows
    return _grid.Grid_DeleteRows(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "wxAssertFailure" failed at
..\..\src\g
eneric\grid.cpp(3601) in wxGridStringTable::DeleteRows(): Called
wxGridStringTab
le::DeleteRows(pos=0, N=0)
Pos value is invalid for present table with 0 rows

jan

This error isn’t related to Panda but to WxPython.
I’m not sure why it occurred (probably a bug in wxWidgets or wxPython) but I’ve just checked in a fix that should make sure this won’t happen.
I’ve checked in a new version of “wxgui/pPropertyGrid.py”, can you update that file and try again?

Hey,

I wasn’t able to build panda on linux … somehow was not able to build pandaode…

Anyway, on windows your recent fix solved the problem (I think).
Still durng runtime a lot of errors pop up:

Traceback (most recent call last):
  File "C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pSceneGraphT
ree.py", line 41, in onSelChange
    modelController.selectModel(self.GetItemPyData(item))
  File "C:\streetboarding\editor\panda3d-editor-read-only\src\core\pModelControl
ler.py", line 236, in selectModel
    messenger.send( EVENT_MODELCONTROLLER_SELECT_MODEL, [model] )
  File "C:\Panda3D-1.5.4\direct\src\showbase\Messenger.py", line 240, in send
    method (*(extraArgs + sentArgs))
  File "C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pSceneGraphT
ree.py", line 47, in selectNodePath
    self.SelectItem(treeItem)
RuntimeError: maximum recursion depth exceeded
Traceback (most recent call last):
  File "C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pEditorApp.p
y", line 267, in onChangeViewports
    self.view.close()
  File "C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pViewport.py
", line 231, in close
    self[s].close()
  File "C:\streetboarding\editor\panda3d-editor-read-only\src\wxgui\pViewport.py
", line 66, in close
    Window.close(self)
  File "C:\streetboarding\editor\panda3d-editor-read-only\src\core\pWindow.py",
line 121, in close
    base.closeWindow(self.win)
AttributeError: 'Viewport' object has no attribute 'win'
:display:windisplay(warning): SetForegroundWindow() failed!
:display:gsg:glgsg(warning): Buffers advertised as supported by OpenGL runtime,
but could not get pointers to extension functions.
:display:gsg:glgsg(warning): Occlusion queries advertised as supported by OpenGL
 runtime, but could not get pointers to extension functions.
:display:windisplay(warning): SetForegroundWindow() failed!
:display:gsg:glgsg(warning): Buffers advertised as supported by OpenGL runtime,
but could not get pointers to extension functions.
:display:gsg:glgsg(warning): Occlusion queries advertised as supported by OpenGL
 runtime, but could not get pointers to extension functions.
:TaskManagerwarning: task evtLoopTask ran for 3.37 seconds
:TaskManagerwarning: task igLoop ran for 5.44 seconds

Also loading some.egg fails. How do I agg models to the scene using the wxgui? I don’t see any controls…

Great work so far. The wxgui is more responsive for me than the direct one and seems to be usable on my laptop.

Also im a huge fan of old school 2x2 quatro viewport thing :slight_smile:

so keep up the good work.

EDIT:

"RuntimeError: maximum recursion depth exceeded "

pop ups all the time. especially when loading stuff. Seems to me as if python somehow limits the stack depths… This system has 1024 mb ram and python consumes ~80.

EDIT2:

I googled that python default stack depth is 1000 and can be set via
sys.setrecursionlimit(limit)
But I doubt that it’s proper behaviour of the code calling so many recursions

Hmm, well, both are really odd problems. As for the AttributeError: I don’t see how that possibly can occur, it would mean that when a viewport is created, its immediately closed but then it is still being initialized. Weird; can you please describe the exact steps to reproduce the problem?

As for the RuntimeError, same question: can you please describe how to reproduce it?

I’ll email you… I don’t want to put even more error logs into this thrad :slight_smile:

i dont really understand why the mouse handler does not work as intended at different fps’s, but it really seems to depend on that. i will check again and try to fix that (it affects both editors actually, but you will only see that error in the dgui editor atm)

edit: jetiAlk3, you may want to check out again, i have added a fix that works quite well from 10 to 340 fps.

Hey,
I updated but nothing changed. Still get the recursion depth error in wxgui and a not very responsive dgui. Plus loading things seems to be broken now.

:loader(error): Couldn't load file C:\streetboarding\editor\panda3d-editor-read-
only\examples\teapot.egg.pz: not found on model path (currently: "/c/streetboard
ing/editor/panda3d-editor-read-only/src/main.py/../../data;/c/streetboarding/edi
tor/panda3d-editor-read-only/src;/c/Panda3D-1.5.4/etc/..;/c/Panda3D-1.5.4/etc/..
/models;/c/streetboarding/editor/panda3d-editor-read-only/examples;/c/streetboar
ding/editor/panda3d-editor-read-only/examples;/c/streetboarding/editor/panda3d-e
ditor-read-only/examples;/c/streetboarding/editor/panda3d-editor-read-only/examp
les;/c/streetboarding/editor/panda3d-editor-read-only/examples;/c/streetboarding
/editor/panda3d-editor-read-only/examples")
W: NodePathWrapper.setModel: model None not found, loading dummy
I: TestObjectExtension.__init__
  - searching for object render/CodeNode-9
  - number of objects in scene 14
:grutil(error): Failed to load heightfield image C:\streetboarding\editor\panda3
d-editor-read-only\examples\terrain.png!
:grutil(error): No valid heightfield image has been set!
:grutil(error): Failed to load heightfield image C:\streetboarding\editor\panda3
d-editor-read-only\examples\terrain.png!
:grutil(error): No valid heightfield image has been set!
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)

I’m starting from root dir call python src/main.py
is that correct?

jan

a strange issue happening here, guess pro-rsoft could be interested:
in the effort to strip off the dgui part and to reduce to a simple wxgui app for study purposes I came into this main.py simplest form:

if __name__ == "__main__":
  USE_GUI = "wxgui"

  from wxgui.pConfig import Config
  Config.loadConfig()

  from core.pWindow import WindowManager
  WindowManager.startBase(showDefaultWindow = False, allowMultipleWindows = True)

  from core.pMain import EditorClass
  editor = EditorClass(render)
  editor.loadEggModelsFile("examples/save-1.egg")

  from wxgui.pEditorApp import EditorApp
  app = EditorApp(editor)

  #>>>try to strip off from here...
  # Now, get it running :)
  if USE_GUI == "dgui":
    import sys
    sys.exit
    editor.toggle(True)
  #>>>... to here
  run()

that is the former without the dgui branches. If I delete the marked part letting no code between the EditorApp instancing and the run() I get this error each time I run the application:

  python: conf.c:3166: snd_config_iterator_first: Assertion `node->type == SND_CONFIG_TYPE_COMPOUND' failed.
Aborted

looks like if you do not let some time to EditorApp to build up that broke up things. At least on my rig.

Hmm, that’s pretty weird. The code inside the marked part doesn’t execute at all, does it?
This assertion error seems related to sounds. Something else must be off with your sound settings / alsa / pulseaudio or whatever you use.
You could try a time.sleep(0.5) or so but I doubt it will work.
You can also turn off Panda’s sound by replacing “p3fmod_audio” with “null” in your Config.prc.

but if I do not strip off that part everything is fine - you could also change the code like that instead

app = EditorApp(editor) 
if True: pass
run() 

and all works fine as well but not if you have this situation:

app = EditorApp(editor) 
run() 

were the app break off. But this is just FYI - do not spend too much time on it 'cos actually, as I said, the code is working and since I’m still digging in it maybe later I can tell you more.

i am currently bugfixing under windows (there were several problems related to filepath’s in the code). it looks good atm (but it’s not yet checked in, need to check under linux again first).

for reference:
the editor must receive panda-style path’s even when under windows, so the gui has to take care that it’s delivering the correct notation (but the paths must not be panda3d type Filename)

edit: changes are now checked in, it works on my windows vista (hmm damn, just remembered that i only checked dgui). however i have seen some problems that were described above, which are now fixed.

about that sound thing, that is very curious because we dont really use sound yet. (the sound module is not implemented and we dont do anything with it yet)

in your shoes I won’t worry about too much if is just me experiencing these issues.

by the way I added on my main.py an option choice to switching more comfortably to the 3 gui options - just use this code

if __name__ == "__main__":
  from optparse import OptionParser
  parser = OptionParser()
  parser.add_option("-d", "--dgui",
    action="store_true", dest="usedgui", default=False,
    help="select a directGUI editor.")
  parser.add_option("-w", "--wxgui",
    action="store_true", dest="usewxgui", default=False,
    help="select a wxWindows GUI editor.")
  parser.add_option("-n", "--nogui",
    action="store_true", dest="usenogui", default=True,
    help="do not select a GUI editor (default action).")
  (options,args) = parser.parse_args()
  #
  if options.usewxgui:  USE_GUI = "wxgui"
  elif options.usedgui: USE_GUI = "dgui"
  else:                 USE_GUI = None

in place of this one

if __name__ == "__main__":
  # Whether to load dgui or wxgui.
  # use the directgui interface
  USE_GUI = "dgui"
  # use the wx-windows gui
  #USE_GUI = "wxgui"
  # just load the scene, dont start the editor
  #USE_GUI = None

starting from line 3 and you’ll may call the app using switches, as is in example

src/main.py -w

to launch it using the wxWindow gui and so on. You may type src/main.py -h to see all the available switches.

Sounds like a useful addition – I’ve updated main.py. Thanks for the suggestion!

revision: 161
os: Win XP
gui: wxWidgets

...

:display:windisplay(warning): SetForegroundWindow() failed!
Traceback (most recent call last):
  File "...\src\wxgui\pSceneGraphTree.py", line 41, in onSelChange
    modelController.selectModel(self.GetItemPyData(item))
  File "...\src\core\pModelController.py", line 236, in selectModel
    messenger.send( EVENT_MODELCONTROLLER_SELECT_MODEL, [model] )
  File "...\src\showbase\Messenger.py", line 178, in send
    if Messenger.notify.getDebug() and not self.quieting.get(event):
RuntimeError: maximum recursion depth exceeded
Traceback (most recent call last):
  File "...\src\wxgui\pSceneGraphTree.py", line 41, in onSelChange
    modelController.selectModel(self.GetItemPyData(item))
  File "...\src\core\pModelController.py", line 236, in selectModel
    messenger.send( EVENT_MODELCONTROLLER_SELECT_MODEL, [model] )
  File "...\src\showbase\Messenger.py", line 178, in send
    if Messenger.notify.getDebug() and not self.quieting.get(event):
RuntimeError: maximum recursion depth exceeded
Traceback (most recent call last):
  File "...\src\wxgui\pSceneGraphTree.py", line 40, in onSelChange
    item = item.GetItem()
RuntimeError: maximum recursion depth exceeded
Traceback (most recent call last):
  File "...\src\wxgui\pSceneGraphTree.py", line 40, in onSelChange
    item = item.GetItem()
RuntimeError: maximum recursion depth exceeded

Could you do a svn update and try again? I’ve committed something which should fix it, looking at your traceback.