mapmapteam / mapmap

Open source video mapping software
http://www.mapmap.info
GNU General Public License v3.0
424 stars 61 forks source link

Scripting #169

Open aalex opened 8 years ago

aalex commented 8 years ago

Would it be interested to integrate Lua or Python scripting into MapMap?

AO-StreetArt commented 8 years ago

Yes...I will do dirty nasty things.

Check out BlenderSync to see an example of what I did with Blender's python API.

aalex commented 8 years ago

Blender has an amazing simple system in which there is a global varible that contains a dictionnary (in C++, a map) of all the objects. So, we could have the same in MapMap.

For example: (in Python)

world["mapping"]["example_0"].position = (0.432, 0.123)

aalex commented 8 years ago

AO-StreetArt: you prefer Python? (disclaimer: I do too) Other options: JavaScript, R, Lua.

AO-StreetArt commented 8 years ago

Alex, I would very much prefer Python, as I am an active Python developer :)

On Wed, Jan 27, 2016 at 1:00 PM, Alexandre Quessy notifications@github.com wrote:

AO-StreetArt: you prefer Python? (disclaimer: I do too) Other options: JavaScript, R, Lua.

— Reply to this email directly or view it on GitHub https://github.com/mapmapteam/mapmap/issues/169#issuecomment-175773250.

aalex commented 8 years ago

I already did implement some Python scripting in a C++ system. It should not be too difficult.

blockspacer commented 4 years ago

cling based C++ as scripting language / hot code reload Why? Able to run C++ script in runtime or compile it for max speed ( as in example https://github.com/derofim/cling-cmake ) Also: May be used to improve modules compile time

HOT code reload possible approaches:

store app state fix cling undo for files https://root-forum.cern.ch/t/loading-unloading-class-as-interpreted-macro-in-cling-multiple-times/32976/2

execute cling code to change callbacks & variables nested cling::Interpreter with multiple cling::MetaProcessor IDK how to do it, but you can create child cling::Interpreter