1. 15 Jul, 2014 1 commit
  2. 14 Jul, 2014 2 commits
  3. 10 Jul, 2014 1 commit
  4. 20 Jun, 2014 3 commits
  5. 19 Jun, 2014 1 commit
  6. 17 Jun, 2014 1 commit
  7. 16 Jun, 2014 1 commit
    • Christian Schulte zu Berge's avatar
      Two small updates: · 0f08b399
      Christian Schulte zu Berge authored
      * SliceExtractor FitToWindow property defaults to true to mimic old behavior per default
      * PointPredicateRenderArea renders y axis label
      0f08b399
  8. 14 Jun, 2014 1 commit
  9. 11 Jun, 2014 3 commits
  10. 10 Jun, 2014 4 commits
  11. 08 Jun, 2014 3 commits
  12. 04 Jun, 2014 2 commits
  13. 31 May, 2014 1 commit
  14. 30 May, 2014 1 commit
  15. 16 May, 2014 1 commit
    • Christian Schulte zu Berge's avatar
      Merge branch 'swig' into 'development' · 418c5e78
      Christian Schulte zu Berge authored
      Initial implementation of a Lua scripting layer
      
      Over the last several months a scripting layer that allows pipelines to be defined in Lua has been developed. It uses SWIG to generate Lua modules with bindings for CAMPVis classes. It is an opt-in feature, and tries to be as non-intrusive to standard CAMPVis code as possible.
      
      The implementation of the scripting layer has reached a state where it's possible to write fully-functional pipelines in Lua. In fact, 2 existing pipelines have been reimplemented in Lua for testing purposes and added to the project. In my opinion, this marks a good point to merge the initial implementation into the development branch — that would make it easier to test and improve it.
      
      Naturally, there are still many rough edges that should eventually be dealt with, but they can be addressed separately as new features:
      - bindings coverage is rather low
      - Lua pipelines currently need to be statically registered
      - pipeline definition syntax could be streamlined (e.g. by getting rid of the `instance` global variable)
      418c5e78
  16. 11 May, 2014 3 commits
    • Artur Grunau's avatar
      Update the Lua submodule to the newest version · 2a838d8f
      Artur Grunau authored
      The CMake-enabled version of Lua that CAMPVis' scripting layer uses
      hasn't been updated in a while. Synchronise it with upstream now that
      we're getting ready to merge the `swig` branch in.
      
      References #1
      2a838d8f
    • Artur Grunau's avatar
      Remove `scripting/testapp.cpp` · e5b278ec
      Artur Grunau authored
      `scripting/testapp.cpp` contains a simple console application that was
      used to test CAMPVis' scripting layer before it was ready for
      integration with the main GUI application. Now that Lua pipelines can be
      registered and executed the same way regular ones are, the test
      application is no longer needed. Consequently, this commit removes it
      from the project.
      
      References #1
      e5b278ec
    • Artur Grunau's avatar
      Improve documentation of LuaPipeline and related classes · dc76b535
      Artur Grunau authored
      Glue classes that live in the `scripting/glue` directory were mostly
      undocumented, and the documentation of LuaPipeline was incomplete.
      
      Improve the documentation of LuaPipeline and LuaVmState. Document
      LuaTable, RegularLuaTable and GlobalLuaTable from the `scripting/glue`
      directory.
      
      References #1
      dc76b535
  17. 10 May, 2014 11 commits
    • Artur Grunau's avatar
      Add a light source to Lua pipelines · 080b3ae3
      Artur Grunau authored
      Starting with commit d6fec679, pipelines need to provide their own light
      source to function properly. Lua pipelines didn't, which caused them to
      fail to render.
      
      Add a SWIG wrapper for LightSourceProvider to make it accessible from
      Lua. Instantiate and attach a light source in existing Lua pipelines.
      
      References #1
      080b3ae3
    • Artur Grunau's avatar
      Adapt bindings to the new invalidation level system · 16ee3af2
      Artur Grunau authored
      Commit 293d43dd introduced breaking changes to the way invalidation
      levels are handled. As a result, property and processor-related bindings
      failed to compile.
      
      Update all SWIG bindings affected by the above problem to make them
      compatible with the current property and processor-related APIs.
      
      References #1
      16ee3af2
    • Artur Grunau's avatar
      Hide superfluous targets provided by LuaDist · 0786655c
      Artur Grunau authored
      LuaDist, the CMake-enabled distribution of Lua that the scripting
      feature uses on Windows, provides several targets (lua, luac, wlua) for
      which there's not much use in CAMPVis. This commit hides them from the
      target list to make project files generated by CMake cleaner.
      
      References #1
      0786655c
    • Artur Grunau's avatar
      Better error message when Lua submodule is missing · 1aa809a1
      Artur Grunau authored
      If CAMPVIS_BUILD_LIB_LUA was set but the Lua Git submodule wasn't checked
      out, the user would get a generic "could not find CMakeLists.txt" error
      message which wasn't of much help.
      
      Log a custom error message that provides a hint how to fix the problem in
      the above situation.
      
      References #1
      1aa809a1
    • Artur Grunau's avatar
      FindLua: only set LUA_FOUND if CAMPVIS_BUILD_LIB_LUA is ON · 2a946aa2
      Artur Grunau authored
      The FindLua CMake script would previously set LUA_FOUND if the directory
      containing the source code of Lua existed without checking if it was
      actually part of the build. This could lead to compilation errors if
      CAMPVIS_BUILD_LIB_LUA was disabled.
      
      Add an additional check to FindLua to only set LUA_FOUND if
      CAMPVIS_BUILD_LIB_LUA is ON and the directory containing the source code
      of Lua exists.
      
      References #1
      2a946aa2
    • Artur Grunau's avatar
      Disable the scripting feature by default · 7d4857ae
      Artur Grunau authored
      Scripting was so far enabled by default on the `swig` branch to make its
      development easier. However, it should be an opt-in feature once it's
      merged in. As that time is quickly approaching, the scripting feature has
      been disabled by default.
      
      References #1
      7d4857ae
    • Artur Grunau's avatar
      Remove the `campvis-scripting-test` target · bdc4817c
      Artur Grunau authored
      Early in the development of the scripting feature the
      `campvis-scripting-test` target was used to test bindings generated by
      SWIG. Now that pipelines defined in Lua have been integrated into the
      main application (where the bindings they use can be tested much more
      thoroughly) the console test application is no longer needed and has
      been removed.
      
      References #1
      bdc4817c
    • Artur Grunau's avatar
      Add support for all signal arities to SWIG wrappers for siglot · 9ee1138f
      Artur Grunau authored
      SWIG wrappers for siglot only supported unary signals until now. This
      commit adds support for all remaining signal arities to make it possible
      to connect to arbitrary signals from Lua.
      
      The implementation makes heavy use of templates but, due to the
      limitations of VS 2010 (no variadic templates), still contains lots of
      duplicated boilerplate code.
      
      `sigslot.i` has been moved from `scripting/` to `ext/sigslot/` to keep
      it close to the code it's wrapping.
      
      References #1
      9ee1138f
    • Artur Grunau's avatar
      Add support for disconnecting slots defined in Lua · 2d4761ba
      Artur Grunau authored
      Up until now it wasn't possible to manually disconnect slots defined in
      Lua: they could only be disconnected automatically when their
      corresponding signals were destroyed.
      
      Add a special `disconnect` method to sigslot's Lua wrapper that makes it
      possible to manually disconnect slots defined in Lua.
      
      References #1
      2d4761ba
    • Artur Grunau's avatar
      Guard accesses to Lua state with a mutex · a337b188
      Artur Grunau authored
      Now that support for signals and slots has been added to Lua pipelines,
      each Lua state has to be protected with a mutex because it's not
      thread-safe and different threads (running LuaPipeline or a processor
      attached to it) may try to access it simultaneously.
      
      The mutex needs to be recursive due to the fact that Lua code can
      trigger the emission (or copying) of signals that have slots defined it
      Lua connected to them. This in turn causes the state to be accessed from
      a thread that, unbeknownst to it, already holds a lock on the mutex.
      
      A pointer to the mutex is stored in the state's registry; this way code
      that accesses Lua state directly (e.g. connections between sigslot's
      signals and slots defined in Lua) can retrieve and lock it when
      necessary.
      
      References #1
      a337b188
    • Artur Grunau's avatar
      Make Lua connections work with copyable signals · 8f1dd0c9
      Artur Grunau authored
      Until now, Lua connections had only stub implementations of several
      sigslot's API methods, including clone() and getdest(). This led to
      crashes when signals that contained Lua connections were copied.
      
      Provide proper (if somewhat forced) implementations of clone() and
      getdest() for Lua connections. This makes Lua connections work with
      signals that may be copied.
      
      References #1
      8f1dd0c9