Hi, Allen Bierbaum wrote: > Carsten Neumann wrote: > >> Hi Allen, >> >> Allen Bierbaum wrote: >> >>> I had never thought of doing this before, but what if we made it so all >>> graph ops could be used a pseudo loaders? Could we make it so that >>> scene file handler could recognize an extension for each graph op and >>> then let the graph op take the next few arguments it needs from the >>> filename to use as parameters for the graph ops? >>> >>> So for example you could have file names like: >>> >>> tie.wrl.4.0-5.0-6.0.rotate >>> >>> tie.wrl.createSingleIndex.3.addTangentSpace >>> >>> As you can see from the first one, coming up with an argument separator >>> could be interesting, but once it is standardized I think this could >>> work fairly well. >>> >>> What does everyone else think? >>> >> hm, looks interesting, but the filenames do look ugly ;) >> You've been mentioning some python bindings, are yours opens source ? >> > > Yes, they have been open for a couple years now. They just haven't be > publicized much. You can see them here: > https://realityforge.vrsource.org/trac/pyopensg > > I need to fix a couple of pretty major bugs, but once that is done I > think they should be ready for production use. > > If > >> so an alternative would be to have a loader that reads python snippets >> and executes the statements in them, something like: >> >> scene = loadModel("myModel.foo") >> ApplyAddTangentSpaceGraphOp(scene) >> ApplyFancyGraphOp(scene, fancyFactor=0.9) >> >> So instead of creating funny named links to models you could write a >> snippet and load that from your app. It's just an idea, I haven't >> thought about what obstacles need to be overcome, though. >> > > This would require pyOpenSG though and wouldn't work with standard > OpenSG. If you have pyOpenSG installed it would be great to do > something like this though and we may be able to write an extension to > pyOpenSG that would allow something similar. > Python bindings for OpenSG are really cool :-) But I think executing GraphOps after reading a model/scene can be done easily, already in Version 1.6. You can create a GraphOpSeq by a string, listing all graph ops you want with their parameters, see method void GraphOpSeq::setGraphOps(const std::string params); and SceneFileHandler::read can receive a GraphOpSeq to apply after loading.
So no need for weird filenames, I think ;-) Christoph ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
