Yep. Another scene editor...

I am using Blender 2.6 + YABEE exporter. And as I remembder Blender also assign names to each shape created, so all nodes must be named in exported egg file.

If its a just visual presentation “feature” of “keep” tag, can it be solved in presentation layer of editor also? So, while processing tree for scene graph you can check for this special case - unnamed parent node with first child be named collision node - and just grab name from colnode and display it? No need to rename unnamed nodes, only display name changes; panda internals stays the same.

But if it affects more than just visual look of scene graph panel, then I am stuck since I dont understand what the problem with assets reimports etc., sorry.

Just committed a bunch of changes, mostly to clean up some atrocious code and fix a few bugs. I have added something which is fun to play with however: you can now run physics simulations inside the editor. Create a bullet world some rigid bodies and shapes, connect them up and hit the ‘P’ button on the modify toolbar to start the simulation. Yay physics!

I’ve just downloaded the latest code and tried to run it. The GUI opens and the Panda3D view also opens up. But the Log Pane shows this:

Using plugins path:  /home/n1nsun/down/panda3d-editor-master/src/userPlugins
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14665, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
  File "/home/n1nsun/down/panda3d-editor-master/src/pandaEditor/app.py", line 110, in FinishInit
    self.game.OnInit()
  File "/home/n1nsun/down/panda3d-editor-master/src/pandaEditor/game/base.py", line 16, in OnInit
    self.pluginMgr.Load()
  File "/home/n1nsun/down/panda3d-editor-master/src/pandaEditor/game/plugins/manager.py", line 50, in Load
    plugin = self.LoadPlugin( fileName )
  File "/home/n1nsun/down/panda3d-editor-master/src/pandaEditor/editor/plugins/manager.py", line 12, in LoadPlugin
    temp = __import__( fileName, globals(), locals(), ['editorPlugin'], -1 )
  File "/home/n1nsun/down/panda3d-editor-master/src/userPlugins/primitives/__init__.py", line 1, in <module>
    import gamePlugin
  File "/home/n1nsun/down/panda3d-editor-master/src/userPlugins/primitives/gamePlugin/__init__.py", line 2, in <module>
    from gamePlugin import GamePlugin
  File "/home/n1nsun/down/panda3d-editor-master/src/userPlugins/primitives/gamePlugin/gamePlugin.py", line 4, in <module>
    from sphere import Sphere
  File "/home/n1nsun/down/panda3d-editor-master/src/userPlugins/primitives/gamePlugin/sphere.py", line 6, in <module>
    from primitiveNPO import PrimitiveNPO
ImportError: No module named primitiveNPO

Importing an egg file also fails and gives errors, as does closing the window. (had to terminate it from outside)

Hi Nemesis,

Sorry about that - submitted something I shouldn’t have. Try it again now.

Ok, looking like that one is fixed.

When trying to start a new project, this is what i get:

Using plugins path:  /home/n1nsun/down/panda3d-editor-master/src/userPlugins
Traceback (most recent call last):
  File "/home/n1nsun/down/panda3d-editor-master/src/pandaEditor/ui/mainFrame.py", line 263, in OnFileNewProject
    self.SetProjectPath( dirPath )
  File "/home/n1nsun/down/panda3d-editor-master/src/pandaEditor/ui/mainFrame.py", line 554, in SetProjectPath
    self.app.project.Set( dirPath )
  File "/home/n1nsun/down/panda3d-editor-master/src/pandaEditor/project.py", line 124, in Set
    self.dirWatcher.setDirectory( self.path )
  File "/home/n1nsun/down/panda3d-editor-master/src/utils/directoryWatcher.py", line 49, in setDirectory
    self.before = self._recurse( self.dirPath )
  File "/home/n1nsun/down/panda3d-editor-master/src/utils/directoryWatcher.py", line 41, in _recurse
    for path, dirs, files in os.walk( dirPath, True )
  File "/home/n1nsun/down/panda3d-editor-master/src/utils/directoryWatcher.py", line 29, in setDict
    fDict[key] = os.path.getmtime( key )
  File "/usr/lib/python2.7/genericpath.py", line 54, in getmtime
    return os.stat(filename).st_mtime
OSError: [Errno 2] No such file or directory: '/home/n1nsun/down/panda3d-editor-master/src/proj2\\project.xml'

Looks like a hardcoded backslash.

Also the gizmos don’t turn off the view panning for me. Every time I click on an arrow or rotation circle the camera view changes along with the modified object. If there is some state checking, it seems to not work for me.

Should be fixed now. Thanks for pointing this out.

I’ll have a look into this. It might be a bit hard because I can’t get a repro on win7. Some of the state checking is a bit dodgy, I seem to remember - so maybe a clean up will fix the issue.

Are you able to use the editor if you switch to no gizmo (Q or cursor)?

EDIT: @Crolli - Just did a few tests with polyset keep descend. Using that flag does indeed cause the unnamed nodes to appear - the unnamed node is the geom node and the node with the original name becomes the collision node under it. There’s not much I can do unless we can detect a node tagged in this way using getTag() or getPythonTag().

However, I’ve just hacked together a plugin based on this code: [url]GeomNode vs CollisionPolygon] which would take a nodepath and convert it to a collision solid without having to use polyset keep descend. Doing it this way would give you better control over how the hierarchy ends up.

EDIT2: I’ve just tried the same trick with BulletTriangleMeshShape and it works quite well. It seems like this part of the pipeline closely resembles the existing Blender pipeline, ie you tag geometry in your editor and parse the model game-side and turn NodePaths into the nodes you need. Hopefully this should make it easier for those considering using the editor who are coming from the Blender pipeline.

Ok, I think wx python is installed correctly now. This is the error I have got.
Currently I have copied and pasted the two folders from the panda3d editor folder to the site packages folder as well. Is this the wrong place for them to be on the python path?

more information.
[evaluate main.py]
Traceback (most recent call last):
  File "F:\Wing IDE 101 4.1\src\debug\tserver\_sandbox.py", line 4, in <module>
    #print 'Exiting sandbox process'
  File "F:\panda3d-editor\panda3d-editor-master\src\pandaEditor\__init__.py", line 13, in <module>
    from project import Project
  File "F:\panda3d-editor\panda3d-editor-master\src\pandaEditor\project.py", line 8, in <module>
    from wx.lib.pubsub import Publisher as pub
ImportError: cannot import name Publisher

Ok, this stumps me. As far as I’m aware the publisher should come with wx as default.

A few suggestions:

  • What version of wx widgets are you using?
  • Can you run a simple script with “import wx”?
  • Do you get the same result when not running from wings?

I have successfully run one of the wxwidget .exe programs to show a simple gui. Presumably that uses the import function.

I’m using wx version 2.9.4 where in the pubsub folder it has the file pub.
Presumably it isn’t workable to have ‘import pub’ There is a point to that, that they haven’t altered Publisher to pub and it cannot import Publisher??
(I.e. the correct interpretation of the code isn’t actually to import the file ‘Publisher’ but refer to it as ‘pub’.
The simplest thing would be to know which version of wx are you using?

Anyway, I did try to alter the references and eventually got an error.

 File "F:\panda3d-editor\panda3d-editor-master\src\wxExtra\customTreeCtrl.py", line 13, in __init__
    self.SetFirstGradientColour( wx.Color(46, 46, 46) )
AttributeError: 'module' object has no attribute 'Color

Its not funny being this ignorant, I’m trying to learn pi3d for the raspberry pi as well, but Panda3d will be far more developed.

This is very odd. I’m using wx v2.8, but unless they have made major revisions I doubt they would have re / moved the wx.Color and publisher classes.

Can you try wx v2.8?

I will do. I tried installing Pandemonium yesterday (I’m not sure if you’ve had a chance to look through some of the features there.) That gave me any number of problems until I completely uninstalled things and reinstalled wx.
Including not using the packaged version of wx, but I’m quite sure it was all a messed up installation.

Anyway, that’s on Panda 1.7.1 and wx 2.8.

Really it would be useful to be able to control separate installations. But just getting things to run would be nice, but at least we’ll have a better idea of the incompatible versions, though it can still be a installation problem even with the correct versions.

I’ll let you know how I get on.

Thanks for this scene editor! Although I wasn’t able to start it yet, I took a look in the code - and I like the style, the way it is structered and the whole idea of having a small, stable base and everything else in plugins. Keep to this concept, it’s great! :smiley:

I opend an issue on github, thought that would be cleaner than post the traceback here…
https://github.com/Derfies/panda3d-editor/issues/1

It seems that it isn’t that simple to make it run on linux as it should be. I would be glad to help with this topic, but alas I have no experience with GUI programming at all. But I can test it and report any bugs I will run into. Or tell me, if there is anything I could inspect and analyse.

If I may ask for a favor: although the code it easy to read, it would be great to have more docstrings on classlevel, that tells me whats the purpose of this class is, and some in init.py. This way it would be very easy to understand the big picture.

And finally after uninstalling all traces of panda, python and wx, and installing the panda 1.8 and wx 2.8…

It runs… :laughing: Thanks for the patience and the replies.

That’s great news! Sounds like there were some conflicting versions / installations going on there, but I’m glad you’re able to test it out finally. :slight_smile:

Thanks Nomad, glad to hear you like what I’m working on. Thanks also for starting an issue DB - let’s keep adding to it in the future. I can’t test on Linux myself at the moment but I know there are some issues there. I will try to get a virtual box up and running so I can test it myself, but don’t be shy sending back issues or PMing me about stuff that seems dodgy.

Yes, I know I’ve been a bit slack with doc strings lately. I’ll try to make things a bit more verbose in places. :slight_smile:

I have yet to give this a try, but if there are features from this that you want integrated then let me know (providing their project is open source BSD license too).

Just commited a few more changes including a hello world example based off the one in the manual. Test is out and let me know what you think. :slight_smile:

sourceforge.net/projects/etc-sto … =directory
wiki.etc.cmu.edu/pandale/index.php/Main_Page

I’ll ask how useable the code is. It was supposed to be included in Panda.
The conversation mode and journal features appeal, but I’m wondering if I can develop something to write out in a different python wrapper, whilst using the features available in Panda for the gui and editor.
Are there any good resources for developing an engine, or is it all based on technical knowledge?

The hello world example is charming. It might be helpful to add the ‘alt plus mouse’ scroll commands in the instructions for manuovering. Are there any plans for adding textures to primitives? or be able to add a background image.

And a delete button… :smiley: It excellent work.

Works rather well imo.

Uploaded with ImageShack.us

Hey all,

Sorry for the lack of updates recently. Been back at work to try and iron out some of the problems, adding some new features and generally improving the architecture. Some stuff which has changed recently:

  • Translation gizmo now has snapping (hold X)
  • Optimised scene file format
  • Hotswapping of textures and models
  • Improved grid appearance
  • Helper meshes should now appear correctly (still getting a weird shader bug though…?)

If anyone can test out the latest that would be greatly appreciated. As always, if you have a suggestion then leave a post or PM me!

Hi kurohyou!

Glad to see you back :slight_smile: I didnt participate for about 2 monthes due to high restrictions on work :frowning:

So, just checked latest revision and posted an issue on github.
Also, small bug with pressing up/down arrow (I know it doesnt work this way, just pressed them accidentally ) in input fields gives:

Traceback (most recent call last):
  File "D:\0\panda3d-editor\src\wxExtra\propertyGrid.py", line 56, in OnChar
    char = chr( key )
ValueError: chr() arg not in range(256)

By the way - how about adding up/down support for changing values? Like UP do +1, DOWN do -1? And maybe 0.1 step for small range values like colors? Just an idea :slight_smile:

I dont know if sample projects must work, I got exception every time I try to open helloworld/panda obejct samples:

Traceback (most recent call last):
  File "D:\0\panda3d-editor\src\pandaEditor\ui\mainFrame.py", line 245, in OnFileOpen
    self.app.doc.Load()
  File "D:\0\panda3d-editor\src\pandaEditor\ui\document.py", line 22, in Load
    self.contents.Load( self.filePath )
  File "D:\0\panda3d-editor\src\pandaEditor\editor\scene.py", line 36, in Load
    base.game.scnParser.Load( self.rootNp, filePath )
  File "D:\0\panda3d-editor\src\pandaEditor\game\sceneParser.py", line 15, in Load
    self.LoadComponent( sRootElem, None )
  File "D:\0\panda3d-editor\src\pandaEditor\game\sceneParser.py", line 31, in LoadComponent
    wrprCls = base.game.nodeMgr.GetWrapperByName( elem.get( 'type' ) )
AttributeError: 'NoneType' object has no attribute 'get'

P.S. sorry, samples works, I forgot to do “Set project” first

Hi Crolli, great to see you’re back!

I’ve figured out what the problem is with primitives but it’s going to take me a while to get a fix in. Once I’ve cleared my schedule I can come back to this.

Also, I think I almost have a solution for embedded collision for your models without using polyset-keep-descend (and thus won’t break the scene format because of duplicate NodePath names). If this is more useful to you then please let me know and I’ll polish it up first.

That’s a relief, but I’ll put some checks in so the editor can tell the user what’s going on instead of raising an exception.

hey, just wanted to say keep up the good work.