{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":573601294,"defaultBranch":"main","name":"QtVTT","ownerLogin":"antoniotejada","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-12-02T21:38:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/6446344?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1670017126.191263","currentOid":""},"activityList":{"items":[{"before":"f1a7e04abfa90ed8777896e8ef118fb6ff520eb0","after":"20b71ea83c5051338ddb98cc6e538d7df6c74cbb","ref":"refs/heads/main","pushedAt":"2023-12-01T19:47:56.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"antoniotejada","name":"Antonio Tejada","path":"/antoniotejada","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6446344?s=80&v=4"},"commit":{"message":"Removed grid handle, added multiple image item edition, wall/image/token rubberband selection, wall/image/token copy/paste, textured visible walls\n\nWith this commit QtVTT is now a fully featured map editor, without having to\nimport external background battlemaps by supporting:\n- visible walls, wall width, textured walls, visually merging all walls for a\n better look\n- multiple images, moving images, scaling images, rotating images\n- rubberband selection, selected walls, tokens & images copy & paste\n\nIn addition, this commit also does some assorted fixes:\n- Corner cases for automatic wall detection (images with offset, rotated,\n without border, out of bounds)\n- Missing unblocksignals in updateImage codepath early exit was causing missing\n scene udpates when there was no background image\n- Snapping to grid when pasting\n- Deleting multiple points from the same wall\n- QGraphicsItem .data/.setData Qt bug workaround\n- Roll selectedOrFocusedItems instead of selectedItems so the focused item is\n also processed\n\nqtvtt.py\n- Abstracted yesnocancel message boxes into qYesNoCancelMessageBox\n- Fixed np saving functions for edge cases (1D arrays, empty active sets)\n- Added bounds check to automatic wall detection, was crashing with small images\n with no white pixel bounds.\n- Made automatic wall detection use the image under the mouse pointer instead of\n hard-coding to images[0]\n- Added rotation to images, centered position instead of topleft corner\n- Added workaround for QGraphicsItem.setData/QGraphicsItem.data failing in certain\n cases, used getItemData and setItemData everywhere to abstract it out\n- Added image handles in order to move/select/rotate/copy/delete\n- Added a background rect item so items are covered (hidden) even if there's no\n background image covering them\n- Removed all grid handle support, grid can be now setup in a much better way\n by using the unsync'ed playerviewport\n- Removed all hard-coding for single image and image[0] being the background\n- Added visible wall support using a stroker. All visible walls are also merged\n together so intersections and loops are removed for a better look\n- Added offset to images, now images have offset and rotation.\n- Generalized snapPosition and snapPositionWithCurrent settings so it can be\n used from more places that don't pay attention to the UI input state\n- Fixed getFogSceneRect to account for children when calculating the bounds\n- Added support for hidden items to flashItem\n- Fixed detectAndGenerateWallAtPos corner cases and the new image rotation and\n offset, added some more debug image saving\n- Added rubberband selection when SHIFT is pressed, scrolled area when in\n rubberband mode and close to the edge\n- Added image rotation/scaling on pressing rR, +-\n- Renamed clear all walls/doors to delete all walls/doors\n- Refactored importDungeonScrawl to use importImage instead of rolling its own\n image creation\n- Added wall/image copy/paste support\n- Changed pasteItem to paste where the mouse pointer is, snap with current\n settings\n- Fixed delItem to support removing multiple points from the same wall instead\n raising of out of bounds\n- Removed old centralWidget code\n- Added stale scene temp file cleanup to createTempSceneSettingsFile\n- Changed populateGrid invocation to be done after images, doors and walls have\n been populated since the grid extents depend on the fogscenerect\n- Fixed missing unblock signal bug introduced in previous checking. Was causing\n missing graphicsview updates when there was no fog center and the player's\n view didn't need updating\n- Abstracted image size clamping so it's both used with image and fog sizes\n- Clamped fog size to a minimum size since without background image it would be\n too small and fine walls would see-through the fog\n- Put back the functionality to open the image files when activating\n images/tokens filenames in the tree\n- Added status information when focusing on wall, image\n\nREADME.md\n- Updated with screenshot, new features\n\nTests:\n- Automatic wall detection, verified it works with the new image offset and\n rotation and it doesn't out of bounds with small images.\n- Verified importing Dungeon Scrawl maps still works.\n- Verified importing Dyson Logos urls still works.\n- Verified legacy files load ok and images are repositioned properly\n- Added walls, images, edited walls, scaled walls, rotated images, scaled images\n- Verified wall merging works as expected, intersections are properly merged\n- Rubberband selected, copied, pasted/deleted walls, tokens and images.","shortMessageHtmlLink":"Removed grid handle, added multiple image item edition, wall/image/to…"}},{"before":"180c76a8f79f36e7e4be59b7f84a06768e062ad0","after":"f1a7e04abfa90ed8777896e8ef118fb6ff520eb0","ref":"refs/heads/main","pushedAt":"2023-11-24T00:30:05.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"antoniotejada","name":"Antonio Tejada","path":"/antoniotejada","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6446344?s=80&v=4"},"commit":{"message":"Changed lincense to AGPL, encounter builder/tracker scene integration, substring indexing, shadow polygon clip fixes, many other small features\n\n- Added code to efficiently remove files from zip archives without having to copy\n the whole zip file to a new zip file (currently unused, but will probably be\n used once files are stored in the zip file)\n- Reworked documentation indices, added substring search, smaller disk footprint\n- Added table header chooser context menu\n- Now the window layout is saved in the scene qvt archive instead of in the app\n settings file\n- Encounder builder and combat tracker scene integration\n- Added current token heading, not currently displayed but used to open the\n right door\n- Improved wall insertion algorithm, now will add the point to the wall segment\n to the same side of the bisector\n- Fixed TOC parsing of complete fighter/priest/thief books, combat and tactics\n- Added wall to door conversion and viceversa\n- Shadow polygon fixes when clipped to scene bounds\n- Made renderFromLabel tokens the only ones that can be fog centers\n- many more... (see specific changes below)\n\nqtvtt.py\n- Added zipfile wrapper that can remove files efficiently (currently unused)\n- Added QVector2D qtuple conversion\n- Added angle sign function\n- Removed finicky qFindTabFromDocWidget implementation based on dock geometry to\n one based on comparing the data pointer, which can be done with the underlying\n sip module used to wrap C++ Qt objects into Python\n- Fixed qKeyEventToSequence to use nativeVirtualKey instead of key so shift+1 is\n handled as shift+1 instead of shift+!, etc\n- Created Animation class to do frame-by-frame animations, currently used to\n flash tokens when double-clicked on the tree\n- Added encounter implementation\n- Reworked build_index and load_index,\n - index is versioned so it's rebuilt when the code version mismatches the\n file version\n - Added complete thief and complete wizard handbooks\n - reduced index disk storage size by storing indices to the filepaths\n instead of replicated filepaths, added inflating of those indices at load\n time\n - Added substring indexing at load time\n- Added table heading choosing context menu for VTTTableWidget\n- Added TokenTableWidget to abstract out tables with token functionality,\n currently only used by EncounterBuilder, will be used by CombatTracker in a\n later cleanup\n- Changed CombatTracker to show specified tokens instead of all the tokens in\n the scene\n- Added save/resoreSceneState to CombatTracker, EncounterBuilder and others\n to restore scene-specific widget information\n- Changed several browseMonster signals to linkActivated, now the links have\n internal qtvtt:// urls that speicify what needs to target (a token to be\n flashed, a monster to be browsed, etc)\n- Added EncounterBuilder row deletion, edition, encounter edition\n- Changed formatting shortcuts from ctrl+1 to ctrl+shift+1, etc since ctrl+1 is\n now used to focus docks (tree, etc)\n- Added internal link support to VTTTextEditor and route through DocEditor to\n MainWindow. When tables are pasted they can include internal links, when the\n link is pressed a signal is emitted. Also, the hand arrow cursor is set and\n unset properly.\n- Added links to internal urls (token, monster) in pasted tables.\n- Added text loading and saving from/to qvt file\n- Fixed a bug in DocEditor storing the index in an instance variable instead of\n class variable due to the way Python member variable hierarchy writes work\n (reads from class variables can be done via the instance, but writes have to\n go through the class)\n- Changed index and text searches to default to substring searches, can be\n switched to whole string searches by enclosing the search term in quotation\n marks\n- Changed window position saving from save/restoreState to save/restoreSceneState\n and saved in qvt file campaign.ini since the windows have scene content that\n cannot be reloaded without a scene set.\n- Added ctrl+f shortcut to DocBrowser to position on the search LineEdit\n- Fixed DocBrowser search and highlight, the search back wasn't focusing on\n the last text occurrence when switching to the previous document, and the\n search in general was failing to put the first highlight of a document in view\n because loading of a document would cause a later layout which would mess up\n the scroll position (fixed by pumping events before scrolling to the\n highlight)\n- Added substring search to the DocBrowser, string search can be toggled back\n enclosing the term in quotation marks\n- Added better TOC generation for complete books, still needs some refining\n- Added cleanup http server thread to remove ips that haven't requested data\n for some time\n- Added debug group to VTTGraphicsScene to render debug information, will only\n be created on logging.DEBUG builds\n- Added abstracted getWallMapWall to access .data(0)\n- Fixed snapPosition to cast from QPoint to QPointF before multiplying by float\n- Added better wall point and wall closing to VTTGraphicsScene\n- Added VTTGraphicsScene setWallClosed to to the necessary QPainterPath\n modifications to close a wall\n- Changed VTTGraphicsScene setTokenHiddenFromPlayer to increase opacity to make\n the token visible on busy backgrounds and change the text color to make it\n clear a token is hidden\n- Made addToken font dependent on cellDiameter so text looks proper on maps with\n bigger cells (may need further tweaking)\n- Added renderFromLabel tokens where the pixmap is rendered from the first word\n in the label instead of taken from an image file. This allows tokens for signs,\n roomnumbers, etc\n- Added getMapTokenToken to get a token from a map_token, getMapWallWall,\n getMapDoorDoor\n- Added addDoor special casing two-point door to show a surraounding rectangle,\n the doors created via the program are two-point doors\n- Added door removal removeDoor\n- Changed addImage to have a maximum dimension to prevent bad performance or\n even corrupted (black) rendering when using out of bounds images\n- Added VTTGraphicsScene flashItem to flash items to highlight them when clicked\n elsewhere, using the Animation class\n- Fixed compute_fog bounding box polygon clipping, since it was failing to\n consider some cases (eg three corner insertion when the frustum , implemented\n via rendering safe big polygons and clipping the polygons properly. Turns out\n rendering big polygons is slower both at rendering time (double all the\n polygons, bigger) and at generation time\n- Added last token heading to decide which door to open when there are multiple\n candidates\n- Minor fixes initializing grid and wall visibility to the member variables,\n don't crash if a wall coudn't be auto detected in detectAndGenerateWallAtPos\n- Added VTTGraphicsView scrolling when graphics items are dragged out of view,\n unfortunately this triggers a drift bug in Qt when dragging zoom-invariant\n items (eg walls, but not tokens).\n- Added a better algorithm to find the wall segment where to insert a middle point\n when there are two options, by finding where the mouse clicked wrt the bisector\n between the two wall segments conformed by the selected point, the previous\n wall point and the next wall point.\n- Removed a long standing annoyance where graphics items inserted in the scene\n were not snapped until moved. This required some careful ordering of the\n super() call wrt the point being snapped\n- Added keyboard handling to toggle wall open/closed, convert line to door/wall,\n close/open all doors\n- Added a better way to set the grid dimensions and offset by using the unsync'ed\n player viewport: the player viewport corners are set to corners of the grid\n (as far apart as possible for best results) and +- keys are used to increase\n the integer number of cells in that area\n- Changed closest door finding to use the heading information\n- Added temporary extraction filename for scene settings so they can be edited\n using QSettings at the same time it's later stored in the qvt zipped file\n- Split window position settings away from application settings and into scene\n settings since most of the dock's contents depend on the loaded scene. Only the\n recent filenames are in the qtvtt.ini file\n- Moved DocEditor to a dock, removed central widget, allowed nested docks, forced\n all docks to top so they don't hit invisible walls when trying to dock around\n a non-existant central widget\n- Added saveSceneState and restoreSceneState functions to store/retrieve UI\n state into campaign.ini file\n- Fixed updatePlayerViewportFromImageWidget to take into account image scaling\n- Started using proper shortcutContext in QAction so they work when used from\n another MainWindow, etc\n- Added new Encounter, new Document shortcuts\n- Added dock goto shortcuts ctrl+0 .. ctrl+6\n- Added [*] automatic windowModified decorator to window and dock titles\n- Hooked scene settings saving to new scene/close scene/save scene\n- Stored last Dungeon Scrawl filepath at runtime so iterating over editing in\n Dungeon Scrawl and QtVTT\n- Added internal url links when copying tables, different link for Id (browser)\n and Name (token)\n- Items are now pasted in the center of the map, so the pasted position can be\n choosen.\n- Generalized urls, internal urls are now prefixed with qtvtt and the linkActivated\n handler does the appropriate in browseUrl depending on the url path\n (/token for flash token, /monster for browse monster, etc)\n- Added combat tracker and encounter builder creation, button handlers\n- Added text & text editor creation\n- Removed centralwidget, all editors are now dockable\n- Since scene files are ini files handled via QSettings, they cannot be\n read/written directly in the .qvt file (a .zip file), added code to store into\n temporary .ini create/destroyTempSceneSettingsFile files and then zipped\n inside the .qvt in loadScene/saveScene time\n- Make Dyson map importing use the new newScene rather than creating scenes\n manually.\n- Added closeScene to do scene ini file saving conditional on scene modified and\n user input\n- Added encounters to scene tree\n- Saved window and tracker settings in the scene ini file instead of in the\n app ini file\n- Saved texts in the scene file instead of leaving them in the filesystem, old\n scene files with texts in the filesystem still be supported but the text file\n will be saved into the scene file when saving the scene.\n- Fixed rendering fog of war when the fog and image scales are not 1\n- Only renderFromLabel tokens can be fog centers now, this prevents the fog\n center moving around when operating tokens in the game. Eg a single\n renderFromLabel token \"PCs\" is now used to symbolize where player characters\n are\n- Set the maximum image dimension to MAX_DIM, currently 4096x4096 pixels\n- Don't copy grahpics scene to http server buffer if no clients are connected\n- Abstracted loading files into loadResource, which can load from the scene file\n or from the filesystem if not in the scene file.\n- Added item flashing when activating scene tree tokens/encounters\n- Added encounter and text name renaming when renaming scene tree items.\n- Added focusing on the dock when clicking on dock tab\n- Added exit on python exception instead of silently ignoring it\n\nREADME.md\n- Added features, screenshot\n\nLICENSE\n- Changed to AGPL v3\n\nTests:\n- Imported Dyson logos, verified an empty scene is created with a map and a new\n text\n- Imported text, verified a new text is created in a new DocEditor, saved in the\n qvt file\n- Created encounters, tracker\n- Created renderFromLabel tokens, verified pixmap is rendered properly and at the\n proper font\n- Created walls, converted to doors, inserted points, verified wevything works\n as expected, points are inserted in the right place with the new bisector\n algorithm","shortMessageHtmlLink":"Changed lincense to AGPL, encounter builder/tracker scene integration…"}},{"before":"83a0d1f6590835b608b0b5346a065b4ba40d64fa","after":"180c76a8f79f36e7e4be59b7f84a06768e062ad0","ref":"refs/heads/main","pushedAt":"2023-10-05T23:32:04.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"antoniotejada","name":"Antonio Tejada","path":"/antoniotejada","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6446344?s=80&v=4"},"commit":{"message":"Fixed README.md typo\n\nRemoved garbage image from previous commit","shortMessageHtmlLink":"Fixed README.md typo"}},{"before":"7c05febf6bae9fae1d3fad04eb314a8558605034","after":"83a0d1f6590835b608b0b5346a065b4ba40d64fa","ref":"refs/heads/main","pushedAt":"2023-10-05T19:04:46.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"antoniotejada","name":"Antonio Tejada","path":"/antoniotejada","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/6446344?s=80&v=4"},"commit":{"message":"Added player viewport, fix for setscene losing token focus, other minor features/fixes\n\nAdded player viewport display and control, the rectangle shown in the\nplayer/remote views is now displayed on the DM view and can be resized from the\nDM view interactively. Alternatively the player viewport can be synced to the\nplayer view and controlled by zooming/panning the player view.\n\nFocus wasn't preserved when pressing combat tracker buttons (roll initiative,\netc), which was disturbing the fog of war. This commit preserves the focus on\nsetScene and works around a Qt bug with focusItem. It also preserves music\nplaying.\n\nOther minor features/fixes:\n- movable table headers\n- scaled image in html page\n- display server port and number of clients in player view\n- taskbar entry for player window so it can be shared independently\n- zoom-independent UI\n - grid lines, wall lines are now same pixel width independently of zooming\n - item handles are now the same size independently of zooming\n- DPI-dependent UI\n - Hooked DPI into the scene, made handle sizes DPI-dependent\n- Disabled Dungeon Scrawl coalescing for the time being since it's damaging\n finely tesselated polygons (in theory the algorithm should take that into\n account by accounting for the angle since the start of the run, not for every\n segment, but it could be broken)\n- Fixed startup crash when no qvt file is loaded (eg there's no previous session\n to restore)\n- Added assert None is to some debug logging so it can be removed when run with\n python -O qtvtt.py\n- Fixed exception when loading stale Dyson url images\n\nFiles:\n\nqtvtt.py\n- Added create_scene to unify scene initialization across loaders, etc. This fixes\n a regression for which not initializing cell_offset was making qtvtt crash\n when started without loading a qvt file (from command line or previous\n session)\n- Disabled coalescing when loading Dungeon Scrawl maps, as it's damaging highly\n tesselated polygons\n- Added some Complete Fighter/Priest books to the documentation, currently\n without table of contents sidebar since they have a more complex format than\n what regular expressions can parse. Converted print debug out into logging\n- Set the table columns as movable so the user can shuffled them around\n- Converted some high frequency logger.debug into assert None is logger.debug\n so they are removed when running with python -O qtvtt.py\n- Renamed display initiative to show initiative for consistence with the new\n show playerviewport\n- Added encounter summary initialization to the number of available monsters\n- Added server port and number of clients connected to the player view titlebar\n- Added another index page index2.html that sets the image.png as background\n image instead of img tag, which allows centered scaling and simplifies\n dm-controlled playerviewport. This is now the default map html page and\n returned when index.html is requested via HTTP.\n- Added ImageWidget imageResized and imageScrolled signals\n- Added ImageWidget getScaledViewportRect to obtain the rectangle of the image\n that is being displayed\n- Fixed ImageWidget scale being set to 0 in setFitToWindow and missing setting\n in resizeImage\n- Added abstracting function getTokenMapToken to get a map token from a token\n abstracting the token data index where the map token is stored\n- Added playerviewport and handles to resize the player viewport,\n playerViewportChanged signal\n- Added DPI setting so some UI (eg item handles) can be sized wrt DPI\n- Added focusItem override to workaround Qt failing to return focusItem when\n QGraphicsScene is not focused\n- Abstracted out VTTGraphicsScene cleanup method\n- Added playerviewport handle capping & tracking\n- Added linking playerviewport to playerview with delayed updates to cover for\n the current slow full scene update\n- Changed VTTGraphicsScene addHandleItem handle size to be DPI-dependent and\n flags to be zoom-independent so the handles are always the same size\n disregarding the zoom level\n- Made some VTTGraphicsScene UI zoom invariant (walls, grid, handles)\n- Added VTTGraphicsScene playerviewport setting/hiding memberfunctions\n- Created VTTGraphicsScene getFogSceneRect to abstract out the scenerect needed\n for calculating the fog. The scenerect now can grow outside of the map image\n due to playerviewport and never shrink so the default sceneRect() would\n decrease performance\n- Hooked playerViewportChanged signals through VTTGraphicsView and\n VTTGraphicsScene (currently unused)\n- The grid input dialog text now defaults to the last used values, if any\n- Added timer to VTTMainWindow to do delayed updates of the playerviewport when\n synced to the playerview, since realtime updates can be slow due to the\n current inefficient setscene update\n- Added menu entries for showing playerviewport/syncing to playerview\n- Renamed display initiative order to show initiative order for consistency with\n show playerviewport\n- setScene should be called for big hammer updates and for brand new/loaded scenes\n The difference should be whether there's already a gscene or not, but looks\n like at some point that got broken and most of the time gscene is not None so\n invalid data (fogcenter, etc) was being preserved across big hammer updates\n (as it should) but also across new scene, load scene (which is wrong). Created\n VTTGraphicsScene.cleanup and called from load and new so setScene is called\n with a None gscene and state is not preserved.\n- multiple fixes to setscene to preserve focus, image scale & scroll, music\n playback, and now playerviewport state\n- Modified floating playerview to have a taskbar entry (so it can be shared via\n eg Skype) and to remove scrollbars so the map dimensions are not leaked.\n- Trapped exceptions when loading dyson urls, as some pages do trigger them when\n trying to access stale image data\n\nindex2.html\n- index page with image as background and fullscreen icon\n\nREADME.md\n- Updated features\n\nTests:\n\n- Verified Dungeon Scrawl files with tesselated geometry are not corrupted\n- Verified fog focus is not lost when pressing combat tracker buttons\n- Verified playerviewport works in sync and non-sync modes\n- Verified jumpscrolling playerviewport doesn't leave trails in the dm view\n- Verified floating playerview has an entry in the taskbar and no scrollbars\n- Verified music is not stopped when setscene is called.\n- Verified table headers can be reshuffled\n- Verified remote view works, including fullscreen button\n- Verified player view shows number of connected clients","shortMessageHtmlLink":"Added player viewport, fix for setscene losing token focus, other min…"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADvar-oAA","startCursor":null,"endCursor":null}},"title":"Activity · antoniotejada/QtVTT"}