1. 28 Oct, 2014 1 commit
  2. 23 Oct, 2014 1 commit
  3. 01 Aug, 2014 1 commit
  4. 22 Jul, 2014 1 commit
  5. 15 Jul, 2014 1 commit
    • Christian Schulte zu Berge's avatar
      Fixed GCC compatability of scripting module: · 92c3bdef
      Christian Schulte zu Berge authored
      * CMake build files now support unix builds
      * SWIG interface files and Lua wrappers are now fully C++ compliant to comfort GCC
      * Hacked shared/static builds of the campvis-modules module even more, but now it works on both MSVC and GCC
  6. 31 May, 2014 1 commit
    • Christian Schulte zu Berge's avatar
      Started implementation of a Lua console in campvis-application. · a33ee468
      Christian Schulte zu Berge authored
      With scripting enabled, the main window now has an additional scripting widget that allows to interact with a Lua VM. The current proof-of-concept implementation creates a Lua VM for every instantiated CAMPVis pipeline while the console just interacts with the first pipeline's one.
      However, the Lua VM concept has to be reiterated later anyway. It may make more sense to have just a single central Lua VM for the entire application, which is shared by each pipeline.
  7. 10 May, 2014 14 commits
    • 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
    • Artur Grunau's avatar
      Scripting: fixes related to building shared libs · 2e595fd0
      Artur Grunau authored
      Now that BUILD_SHARED_LIBS is a top-level CAMPVis option, we could take
      advantage of that and make the way we build Lua more robust. Also,
      campvis-scripting has been marked as static library to prevent the build
      from failing when BUILD_SHARED_LIBS is set.
      References #1
    • Artur Grunau's avatar
      Add support for automatic registration of Lua pipelines · c2348225
      Artur Grunau authored
      As there's currently only one Lua pipeline, we could so far get away
      with storing it in the `scripting` directory, giving it a generic name
      and registering it manually. However, this approach won't work anymore
      once additional Lua pipelines start to be implemented.
      To support multiple Lua pipelines, implement a registration mechanism
      for scripted pipelines based on PipelineFactory and similar to
      PipelineRegistrar. It scans each active module's `pipelines` directory
      for Lua pipelines, parses them and generates a registration header that,
      when included, registers them with PipelineFactory.
      As a result of the above, the test Lua pipeline had to be moved to
      `modules/preprocessing/pipelines/` and could be renamed
      References #1
    • Artur Grunau's avatar
      Use Lua helper classes to simplify LuaPipeline · 1d99f396
      Artur Grunau authored
      LuaPipeline used to create a Lua VM itself and interact with it
      directly. That caused its code to be unnecassarily bloated and complex as
      it dealt with rather low-level details.
      Delegate the management of Lua VM's state to the recently introduced
      LuaVmState class and use the new table helpers to simplify LuaPipeline.
      References #1
    • Artur Grunau's avatar
      Work around a bug in SWIG_ADD_MODULE · 59e4f6c7
      Artur Grunau authored
      There's a bug in SWIG_ADD_MODULE that breaks out-of-tree builds by not
      creating wrapper output directories:
      Manually create missing directories for the time being to fix the
      References #1
    • Artur Grunau's avatar
      Lua scripting: rearrange interface files · 382d1c52
      Artur Grunau authored
      All interface files used to live under `scripting/`. However, that
      separated them from the code they were binding and clustered them
      Make each interface file part of the CAMPVis component whose code it's
      binding. This fixes the issues mentioned above and makes it possible to
      build Lua modules conditionally, depending on what components of CAMPVis
      are enabled.
      References #1
    • Artur Grunau's avatar
      Clean up how CAMPVis' Lua modules are built · 2be90976
      Artur Grunau authored
      There were several problems with how CAMPVis' Lua modules were built:
      - modules were placed in the same directory as all other CAMPVis'
        libraries, which polluted Lua's module path and could lead to name
      - SWIG interface files included instead of importing one another; this
        resulted in duplicated bindings being generated
      To fix these probles place all of CAMPVis' Lua modules in one
      sub-directory and let the code know what that sub-directory is so that
      it can instruct Lua to search it. Moreover, use %import instead of
      %include when one SWIG interface file needs to have access to
      definitions from another one.
      References #1
    • Artur Grunau's avatar
      Make a sample Lua pipeline available to the app · 36d964b1
      Artur Grunau authored
      This commit marks the start of work on making Lua pipelines as easy to
      register and instantiate as regular ones. A sample Lua pipeline has been
      made available to the application so that problems with integrating Lua
      pipelines can be discovered and fixed.
      References #1
    • Artur Grunau's avatar
      Fix how the SWIG run-time header is generated · e117d555
      Artur Grunau authored
      The header with SWIG run-time functions was generated in the PRE_BUILD
      phase which is only fully supported by Visual Studio builds. Add an
      explicit dependency on swigluarun.h to the campvis-scripting target to
      make sure that the former exists before the latter is built.
      References #1
    • Artur Grunau's avatar
      Fix out-of-tree and Visual Studio builds · 8079c98c
      Artur Grunau authored
      Out-of-tree builds were broken due to Lua and Swig header files not
      being correcly included. The state of Visual Studio builds was even
      worse: they failed because Lua modules, scripts and libraries were
      The issues mentioned above have been fixed by making the build system
      properly deal with out-of-tree builds and multi-config generators.
      References #1
    • Artur Grunau's avatar
      Lua and C++ parts of a pipeline can now interact · 31df41df
      Artur Grunau authored
      Lua functions invoked by LuaPipeline had no access to the pipeline
      instance and, as a result, couldn't configure or modify it in any way.
      In order to make it possible to actually define pipelines in Lua, each
      script can now access the C++ pipeline object it's supposed to augment
      via a global variable named instance. This variable is injected into the
      script by LuaPipeline and can be used to call standard pipeline methods
      (e.g. addProcessor).
      The functionality described has been tested by implementing a pipeline
      constructor that creates and registers several processors.
      References #1
    • Artur Grunau's avatar
      Initial support for pipelines implemented in Lua · b3dba5f4
      Artur Grunau authored
      A new class, LuaPipeline, has been added to the scripting module. It
      provides a way of interfacing with pipelines implemented in Lua.
      For the time being only the most basic operations (i.e. init and deinit)
      are supported, but work on making it possible to implement
      fully-functional pipelines in Lua is underway.
      References #1
    • Artur Grunau's avatar
      Wrap several CAMPVis classes with SWIG · 4f6b4ba6
      Artur Grunau authored
      To test the feasibility of using SWIG to generate Lua bindings for
      CAMPVis several classes have been wrapped with SWIG interface files.
      If version 2.0.11 of SWIG is used to generate bindings, it must be
      patched to fix wrapper compilation errors:
      References #1
    • Artur Grunau's avatar
      CMake skeleton of the scripting feature · 82a6d86c
      Artur Grunau authored
      An option to enable CAMPVis scripting has been added to the top level
      CMakeLists.txt. Moreover, a minimal sub-project for the scripting
      feature has been created. There's also a new CMake macro, FindLua, that
      locates Lua's include and library files.