repo_id
stringclasses
383 values
file_path
stringlengths
7
168
content
stringlengths
0
1.75M
Amulet-Map-Editor
amulet_map_editor\api\opengl\resource_pack\resource_pack_manager.py
from amulet_map_editor.api.opengl.resource_pack import OpenGLResourcePack class OpenGLResourcePackManagerStatic: """A class to hold an opengl resource pack. All classes wanting to access block geometry or textures should subclass this class. """ def __init__( self, resource_pack: Open...
Amulet-Map-Editor
amulet_map_editor\api\opengl\resource_pack\__init__.py
from .resource_pack import OpenGLResourcePack from .resource_pack_manager import ( OpenGLResourcePackManager, OpenGLResourcePackManagerStatic, )
Amulet-Map-Editor
amulet_map_editor\api\opengl\shaders\__init__.py
from OpenGL.GL import ( glClearColor, glBindVertexArray, glGenVertexArrays, GL_VERTEX_SHADER, GL_FRAGMENT_SHADER, glGetString, GL_SHADING_LANGUAGE_VERSION, GL_VERSION, ) import OpenGL.GL.shaders import os from typing import Dict, Tuple, Any import re shader_dir = os.path.join(os.path.di...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\level\level.py
from typing import TYPE_CHECKING, Generator, Optional, Any import numpy import time import logging from amulet.api.data_types import Dimension, ChunkCoordinates from .chunk import RenderChunk from .region import ChunkManager from .selection import GreenRenderSelectionGroup from amulet_map_editor.api.opengl.data_types...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\level\region.py
from OpenGL.GL import ( GL_DYNAMIC_DRAW, glBindVertexArray, glBindBuffer, GL_ARRAY_BUFFER, glBufferSubData, ) from typing import Dict, Tuple, Optional import numpy import queue from .chunk import RenderChunk from amulet_map_editor.api.opengl.mesh.tri_mesh import TriMesh from amulet_map_editor.api.op...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\level\selection.py
from typing import Tuple from amulet_map_editor.api.opengl.mesh.selection import ( RenderSelection, RenderSelectionGroup, ) class GreenRenderSelection(RenderSelection): @property def box_tint(self) -> Tuple[float, float, float]: return 0.7, 1.0, 0.7 class GreenRenderSelectionGroup(RenderSele...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\level\__init__.py
from .level import RenderLevel
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\__init__.py
from .box import RenderSelection, RenderSelectionEditable, RenderSelectionHighlightable from .group import RenderSelectionGroup, RenderSelectionGroupHighlightable
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\level\chunk\chunk.py
import numpy from typing import TYPE_CHECKING, Tuple, List, Union import weakref import itertools import logging from amulet.api.errors import ChunkLoadError, ChunkDoesNotExist from amulet.api.chunk.blocks import Blocks from amulet.api.data_types import Dimension from amulet.api.level import BaseLevel from amulet.api....
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\level\chunk\chunk_builder.py
import numpy from typing import Tuple, List from amulet.api.chunk import Chunk from amulet_map_editor.api.opengl.mesh import TriMesh from amulet_map_editor.api.opengl.resource_pack import ( OpenGLResourcePackManagerStatic, OpenGLResourcePack, ) try: from .chunk_builder_cy import create_lod0_chunk except...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\level\chunk\__init__.py
from .chunk import RenderChunk
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\box\colours.json
{ "box_normal": [1.0, 1.0, 1.0], "box_highlight": [0.5, 0.5, 1.0], "box_highlight_move": [1.0, 0.7, 0.3], "box_edge": [0.5, 1.0, 1.0], "box_corner": [1.0, 1.0, 0.5], "box_point1": [0.0, 1.0, 0.0], "box_point2": [0.0, 0.0, 1.0] }
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\box\colours.py
import os import json colours_path = os.path.join(os.path.dirname(__file__), "colours.json") if os.path.isfile(colours_path): with open(colours_path) as f: colours = json.load(f) if isinstance(colours, dict): colours = { key: tuple(float(c) for c in val) for key, val in...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\box\render_selection.py
import numpy from OpenGL.GL import ( GL_TRIANGLES, GL_DYNAMIC_DRAW, glCullFace, GL_FRONT, GL_BACK, glDisable, glEnable, GL_DEPTH_TEST, GL_LINE_STRIP, glGetBooleanv, glGetIntegerv, GL_CULL_FACE_MODE, ) import itertools from typing import Tuple, Optional, Union from amulet...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\box\render_selection_editable.py
import numpy from OpenGL.GL import ( GL_TRIANGLES, glCullFace, GL_FRONT, GL_BACK, glDisable, GL_DEPTH_TEST, GL_LINE_STRIP, glEnable, glGetBooleanv, glGetIntegerv, GL_CULL_FACE_MODE, ) from amulet.api.data_types import PointCoordinatesAny from .render_selection_highlightable ...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\box\render_selection_highlightable.py
from typing import Union import numpy from .render_selection import RenderSelection from amulet_map_editor.api.opengl.resource_pack import OpenGLResourcePack from amulet_map_editor.api.opengl.data_types import RGBColour from .colours import colours class RenderSelectionHighlightable(RenderSelection): """A drawab...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\box\__init__.py
from .render_selection import RenderSelection from .render_selection_editable import RenderSelectionEditable from .render_selection_highlightable import RenderSelectionHighlightable
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\group\render_selection_group.py
import numpy from typing import List from amulet_map_editor.api.opengl import Drawable, ContextManager from amulet_map_editor.api.opengl.resource_pack import ( OpenGLResourcePack, OpenGLResourcePackManagerStatic, ) from amulet.api.selection import SelectionGroup, SelectionBox from amulet.api.data_types import ...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\group\render_selection_group_highlightable.py
from typing import List, Union import numpy from .render_selection_group import ( RenderSelectionGroup, ) from amulet_map_editor.api.opengl.mesh.selection import RenderSelectionHighlightable class RenderSelectionGroupHighlightable(RenderSelectionGroup): """A group of selection boxes to be drawn with an added ...
Amulet-Map-Editor
amulet_map_editor\api\opengl\mesh\selection\group\__init__.py
from .render_selection_group import RenderSelectionGroup from .render_selection_group_highlightable import RenderSelectionGroupHighlightable
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\base_define.py
import wx import wx.lib.scrolledpanel from typing import Tuple, Type import PyMCTranslate from amulet.api.data_types import VersionNumberTuple, PlatformType from amulet_map_editor.api.wx.ui.base_select import EVT_ITEM_CHANGE, BaseSelect from amulet_map_editor.api.wx.ui.version_select import ( VersionSelect, E...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\base_select.py
import wx from wx.lib import newevent from typing import Tuple, List, Optional import PyMCTranslate from amulet_map_editor.api.image import COLOUR_PICKER ( ItemNamespaceChangeEvent, EVT_ITEM_NAMESPACE_CHANGE, ) = newevent.NewCommandEvent() # the namespace entry changed ( ItemNameChangeEvent, EVT_ITE...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\nbt_editor.py
from __future__ import annotations from functools import partial from collections.abc import MutableMapping, MutableSequence import wx from amulet_map_editor.api.wx.ui import simple import amulet_nbt as nbt from amulet_map_editor.api import image nbt_resources = image.nbt NBT_FILE = b"\x0a\x00\x0b\x68\x65\x6c\x6...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\select_world.py
import os import wx import glob from sys import platform from typing import List, Dict, Tuple, Callable, TYPE_CHECKING import traceback import logging from amulet import load_format from amulet.api.errors import FormatError from amulet_map_editor import lang, CONFIG from amulet_map_editor.api.wx.ui import simple from...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\simple.py
"""A collection of classes for wx objects to abstract away the repeated code and make working with wx a bit more simple.""" import logging import wx from wx.lib.scrolledpanel import ScrolledPanel from typing import Iterable, Union, Any, List, Optional, Sequence, Dict, Tuple log = logging.getLogger(__name__) class S...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\traceback_dialog.py
from typing import Optional import wx from amulet_map_editor.api import image class TracebackDialog(wx.Dialog): def __init__( self, parent: Optional[wx.Window], title: str, error: str, traceback: str, **kwargs, ): kwargs["style"] = ( kwargs.g...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\version_select.py
from amulet_map_editor.api.wx.ui.simple import SimpleChoice, SimpleChoiceAny import wx from wx.lib import newevent import PyMCTranslate from typing import Tuple, Optional, Type, Any from amulet.api.data_types import VersionNumberTuple, PlatformType ( PlatformChangeEvent, EVT_PLATFORM_CHANGE, ) = newevent.NewC...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\__init__.py
Amulet-Map-Editor
amulet_map_editor\api\wx\util\button_input.py
import wx from typing import Set, Dict, Tuple from .window_container import WindowContainer from .key_config import KeyType, serialise_key, KeybindGroup ActionIDType = str _InputPressEventType = wx.NewEventType() EVT_INPUT_PRESS = wx.PyEventBinder(_InputPressEventType) class InputPressEvent(wx.PyEvent): """An...
Amulet-Map-Editor
amulet_map_editor\api\wx\util\key_config.py
import wx from amulet_map_editor.api.wx.ui.simple import ( SimpleDialog, SimpleScrollablePanel, SimpleChoice, ) from typing import Dict, Tuple, Optional, Union, Sequence from amulet_map_editor.api.image import ADD_ICON, SUBTRACT_ICON, EDIT_ICON ModifierKeyType = str KeyType = Union[int, str] KeybindGroupI...
Amulet-Map-Editor
amulet_map_editor\api\wx\util\mouse_movement.py
import wx from typing import Tuple from .window_container import WindowContainer class MouseMovement(WindowContainer): """A class to get and set the cursor position and track changes.""" def __init__(self, window: wx.Window): super().__init__(window) # the current mouse position self....
Amulet-Map-Editor
amulet_map_editor\api\wx\util\ui_preferences.py
from __future__ import annotations from typing import Type, Tuple, TypedDict, Dict import atexit import wx from amulet_map_editor import CONFIG class WindowConfig(TypedDict): size: Tuple[int, int] position: Tuple[int, int] is_full_screen: bool PRE_EXISTING_CONFIG: Dict[str, WindowConfig] = CONFIG.ge...
Amulet-Map-Editor
amulet_map_editor\api\wx\util\validators.py
import wx SpecialChrs = { wx.WXK_BACK, wx.WXK_DELETE, wx.WXK_SHIFT, wx.WXK_END, wx.WXK_HOME, wx.WXK_LEFT, wx.WXK_RIGHT, wx.WXK_RETURN, *range(1, 27), } class BaseValidator(wx.Validator): """Validates data as it is entered into the text controls.""" def __init__(self): ...
Amulet-Map-Editor
amulet_map_editor\api\wx\util\window_container.py
import weakref import wx class WindowContainer: """A helper class to store a reference to a wx.Window. If a window is hard referenced there may be cyclic references leading to memory leaks. Subclass this class if you intend to store a reference to a window.""" def __init__(self, window: wx.Window): ...
Amulet-Map-Editor
amulet_map_editor\api\wx\util\__init__.py
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\biome_select\biome_define.py
from typing import Tuple import PyMCTranslate import wx from amulet_map_editor.api.wx.ui.base_define import BaseDefine from amulet_map_editor.api.wx.ui.biome_select.biome_select import BiomeSelect class BiomeDefine(BaseDefine): def __init__( self, parent, translation_manager: PyMCTransla...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\biome_select\biome_select.py
from amulet_map_editor.api.wx.ui.base_select import BaseSelect class BiomeSelect(BaseSelect): TypeName = "Biome" def _populate_namespace(self): version = self._translation_manager.get_version( self._platform, self._version_number ) namespaces = list( set( ...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\biome_select\__init__.py
from .biome_define import BiomeDefine
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\block_select\block_define.py
import wx import wx.lib.scrolledpanel from typing import Tuple, Optional, Dict, Mapping, Union import PyMCTranslate from amulet.api.block import PropertyType, Block, PropertyValueType from amulet.api.block_entity import BlockEntity from amulet_nbt import SNBTType, AbstractBaseTag from amulet_map_editor.api.wx.ui.base...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\block_select\block_select.py
import wx from typing import Tuple import PyMCTranslate from amulet_map_editor.api.wx.ui.base_select import BaseSelect class BlockSelect(BaseSelect): TypeName = "Block" def __init__( self, parent: wx.Window, translation_manager: PyMCTranslate.TranslationManager, platform: st...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\block_select\multi_block_define.py
import wx import wx.lib.scrolledpanel from typing import List import PyMCTranslate from amulet_map_editor.api.image import ( UP_CARET, DOWN_CARET, TRASH, ADD_ICON, MAXIMIZE, MINIMIZE, ) from amulet_map_editor.api.wx.ui.block_select import BlockDefine, EVT_PROPERTIES_CHANGE class MultiBlockDe...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\block_select\properties.py
import wx from wx.lib import newevent from typing import Tuple, Dict, Optional, List, Union import weakref import PyMCTranslate import amulet_nbt from amulet_nbt import SNBTType from amulet.api.block import PropertyDataTypes, PropertyType WildcardSNBTType = Union[SNBTType, str] from amulet_map_editor.api.image impor...
Amulet-Map-Editor
amulet_map_editor\api\wx\ui\block_select\__init__.py
from .block_select import BlockSelect from .properties import PropertySelect, EVT_PROPERTIES_CHANGE from .block_define import BlockDefine from .multi_block_define import MultiBlockDefine
Amulet-Map-Editor
amulet_map_editor\programs\convert\convert.py
import wx from threading import Thread import webbrowser import logging from typing import TYPE_CHECKING, Optional from amulet import load_format from amulet.api.level import BaseLevel from amulet_map_editor import lang from amulet_map_editor.api.wx.ui.simple import SimplePanel, SimpleScrollablePanel from amulet_map_...
Amulet-Map-Editor
amulet_map_editor\programs\convert\__init__.py
from amulet_map_editor import lang from .convert import ConvertExtension export = {"name": lang.get("program_convert.tab_name"), "ui": ConvertExtension}
Amulet-Map-Editor
amulet_map_editor\programs\edit\edit.py
from typing import TYPE_CHECKING, Optional, Generator import webbrowser import logging from threading import Thread import traceback import wx from amulet.api.data_types import OperationYieldType EDIT_CONFIG_ID = "amulet_edit" from amulet_map_editor import lang from amulet_map_editor.api.framework.programs import B...
Amulet-Map-Editor
amulet_map_editor\programs\edit\__init__.py
from amulet_map_editor import lang from amulet_map_editor.api.opengl import check_opengl check_opengl() from amulet_map_editor.programs.edit.edit import EditExtension export = {"name": lang.get("program_3d_edit.tab_name"), "ui": EditExtension}
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\chunk_generator.py
import time from typing import Optional from threading import Thread from amulet_map_editor.api.opengl import ThreadedObjectContainer ThreadingEnabled = True if ThreadingEnabled: class ChunkGenerator(ThreadedObjectContainer): def __init__(self): ThreadedObjectContainer.__init__(self) ...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\edit_canvas_container.py
from typing import TYPE_CHECKING from amulet_map_editor.api.opengl.canvas_container import CanvasContainer if TYPE_CHECKING: from amulet_map_editor.programs.edit.api.canvas import EditCanvas class EditCanvasContainer(CanvasContainer): """A helper class to store a reference to the canvas. This ensures the...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\events.py
import wx from wx.lib import newevent from amulet_map_editor.api.opengl.camera import ( CameraMovedEvent, EVT_CAMERA_MOVED, ProjectionChangedEvent, EVT_PROJECTION_CHANGED, SpeedChangedEvent, EVT_SPEED_CHANGED, ) from amulet_map_editor.api.opengl.events import ( PreDrawEvent, EVT_PRE_DR...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\key_config.py
from typing import List from amulet_map_editor.api.wx.util.key_config import ( KeybindContainer, KeybindGroup, KeybindGroupIdType, KeyActionType, Space, Shift, MouseLeft, MouseRight, MouseWheelScrollUp, MouseWheelScrollDown, Control, Alt, Tab, ) ACT_MOVE_UP = "ACT_MO...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\renderer.py
from typing import TYPE_CHECKING, Optional import wx from OpenGL.GL import ( glClear, GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, ) from amulet.api.data_types import Dimension from amulet_map_editor.api.opengl.camera import Projection from amulet_map_editor.api.opengl.mesh.level import RenderLevel from amul...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\selection.py
from typing import Tuple, Optional, Any, TYPE_CHECKING import logging import wx import weakref from amulet.api.selection import SelectionGroup, SelectionBox from amulet.api.history.history_manager import ObjectHistoryManager from amulet.api.history import Changeable log = logging.getLogger(__name__) if TYPE_CHECKING:...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\__init__.py
from .edit_canvas_container import EditCanvasContainer from .canvas import EditCanvas
Amulet-Map-Editor
amulet_map_editor\programs\edit\plugins\__init__.py
Amulet-Map-Editor
amulet_map_editor\programs\edit\amulet_resource_pack\bedrock\manifest.json
{ "format_version": 2, "header": { "description": "Textures for the Amulet renderer", "name": "Textures for the Amulet renderer", "uuid": "a29e7a15-2ea8-4be4-895a-a85866d9b2d3", "version": [0, 0, 1], "min_engine_version": [ 1, 14, 0 ] }, "modules": [ { ...
Amulet-Map-Editor
amulet_map_editor\programs\edit\amulet_resource_pack\bedrock\textures\terrain_texture.json
{ "num_mip_levels" : 4, "padding" : 8, "resource_pack_name" : "amulet", "texture_data" : { "amulet_selection" : { "textures" : "amulet_ui/selection" }, "amulet_translucent_white" : { "textures" : "amulet_ui/translucent_white" } }, "texture_name" : "atlas.terra...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\base_behaviour.py
from typing import TYPE_CHECKING from ..edit_canvas_container import EditCanvasContainer if TYPE_CHECKING: from amulet_map_editor.programs.edit.api.canvas import EditCanvas class BaseBehaviour(EditCanvasContainer): """This class implements how the program actually works. It detects various inputs and set...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\block_selection_behaviour.py
from typing import TYPE_CHECKING, Tuple, Optional import time import numpy import wx from wx.lib import newevent from ..events import ( InputPressEvent, InputReleaseEvent, EVT_INPUT_RELEASE, EVT_SELECTION_CHANGE, ) from amulet.api.selection import SelectionGroup, SelectionBox from amulet.api.data_types...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\camera_behaviour.py
from typing import TYPE_CHECKING import math import wx import time from amulet_map_editor.api.opengl.camera import Projection from amulet_map_editor.api.opengl.data_types import CameraRotationType from .base_behaviour import BaseBehaviour from ..events import ( InputHeldEvent, EVT_INPUT_HELD, InputPressEv...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\chunk_selection_behaviour.py
from typing import TYPE_CHECKING, Tuple import numpy import time from amulet.api.selection import SelectionGroup, SelectionBox from .pointer_behaviour import PointerBehaviour from amulet_map_editor.api.opengl.mesh.selection import ( RenderSelectionGroup, RenderSelection, ) from ..events import ( InputPress...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\inspect_block_behaviour.py
from typing import TYPE_CHECKING import logging import wx from wx.adv import RichToolTip from amulet.api.chunk.biomes import BiomesShape from .base_behaviour import BaseBehaviour from .pointer_behaviour import PointerBehaviour from ..events import ( InputPressEvent, EVT_INPUT_PRESS, ) from ..key_config import...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\pointer_behaviour.py
from typing import TYPE_CHECKING import wx from amulet_map_editor.api.opengl.mesh.selection import RenderSelection from amulet_map_editor.api.opengl.camera import Projection from amulet.api.data_types import BlockCoordinatesNDArray, BlockCoordinates from .raycast_behaviour import RaycastBehaviour from ..events import...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\raycast_behaviour.py
from typing import TYPE_CHECKING, Optional, Tuple, Generator, List import numpy import math from amulet.api.chunk import Chunk from amulet.api.block import UniversalAirLikeBlocks from amulet.api.errors import ChunkLoadError from amulet_map_editor.api.opengl.matrix import rotation_matrix_xy from amulet.api.data_types...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\static_selection_behaviour.py
from typing import TYPE_CHECKING from amulet_map_editor.api.opengl.mesh.selection import RenderSelectionGroup from ..events import EVT_SELECTION_CHANGE from .base_behaviour import BaseBehaviour from amulet_map_editor.api.opengl.camera import Projection if TYPE_CHECKING: from amulet_map_editor.programs.edit.api.ca...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\behaviour\__init__.py
# API layout from .base_behaviour import BaseBehaviour # camera behaviour from .camera_behaviour import CameraBehaviour # ray casting behaviour from .raycast_behaviour import RaycastBehaviour # pointer box behaviour from .pointer_behaviour import PointerBehaviour # static selection from .static_selection_behaviour ...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\canvas\base_edit_canvas.py
import logging import wx import traceback from OpenGL.GL import ( glClearColor, glViewport, ) import os from typing import Optional, Generator import weakref import sys import time from minecraft_model_reader.api.resource_pack.java.download_resources import ( get_java_vanilla_latest_iter, get_java_vani...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\canvas\edit_canvas.py
import logging import warnings import wx from typing import Callable, TYPE_CHECKING, Any, Generator, Optional from types import GeneratorType from threading import RLock, Thread from .base_edit_canvas import BaseEditCanvas from ...edit import EDIT_CONFIG_ID from ..key_config import ( DefaultKeys, DefaultKeybin...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\canvas\__init__.py
from .edit_canvas import EditCanvas
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\errors.py
class BaseOperationException(Exception): pass class BaseLoudException(BaseOperationException): pass class BaseSilentException(BaseOperationException): pass class OperationError(BaseLoudException): """Error to raise if something went wrong when running the operation. Will notify the user with a...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\__init__.py
from .base import OperationUI, OperationUIType, DefaultOperationUI from .ui.fixed_pipeline import FixedFunctionUI from .errors import OperationError, OperationSuccessful, OperationSilentAbort from .ui.simple_operation_panel import SimpleOperationPanel
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\canvas_toggle_element.py
class CanvasToggleElement: """This is a base class for any UI element that is dropped into the canvas and can be enabled and disabled.""" def enable(self): """Set the state of the UI for being enabled. Do not bind events to the canvas here because they will get removed. Do this in bind_even...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\file.py
from typing import TYPE_CHECKING, Optional from math import floor, log10 import wx from amulet_map_editor.programs.edit.api.edit_canvas_container import ( EditCanvasContainer, ) from amulet_map_editor.api.wx.ui.simple import SimpleChoiceAny from amulet_map_editor.programs.edit.api.events import ( EVT_CAMERA_MO...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\goto.py
from typing import Optional, Tuple import wx import re from amulet.api.data_types import PointCoordinates from amulet_map_editor import lang from amulet_map_editor.api.wx.ui.simple import SimpleDialog from amulet_map_editor.api import image CoordRegex = re.compile( r"^" # match the start r"\s*" # leading w...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\nudge_button.py
from typing import Tuple import wx import weakref import numpy import math from amulet_map_editor.api.opengl.camera import Camera from amulet_map_editor.api.opengl.matrix import rotation_matrix_xy from amulet_map_editor.programs.edit.api.key_config import ( KeybindGroup, ACT_MOVE_UP, ACT_MOVE_DOWN, AC...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\tool_manager.py
import wx from typing import TYPE_CHECKING, Type, Dict, Optional from amulet_map_editor.programs.edit.api import EditCanvasContainer from amulet_map_editor.programs.edit.api.ui.tool.base_tool_ui import ( BaseToolUI, BaseToolUIType, ) from amulet_map_editor.programs.edit.api.events import ( ToolChangeEvent,...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\__init__.py
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\base\default_operation_ui.py
from typing import TYPE_CHECKING import wx from OpenGL.GL import ( glClear, GL_DEPTH_BUFFER_BIT, ) from .operation_ui import OperationUI from amulet_map_editor.programs.edit.api.behaviour import StaticSelectionBehaviour from amulet_map_editor.api.opengl.camera import Projection from amulet_map_editor.programs....
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\base\operation_ui.py
import pickle from typing import Any, TYPE_CHECKING, Union, Tuple import os import wx import weakref import warnings from amulet_map_editor.programs.edit.api.edit_canvas_container import ( EditCanvasContainer, ) from amulet_map_editor.programs.edit.api.ui.canvas_toggle_element import ( CanvasToggleElement, ) ...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\base\__init__.py
from .operation_ui import OperationUI, OperationUIType from .default_operation_ui import DefaultOperationUI
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\manager\operation_manager.py
import sys from typing import Tuple, Dict, Type from types import ModuleType import os import traceback import pkgutil import importlib import logging from .loader import ( BaseOperationLoader, OperationLoader, UIOperationLoader, ) from .util import STOCK_PLUGINS_DIR, STOCK_PLUGINS_NAME, CUSTOM_PLUGINS_DIR...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\manager\util.py
import os from amulet_map_editor.programs.edit.plugins.operations import stock_plugins STOCK_PLUGINS_DIR: str = stock_plugins.__path__[0] STOCK_PLUGINS_NAME: str = stock_plugins.__name__ CUSTOM_PLUGINS_DIR = os.path.join(os.environ["DATA_DIR"], "plugins")
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\manager\__init__.py
from .operation_manager import ( OperationManager, UIOperationManager, BaseOperationManager, ) from .loader import BaseOperationLoader, OperationLoader, UIOperationLoader
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\ui\fixed_pipeline.py
import wx from typing import Callable, Dict, Any, TYPE_CHECKING, Sequence import logging import inspect from amulet_map_editor.api.wx.util.validators import IntValidator from amulet.api.data_types import OperationReturnType from amulet_map_editor.programs.edit.api.operations import DefaultOperationUI if TYPE_CHECKIN...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\ui\simple_operation_panel.py
import wx from typing import TYPE_CHECKING from amulet.api.selection import SelectionGroup from amulet.api.data_types import Dimension, OperationReturnType from amulet_map_editor.programs.edit.api.operations import DefaultOperationUI if TYPE_CHECKING: from amulet.api.level import BaseLevel from amulet_map_ed...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\ui\__init__.py
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\manager\loader\base_operation_loader.py
import logging log = logging.getLogger(__name__) class BaseOperationLoader: """A class to load and wrap an operation""" def __init__(self, identifier: str, export_dict: dict): """ Set up the OperationLoader. :param identifier: The path to the operation file. This may be a file or dir...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\manager\loader\operation_loader.py
from typing import Callable, Any, Optional import logging from .base_operation_loader import BaseOperationLoader from amulet.api.level import BaseLevel from amulet.api.data_types import Dimension from amulet.api.selection import SelectionGroup log = logging.getLogger(__name__) class OperationLoader(BaseOperationLo...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\manager\loader\ui_operation_loader.py
from typing import Callable, Optional, Type, TYPE_CHECKING import inspect import os import struct import hashlib import logging import wx from .base_operation_loader import BaseOperationLoader from amulet.api.level import BaseLevel from amulet_map_editor.programs.edit.api.operations import ( OperationUI, Ope...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\operations\manager\loader\__init__.py
from .base_operation_loader import BaseOperationLoader from .operation_loader import OperationLoader from .ui_operation_loader import UIOperationLoader
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\select_location\events.py
import wx import math from amulet.api.data_types import BlockCoordinates, FloatTriplet # The location changed _ObjectLocationChangeEventType = wx.NewEventType() EVT_LOCATION_CHANGE = wx.PyEventBinder(_ObjectLocationChangeEventType) class LocationChangeEvent(wx.PyEvent): """Run when the camera has moved or rotat...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\select_location\select_location.py
import wx from typing import Type, Any, Tuple from amulet.api.data_types import BlockCoordinates from amulet_map_editor.api.wx.ui.simple import SimplePanel from amulet_map_editor.api.wx.util.validators import IntValidator from amulet_map_editor.api import config from .events import LocationChangeEvent, TransformChange...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\select_location\select_transform.py
import wx import math from amulet.api.data_types import FloatTriplet from .select_location import SelectLocationUI from .events import RotationChangeEvent, ScaleChangeEvent, TransformChangeEvent class SelectTransformUI(SelectLocationUI): """A UI element that can be dropped into the EditCanvas and let the user pi...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\select_location\__init__.py
from .select_location import SelectLocationUI from .events import ( LocationChangeEvent, EVT_LOCATION_CHANGE, RotationChangeEvent, EVT_ROTATION_CHANGE, ScaleChangeEvent, EVT_SCALE_CHANGE, TransformChangeEvent, EVT_TRANSFORM_CHANGE, ) from .select_transform import SelectTransformUI
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\tool\base_operation_choice.py
import wx from typing import TYPE_CHECKING, Optional import traceback import logging import os import sys import subprocess from amulet_map_editor.api import image from amulet_map_editor.api.wx.ui.simple import SimpleChoiceAny from amulet_map_editor.api.wx.ui.traceback_dialog import TracebackDialog from amulet_map_e...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\tool\base_tool_ui.py
import wx from typing import Union, Any from amulet_map_editor.programs.edit.api.edit_canvas_container import ( EditCanvasContainer, ) from ..canvas_toggle_element import CanvasToggleElement BaseToolUIType = Union[wx.Window, wx.Sizer, "BaseToolUI"] class BaseToolUI(EditCanvasContainer, CanvasToggleElement): ...
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\tool\default_base_tool_ui.py
import logging import wx from typing import TYPE_CHECKING from OpenGL.GL import ( glClear, GL_DEPTH_BUFFER_BIT, ) import traceback import os import amulet from amulet.api.errors import LoaderNoneMatched from amulet_map_editor.api.wx.ui.traceback_dialog import TracebackDialog from amulet_map_editor.api.opengl....
Amulet-Map-Editor
amulet_map_editor\programs\edit\api\ui\tool\__init__.py
from .base_operation_choice import BaseOperationChoiceToolUI from .base_tool_ui import BaseToolUI from .default_base_tool_ui import DefaultBaseToolUI
Amulet-Map-Editor
amulet_map_editor\programs\edit\plugins\operations\__init__.py
Amulet-Map-Editor
amulet_map_editor\programs\edit\plugins\tools\chunk.py
from typing import TYPE_CHECKING, Dict, Tuple, Optional import wx from OpenGL.GL import ( glClear, GL_DEPTH_BUFFER_BIT, GL_DEPTH_TEST, glEnable, glDisable, glGetBoolean, ) from amulet_map_editor import lang from amulet_map_editor.api.opengl.camera import Projection, EVT_CAMERA_MOVED from amulet...