# mcedit2.editortools package — mceditlib 0.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- mceditlib 0.1 documentation »
- mcedit2 package »

# mcedit2.editortools package

## Subpackages

- mcedit2.editortools.brush package
  - Module contents

## Submodules

## mcedit2.editortools.edit_chunk module

player

class `mcedit2.editortools.edit_chunk.``ChunkTool`(editorSession, *args, **kwargs)

  Bases: `mcedit2.editortools.EditorTool`

  `name` = u'Edit Chunk'
  `iconName` = u'edit_chunk'
  `toolInactive`()
  `updateChunkWidget`()
  `terrainPopulatedDidChange`(value)
  `lightPopulatedDidChange`(value)
  `inhabitedTimeDidChange`(value)
  `updateTimeDidChange`(value)
  `tabDidChange`(index)
  `mousePress`(event)
  `selectChunk`(cx, cz)
  `setSelectedChunk`(chunk)
  `updateNBTView`()
  `chunkPositionDidChange`()
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008B39888>

## mcedit2.editortools.edit_entity module

select

class `mcedit2.editortools.edit_entity.``SelectEntityCommand`(tool, ray, *args, **kwargs)

  Bases: `PySide.QtGui.QUndoCommand`

  `undo`()
  `redo`()

class `mcedit2.editortools.edit_entity.``EntityTool`(editorSession, *args, **kwargs)

  Bases: `mcedit2.editortools.EditorTool`

  `name` = u'Edit Entity'
  `iconName` = u'edit_entity'
  `selectionRay` = None
  `currentEntity` = None
  `createToolWidget`()
  `editWasMade`()
  `mousePress`(event)
  `setSelectionRay`(ray)
  `setSelectedEntity`(index)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000009C9FBC8>

`mcedit2.editortools.edit_entity.``entitiesOnRay`(dimension, ray, rayWidth=0.75, maxDistance=1000)

## mcedit2.editortools.flood_fill module

flood_fill

class `mcedit2.editortools.flood_fill.``FloodFillTool`(editorSession, *args, **kwargs)

  Bases: `mcedit2.editortools.EditorTool`

  `name` = 'Flood Fill'
  `iconName` = 'flood_fill'
  `mousePress`(event)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x0000000008D99B88>

class `mcedit2.editortools.flood_fill.``FloodFillCommand`(editorSession, point, blockInfo)

  Bases: `mcedit2.command.SimplePerformCommand`

  `perform`()

## mcedit2.editortools.generate module

create

class `mcedit2.editortools.generate.``GeneratePlugin`

  Bases: `PySide.QtCore.QObject`

  `generatePreview`(bounds, blocktypes)
  `getPreviewNode`()
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000A19A148>

class `mcedit2.editortools.generate.``TreeGen`(*args, **kwargs)

  Bases: `mcedit2.editortools.generate.GeneratePlugin`

  `getOptionsWidget`()
  `generate`(bounds, blocktypes)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000A19A1C8>

class `mcedit2.editortools.generate.``GenerateTool`(*args, **kwargs)

  Bases: `mcedit2.editortools.EditorTool`

  `name` = u'Generate'
  `iconName` = u'generate'
  `instantDisplayChunks` = 32
  `createToolWidget`()
  `generatorTypeChanged`(index)
  `mousePress`(event)
  `mouseMove`(event)
  `mouseRelease`(event)
  `boundsDidChange`(bounds)
  `boundsDidChangeDone`(bounds, newSelection)
  `displaySchematic`(schematic, offset)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000A19A108>

## mcedit2.editortools.move module

move

class `mcedit2.editortools.move.``MoveSelectionCommand`(moveTool, pendingImport, text=None, *args, **kwargs)

  Bases: `mcedit2.command.SimpleRevisionCommand`

  `undo`()
  `redo`()

class `mcedit2.editortools.move.``MoveOffsetCommand`(moveTool, oldPoint, newPoint)

  Bases: `PySide.QtGui.QUndoCommand`

  `undo`()
  `redo`()

class `mcedit2.editortools.move.``MoveFinishCommand`(moveTool, pendingImport, *args, **kwargs)

  Bases: `mcedit2.command.SimpleRevisionCommand`

  `undo`()
  `redo`()

class `mcedit2.editortools.move.``CoordinateWidget`(*args, **kwargs)

  Bases: `PySide.QtGui.QWidget`

  `pointChanged` = <PySide.QtCore.Signal object at 0x000000000A2D9260>
  `point`
  `setX`(value)
  `setY`(value)
  `setZ`(value)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000A2D5288>

class `mcedit2.editortools.move.``PendingImportNode`(pendingImport, textureAtlas)

  Bases: `mcedit2.rendering.scenegraph.TranslateNode`

  `pos`
  `hoverFace`(face)

class `mcedit2.editortools.move.``MoveTool`(editorSession, *args, **kwargs)

  Bases: `mcedit2.editortools.EditorTool`

  `iconName` = 'move'
  `name` = 'Move'
  `movePosition`
  `pointInputChanged`(value)
  `addPendingImport`(pendingImport)
  `removePendingImport`(pendingImport)
  `doMoveOffsetCommand`(oldPoint, newPoint)
  `listClicked`(index)
  `listDoubleClicked`(index)
  `currentImport`
  `currentImportNode`
  `schematicBox`
  `dragMovePoint`(ray)
    Return a point representing the intersection between the mouse ray
      and an imaginary plane coplanar to the dragged face

    Return type: | Vector

  `mouseMove`(event)
  `mouseDrag`(event)
  `mousePress`(event)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000A2D52C8>
  `mouseRelease`(event)
  `toolActive`()
  `toolInactive`()
  `confirmImport`()

## mcedit2.editortools.select module

select

class `mcedit2.editortools.select.``SelectionCoordinateWidget`(*args, **kwargs)

  Bases: `PySide.QtGui.QWidget`

  `editSizeClicked`(state)
  `boxChanged` = <PySide.QtCore.Signal object at 0x00000000045B7068>
  `boundingBox`
  `setMinX`(value)
  `setMinY`(value)
  `setMinZ`(value)
  `setMaxX`(value)
  `setMaxY`(value)
  `setMaxZ`(value)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x00000000056BB988>

class `mcedit2.editortools.select.``SelectCommand`(selectionTool, box, text=None, *args, **kwargs)

  Bases: `PySide.QtGui.QUndoCommand`

  `undo`()
  `redo`()

class `mcedit2.editortools.select.``SelectionTool`(editorSession, *args, **kwargs)

  Bases: `mcedit2.editortools.EditorTool`

  `name` = u'Select'
  `iconName` = u'select_blocks'
  `shapeDidChange`()
  `toolActive`()
  `toolInactive`()
  `hideSelectionWalls`
  `currentSelection`
  `coordInputChanged`(box)
  `selectionDidChange`(value)
  `updateNodes`()
  `deleteSelection`()
  `deleteBlocks`()
  `deleteEntities`()
  `fill`()
  `boxHandleResized`(box)
  `boxHandleResizedDone`(box, newSelection)
  `mousePress`(event)
  `mouseMove`(event)
  `mouseDrag`(event)
  `mouseRelease`(event)
  `deselect`()
  `selectionColor` = (0.8, 0.8, 1.0)
  `alpha` = 0.33
  `showPreviousSelection` = True
  `createShapedSelection`(box)
  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x00000000056BBB88>

class `mcedit2.editortools.select.``SelectionCursorRenderNode`(sceneNode)

  Bases: `mcedit2.rendering.rendergraph.RenderNode`

  `drawSelf`()

class `mcedit2.editortools.select.``SelectionCursor`(point=(x=0, y=0, z=0), face=Face(West), color=(0.3, 0.3, 1))

  Bases: `mcedit2.rendering.scenegraph.Node`

  `RenderNodeClass`

    alias of `SelectionCursorRenderNode`

  `point`
  `face`
  `color`

## Module contents

__init__.py

`mcedit2.editortools.``RegisterTool`(cls)

  Register a tool class. Class must inherit from EditorTool.

      >>> @RegisterTool
      >>> class MyTool(EditorTool):
      >>>     pass

  Parameters: | cls –
  Returns: |
  Return type: |

`mcedit2.editortools.``ToolClasses`()

class `mcedit2.editortools.``EditorTool`(editorSession, *args, **kwargs)

  Bases: `PySide.QtCore.QObject`

  `name` = u'Unnamed tool'
  `iconName` = None
  `toolWidget` = None
  `cursorNode` = None
  `overlayNode` = None
  `mousePress`(event)

    event has been augmented with these attributes:

    > point, ray, blockPosition, blockFace

  `mouseMove`(event)

    event has been augmented

  `mouseDrag`(event)

    event has been augmented

  `mouseRelease`(event)

    event has been augmented

  `toolActive`()

    Called when this tool is selected. :return: :rtype:

  `toolInactive`()

    Called when a different tool is selected. :return: :rtype:

  `staticMetaObject` = <PySide.QtCore.QMetaObject object at 0x000000000841F708>

### Navigation

- index
- modules |
- next |
- previous |
- mceditlib 0.1 documentation »
- mcedit2 package »