Exemple #1
0
 def _paste_confirm(self):
     self.canvas.run_operation(lambda: paste_iter(
         self.canvas.world,
         self.canvas.dimension,
         self._paste_panel.structure,
         self._paste_panel.location,
         (1, 1, 1),
         self._paste_panel.rotation,
         self._paste_panel.copy_air,
     ))
Exemple #2
0
 def _paste_confirm(self, evt):
     fake_levels = self.canvas.renderer.fake_levels
     level_index: int = fake_levels.active_level_index
     if level_index is not None:
         render_level: RenderLevel = fake_levels.render_levels[level_index]
         self.canvas.run_operation(lambda: paste_iter(
             self.canvas.world,
             self.canvas.dimension,
             render_level.level,
             render_level.dimension,
             self._paste_panel.location,
             self._paste_panel.scale,
             self._paste_panel.rotation,
             self._paste_panel.copy_air,
             self._paste_panel.copy_water,
             self._paste_panel.copy_lava,
         ))
Exemple #3
0
 def _paste_operation(self):
     if all(self._scale.value):
         fake_levels = self.canvas.renderer.fake_levels
         level_index: int = fake_levels.active_level_index
         if level_index is not None:
             render_level: RenderLevel = fake_levels.render_levels[
                 level_index]
             yield from paste_iter(
                 self.canvas.world,
                 self.canvas.dimension,
                 render_level.level,
                 render_level.dimension,
                 self._location.value,
                 self._scale.value,
                 self._rotation.value,
                 self._copy_air.GetValue(),
                 self._copy_water.GetValue(),
                 self._copy_lava.GetValue(),
             )
     else:
         raise OperationSuccessful(
             lang.get("program_3d_edit.paste_tool.zero_scale_message"))