Mercurial > fife-parpg
comparison tools/editor/plugins/LayerTool.py @ 422:9d94f4676d17
Moved the management of cameras into the Map class. The View class no longer exists since it now serves no purpose. The engine class itself holds the renderers and these get passed to each map that is loaded and then passed to each camera on each map. This change makes it possible for multiple maps to be loaded at the same time with the same camera id without a name clash. fixes[t:342]
author | vtchill@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 12 Feb 2010 06:34:50 +0000 |
parents | 64738befdf3b |
children |
comparison
equal
deleted
inserted
replaced
421:293e812316c0 | 422:9d94f4676d17 |
---|---|
284 | 284 |
285 map = self._mapview.getMap() | 285 map = self._mapview.getMap() |
286 | 286 |
287 # FIFE will crash if we try to delete the layer which is in use by a camera | 287 # FIFE will crash if we try to delete the layer which is in use by a camera |
288 # so we will set the camera to another layer instead | 288 # so we will set the camera to another layer instead |
289 for cam in self._editor.getEngine().getView().getCameras(): | 289 for cam in map.getCameras: |
290 if cam.getLocationRef().getMap().getId() != map.getId(): | 290 if cam.getLocationRef().getMap().getId() != map.getId(): |
291 continue | 291 continue |
292 | 292 |
293 if cam.getLocation().getLayer().getId() != layer.getId(): | 293 if cam.getLocation().getLayer().getId() != layer.getId(): |
294 continue | 294 continue |