Robert Osfield
900534f86e
Added writeFile support
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14381 16af8721-9629-0410-8352-f15c8da7e697
2014-07-23 14:50:42 +00:00
Robert Osfield
5130361d65
Added Node:getNumParents() and Node:getParent(index) support
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14380 16af8721-9629-0410-8352-f15c8da7e697
2014-07-23 10:49:27 +00:00
Robert Osfield
50e63ad3ee
Added readScript/writeScript methods to ReaderWriter
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14366 16af8721-9629-0410-8352-f15c8da7e697
2014-07-14 15:59:06 +00:00
Robert Osfield
5a7a20d01e
Renamed osgDB::PropertyInterface to osgDB::ClassInterface to better reflect it's functionality
...
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14365 16af8721-9629-0410-8352-f15c8da7e697
2014-07-14 14:09:08 +00:00
Robert Osfield
9b299dc4b9
Added ability to replace callback objects via lua scripts to allow one to override callbacks.
...
Added fallback for osgGA::Widget::Extents.
2014-03-07 11:09:25 +00:00
Robert Osfield
9319350176
Added support for osg::Image to the lua plugin.
2014-03-06 10:27:26 +00:00
Robert Osfield
076adcbd82
Implement add, set and get methods for StateSet.
2014-03-04 13:36:13 +00:00
Robert Osfield
de09adcaa9
Added MapReverseIterator implementation.
2014-02-27 10:02:55 +00:00
Robert Osfield
46381cb15c
Added MapIteratorObject and support for it in the lua plugin to provide map iterator functionality.
2014-02-26 18:18:08 +00:00
Robert Osfield
9394215d31
Added Map serializer size() method and support for it in the lua plugin. Renamed functions in lua plugin to be more consistent.
2014-02-26 11:01:35 +00:00
Robert Osfield
69e9f2c973
Added support for vector and map containers in osgDB::Serailizer's and lua plugin.
2014-02-26 08:26:51 +00:00
Robert Osfield
4ef5d9eb5f
Added Vector serialization and support in lua plugin top enable script users to set/get vector properties such as osg::Array, osg::PrimitiveSet and children lists.
2014-02-24 10:19:48 +00:00
Robert Osfield
6d68718fba
Fixed handling of enums in Lua plugin.
...
Fixed computation of getNumPrimitives() so that it returns 0 when PrimitiveSet is zero.
Added missing properties to PrimitiveSet serializers
2014-02-13 18:52:41 +00:00
Robert Osfield
743a6b049c
Added initial support for wrapping osg::Array in a way that can be used via scripting.
2014-02-12 18:03:53 +00:00
Robert Osfield
2797e8cb7c
Improved support for setting/getting properties via the osg::UserDataContainer.
2014-02-11 18:07:37 +00:00
Robert Osfield
e3a003a08f
Quitened down debug messages
2014-02-11 10:56:51 +00:00
Robert Osfield
a9f8af3fb6
Changed implementation of enums to use strings as lua type to make it easier to do comparisons and track values
2014-02-11 09:43:08 +00:00
Robert Osfield
31e98b51df
Added support for serailizing and scripting BoundingBox and BoundingSphere objects
2014-02-10 16:44:13 +00:00
Robert Osfield
3dcca431a9
Fixed handling of setting member variables via the Serializers when the value is the default.
...
Added support for more features of the osgDB::Widget class.
Fixed handling of boolean values in the Lua plugin
2014-02-08 17:53:51 +00:00
Robert Osfield
1319c2d281
Added support for enum's in the Lua script integration
2014-02-08 10:39:20 +00:00
Robert Osfield
8ad0ab1f6b
Fixed handling of returns when invoking a script, removed some debug messages, added a warning message when detecting erronous types.
...
Added FocusBehaviour enum to osgGA::Widget serialization
2014-02-07 16:06:57 +00:00
Robert Osfield
99eb81e743
Added support for casting objects to allow one to access a parent classes methods.
2014-02-06 11:25:37 +00:00
Robert Osfield
c599189d7d
Added lua-5.2.3 as source code so it can be optinally built as part of the lua plugin, making it possible to work out of the box across all platforms with needing lua as an external dependency.
...
Added the Cmake option OSG_USE_LOCAL_LUA_SOURCE to control whether to build and use the Lua source code in the lua plugin, or look for lua as an external dependency.
2014-02-04 16:49:13 +00:00
Robert Osfield
488e1692cc
From Stephan Huber, added support for compile source code of lua with the lua plugin
2014-02-04 11:24:01 +00:00
Robert Osfield
5f8e2bda2f
Added osg::CallbackObject to be used to extend C++ class from scripting languages by providing callback objects assigned to the osg::Object UserDataContainer, with the CallbackObject's Name used to map the "method" provided by the CallbackObject. The CallbackObject is implemented by the script engine to provide the neccessary glue to invoking the script with the appropriate input parameters and handling the output parameters.
...
To the Lua plugin added support for assigned lua functions to C++ osg::Objects via the new osg::CallbackObject mechanism. To invoke the scripts function from C++ one must get the CallbackObject and call run on it.
Renamed ScriptCallback to ScriptNodeCallback to avoid possibly confusion between osg::CallbackObject and the ScriptNodeCallback.
2014-01-31 16:20:29 +00:00
Robert Osfield
cc99a40b16
Added support for Switch::set/getValue()
2014-01-06 17:19:21 +00:00
Robert Osfield
fa7f25d75d
Removed the prototype MethodObject classes
2014-01-06 15:46:36 +00:00
Robert Osfield
6490f1b6a5
Moved osgDB::MethodObject from lua plugin into osgDB, added support for running methods via the osgDB::PropertyInterface class.
...
Updated lua plugin to use new osgDB::PropertyInterface to run methods.
Added addChild/removeChild() etc to Group.cpp, and addDrawable/removeDrawable() etc. to Geode.cpp serializers.
2014-01-06 15:45:46 +00:00
Robert Osfield
afab78ed40
Preliminary support for wrapping methods in the lua script plugin.
2013-12-25 17:36:32 +00:00
Robert Osfield
3e171414bd
From Michal Durkovic, "I’m building current trunk on Mac OS X 10.9 and have encountered this error during linking of osgdb_lua plugin:
...
Undefined symbols for architecture x86_64:
"lua::LuaScriptEngine::pushValue(osg::Quat const&) const", referenced from:
PushStackValueVisitor::apply(osg::Quat const&) in LuaScriptEngine.o
"lua::LuaScriptEngine::pushValue(osg::Plane const&) const", referenced from:
PushStackValueVisitor::apply(osg::Plane const&) in LuaScriptEngine.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Looks like LuaScriptEngine was missing implementation of those 2 member functions. Fixed src/osgPlugins/lua/LuaScriptEngine.cpp file in attachment.
"
2013-12-19 13:53:40 +00:00
Robert Osfield
234adf7daf
Cleaned up addChild/getChild/setChild/getNumChildren methods and added readNodeFile, readImageFile and readObjectFile functions
2013-10-24 09:06:52 +00:00
Robert Osfield
f548bc79d4
Added support for Group::addChild/setChild/getChild/getNumChildren.
2013-10-23 16:17:26 +00:00
Robert Osfield
9c53794bc7
Implemented preliminary readNode/readImage support in the lua plugin allow a lua script to create a scene graph as return it.
2013-10-09 15:32:56 +00:00
Robert Osfield
da2d7e2dde
Added support for automatically select Lua 5.2 is it's available, then falling back to checking for Lua 5.1 otherwise.
2013-10-04 20:42:23 +00:00
Robert Osfield
d260b16981
Moved code across to use lua_userdata to manage pointer to osg::Object that is ref()/unref()
2013-10-04 19:48:03 +00:00
Robert Osfield
79e2d1309f
Added support for Lua 5.2 and osg::Object creation from within Lua scripts.
2013-10-04 16:30:25 +00:00
Robert Osfield
8bc85764ff
Unified Vec/Plane/Quat handling code.
2013-09-27 18:43:35 +00:00
Robert Osfield
ff925f1d86
Added support for getting Vec* and Matrix objects from Lua stack and assigning them as OSG object properties.
2013-09-27 13:04:04 +00:00
Robert Osfield
43cb1b3a41
Initial cut of setting and getting osg::Object properties within Lua scripts
2013-09-26 17:27:49 +00:00
Robert Osfield
6d8f40d13a
Added support for passing parameters in and out of scripts.
...
Implemented support for osg::ValueObject in LuaScriptEngine.
2013-09-24 15:17:42 +00:00
Robert Osfield
bd7ec9c5f7
Added initial cut of basic scripting support, introducing an osg::Script object to wrap up the individual scripts, osg::ScriptCallback for assigning a Script as node callback and an osg::ScriptEngine base class that plugins implement to provided support for specific scripting languages.
...
Provided are lua, python and V8 (for javascript) plugins that just open up enough of a link to the respective libs to run a script, there is no scene graph <-> script communication in current implementation.
2013-08-09 16:51:06 +00:00