# HG changeset patch # User chewie@33b003aa-7bff-0310-803a-e67f0ece8222 # Date 1250010501 0 # Node ID af0b233e246f023da5c5a5f6a093199b65aea28a # Parent 22253b2c9b14714bb289331fad3604372e9fe551 - added a workaround for the rotation issue of groundtiles in rio de hola maps diff -r 22253b2c9b14 -r af0b233e246f clients/editor/plugins/ObjectEdit.py --- a/clients/editor/plugins/ObjectEdit.py Tue Aug 11 15:32:54 2009 +0000 +++ b/clients/editor/plugins/ObjectEdit.py Tue Aug 11 17:08:21 2009 +0000 @@ -312,8 +312,14 @@ }) if not self._animation: - index = self._avail_rotations.index( self._fixed_rotation ) - self._gui_rotation_dropdown._setSelected(index) + if self._fixed_rotation in self._avail_rotations: + index = self._avail_rotations.index( self._fixed_rotation ) + self._gui_rotation_dropdown._setSelected(index) + else: + print "Internal FIFE rotation: ", self._instances[0].getRotation() + print "Fixed rotation (cam rot) ", self._fixed_rotation + int(abs(self._camera.getRotation())) + print "Collected rots from object ", self._avail_rotations + self.container.adaptLayout() @@ -561,7 +567,7 @@ # print "Camera rotation: ", self._camera.getRotation() # print "Instance rotation: ", instance.getRotation() - self._fixed_rotation = int(instance.getRotation() + abs( self._camera.getTilt() ) ) +# self._fixed_rotation = int(instance.getRotation() + abs( self._camera.getRotation() ) ) self._fixed_rotation = instance.getRotation() # self._fixed_rotation = visual.getClosestMatchingAngle(self._fixed_rotation) @@ -597,6 +603,7 @@ if not self._animation: rotations = visual.getStaticImageAngles() for angle in rotations: +# angle += int(abs( self._camera.getRotation() )) self._avail_rotations.append(angle) self._image_default_x_offset = self._image.getXShift() @@ -639,7 +646,6 @@ self.highlight_selected_instance() self.get_instance_data() self.update_gui() - self.container.adaptLayout() self.container.show() else: self._reset()