diff --git a/Nasal/aircraft.nas b/Nasal/aircraft.nas index 59c31e4e3..e7a7ef36c 100644 --- a/Nasal/aircraft.nas +++ b/Nasal/aircraft.nas @@ -701,13 +701,14 @@ var canvas_livery = { # Class for Canvas based liveries # var canvas_livery_update = { - init: func(liveriesdir, interval = 10.01, callback = nil, resolution=4096) { + init: func(liveriesdir, module_id, interval = 10.01, callback = nil, resolution=4096) { var m = { parents: [canvas_livery_update, overlay_update.new()] }; m.parents[1].add(liveriesdir, "sim/model/livery/file", callback); m.parents[1].interval = interval; m.liveriesdir = liveriesdir; m.resolution = resolution; m.targets = {}; + m.module_id = module_id; return m; }, setResolution: func(resolution) { @@ -739,7 +740,7 @@ var canvas_livery_update = { # "anisotropy": 32.0 }); foreach (var object; objects) { - me.targets[name].canvas.addPlacement({"node": object}); + me.targets[name].canvas.addPlacement({"module-id": me.module_id, "type": "scenery-object", "node": object}); } me.targets[name].groups["base"] = me.targets[name].canvas.createGroup("base"); resStr = findTexByRes(me.liveriesdir, getprop(property), resolution);