Merge branch 'master' of https://github.com/mcedit/mcedit
This commit is contained in:
commit
ac79f0610d
@ -45,7 +45,7 @@ You should now be able to run MCEdit with `python mcedit.py` assuming you've ins
|
|||||||
Additional dependencies are required to package MCEdit. Regardless of which platform you're targetting, [esky](http://pypi.python.org/pypi/esky/) will be required.
|
Additional dependencies are required to package MCEdit. Regardless of which platform you're targetting, [esky](http://pypi.python.org/pypi/esky/) will be required.
|
||||||
|
|
||||||
#### OS X
|
#### OS X
|
||||||
*Note:* These instructions have only been testing on OS X Lion.
|
*Note:* These instructions have only been tested on OS X Lion.
|
||||||
|
|
||||||
You will run into errors attempting to use the system Python when packaging anything under OS X. The easiest way to install a new Python is by using [Homebrew](http://mxcl.github.com/homebrew/).
|
You will run into errors attempting to use the system Python when packaging anything under OS X. The easiest way to install a new Python is by using [Homebrew](http://mxcl.github.com/homebrew/).
|
||||||
|
|
||||||
|
@ -12,10 +12,11 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."""
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."""
|
||||||
|
|
||||||
from toolbasics import *
|
|
||||||
from mceutils import ChoiceButton
|
|
||||||
from editortools.clone import BlockCopyOperation
|
from editortools.clone import BlockCopyOperation
|
||||||
|
from mceutils import ChoiceButton
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
|
import tempfile
|
||||||
|
from toolbasics import *
|
||||||
|
|
||||||
BrushSettings = config.Settings("Brush")
|
BrushSettings = config.Settings("Brush")
|
||||||
BrushSettings.brushSizeL = BrushSettings("Brush Shape L", 3)
|
BrushSettings.brushSizeL = BrushSettings("Brush Shape L", 3)
|
||||||
|
@ -12,8 +12,10 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|||||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."""
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE."""
|
||||||
|
|
||||||
from toolbasics import *
|
from collections import defaultdict
|
||||||
from fill import FillTool, BlockFillOperation
|
from fill import FillTool, BlockFillOperation
|
||||||
|
import tempfile
|
||||||
|
from toolbasics import *
|
||||||
|
|
||||||
SelectSettings = config.Settings("Selection")
|
SelectSettings = config.Settings("Selection")
|
||||||
SelectSettings.showPreviousSelection = SelectSettings("Show Previous Selection", True)
|
SelectSettings.showPreviousSelection = SelectSettings("Show Previous Selection", True)
|
||||||
|
@ -23,8 +23,11 @@ imported from editortools/
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from collections import defaultdict
|
||||||
import gc
|
import gc
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
import itertools
|
||||||
|
import logging
|
||||||
from OpenGL.GL import *
|
from OpenGL.GL import *
|
||||||
# from OpenGL.GLUT import glutBitmapCharacter, GLUT_BITMAP_HELVETICA_18
|
# from OpenGL.GLUT import glutBitmapCharacter, GLUT_BITMAP_HELVETICA_18
|
||||||
import time
|
import time
|
||||||
@ -990,7 +993,7 @@ class CameraViewport(GLViewport):
|
|||||||
|
|
||||||
def mouse_down(self, evt):
|
def mouse_down(self, evt):
|
||||||
button = remapMouseButton(evt.button)
|
button = remapMouseButton(evt.button)
|
||||||
debug("Mouse down %d @ %s", button, evt.pos)
|
logging.debug("Mouse down %d @ %s", button, evt.pos)
|
||||||
|
|
||||||
if button == 1:
|
if button == 1:
|
||||||
self.leftClickDown(evt)
|
self.leftClickDown(evt)
|
||||||
@ -1005,7 +1008,7 @@ class CameraViewport(GLViewport):
|
|||||||
|
|
||||||
def mouse_up(self, evt):
|
def mouse_up(self, evt):
|
||||||
button = remapMouseButton(evt.button)
|
button = remapMouseButton(evt.button)
|
||||||
debug("Mouse up %d @ %s", button, evt.pos)
|
logging.debug("Mouse up %d @ %s", button, evt.pos)
|
||||||
if button == 1:
|
if button == 1:
|
||||||
self.leftClickUp(evt)
|
self.leftClickUp(evt)
|
||||||
elif button == 2:
|
elif button == 2:
|
||||||
@ -2183,24 +2186,24 @@ class LevelEditor(GLViewport):
|
|||||||
def activeevent(self, evt):
|
def activeevent(self, evt):
|
||||||
if evt.state & 0x4: # minimized
|
if evt.state & 0x4: # minimized
|
||||||
if evt.gain == 0:
|
if evt.gain == 0:
|
||||||
debug("Offscreen")
|
logging.debug("Offscreen")
|
||||||
self.onscreen = False
|
self.onscreen = False
|
||||||
|
|
||||||
self.mouseLookOff()
|
self.mouseLookOff()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
debug("Onscreen")
|
logging.debug("Onscreen")
|
||||||
self.onscreen = True
|
self.onscreen = True
|
||||||
self.invalidate()
|
self.invalidate()
|
||||||
|
|
||||||
if evt.state & 0x1: # mouse enter/leave
|
if evt.state & 0x1: # mouse enter/leave
|
||||||
if evt.gain == 0:
|
if evt.gain == 0:
|
||||||
debug("Mouse left")
|
logging.debug("Mouse left")
|
||||||
self.mouseEntered = False
|
self.mouseEntered = False
|
||||||
self.mouseLookOff()
|
self.mouseLookOff()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
debug("Mouse entered")
|
logging.debug("Mouse entered")
|
||||||
self.mouseEntered = True
|
self.mouseEntered = True
|
||||||
|
|
||||||
def swapDebugLevels(self):
|
def swapDebugLevels(self):
|
||||||
@ -2446,7 +2449,7 @@ class LevelEditor(GLViewport):
|
|||||||
if keyname == 'enter':
|
if keyname == 'enter':
|
||||||
keyname = 'return'
|
keyname = 'return'
|
||||||
|
|
||||||
debug("Key down: %s", keyname)
|
logging.debug("Key down: %s", keyname)
|
||||||
d = self.cameraInputs
|
d = self.cameraInputs
|
||||||
im = [0., 0., 0.]
|
im = [0., 0., 0.]
|
||||||
mods = evt.dict.get('mod', 0)
|
mods = evt.dict.get('mod', 0)
|
||||||
|
Reference in New Issue
Block a user