Time to get Scene Editor working in 1.2.3

I’m brand new to Panda3d. As far as I can tell no one is currently working on getting the Scene Editor working in 1.2.3.

I sat down tonight and fixed a few things and now the GUI atleast starts and lets you load scenes and things. Having never used the editor before I’m not sure how buggy it was before, but it seems to be awfully buggy now, I think there are still another wave of inport style errors needing to be ironned out.

I created a patch that can be applied to the SceneEditor folder in the source for 1.0.5.

Get the Patch here

If anyone has a chance can you try some common features and report back to this thread about problems with them?

Has someone else already done this work? If so, can you clue the rest of us in?

thanks,

Jaren Peterson
Kaysville, Utah

I got up today and realized the SceneEditor is slightly different in CVS and actually has a few of the things I patched up already done. I created a new patch to patch up the CVS version which is probably a better direction to go anyway. So go ahead and get the SceneEditor code from cvs, its in the doc folder for some reason ( can anyone explain? ).
Here is the new patch.

Does anyone even think fixing the SceneEditor is worthwhile?
Is everyone using something else since the editor has been broken for so long?[/url]

I guess I just found out why the editor hasn’t been fixed in all this time. A full day without a single comment or word of encouragement. I guess this project is basically dead without the CMU students. I’ll wander back to Ogre3d and leave it to them in the fall.

Jaren

Hum, well, Panda3D has a somewhat smaller community than Ogre3D. In particular, there are only two people officially associated with Panda who frequent these forums: Josh, who represents CMU, and myself, from Disney. I haven’t heard from Josh for a while, so I assume he’s neck-deep in the turmoils of academia at the moment. That just leaves me, and I don’t know beans about the scene editor.

Of course, there are a number of people in the community who have repeatedly expressed interest in the scene editor, and any of them will surely be thrilled to hear that you have been cleaning it up. For myself, I think it’s great that you’re doing this!

But, like I said, it’s a small community; sometimes days go by with only a couple of posts. You have to give people a few days to check the forum.

David

The videos that show how the Scene Editor seem to be unavailable now, so I have no idea how useful it was before. My impression from what I’ve read here seems to be that it would be useful.

I’m all in support, as a simple “level editor” would save me hours of works required otherwise.

I’m curious, how far did you get? Which patch should I use? I guess the one for CVS version won’t work with release 1.2.3 right?

Ales

OK, here’s the update from my end.

I am, indeed, neck-deep in academia stuff. The school year is about to begin, this is a pretty crazy time of year.

The biggest reason that the scene editor wasn’t working was because the import statements were all broken. The problem is that Panda modules are exporting literally hundreds of unnecessary symbols. When combined with the use of “import *” in the scene editor, this triggers the importation of symbols that cause name conflicts. Of course, every time somebody changes panda a little, the name conflicts change, which means that the scene editor seems to break in every release.

The solution is to fix panda so that it isn’t exporting long lists of unnecessary symbols. David and I are, in fact, working on this right now.

Josh,

Would it be possible to reverse the solution and restrict the imports that the scene editor requests instead of changing the exports that the Panda modules dish out? I don’t know if that would be easier; regrettably, I haven’t had time to look at the codebase myself either (feels like everyone always gets much busier this time of year).

I agree that there are a hellacious number of symbols output by the “import *” directive, but I still have nightmares about having to change all of my “DirectObject” parent-identifiers to “DirectObject.DirectObject” :wink:

On the other hand, if you stopped fixing things that needed fixing in the interest of backwards compatability, nothing would ever get done… or you’d be writing a commercial operating system :smiley:

Take care,
Mark

I went through and every time a complaint was made about the imports. I simply figured out exactly what function needed to be imported rather than importing *.

If you apply my patch, linked to in the second post above, to the cvs version of the editor you should be able to atleast start using the editor. Since I’m new to panda I don’t really know what the editor can and should do. Maybe someone with an actual production scene should try it out and see if there are other imports that need to be fixed as well. Anyway, that should atleast get people up and running until someone has time to fix the Ogre module exports.

P.S. Speaking of the CVS version. Why was the source moved into the docs folder? Was this essentially to stop people from complaining that it was broken? Should it be moved back?

Jaren,

thanks for doing this. I have never had a chance to register to these forums, but I must really say that having the scene editor working again makes an enormous difference, especially for small teams of developers.

Link to working video downloads: panda3d.org/manual/index.php/Scene_Editor_Lectures

I tried using your patch, but when I try to start the editor I get a “wrong TCL version, need 8.3, have 8.4” error…

Thank you!

It’s not that the source was “moved” to the docs folder; it was accidentally created within that folder from the beginning, due to the way we had set up some of the cvs redirects in the CVSROOT folder. There are a couple of other source folders that are also accidentally within the docs folder.

Yeah, it should be moved. But it’s difficult to do this on a tree that is always in active development, because in order to move it, we’d have to submit a request to SourceForge and stop all development until that request is handled, and then re-update every developer’s local tree. On the other hand, it’s not really broken in that docs directory, since you can still check it out from the root of the tree; this mainly only affects people trying to find it via ViewCVS. So we haven’t gotten around to fixing it.

David

Copied the TCL folder inside Python installation over the tcl directory inside Panda, and now it seems to work, even though occasionally it raises the same error as before (?).

Thats strange, I’ve tried it on two different computers and not seen that error. What platform are you using? On both of the computers I tried I was running Linux, more specifically Ubuntu Dapper. So I imagine I’m using whatever version of python and TCL comes installed in Dapper, which I just verified is 8.4.

Does the error seem to happen when you try to do specific functions? Or is it random?

Hello Jaren!

I reinstalled TCL, again, and the error does not appear anymore - seems like that caused the issue. Like you, I have never used the editor before, so I do not know which of these functions have have not been working also in the past. These are the errors I am getting so far:

1 - particle effects: this error is returned when I enter the particle effects submenu:

Error: 2
TypeError Exception in Tk callback
  Function: <function <lambda> at 0x05EFA5F0> (type: <type 'function'>)
  Args: ()
Traceback (innermost last):
  File "C:\Panda3D-1.2.3\Pmw\Pmw_1_2\lib\PmwBase.py", line 1747, in __call__
    return apply(self.func, args)
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 340, in <lambda>
    button = Button(buttonFrame, image = element, command=lambda n=i : self.buttonPushed(n))
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 381, in buttonPushed
    self.openParticlePanel()
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 1208, in openParticlePanel
    self.particlePanel=seParticlePanel.ParticlePanel()
  File "C:\Panda3D-1.2.3\SceneEditor\seParticlePanel.py", line 51, in __init__
    pe.reparentTo(self.emitter)
TypeError: NodePath::reparent_to() argument 1 must be NodePath, not NoneType
  1. Import option, in the File menu - nothing happens, leaving aside the message “Please Import” in the python shell.
  2. These errors are returned into the shell, while the program is started and then executed:
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
  wglGraphicsPipe
(3 aux display modules not yet loaded.)
Warning: DirectNotify: category 'ForceGroup' already exists
Warning: DirectNotify: category 'Particles' already exists
Warning: DirectNotify: category 'ParticleEffect' already exists
:collide(warning): Using deprecated set_collide_geom().  Replace this with an ap
propriate call to set_from_collide_mask(), e.g. set_from_collide_mask(GeomNode::
get_default_collide_mask()).
C:\Panda3D-1.2.3\SceneEditor\seGrid.py:97: DeprecationWarning: integer argument
expected, got float
  for i in range(-numLines,numLines + 1):
----SideWindow is Initialized!!
:util(warning): Adjusting global clock's real time by -1.41197 seconds.
:loader(error): Couldn't load file sphere: not found on model path (which is cur
rently: ".;/c/Panda3D-1.2.3/etc/..;/c/Panda3D-1.2.3/etc/../models")
TypeError Exception in Tk callback
  Function: <function <lambda> at 0x05EFA5F0> (type: <type 'function'>)
  Args: ()
Traceback (innermost last):
  File "C:\Panda3D-1.2.3\Pmw\Pmw_1_2\lib\PmwBase.py", line 1747, in __call__
    return apply(self.func, args)
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 340, in <lambda>
    button = Button(buttonFrame, image = element, command=lambda n=i : self.butt
onPushed(n))
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 381, in buttonPushed
    self.openParticlePanel()
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 1208, in openParticle
Panel
    self.particlePanel=seParticlePanel.ParticlePanel()
  File "C:\Panda3D-1.2.3\SceneEditor\seParticlePanel.py", line 51, in __init__
    pe.reparentTo(self.emitter)
TypeError: NodePath::reparent_to() argument 1 must be NodePath, not NoneType

:loader(error): Couldn't load file sphere: not found on model path (which is cur
rently: ".;/c/Panda3D-1.2.3/etc/..;/c/Panda3D-1.2.3/etc/../models")
TypeError Exception in Tk callback
  Function: <function <lambda> at 0x05EFA5F0> (type: <type 'function'>)
  Args: ()
Traceback (innermost last):
  File "C:\Panda3D-1.2.3\Pmw\Pmw_1_2\lib\PmwBase.py", line 1747, in __call__
    return apply(self.func, args)
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 340, in <lambda>
    button = Button(buttonFrame, image = element, command=lambda n=i : self.butt
onPushed(n))
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 381, in buttonPushed
    self.openParticlePanel()
  File "C:\Panda3D-1.2.3\SceneEditor\sceneEditor.py", line 1208, in openParticle
Panel
    self.particlePanel=seParticlePanel.ParticlePanel()
  File "C:\Panda3D-1.2.3\SceneEditor\seParticlePanel.py", line 51, in __init__
    pe.reparentTo(self.emitter)
TypeError: NodePath::reparent_to() argument 1 must be NodePath, not NoneType

Thanks again for your efforts!

P.S. One question: what did you mean when you wrote:

You mean it is possible to use Ogre editor with Panda?

I’m sorry Harry, I meant to say Panda. I’ve been bouncing back and forth between panda and ogre and I said Ogre when I meant Panda. Thanks for the correction.

Hehe no problem Jaren - even though it seemed impossible, I hope it was actually doable in some way! I never used it, but I heard there are some nice level editor for Ogre and Irrlicht.

As far as #2 goes:

If you look at the code for the File->Import option you will see that it simply spits ou the message “God bless you Please Import” and then continues. This leads me to believe that the Import functionality was never implemented.

Right, just noticed it (I used ultra edit to look for text string in all sceneeditor’s files). I wonder what was it supposed to import in the first place?

First, we need to have a sphere.egg file to be used by the particle system; other errors must be caused by lack of some modules, but I found out that the STTexture error has been there for a long, long time (search in the forums).

Then, I found more errors - the scene editor is unable to open existing level files. When you import models, you are unable to select single nodes in the left window, for some reason.

I wonder which was the last version of Panda where the Scene Editor was actually working?

I ended up copying sphere.bam up one folder to where the scene editor was able to see it. (this is included in the panda models/misc folder)

After adding

from pandac.PandaModules import BaseParticleEmitter
from pandac.PandaModules import SpriteParticleRenderer
from pandac.PandaModules import SparkleParticleRenderer

to the top of seParticlePanel.py the panel comes up and you see a particle system around the sphere in the render window.

You still get the STTexture problem and there currently isn’t anything on the particle panel. Are there normally widgets on that panel? Is it blank just because of the STTexture error?

Good job!

From the look of the particlepanel file, seems like there are normally widgets on the panel… I tried to search STTexture info on google, but I had no luck!

Edit: confirmed… look at the particles tutorial in panda3d.etc.cmu.edu/wiki/index.p … r_Lectures