Commit Graph

488 Commits

Author SHA1 Message Date
d3c7a61cef MMGraphNode should use GraphEdit Instead of MMGraphEditor. 2022-06-15 18:57:08 +02:00
d73d398155 Connect PolygonControlpoint's gui input method. 2022-06-15 18:52:55 +02:00
6da06474cf Added the Node structure for PolygonDialog. 2022-06-15 18:21:15 +02:00
ee9144b1b5 PolygonEdit should have inherited from Button, and connected the pressed signal. 2022-06-15 18:03:35 +02:00
9975ea358f MMGraphNode should instance PolygonEdit instead of PolygonEditor. 2022-06-15 17:57:20 +02:00
08c6131285 Fix duplicate properties in PolygonEdit. 2022-06-15 17:56:32 +02:00
fe5f0bc196 Det anchors properly,a nd connect gui_input In PolygonEditor. 2022-06-15 17:56:14 +02:00
f1eced523c Fix overrides and duplicate binds in PolygonEditor. 2022-06-15 17:38:19 +02:00
6e09878f54 Fix sorting GradientCursors. 2022-06-15 17:22:58 +02:00
1ec5e8a756 Fix loading cursors for the gradient editor. 2022-06-15 16:45:58 +02:00
275d0604f8 Added virtual method binding for get_gradient_color in GradientBase. 2022-06-15 14:34:51 +02:00
d320f3862f Fix having a duplicate binding in GradientCursor. Also fix setting up the value label for it. 2022-06-15 14:04:42 +02:00
af2999c615 Fix duplicate method bind. 2022-06-15 13:41:58 +02:00
3566962fab Fix shader and a crash in Gradient Editor. 2022-06-15 13:41:35 +02:00
76464a0509 Instance the proper base type when using scripts in mat maker gd editor. 2022-06-15 13:40:46 +02:00
3e26ea2975 Check whenter the node has the proper class before adding a curve, polygon or gradient graph node. 2022-06-15 13:19:18 +02:00
af2059468f Fix initializing MMGraphNodes. 2022-06-15 13:02:15 +02:00
9b36e0dd1c Set minimum size for the mat maker editor. 2022-06-15 12:47:39 +02:00
c6d7e7c112 Fix set_input_properties and set_output_properties in MMNode. 2022-06-15 12:44:17 +02:00
aedd8ee5d1 Fix crahs in mat maker's editor. 2022-06-15 10:53:13 +02:00
93ea9616d1 Fixed default parameter bindings for MMGraphNode. 2022-06-15 10:41:03 +02:00
d642c0ad79 Re-enable mat maker's editor plugin. 2022-06-15 10:34:09 +02:00
764c285223 Fix the add popup for mat maker's ui. 2022-06-15 10:33:57 +02:00
315f642c3a Fix MMNode registration. 2022-06-15 10:01:14 +02:00
4de6619a40 Fix typo. 2022-06-15 10:00:37 +02:00
4e43137471 Disable mat maker's editor plugin for now. 2022-06-14 18:57:33 +02:00
38b918c515 Fix binding related errors on startup. 2022-06-14 18:44:45 +02:00
1890f45fe1 Added an editor plugin for the material maker module. 2022-06-14 18:27:36 +02:00
43db64cc7f Reimplement the missing methods in MMGraphNode. Had to rename the cure and gradient editor classes as they were confliction with engine stuff. 2022-06-14 17:55:23 +02:00
f180658682 Fixed smaller issues and added all of mat maker's widgets to the build. 2022-06-14 17:16:26 +02:00
35fadcb6bb Fixed the remaining compile issues for the gradient editor, and added it to the build. 2022-06-14 16:43:44 +02:00
dbca350602 More cleanups to the gradient editor. 2022-06-14 15:00:55 +02:00
f21019adab Also added the file dialog and float edit to the build. 2022-06-13 23:07:53 +02:00
d2a8b9ad86 Added it to the build. 2022-06-13 22:52:48 +02:00
fbde39b27f Fixed the remaining issues with the curve editor. 2022-06-13 22:52:12 +02:00
b8b0294501 Fix ImagePickerButton. 2022-06-13 21:38:34 +02:00
ce637e247e Renamed mat maker's file dialog's file. 2022-06-13 20:58:27 +02:00
a276ee47e8 Claened up MatMAker's FileDialog. 2022-06-13 20:57:24 +02:00
18694c27b9 Cleaned up LeftPanel. 2022-06-13 20:09:59 +02:00
efd6c7b333 Cleaned up PolygonEditor. 2022-06-13 18:58:08 +02:00
5eafb2fcd5 Cleaned up PolygonDialog. 2022-06-13 18:35:51 +02:00
665f8be21f Cleaned up PolygonEdit. 2022-06-13 18:12:04 +02:00
8178d526ba Renamed polygon editor's ControlPoint to PolygonControlPoint. 2022-06-13 17:45:23 +02:00
6014b98720 Mostly done ControlPoint. 2022-06-13 17:42:10 +02:00
a12ee8f913 Cleaned up PolygonView. 2022-06-13 17:28:17 +02:00
09e7eb3db2 An another set of cleanups to CurveEdit. 2022-06-13 16:51:02 +02:00
e78601c60a Cleaned up CurveDialog. 2022-06-13 16:47:01 +02:00
4c12cb8606 Cleaned up CurveEdit. 2022-06-13 16:46:42 +02:00
20b291a2ea Light clean pass on CurveEditor. 2022-06-12 22:24:36 +02:00
28720be0be Initial cleanup for ControlPoint. 2022-06-12 16:59:12 +02:00
1943e7f150 Cleaned up CurveView. 2022-06-12 16:19:27 +02:00
e4ef99abc4 An another touchup. 2022-06-12 15:25:33 +02:00
db18d2b5b2 Cleaned up SlopePoint. 2022-06-12 15:24:10 +02:00
7923375f8e Added the 3 base classes to the build. 2022-06-12 14:45:01 +02:00
21ca852196 Also cleaned up PolygonBase. 2022-06-12 14:24:27 +02:00
a4276b11d0 Cleaned up GradientBase. 2022-06-12 13:47:09 +02:00
240871c517 Fix all errors in CurveBase found by clangd. 2022-06-12 13:41:42 +02:00
4943aa9569 Initial cleanup pass on CurveBase. 2022-06-12 00:54:08 +02:00
c2311362fd Also converted and added the base nodes for material maker. 2022-06-11 23:39:25 +02:00
aa38f53ed2 Fix typo. 2022-06-11 21:17:26 +02:00
f0ac767970 Compare as boolean. 2022-06-11 20:57:03 +02:00
38ff41c893 Fix handling input for the PaintWindow. 2022-06-11 20:56:41 +02:00
1309b39162 Little cleanups for the GradientEditor. 2022-06-10 19:41:28 +02:00
943538fec9 GradientCursor initial cleanup. 2022-06-10 18:33:01 +02:00
8ff93d88e8 Cleaned up FloatEdit. 2022-06-10 15:55:10 +02:00
d25efcc17c Initial cleanup for the ImagePickerButton. 2022-06-10 01:01:32 +02:00
b50e8bc49b Ported color picker popup. 2022-06-10 00:05:36 +02:00
35f8b54b75 Also renamed it's filename and directory. 2022-06-09 23:52:31 +02:00
4f27367a1f Cleaned up mat maker's color picker button. 2022-06-09 23:50:23 +02:00
4c2ec0ffd9 Converted the widget code for mat_maker_gd to cpp and added it in. 2022-06-09 19:42:17 +02:00
96ed3b53a3 More smaller fixes. 2022-06-08 21:48:23 +02:00
7f5e462ad0 Fix one more error. 2022-06-08 21:23:48 +02:00
5915042c20 Fixed every issue found by clangd in MMGraphNode. 2022-06-08 21:22:05 +02:00
15ce82c23b Full cleanup of MatMakerGDEditor. 2022-06-08 19:13:06 +02:00
0f7a6fb070 The MMCreateNamePopup should be finished now. 2022-06-08 17:02:10 +02:00
7af9c93c3f Added MMNode registry to MMAlgos. 2022-06-08 15:53:58 +02:00
ab95dd6418 Second pass on MMCreateNamePopup. 2022-06-08 11:04:34 +02:00
56eeb9adde Initial cleanup for the MMCreateNamePopup. 2022-06-08 09:42:21 +02:00
221708f7c3 Initial cleanup of MatMakerGDEditor. 2022-06-08 00:45:59 +02:00
4f6a2df5a5 Second round of cleanups to MMGraphNode. 2022-06-07 17:44:25 +02:00
0d5514856f More cleanups to MMGraphNode. 2022-06-07 16:50:32 +02:00
36881d5390 Renamed the rest of the editor classes. 2022-06-07 15:57:04 +02:00
8682d334a1 Initial cleanup form MMGraphNode. 2022-06-07 15:56:49 +02:00
729950b86a More null checks. 2022-06-07 13:32:04 +02:00
ecd2be23a6 Fix operator for gradients in MMAlgos. 2022-06-07 13:05:56 +02:00
0abb68c016 More fixes to MMnode. 2022-06-07 12:35:24 +02:00
523ed95055 MMNodeUniversalProperty bindings cleanup. 2022-06-07 10:55:42 +02:00
7f0b7d121e MMNode binding cleanup. 2022-06-07 10:11:45 +02:00
dcdcd7098c Cleaned up MMMaterial's bindings. 2022-06-07 09:43:42 +02:00
d30be583de Added the 3 new cleaned up classes to the build. They still need some work on their bindings to work properly though. 2022-06-07 03:42:35 +02:00
daa818e9d3 Initial cleanup of MMMaterial. 2022-06-07 03:41:22 +02:00
ad813681e8 More cleanups to MMNode, and added a few missing methods. 2022-06-07 03:41:02 +02:00
9529c7a5a5 Return a value in all codepaths. 2022-06-07 03:40:24 +02:00
4589a29066 Initial cleanups for MMNode. 2022-06-07 01:56:45 +02:00
4c5c313b10 Initial cleanup for MMNodeUniversalProperty. 2022-06-06 23:01:34 +02:00
5cb26e2b6b Ran the cpp conversion scripts on mat_maker_gd's core classes. 2022-06-06 22:04:36 +02:00
df9099e0ed Added the MMAlgos class (and binding) to the build. Also set up it's singleton. 2022-06-06 18:44:51 +02:00
2c3d7cecff Fixed all issues clangd was able to find with MMAlgos. 2022-06-06 18:13:29 +02:00
80439d8cb7 Initial cleanups to the new files. 2022-06-06 15:48:52 +02:00
6a58bbca29 Added a generated MMAlgos class for the material maker module. 2022-06-06 14:06:22 +02:00
c3d05ab91f Fix shadowed declaration warning. 2022-05-27 00:38:55 +02:00
125af06336 Implemented z offset support for TiledWalls when using Vertical tiling. 2022-05-26 23:19:30 +02:00
8d00fe6db9 Implement tile y size handling for TiledWalls. 2022-05-26 21:07:00 +02:00
6a18764f1d TiledWallData's size is now a float instad of a vector2. 2022-05-26 18:49:24 +02:00
36437d98b2 Renamed the internal vectors of TiledWallData. 2022-05-26 18:42:24 +02:00
f141399345 Removed the _texture_ infix from the methods in TiledWallData which were not supposed to have it. 2022-05-26 18:38:01 +02:00
c7e1f40435 Also added a collider type enum for TiledWallData. Not used yet. 2022-05-26 18:26:05 +02:00
09a4afc907 Reworked TiledWallData's api, and added per tile size and z offset members. Mesh generation does not use them yet. 2022-05-26 18:17:48 +02:00
3de05db75a Prefixed all member variables with _ in the wfc module. 2022-04-25 11:59:24 +02:00
d8938665f8 The 2 constants are uppercase in TilingWFC. 2022-04-25 10:46:16 +02:00
f93c9fdd15 Small optimization. 2022-04-24 17:46:36 +02:00
4922e62b13 Small optimization for image indexer. This also fixes pixel order. 2022-04-24 17:46:14 +02:00
278a55a4b4 Fix wrong order of arguments. 2022-04-24 17:15:18 +02:00
0a7b5c2deb Actually set pattern frequencies in TilingWFC. This actually fixes the image generation problems. 2022-04-24 16:44:28 +02:00
89d7829c1e Don't crash in TilingWFC due to the result containing bad indices. This will help with debugging. 2022-04-24 16:25:17 +02:00
c930e8b754 API improvements, crash fixes and smaller various improvements for the Tiling WFC class. 2022-04-24 15:14:29 +02:00
c9a520f9c3 Better error handling and fix potential crash in the overlapping WFC class. 2022-04-24 15:13:50 +02:00
dcdb5715cc Use ERR_FAIL_COND macro again if the image passed in is not valid in index_image. Also don't delete color information. 2022-04-24 11:46:46 +02:00
53aed73a64 Added helper methods so tile name can also be used when it's more conveninent in TilingWaveFormCollapse. 2022-04-24 11:34:09 +02:00
7dbf967170 Improved the api / usability of the image indexer. 2022-04-24 11:19:03 +02:00
b8dcd4fbf8 Add back binding that I accidentally emoved. 2022-04-24 09:51:09 +02:00
9b717b0a87 Added reset method to the ImageIndexer, and made it's index_image method additive. 2022-04-24 09:49:59 +02:00
6736ff17fd Bindings for TilingWaveFormCollapse. 2022-04-24 01:49:26 +02:00
f9db81c6c4 Added new helper methods to Array2D. 2022-04-24 01:39:47 +02:00
3ba0a856a3 Fix typo. 2022-04-24 01:37:16 +02:00
c7ee453e8a Found an unneeded static cast. 2022-04-23 21:30:51 +02:00
05dddc114e Found more smaller things. 2022-04-23 16:03:37 +02:00
f3c96f945a Lots of small fixes and improvements to the wfc module. It still has issues though. 2022-04-23 15:23:00 +02:00
2f81373562 Lots of work on the bindings for the wfc module. Also smaller improvements. 2022-04-23 00:48:19 +02:00
0f1c04e08d Added a new ImageIndexer helper class. 2022-04-22 22:54:42 +02:00
73caee4fa2 Re-extracted the class docs. 2022-04-22 19:39:21 +02:00
e1ca765409 Set up doc classes for the wfc module. 2022-04-22 19:36:12 +02:00
e311cacced Use int-s instead of uint32_t-s in the wfc module for better compatibility with scripting. 2022-04-22 19:07:29 +02:00
129ed4e349 Register the new classes into the ClassDB. 2022-04-22 18:54:59 +02:00
6e5407c55f Finished the initial cleanup for OverlappingWaveFormCollapse, and added it to the build. 2022-04-22 18:50:27 +02:00
21be696f6a OverlappingWaveFormCollapse initial codestyle cleanup / setup. 2022-04-22 15:18:19 +02:00
2c0952a893 Fix different signedness warnings. 2022-04-22 02:52:54 +02:00
137bf204a6 Finished the first set of cleanups, and added TilingWaveFormCollapse to the build. 2022-04-22 02:35:38 +02:00
24ef915413 More cleanups and refactors to the TilingWaveFormCollapse class. 2022-04-22 01:55:53 +02:00
89541c361b Initial cleanup to the TilingWFC class. 2022-04-22 01:15:40 +02:00
e6e780291f Small improvements. 2022-04-22 00:56:24 +02:00
6c6e9599c2 Revert the previous change for now. 2022-04-22 00:50:57 +02:00
e7b3819103 Remvoed the PropagationEntry struct. 2022-04-22 00:33:10 +02:00
cc921370ce Fixed comparison of integer expressions of different signedness warnings. 2022-04-22 00:08:26 +02:00
bcfb45d049 Also merged directions.h into WaveFormCollapse. 2022-04-21 23:35:45 +02:00
9f190ca13c Move methods out from the anonymous namespace. 2022-04-21 23:33:21 +02:00
5beae4d5dc Merged Propagator and Wave into the WaveFormCollapse class, ans simplified it's design as much as possible. It still needs more work though. 2022-04-21 23:31:25 +02:00
fdb6ced123 Got rid of the EntropyMemoisation struct as it just makes readability worse. 2022-04-21 20:14:31 +02:00
a501292046 Renamed WFC to WaveFunctionCollapse, asn started transforming it. 2022-04-21 20:00:42 +02:00
96738f5783 Notes. 2022-04-21 19:45:09 +02:00
dc1064aac4 Small improvements. 2022-04-21 17:45:30 +02:00
4e8d254ba9 Smaller improvements. 2022-04-21 17:33:44 +02:00
2680c89948 Got rid of std::touples in the wfc module. 2022-04-21 17:17:50 +02:00
bb723e3c44 Got rid of std::arrays in the wfc module. 2022-04-21 17:05:26 +02:00
e4a2429b45 Use error macros in the wfc module instead of asserts. 2022-04-21 16:51:10 +02:00
ec6b52f5d8 unsigned to uint32_t conversion for the wfc module. 2022-04-21 16:43:04 +02:00
531dc783d8 std::size_t to uint32_t for the wfc module. 2022-04-21 16:36:33 +02:00
f080f5e027 Replace std::vectors in the wfc module to engine vectors. 2022-04-21 16:31:03 +02:00
c886f9f7af Add wfc's classes to the build. 2022-04-21 14:28:18 +02:00
5be272e5cb Fix a few typos and remove std::optional from wcf. 2022-04-21 14:28:04 +02:00
dfbae29faa An another set of codestyle cleanups for the wfc module. 2022-04-20 03:24:50 +02:00
837e518e5a Clang format and codestyle cfixed to the wfc module. 2022-04-20 03:05:34 +02:00
98008d48c9 Proper structural setup for the new module. 2022-04-20 02:50:16 +02:00
05bb8567ba Added a new wfc (wave function collapse) module. I added https://github.com/math-fehr/fast-wfc 's code as a base for it. It's not in the build yet. 2022-04-20 02:39:35 +02:00
bb303112fe Move paint's shader to an another folder to avoid unused variable warning. 2022-04-19 00:10:39 +02:00
ecda65d37b Fix an another shadoved declaration. 2022-04-18 23:41:49 +02:00
4813832b92 Fix shadowed declaration warning. 2022-04-18 19:34:52 +02:00
18184429bb Also fix ste style of the 3d prop plugin's convert button. 2022-04-18 19:33:47 +02:00
56e5874267 Set Prop2D's conver button's style to flat, so it's in the expected style. 2022-04-18 19:32:17 +02:00
396426aa12 Skip registering PaintEditorPlugin for now, as the module will need lots of refactorings and I need to think about them more. 2022-04-18 16:33:37 +02:00
701e07a2cd Typo fix. 2022-04-18 16:26:01 +02:00
81e9a54129 The PaintCanvasBackgorund needs draw behind parent set. 2022-04-18 15:45:24 +02:00
7abae2b54e Properly ported PaintCanvasBackground. 2022-04-18 15:32:55 +02:00
71ac7bc4e3 Bit more work on porting PaintActions. 2022-04-18 14:10:21 +02:00
111daab50e Switched to it in a few places. 2022-04-18 13:00:14 +02:00
361f949093 Work on porting the actions. 2022-04-17 21:10:43 +02:00
a3fc87a576 Cleaned up BrushPrefabs. Also started cleaning up actions. 2022-04-17 20:04:30 +02:00
d3c039be7e Also port the logic of the selection box and visual grid. 2022-04-17 18:14:06 +02:00
cc217b7eea Also ported the settings dialog. 2022-04-17 17:23:58 +02:00
bd42d11629 Also ported the PaintCanvasDialog, and the grid size dialog. 2022-04-17 16:44:54 +02:00
398af1a772 Fully ported PaintLoadFlieDialog aswell. 2022-04-17 15:29:03 +02:00
8182d82135 Implemented signals for PaintWindow, smaller fixes for PaintCanvas, and cleaned up the save file dialog. 2022-04-17 14:15:40 +02:00
b7230dd942 Added in the icons for paint's gui. 2022-04-17 12:03:12 +02:00
b9f0ccdeb3 Finished porting the logic of PaintWindow. Also smaller fixes / improvements. 2022-04-17 11:43:25 +02:00
0521aa4d6b or to || 2022-04-17 03:27:52 +02:00
59fb670bc8 or to || 2022-04-17 03:25:22 +02:00
28f57aa439 Fix shadowed declaration. 2022-04-17 03:20:34 +02:00
62c384b3a4 Almost completely ported the logic of the PaintWindow. 2022-04-17 03:18:09 +02:00
5e368ec978 Ported the logic for PaintCanvas. 2022-04-17 00:17:05 +02:00
3461d692d4 Node hierarchy port / implementation for PaintCanvas. 2022-04-16 22:11:06 +02:00
bbc671693a Fix adding the wrong child. 2022-04-16 21:01:04 +02:00
0d917718dd Implement / port PaintNavbar. 2022-04-16 20:57:42 +02:00
e540e4e414 Implemented the paint editor plugin. Also reimplemented PaintWindow's ui. 2022-04-16 19:08:19 +02:00
79aa630959 or to ||. 2022-04-16 02:58:02 +02:00
d0af0cb360 Added all paint classes to the build. 2022-04-16 02:54:22 +02:00
25d219a4a0 Const qualifiers and references for the paint module. 2022-04-16 02:35:03 +02:00
d98f9746e8 Ported the logic for quite a few classes of the paint module. 2022-04-16 01:25:02 +02:00
60048f3602 Also convert the leftover dialogs. 2022-04-15 20:05:56 +02:00
e70fb4a67e Created the rest of the skeleton classes for the paint module, and moved the code into them. 2022-04-15 19:40:12 +02:00
a662e12c3c Added the required (skeleton) c++ classes for the paint module. 2022-04-15 02:20:27 +02:00