sammyogre
26-11-2007 15:36:58
Hi all,
Are there any OGRE editor for setting different properties of mesh and lighting?
(similar to irrEdit for irrlicht engine)
Thanks in advance
There is an unstable one for c++ ogre called goof. Search in the wiki for it.
sueds
07-12-2007 02:40:04
can we use c ++ tools for python ogre ?
nickyip
07-12-2007 05:09:54
can we use c ++ tools for python ogre ?
You can use all tools which can export .scene format (which is in XML). There is a dotscene loader in the demo folder.
sueds
09-12-2007 06:14:13
So I can use maya scene exporter, oscene or even lightwave scene exporter without trouble ?
Maybe you could use it as an editor ? Since the scene is created you just need to code the rest
bharling
14-12-2007 21:24:07
ethankennerly
02-02-2008 05:51:18
This week a programmer and I, both novices at Python-Ogre, had some woes with OgreWindowWX. We wanted to be able to access any already built Python-Ogre application, as a general purpose application editor.
I looked into it, and had been using a
"console" method through PyCrust. Then yesterday I began exploring what I'd already been using to prototype a barebones UI of my
MFA thesis in, PythonCard. It quickly proved itself to have great potential for general purpose editing.
Because the Python-Ogre application is not bound to the WX panel, it doesn't suffer the overhead of the WX loop, so the frame rate is much higher. Because PythonCard is data-driven and has many batteries included as command-line or one-line options (dialogs, shell, namespace browser), developing the editor UI appears to be light and flexible (from a designer/scripter's perspective).
-- Ethan
Runesinger
PythonCard seems pretty interesting(basically a wxPython wrapper right). But how do you use PythonCard and your Ogre application together? Do you run one ogre Window and one PythonCard application. Can you post some code snippets.
ethankennerly
02-03-2008 02:46:36
PythonCard seems pretty interesting(basically a wxPython wrapper right). But how do you use PythonCard and your Ogre application together? Do you run one ogre Window and one PythonCard application. Can you post some code snippets.
Right. The full code is too long for a post. Here's a minimal excerpt.
In the PythonCard resource file, suppose a button for "go" and text field for "application" name.
{'type':'Button',
'name':'go',
'position':(15, 15),
'label':'go',
},
{'type':'TextField',
'name':'ogreApp',
'position':(102, 15),
'size':(285, -1),
'text':'application',
},
In the PythonCard application file, suppose a background to run an Ogre application.
class ogre_background_class(model.Background):
'''PythonCard user interface for rbert prototype.
>>> application = model.Application( ogre_background_class )
>>> background = application.backgrounds[0]
'''
def on_initialize(self, event):
self.node = None
def on_go_mouseClick(self, event):
result = dialog.fileDialog()
if result.accepted:
file = result.paths[0]
app_module_text = basefilename( file )
# Often times, I want to script in the shell in the same namespace.
code_util.import_file( file, locals(), globals(),
this_namespace = True )
assert ogre
global app
app = eval( self.components.ogreApp.text )
assert app
app.go()
code_util is my utility module for importing a file, but that's not hard to figure out how to do and it's not relevant to Python-Ogre.
Furthermore, suppose a PythonCard shell and debug menu.
def main():
configuration.setOption('showShell',True)
configuration.setOption('showDebug',True)
# Precondition: Configuration options in configuration.configDict set.
pythoncard_app = model.Application(ogre_background_class)
pythoncard_app.MainLoop()
Now you have access to a shell that can access the full namespace, and a browser of that namespace as well.
My first test case was setting the ambient light of Ogre while running, by a standard color dialog. Here is code snippet for that, assuming you have the button defined in the resource file:
def dialog_getOgreColourValue( ogre ):
result = dialog.colorDialog()
if result.accepted:
# Convert PythonCard [0-255] color value to ogre [0.0-1.0] color.
r = float(result.color[0])/255.0
g = float(result.color[1])/255.0
b = float(result.color[2])/255.0
return ogre.ColourValue( r,g,b )
return None
The application gets a function for the resource button named "setAmbientLight":
def on_setAmbientLight_mouseClick(self, event):
global ogre
app.sceneManager.setAmbientLight( dialog_getOgreColourValue( ogre ) )
There you have it. PythonCard is the widget/tool interface that is decoupled from the Python-Ogre application. Within the shell you can program the Ogre applicatio on the fly, and if you find yourself using the same functions over and over, you can rapidly create their GUI widgets in PythonCard.
If anyone knows anything else along these lines or wants to collaborate on a Python-Ogre editor, let me know.
-- Ethan
Thank you. This very helpful indeed.
ethankennerly
08-06-2008 17:04:46
Nice work. I´ll investigate in it at the weekend.