Mercurial > fife-parpg
comparison tools/editor/scripts/gui/cameradialog.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 | 85e8986e7b8f |
comparison
equal
deleted
inserted
replaced
421:293e812316c0 | 422:9d94f4676d17 |
---|---|
98 tilt = int(self._widget.collectData('tiltBox')) | 98 tilt = int(self._widget.collectData('tiltBox')) |
99 except ValueError: | 99 except ValueError: |
100 print 'Please enter positive integer values for rotation and tilt.' | 100 print 'Please enter positive integer values for rotation and tilt.' |
101 return | 101 return |
102 | 102 |
103 cam = self.engine.getView().addCamera(str(id), layer, viewport, fife.ExactModelCoordinate(0,0,0)) | 103 cam = map.addCamera(str(id), layer, viewport, fife.ExactModelCoordinate(0,0,0)) |
104 cam.setCellImageDimensions(refw, refh) | 104 cam.setCellImageDimensions(refw, refh) |
105 cam.setRotation(rot) | 105 cam.setRotation(rot) |
106 cam.setTilt(tilt) | 106 cam.setTilt(tilt) |
107 | 107 |
108 self._widget.hide() | 108 self._widget.hide() |