editortools package

Submodules

editortools.blockpicker module

class editortools.blockpicker.BlockPicker(blockInfo, materials, *a, **kw)[source]

Bases: albow.dialogs.Dialog

blockInfo
dispatch_key(name, evt)[source]
is_gl_container = True
selectTableRow(i, e)[source]
textEntered()[source]
editortools.blockpicker.anySubtype(self)[source]

editortools.blockview module

class editortools.blockview.BlockButton(materials, blockInfo=None, ref=None, recentBlocks=None, *a, **kw)[source]

Bases: albow.controls.ButtonBase, glbackground.Panel

action()[source]
blockInfo
createRecentBlockView()[source]
draw_all(s)[source]
labelText
recentBlockLimit = 7
recentBlockView = None
tooltipText
updateRecentBlockView()[source]
class editortools.blockview.BlockView(materials, blockInfo=None)[source]

Bases: albow.openglwidgets.GLOrtho

gl_draw()[source]
listBlockInfo = None
tooltipText

editortools.brush module

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class editortools.brush.BrushOperation(tool)[source]

Bases: editortools.operation.Operation

dirtyBox()[source]
perform(recordUndo=True)[source]
class editortools.brush.BrushPanel(tool)[source]

Bases: glbackground.Panel

brushModeChanged()[source]

Called on selecting a brushMode, sets it in BrushTool as well.

createField(key, value)[source]

Creates a field matching the input type. :param key, key to store the value in, also the name of the label if type is float or int. :param value, default value for the field.

createPresetRow()[source]

Creates the brush preset widget, called by BrushPanel when creating the panel.

static getBrushFileList()[source]

Returns a list of strings of all .preset files in the brushes directory.

openSavePresetDialog()[source]

Opens up a dialgo to input the name of the to save Preset.

presetSelected()[source]

Called ons selecting item on Load Preset, to check if remove preset is selected. Calls removePreset if true, loadPreset(name) otherwise.

removePreset()[source]

Brings up a panel to remove presets.

tool = None

presets, modeRow and styleRow are always created, no matter what brush is selected. styleRow can be disabled by putting disableStyleButton = True in the brush file.

class editortools.brush.BrushTool(*args)[source]

Bases: editortools.clone.CloneTool

H
L
W
brushModes = {}
cameraDistance
decreaseBrushSize()[source]

Increases Brush Size, triggered by pressing corresponding key.

decreaseToolReach()[source]

Called on scrolling down (default). Decreases the reticleOffset (distance between face and brush center) by 1. (unless you’re in right-click mode and don’t have long-distance mode enabled)

dragLineToPoint(point)[source]

Calculates the new point and adds it to self.draggedPositions. Called by mouseDown and mouseDrag

drawTerrainReticle()[source]

Draws the white reticle where the cursor is pointing. Called by leveleditor.render

drawToolReticle()[source]

Draws a yellow reticle at every position where you dragged the brush. Called by leveleditor.render

getBrushSize()[source]

Returns an array of the sizes of the brush. Called by methods that need the size of the brush like createBrushMask

getDirtyBox(point, tool)[source]

Returns a box around the Brush given point and size of the brush.

getReticlePoint(pos, direction)[source]

Calculates the position of the reticle. Called by drawTerrainReticle.

importBrushModes()[source]

Imports all Stock Brush Modes from their files. Called by setupBrushModes

importPaste()[source]

Hack for paste to import a level.

increaseBrushSize()[source]

Decreases Brush Size, triggered by pressing corresponding key.

increaseToolReach()[source]

Called on scrolling up (default). Increases the reticleOffset (distance between face and brush center) by 1. (unless you’re in right-click mode and don’t have long-distance mode enabled)

keyDown(evt)[source]

Triggered on pressing a key, sets the corresponding variable to True

keyUp(evt)[source]

Triggered on releasing a key, sets the corresponding variable to False

loadBrushPreset(name)[source]

Loads a brush preset name.preset :param name, name of the preset to load.

loadLevel(level)[source]
mouseDown(*args, **kw)
mouseDrag(*args, **kw)
mouseUp(*args, **kw)
offsetMax()[source]

Sets the Brush Offset (space between face the cursor is pointing at and center of brush. Called by toolSelected if updateBrushOffset is Checked in BrushOptions

optionBackup = None
options = {'Style': 'Round'}
previewDirty = False
recentBlocks = {}
resetToolDistance()[source]

Resets the distance of the brush in right-click mode, appropriate to the size of the brush.

resetToolReach()[source]

Resets reticleOffset or tooldistance in right-click mode.

reticleOffset
roll(blocksOnly=False)[source]

Rolls the brush. :keyword blocksOnly: Also roll the data value of the block we’re brushing with.

rotate(blocksOnly=False)[source]

Rotates the brush. :keyword blocksOnly: Also rotate the data value of the block we’re brushing with.

saveBrushPreset(name)[source]

Saves current brush presets in a file name.preset :param name, name of the file to store the preset in.

settings = {'brushAlpha': 1.0, 'updateBrushOffset': False, 'chooseBlockImmediately': False}
setupBrushModes()[source]

Makes a dictionary of all mode names and their corresponding module. If no name is found, it uses the name of the file. Creates dictionary entries for all inputs in import brush modules. Called by toolSelected

setupPreview(*args, **kw)
showPanel()[source]

Removes old panels. Makes new panel instance and add it to leveleditor.

statusText
swap()[source]
swapBrushStyles()[source]

Swaps the BrushStyleButton to the next Brush Style. Called by pressing BrushStyleButton in panel.

toolEnabled()[source]

Brush tool is always enabled on the toolbar. It does not need a selection.

toolIconName = 'brush'
toolReselected()[source]

Called on reselecting the brush. Makes a blockpicker show up for the Main Block of the brush mode.

toolSelected()[source]

Applies options of BrushToolOptions. It then imports all brush modes from their files, sets up the panel, and sets up the brush preview. Called on pressing “2” or pressing the brush button in the hotbar when brush is not selected.

tooltipText = 'Brush\nRight-click for options'
tryImport(name, dir)[source]

Imports a brush module. Called by importBrushModules :param name, name of the module to import.

worldTooltipText

Displays the corresponding tooltip if ALT is pressed. Called by leveleditor every tick.

class editortools.brush.BrushToolOptions(tool)[source]

Bases: editortools.tooloptions.ToolOptions

editortools.brush.createBrushMask(shape, style='Round', offset=(0, 0, 0), box=None, chance=100, hollow=False)[source]

Return a boolean array for a brush with the given shape and style. If ‘offset’ and ‘box’ are given, then the brush is offset into the world and only the part of the world contained in box is returned as an array. :param shape, UNKWOWN :keyword style, style of the brush. Round if not given. :keyword offset, UNKWOWN :keyword box, UNKWOWN :keyword chance, also known as Noise. Input in stock-brushes like Fill and Replace. :keyword hollow, input to calculate a hollow brush.

editortools.brush.createTileEntities(block, box, chunk)[source]

editortools.chunk module

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class editortools.chunk.ChunkTool(editor)[source]

Bases: editortools.editortool.EditorTool

cancel()[source]
createChunks(*args, **kw)
destroyChunks(*args, **kw)
dontRepopChunks(*args, **kw)
drawToolMarkers()[source]
keyDown(evt)[source]
keyUp(evt)[source]
mouseDown(*args)[source]
mouseUp(evt, *args)[source]
pruneChunks(*args, **kw)
relightChunks(*args, **kw)
repopChunks(*args, **kw)
selectedChunks()[source]
statusText
toolDeselected()[source]
toolEnabled()[source]
toolIconName = 'chunk'
toolSelected()[source]
tooltipText = 'Chunk Control'
worldTooltipText
class editortools.chunk.ChunkToolPanel(tool, *a, **kw)[source]

Bases: glbackground.Panel

chunkSizeText
updateText()[source]
editortools.chunk.GeneratorPanel()[source]

editortools.clone module

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class editortools.clone.BlockCopyOperation(editor, sourceLevel, sourceBox, destLevel, destPoint, copyAir, copyWater, copyBiomes, staticCommands, moveSpawnerPos, regenerateUUID)[source]

Bases: editortools.operation.Operation

static bufferSize()[source]
dirtyBox()[source]
name()[source]
perform(recordUndo=True)[source]
class editortools.clone.CloneOperation(editor, sourceLevel, sourceBox, originSourceBox, destLevel, destPoint, copyAir, copyWater, copyBiomes, staticCommands, moveSpawnerPos, regenerateUUID, repeatCount)[source]

Bases: editortools.operation.Operation

dirtyBox()[source]
perform(recordUndo=True)[source]
redo()[source]
selectOriginalAfterRepeat = True
undo()[source]
class editortools.clone.CloneTool(*args)[source]

Bases: editortools.editortool.EditorTool

alignDestPoint()[source]
cameraDistance
canRotateLevel
cancel()[source]
chunkAlign
cloneCameraDistance = 0
color = (0.3, 1.0, 0.3, 0.19)
confirm(*args, **kw)
copyAir
copyBiomes
copyWater
decreaseToolReach()[source]
discardPreviewer()[source]
draggingColor = (0.77, 1.0, 0.55, 0.05)
draggingFace = None
draggingOrigin()[source]
draggingStartPoint = None
draggingY = 0
drawRepeatedCube(box, color)[source]
drawTerrainReticle()[source]
drawToolMarkers()[source]
drawToolReticle()[source]
flip(*args, **kw)
static getBlockAt()[source]
getDestBox()[source]
getReticleBox()[source]
getReticleOrigin()[source]
increaseToolReach()[source]
keyDown(evt)[source]
keyUp(evt)[source]
level = None
mirror(*args, **kw)
mouseDown(*args, **kw)
mouseUp(*args, **kw)
moveSpawnerPos
nudge(nudge)[source]
offsetChanged()[source]
option1()[source]
option2()[source]
option3()[source]
option4()[source]
option5()[source]
panelClass

alias of CloneToolPanel

pickUp()[source]
placeImmediately
positionOnDraggingPlane()[source]
quickNudge(nudge)[source]
regenerateUUID
repeatCount = 1
rescaleLevel(*args, **kw)
resetToolReach()[source]
roll(*args, **kw)
rotate(*args, **kw)
rotatedSelectionSize()[source]
safeToolDistance()[source]
scaleFactor
selectionChanged()[source]
setupPreview(alpha=1.0)[source]
showPanel()[source]
sourceLevel()[source]
staticCommands
statusText
surfaceBuild = True
toolEnabled()[source]
toolIconName = 'clone'
toolReselected()[source]
toolSelected()[source]
tooltipText = 'Clone\nRight-click for options'
updateOffsets()[source]
updateSchematic(*args, **kw)
class editortools.clone.CloneToolOptions(tool)[source]

Bases: editortools.tooloptions.ToolOptions

class editortools.clone.CloneToolPanel(tool, editor, _parent=None)[source]

Bases: glbackground.Panel

transformEnable()[source]
useOffsetInput = True
class editortools.clone.ConstructionTool(*args)[source]

Bases: editortools.clone.CloneTool

createTestBoard(anyBlock=True)[source]
loadLevel(*args, **kw)
loadSchematic(filename)[source]

actually loads a schematic or a level

mouseDown(evt, pos, direction)[source]
originalLevelSize = (0, 0, 0)
panelClass

alias of ConstructionToolPanel

quickNudge(nudge)[source]
selectionBox()[source]
selectionChanged()[source]
selectionSize()[source]
showPanel()[source]
sourceLevel()[source]
statusText
surfaceBuild = True
toolEnabled()[source]
toolIconName = 'crane'
toolReselected()[source]
toolSelected()[source]
tooltipText = 'Import\nRight-click for options'
updateSchematic()[source]
class editortools.clone.ConstructionToolOptions(tool)[source]

Bases: editortools.tooloptions.ToolOptions

class editortools.clone.ConstructionToolPanel(tool, editor, _parent=None)[source]

Bases: editortools.clone.CloneToolPanel

useOffsetInput = False
class editortools.clone.CoordsInput(editor)[source]

Bases: albow.widget.Widget

coords
coordsChanged()[source]
getCoords()[source]
is_gl_container = True
nudge(nudge)[source]
setCoords(coords)[source]

editortools.editortool module

class editortools.editortool.EditorTool(editor)[source]

Bases: object

boxFaceUnderCursor(box)[source]
cameraDistance
cancel()[source]

cancel the current operation. called when a different tool is picked, escape is pressed, or etc etc

confirm()[source]

called when user presses enter

decreaseToolReach()[source]

Return True if the tool handles its own reach

drawTerrainMarkers()[source]
drawTerrainPreview(origin)[source]
drawTerrainReticle()[source]
drawToolMarkers()[source]

draw any markers the tool wants to leave in the field while another tool is out. e.g. the current selection for SelectionTool

drawToolReticle()[source]

get self.editor.blockFaceUnderCursor for pos and direction. pos is the coordinates of the block under the cursor, direction indicates which face is under it. draw something to let the user know where the tool is going to act. e.g. a transparent block for the block placing tool.

edge_factor = 0.1
findBestTrackingPlane(face)[source]
flip(amount=1, blocksOnly=False)[source]
hidePanel()[source]
hotkey
increaseToolReach()[source]

Return True if the tool handles its own reach

keyDown(evt)[source]
keyUp(evt)[source]
levelChanged()[source]

called after a level change

maxBlocks
mirror(amount=1, blocksOnly=False)[source]
mouseDown(evt, pos, direction)[source]

pos is the coordinates of the block under the cursor, direction indicates which face is under it. the tool performs its action on the specified block

mouseDrag(evt, pos, direction)[source]
mouseUp(evt, pos, direction)[source]
optionsPanel = None
panel = None
previewRenderer = None
resetToolReach()[source]

Return True if the tool handles its own reach

roll(amount=1, blocksOnly=False)[source]
rotate(amount=1, blocksOnly=False)[source]
selectionBox()[source]

selection corners, ordered, with the greater point moved up one block for use as the ending value of an array slice

selectionBoxForCorners(p1, p2)[source]

considers p1,p2 as the marked corners of a selection. returns a BoundingBox containing all the blocks within.

selectionChanged()[source]

called when the selection changes due to nudge. other tools can be active.

selectionCorners()[source]

returns the positions of the two selection corners as a pair of 3-tuples, each ordered x,y,z

selectionSize()[source]

returns a tuple containing the size of the selection (x,y,z)

showPanel()[source]
statusText
surfaceBuild = False
swap(amount=1)[source]
toolDeselected()[source]
toolEnabled()[source]
toolIconName = None
toolReselected()[source]
toolSelected()[source]
tooltipText = '???'
worldTooltipText = None

editortools.fill module

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class editortools.fill.BlockFillOperation(editor, destLevel, destBox, blockInfo, blocksToReplace, noData=False)[source]

Bases: editortools.operation.Operation

bufferSize()[source]
dirtyBox()[source]
name()[source]
perform(recordUndo=True)[source]
class editortools.fill.FillTool(*args, **kw)[source]

Bases: editortools.editortool.EditorTool

blockInfo
blockTexFunc(terrainTexture, tex)[source]
cancel()[source]
chooseBlockImmediately
chooseBlockImmediatelyReplace
color = (0.75, 1.0, 1.0, 0.7)
confirm(*args, **kw)
drawToolMarkers()[source]
drawToolReticle()[source]
flip(amount=1, blocksOnly=False)[source]
keyDown(evt)[source]
keyUp(evt)[source]
levelChanged()[source]
mirror(amount=1, blocksOnly=False)[source]
mouseDown(*args, **kw)
mouseUp(*args)[source]
noData = False
openReplace()[source]
replaceBlockInfo = <Block Air (0:0)>
replacing = False
roll(amount=1, blocksOnly=False)[source]
rotate(amount=1, blocksOnly=False)[source]
showPanel()[source]
statusText
swap(*args, **kw)
toggleReplacing()[source]
toolEnabled()[source]
toolIconName = 'fill'
toolReselected()[source]
toolSelected()[source]
tooltipText = 'Fill and Replace\nRight-click for options'
worldTooltipText
class editortools.fill.FillToolOptions(tool)[source]

Bases: editortools.tooloptions.ToolOptions

class editortools.fill.FillToolPanel(tool)[source]

Bases: glbackground.Panel

pickFillBlock()[source]
pickReplaceBlock()[source]
swapBlockTypes()[source]

editortools.filter module

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class editortools.filter.FilterModuleOptions(tool, module, *args, **kw)[source]

Bases: albow.widget.Widget

static confirm(tool)[source]
giveEditorObject(module)[source]
is_gl_container = True
makeTabPage(tool, inputs, trn=None, **kwargs)[source]
options
rebuildTabPage(inputs, **kwargs)[source]
class editortools.filter.FilterOperation(editor, level, box, filter, options)[source]

Bases: editortools.operation.Operation

dirtyBox()[source]
perform(recordUndo=True)[source]
class editortools.filter.FilterTool(editor)[source]

Bases: editortools.editortool.EditorTool

filterNames
hidePanel()[source]
static moduleDisplayName(module)[source]
reloadFilters()[source]
showPanel(*args, **kw)
statusText
toolEnabled()[source]
toolIconName = 'filter'
toolSelected()[source]
tooltipText = 'Filter'
class editortools.filter.FilterToolOptions(tool)[source]

Bases: editortools.tooloptions.ToolOptions

class editortools.filter.FilterToolPanel(tool)[source]

Bases: glbackground.Panel

BACKUP_FILTER_JSON = False

If set to true, the filter.json is backed up to the hard disk every time it’s edited. The default is false, which makes the file save only whenever the tool gets closed. If MCEdit were to crash, any recorded macros would not be saved.

bind_key(message=None)[source]
close()[source]
confirm(*args, **kw)[source]
delete_macro()[source]
filterChanged()[source]
filter_json
static load_filter_json()[source]
macroSelected
reload()[source]
start_record_macro()[source]
stop_record_macro()[source]
unbind_key()[source]
class editortools.filter.FilterUtils(**kwargs)[source]

Bases: object

Available_Attributes()[source]
class editortools.filter.JsonDictProperty(filename, **kwargs)[source]

Bases: dict

class editortools.filter.MacroModuleOptions(macro_data, *args, **kw)[source]

Bases: albow.widget.Widget

confirm(*args, **kw)[source]
is_gl_container = True
options
run()[source]
class editortools.filter.MacroOperation(editor, level, box, filters, options)[source]

Bases: editortools.operation.Operation

dirtyBox()[source]
perform(recordUndo=True)[source]
class editortools.filter.SingleFileChooser(file_types=None, operation=0, **kwds)[source]

Bases: albow.widget.Widget

OPEN_FILE = 0
SAVE_FILE = 1
editortools.filter.addNumField(page, optionName, oName, val, min_value=None, max_value=None, increment=0.1)[source]
editortools.filter.alertFilterException(func)[source]
editortools.filter.tryImport(_root, name, org_lang, stock=False, subFolderString='', unicode_name=False, notify=True)
editortools.filter.tryImport_new(_root, name, org_lang, stock=False, subFolderString='', unicode_name=False, notify=True)[source]
editortools.filter.tryImport_old(_root, name, org_lang, stock=False, subFolderString='', unicode_name=False, notify=True)[source]

editortools.nbtexplorer module

class editortools.nbtexplorer.NBTExplorerOperation(toolPanel)[source]

Bases: editortools.operation.Operation

extractUndo()[source]
perform(recordUndo=True)[source]
redo()[source]
undo()[source]
update_tool()[source]
class editortools.nbtexplorer.NBTExplorerOptions(tool)[source]

Bases: editortools.tooloptions.ToolOptions

defaultBulletImagesBox_click(e)[source]
dismiss(*args, **kwargs)[source]
open_bullet_file()[source]
useStyleBox_click(e)[source]
class editortools.nbtexplorer.NBTExplorerTool(editor)[source]

Bases: editortools.editortool.EditorTool

...

alreadyHidden
keyDown(*args, **kwargs)[source]
loadFile(fName=None)[source]
saveFile(fName, data, savePolicy)[source]
showPanel(fName=None, nbtObject=None, savePolicy=0, dataKeyName='Data')[source]

...

toolReselected()[source]
toolSelected()[source]
tooltipText = 'NBT Explorer\nDive into level NBT structure.\nRight-click for options'
class editortools.nbtexplorer.NBTExplorerToolPanel(editor, nbtObject=None, fileName=None, savePolicy=0, dataKeyName='Data', close_text='Close', load_text='Open', **kwargs)[source]

Bases: glbackground.Panel

...

static build_attributes(items)[source]
static build_field(itm)[source]
build_inventory(items)[source]
build_motion(items)[source]
static build_pos(items)[source]
static build_rotation(items)[source]
close()[source]
dispatch_key(event_name, e)[source]
init_data()[source]
key_down(e)[source]
reset()[source]
save_NBT()[source]
setCompounds()[source]
set_update_ui(v)[source]
update_side_panel(item)[source]
class editortools.nbtexplorer.NBTTree(*args, **kwargs)[source]

Bases: albow.tree.Tree

add_child(types_item=None)[source]
add_item(types_item=None)[source]
static add_item_to_TAG_Compound(parent, name, item)[source]
add_item_to_TAG_List(parent, name, item)[source]
click_item(*args, **kwargs)[source]
delete_item()[source]
draw_TAG_bullet(surf, bg, fg, shape, text, item_text, lvl)[source]
static draw_circle(surf, bg, r)[source]
static draw_image(surf, bg, r)[source]
static draw_square(surf, bg, r)[source]
parse_TAG_List(name, data)[source]
rename_item()[source]
update_draw_bullets_methods(styles)[source]
class editortools.nbtexplorer.SlotEditor(inventory, data, *args, **kwargs)[source]

Bases: albow.dialogs.Dialog

cancel(*args, **kwargs)[source]
dismiss(*args, **kwargs)[source]
dispatch_key(name, evt)[source]
ok(*args, **kwargs)[source]
select_tablerow(i, e)[source]
text_entered()[source]
class editortools.nbtexplorer.TAG_List_Type(value=None)[source]

Bases: albow.widget.Widget

choices = ['Short', 'String', 'Integral', u'Floating point (TAG_Float)', 'Byte Array', 'List', u'Floating point (TAG_Double)', 'Int Array', 'Long', 'Compound', 'Byte', 'Short Array']
value
editortools.nbtexplorer.change_styles()[source]
editortools.nbtexplorer.create_TAG_Byte(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_Byte_Array(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_Compound(self, i_type, i_name, i_value)[source]
editortools.nbtexplorer.create_TAG_Double(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_Float(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_Int(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_Int_Array(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_List(self, i_type, i_name, i_value)[source]
editortools.nbtexplorer.create_TAG_Long(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_Short(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_Short_Array(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_TAG_String(self, i_type, i_name, i_value)
editortools.nbtexplorer.create_array_item(self, i_type, i_name, i_value)[source]
editortools.nbtexplorer.create_base_item(self, i_type, i_name, i_value)[source]
editortools.nbtexplorer.get_bullet_image(index, w=16, h=16)[source]
editortools.nbtexplorer.loadFile(fName)[source]
editortools.nbtexplorer.saveFile(fName, data, savePolicy)[source]

editortools.nudgebutton module

class editortools.nudgebutton.NudgeButton(editor)[source]

Bases: glbackground.GLBackground

A button that captures movement keys while pressed and sends them to a listener as nudge events. Poorly planned.

is_gl_container = True
key_down(evt)[source]
key_up(evt)[source]
mouse_down(event)[source]
mouse_up(event)[source]

editortools.operation module

class editortools.operation.Operation(editor, level)[source]

Bases: object

changedLevel = True
dirtyBox()[source]

The region modified by the operation. Return None to indicate no blocks were changed.

extractUndo(level, box)[source]
extractUndoChunks(level, chunks, chunkCount=None)[source]
static extractUndoSchematic(level, box)[source]
perform(recordUndo=True)[source]

Perform the operation. Record undo information if recordUndo

redo()[source]
redoLevel = None
undo()[source]

Undo the operation. Ought to leave the Operation in a state where it can be performed again. Default implementation copies all chunks in undoLevel back into level. Non-chunk-based operations should override this.

undoLevel = None
editortools.operation.mkundotemp()[source]

editortools.player module

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class editortools.player.PlayerAddOperation(tool)[source]

Bases: editortools.operation.Operation

newPlayer()[source]
perform(recordUndo=True)[source]
playerTag = None
redo()[source]
undo()[source]
class editortools.player.PlayerMoveOperation(tool, pos, player='Player', yp=(None, None))[source]

Bases: editortools.operation.Operation

static bufferSize()[source]
perform(recordUndo=True)[source]
redo()[source]
redoPos = None
undo()[source]
undoPos = None
class editortools.player.PlayerPositionPanel(tool)[source]

Bases: glbackground.Panel

dispatch_key(name, evt)[source]
editNBTData()[source]
key_down(evt)[source]
selectedPlayer
class editortools.player.PlayerPositionTool(*args)[source]

Bases: editortools.editortool.EditorTool

addPlayer(*args, **kw)
delete_skin(uuid)[source]
drawCharacterHead(x, y, z, realCoords=None, dim=0)[source]
drawToolMarkers()[source]
drawToolReticle()[source]
gotoPlayer()[source]
gotoPlayerCamera()[source]
hidePanel()[source]
keyDown(evt)[source]
keyUp(evt)[source]
levelChanged()[source]
markerLevel = None
mouseDown(*args, **kw)
movePlayer(*args, **kw)
movePlayerToCamera(*args, **kw)
movingPlayer = None
panel = None
recordMove = True
reloadSkins(*args, **kw)
reloadTextures()[source]
removePlayer(*args, **kw)
showPanel()[source]
surfaceBuild = True
toolIconName = 'player'
toolReselected(*args, **kw)
toolSelected(*args, **kw)
tooltipText = 'Players'
class editortools.player.PlayerRemoveOperation(tool, player='Player (Single Player)')[source]

Bases: editortools.operation.Operation

perform(recordUndo=True)[source]
redo()[source]
undo()[source]
undoTag = None
class editortools.player.PlayerSpawnMoveOperation(tool, pos)[source]

Bases: editortools.operation.Operation

perform(recordUndo=True)[source]
redo()[source]
redoPos = None
undo()[source]
undoPos = None
class editortools.player.PlayerSpawnPositionOptions(tool)[source]

Bases: editortools.tooloptions.ToolOptions

class editortools.player.PlayerSpawnPositionTool(*args)[source]

Bases: editortools.player.PlayerPositionTool

drawCage(x, y, z)[source]
drawToolReticle()[source]
gotoSpawn()[source]
mouseDown(*args, **kw)
showPanel()[source]
spawnProtection
statusText
surfaceBuild = True
toolEnabled()[source]
toolIconName = 'playerspawn'
toolReselected(*args, **kw)
tooltipText = 'Move Spawn Point\nRight-click for options'
exception editortools.player.SpawnPositionInvalid[source]

Bases: exceptions.Exception

editortools.player.okayAboveSpawn(level, pos)[source]

3 blocks above spawn must be open

editortools.player.okayAt63(level, pos)[source]

blocks 63 or 64 must be occupied

editortools.player.positionValid(level, pos)[source]

editortools.select module

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class editortools.select.CBCommandsOptionsPanel[source]

Bases: editortools.tooloptions.ToolOptions

changeSorting()[source]
editortools.select.GetSelectionColor(colorWord=None)[source]
class editortools.select.NudgeBlocksOperation(editor, level, sourceBox, direction)[source]

Bases: editortools.operation.Operation

dirtyBox()[source]
perform(recordUndo=True)[source]
redo()[source]
undo()[source]
class editortools.select.NudgeSelectionOperation(selectionTool, direction)[source]

Bases: editortools.operation.Operation

changedLevel = False
oldSelection = None
perform(recordUndo=True)[source]
redo()[source]
undo()[source]
class editortools.select.SelectionOperation(selectionTool, points)[source]

Bases: editortools.operation.Operation

changedLevel = False
perform(recordUndo=True)[source]
redo()[source]
undo()[source]
class editortools.select.SelectionTool(editor)[source]

Bases: editortools.editortool.EditorTool

CBCommandsOptions()[source]
alpha = 0.25
analyzeSelection(*args, **kw)
bottomLeftColor = (0.0, 0.0, 1.0)
bottomLeftPoint = None
bottomLeftSelectionColor = (0.75, 0.62, 1.0)
cancel()[source]
chunkMode
clampPos(pos)[source]
clickSelectionInProgress = False
color = (0.7, 0.0, 0.7)
copySelection(*args, **kw)
currentCorner
currentCornerName
cutSelection(*args, **kw)
deleteBlocks(*args, **kw)
deleteEntities(*args, **kw)
deleteTileTicks(*args, **kw)
describeBlockAt(pos)[source]
deselect()[source]
dragResizeDimension = None
dragResizeFace = None
dragResizePoint()[source]
dragResizePosition = None
dragStartPoint = None
draggingSelectionBox()[source]
drawToolMarkers()[source]
drawToolReticle()[source]
endSelection()[source]
exportSelection(*args, **kw)
getSelectionPoint(pointNumber)[source]
getSelectionPoints()[source]
hideNudgePanel()[source]
hidePanel()[source]
keyDown(evt)[source]
keyUp(evt)[source]
mouseDown(evt, pos, direction)[source]
mouseUp(evt, pos, direction)[source]
nudgeBlocks(*args, **kw)
nudgeBottomLeft(n)[source]
nudgePanel = None
nudgePoint(p, n)[source]
nudgeSelection(direction)[source]
nudgeTopRight(n)[source]
openCommands(*args, **kw)
option1()[source]
selectAll()[source]
selectChunks(*args, **kw)
selectNone()[source]
selectOtherCorner()[source]
selectionBoxInProgress()[source]
selectionInProgress = False
static selectionPointsFromBox(box)[source]
selectionPointsFromDragResize()[source]
setSelection(box)[source]
setSelectionPoint(pointNumber, newPoint)[source]
setSelectionPoints(points, changeSelection=True)[source]
showPanel()[source]
showPreviousSelection
sizeLabelText()[source]
statusText
surfaceBuild = False
toolIconName = 'selection2'
toolReselected()[source]
toolSelected()[source]
tooltipText = 'Select\nRight-click for options'
topRightColor = (0.89, 0.89, 0.35)
topRightPoint = None
topRightSelectionColor = (1, 0.99, 0.65)
updateSelectionColor()[source]
worldTooltipText
class editortools.select.SelectionToolOptions(tool)[source]

Bases: editortools.tooloptions.ToolOptions

colorChanged()[source]
updateColors()[source]
class editortools.select.SelectionToolPanel(tool, editor)[source]

Bases: glbackground.Panel

editortools.thumbview module

class editortools.thumbview.BlockThumbView(materials, blockInfo=None, **kw)[source]

Bases: albow.widget.Widget

blockInfo
is_gl_container = True
thumb = None
class editortools.thumbview.ThumbView(sch, **kw)[source]

Bases: albow.openglwidgets.GLPerspective

clear()[source]
drawBackground = True
fbo = None
gl_draw()[source]
gl_draw_tex()[source]
gl_draw_thumb()[source]
set_position_modifiers()[source]
setup_modelview()[source]

editortools.tooloptions module

class editortools.tooloptions.ToolOptions(*args, **kwargs)[source]

Bases: glbackground.Panel

escape_action(*args, **kwargs)[source]
key_down(evt)[source]

Module contents

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.