Commit graph

1610 commits

Author SHA1 Message Date
Johannes Sixt
6bbecad7e2 Synthesize Technic Pneumatic Tubes. 2021-03-21 10:18:43 +01:00
Johannes Sixt
94f7a9800a Factor out a function that constructs a tube mesh.
Later, we want to make tubes with different radii.

While we are here, correct the winding of the triangles that make the
inner tube.
2021-03-21 10:13:00 +01:00
Leonardo Zide
177265d9f8 Fixed CLI crash. 2021-03-20 12:32:05 -07:00
Leonardo Zide
b548e1f4d2
Merge pull request #669 from j6t/fix-default-control-points
Fix incorrect control points of second and later synthesized pieces.
2021-03-17 21:46:14 -07:00
Leonardo Zide
a460075278 Fixed normal transforms. 2021-03-17 21:43:02 -07:00
Johannes Sixt
57edf44020 Fix incorrect control points of second and later synthesized pieces.
When a model that was not create by LeoCAD contains two different pieces
that are handled by lcSynth, then a set of default control points is
generated for the first piece. When the following synthesized pieces are
loaded, this set of control points is reused for the other pieces. But
the values generated for the first piece may not be a suitable default
for the subsequent pieces. Clear the control points after they have been
applied to a piece so that later pieces receive a new set of defaults.
2021-03-15 21:48:28 +01:00
Leonardo Zide
6ef3fe5500 Updated version. 2021-03-14 11:33:15 -07:00
Leonardo Zide
32c7964503 Load official parts before unofficial. 2021-03-13 20:01:25 -08:00
Leonardo Zide
b0f689df83 Crash fix. 2021-03-13 14:53:50 -08:00
Leonardo Zide
c8bd036236 Fixed texture upload from worker threads. 2021-03-13 14:09:08 -08:00
Leonardo Zide
a5a794d3fc Set texture unit 0 for all textures. 2021-03-13 11:40:33 -08:00
Leonardo Zide
f789dd21df Read official files before unofficial files.
This is for consistency with other tools #652.
2021-03-13 10:51:35 -08:00
Johannes Sixt
19bc2f4f90 Fix check for type of mesh index.
The index type does not only depend on the number of geometry vertices,
but also on the number of conditional line vertices. Check the stored
type, not the number of vertices.
2021-03-13 11:59:57 +01:00
Leonardo Zide
233affe3fc Moved global resource creation to startup instead of context creation. Fixes #645. 2021-03-10 21:22:41 -08:00
Leonardo Zide
44d0e92b50 Crash fix. Fixes #648. 2021-03-10 16:10:24 -08:00
Leonardo Zide
5065dcac74 Fixed vertex attribute bindings for the conditional shader. 2021-03-10 13:30:41 -08:00
Hubert Figuière
064c815360 CurrentWidth can be MaxWidth.
Fix instructions hanging when there is a 16 x 16 plate
Closes #649
2021-03-10 00:00:01 -05:00
Leonardo Zide
de3a3adf34 Fixed wrong function call. 2021-03-07 16:07:43 -08:00
Leonardo Zide
4a50ac69a9 Fixed conditional line color. 2021-03-07 11:05:44 -08:00
Leonardo Zide
4f53004aae Disable conditional lines when shaders are not available. 2021-03-07 11:04:53 -08:00
Leonardo Zide
3e84285f40 Refactored bounding box calculation. 2021-03-07 10:14:48 -08:00
Leonardo Zide
b7740d9db1 Don't look for duplicate conditional verts. 2021-03-07 09:57:17 -08:00
Leonardo Zide
b2880731db Added conditional lines option. 2021-03-07 09:53:35 -08:00
Leonardo Zide
c3ad14ac04 Conditional line shader. 2021-03-06 18:54:24 -08:00
Leonardo Zide
cf664584c6 Fixed conditional lines math. 2021-03-06 10:08:36 -08:00
Hubert Figuière
06b4c2642b Add Unhide selected menu item 2021-03-04 23:55:39 -05:00
Leonardo Zide
6117c7de88 Crash fix. 2021-03-01 17:21:13 -08:00
Leonardo Zide
140daced93 Added model measurements. Fixes #631. 2021-02-28 15:57:02 -08:00
Leonardo Zide
d0404d9fbb gcc fix. 2021-02-28 13:11:54 -08:00
Leonardo Zide
27734f2469 Moved bricklink color table to the mapping file. 2021-02-28 13:02:58 -08:00
Leonardo Zide
310504775e
Merge pull request #632 from hfiguiere/bl-export
Issue #630 - Remap element for BrickLink export
2021-02-28 11:36:13 -08:00
Leonardo Zide
7a9e193d41 View cleanup. 2021-02-28 11:32:12 -08:00
Leonardo Zide
40983db71c View cleanup. 2021-02-28 10:57:14 -08:00
Leonardo Zide
1a8e8a3abe Crash fix. 2021-02-28 10:30:26 -08:00
Hubert Figuière
6a89cdb68a Issue #630 - Detect duplicates in the list 2021-02-27 19:05:08 -05:00
Hubert Figuière
67d657e71e Issue #630 - Move the BrickLink colour table to the BrickLink export 2021-02-27 19:05:08 -05:00
Hubert Figuière
b13caa1a61 Issue #630 - Put the mapping table into a resource
- can also load from a file
2021-02-27 19:05:08 -05:00
Hubert Figuière
a344b0af6f Issue #630 - Avoid duplicate parts on output 2021-02-27 19:05:08 -05:00
Hubert Figuière
06e1552153 Issue #630 - More mappings 2021-02-27 19:05:08 -05:00
Hubert Figuière
370791e622 Issue #630 - Move the BrickLink export out 2021-02-27 19:05:08 -05:00
Hubert Figuière
08868c7cfa Issue #630 - Remap element for BrickLink export 2021-02-27 19:05:08 -05:00
Leonardo Zide
92c8bdc09a View cleanup. 2021-02-27 11:53:00 -08:00
Leonardo Zide
b057afdd63 Removed Reset Cameras. 2021-02-27 11:35:42 -08:00
Leonardo Zide
4a77391c6b Removed GetViews(). 2021-02-27 11:32:52 -08:00
Leonardo Zide
95fbc13247 Removed GetViewsForModel. 2021-02-27 11:15:04 -08:00
Leonardo Zide
4b36b90f7c Fixed view array removal loop. 2021-02-27 10:46:10 -08:00
Hubert Figuière
cd68bb16a5 Remove views in destructor
- This avoid a use-after-free when the view remove itself in its dtor
2021-02-26 22:28:56 -05:00
Leonardo Zide
ff13fd90db Fixed LightDarkControl. 2021-02-15 10:43:23 -08:00
Leonardo Zide
b99724c7b0 Don't try to change the file extension to mpd. Fixes #451. Fixes #616. Fixes #462. 2021-02-07 13:44:59 -08:00
Leonardo Zide
98f2679cb2 Fixed light/dark color index conversion. 2021-02-07 12:59:22 -08:00
Leonardo Zide
d84b7711fd Added option to paste keeping the original steps. Fixes #612. 2021-02-07 10:48:23 -08:00
Leonardo Zide
0784a2133a
Merge pull request #621 from trevorsandy/AUTOMATE_EDGE_COLOURS
Use saturated part colour when calculating edge colour
2021-02-07 10:15:24 -08:00
Leonardo Zide
82e3bf557a Keep edge color math in linear space. 2021-02-07 10:14:54 -08:00
Leonardo Zide
9e1a8fd559 Added replace icons. 2021-02-03 19:23:38 -08:00
Leonardo
48347ea371 Ignore part settings from the previous step. Fixes #602. 2021-02-03 14:49:07 -08:00
Leonardo
55384a3c35 Fixed crash loading invalid lcd file. Fixes #617. 2021-02-03 14:24:22 -08:00
Trevor SANDY
aa1fa3ea77 Disable saturation adjust 2021-02-03 15:30:18 +01:00
Trevor SANDY
dcac8b27c7 Cleanup 2021-02-03 15:29:55 +01:00
Trevor SANDY
87c23a6d21 Use saturated part colour when calculating edge colour 2021-02-02 18:35:24 +01:00
Leonardo
f033578abc Keep find next working after closing the find widget. 2021-02-01 14:12:03 -08:00
Leonardo Zide
680511879a Removed replace checkboxes. 2021-01-31 17:49:22 -08:00
Leonardo Zide
c182daa10d Removed find color checkbox. 2021-01-31 17:32:38 -08:00
Leonardo Zide
dc0ffbc8bb Removed Select By Color. 2021-01-31 12:23:28 -08:00
Leonardo Zide
3bee3a2bcf Removed the find widget part checkbox. 2021-01-31 12:05:15 -08:00
Leonardo Zide
6a2c8a715e Added find all. 2021-01-31 11:02:50 -08:00
Leonardo Zide
7f0ed057b6 Added find next icon. 2021-01-30 18:03:35 -08:00
Leonardo Zide
b74eb3a81e New find/replace widget. 2021-01-30 15:37:17 -08:00
Leonardo Zide
48ae9dae17 Fixed pieces not sorted correctly when changing their step. Fixes #614. 2021-01-30 10:17:15 -08:00
Leonardo
7931720b5f Renamed abs/rel indicator. 2021-01-29 15:23:22 -08:00
Leonardo
75fdca0387 Added transform menu and indicator. Fixes #554. 2021-01-29 15:18:02 -08:00
Leonardo
28c91d0656 Workaround for a Qt bug recreating QApplication. Fixes #610. 2021-01-28 12:10:16 -08:00
Leonardo
4f8252eff9 Fixed retina displays again. Fixes #447. 2021-01-26 17:07:51 -08:00
Leonardo
fd087a177d Removed hardcoded stud style checks. 2021-01-26 14:58:02 -08:00
Trevor SANDY
d1d3bf2294 Enable automate edge colour and high contrast options from command line 2021-01-26 21:09:51 +01:00
Trevor SANDY
afb74544ef Use luminescence for light/dark colours with high contrast styles 2021-01-26 18:38:34 +01:00
Trevor SANDY
2801558458 More intuitive edge colour naming 2021-01-26 18:24:29 +01:00
Leonardo
6fe393d147 Small cleanup. 2021-01-25 17:50:00 -08:00
Leonardo
41aa31b7a4 Fixed loading built-in library. 2021-01-25 16:58:44 -08:00
Leonardo
88b224daea Renamed color macro. 2021-01-25 16:52:49 -08:00
Trevor SANDY
914b47f8ee Trigger black/dark colour change warning when automate edge colour is enabled 2021-01-25 22:16:44 +01:00
Trevor SANDY
ca00f431cf Add reset buttons to contrast and light/dark value colour preferences 2021-01-25 21:43:26 +01:00
Trevor SANDY
7f06b93e1e Remove configurable gamma setting and fix colour reset action 2021-01-25 21:18:43 +01:00
Trevor SANDY
feeb034ff9 Make high contrast colours configurable and split preferences dialogue 2021-01-25 13:35:04 +01:00
Trevor SANDY
512785de36 Automate edge colours cleanup 2021-01-25 08:34:22 +01:00
Trevor SANDY
daf459d670 Automate edge colours 2021-01-24 12:53:02 +01:00
Leonardo Zide
03b9c75d9e Fixed subparts not updating stud style. 2021-01-23 14:55:00 -08:00
Leonardo Zide
728980c97a Fixed mesh reload after changing stud options. Fixes #608. 2021-01-23 11:43:57 -08:00
Leonardo Zide
078842d3ac Fixed warnings. 2021-01-23 10:52:45 -08:00
Leonardo Zide
99a0011764 Removed gNumUserColors. 2021-01-23 10:21:00 -08:00
Leonardo Zide
3553de5a58 Keep the color index constant when reloading colors. 2021-01-23 10:16:44 -08:00
Leonardo Zide
5a796232f0 Update the color list widget when the color config changes. 2021-01-22 16:01:42 -08:00
Leonardo Zide
63a6590fc8 Replaced hardcoded stud style values with an enum. 2021-01-22 14:16:28 -08:00
Leonardo Zide
0c03fd3fea Fixed crash using the --stud-style option. 2021-01-22 13:59:36 -08:00
Leonardo Zide
eb70a09961 Fixed issues with stud colors. 2021-01-22 13:40:16 -08:00
Trevor SANDY
f21d7ad63a Stud style - Rename stud logo 2021-01-20 13:19:29 +01:00
Trevor SANDY
0a749f6f3a Stud style 2021-01-20 13:19:09 +01:00
Leonardo Zide
a8d757c0c4 Added a system to override primitives and updated the stud logos to use it. 2021-01-18 15:23:13 -08:00
Leonardo Zide
cbfd2ce4bc Renamed enum. 2021-01-18 13:38:17 -08:00
Leonardo Zide
c1d7e986b3 Added stud logo primitives. 2021-01-18 12:09:33 -08:00
Leonardo Zide
cc75291125 Added number and PLI toggles. 2021-01-17 11:05:50 -08:00
Leonardo Zide
00f3f0588f Cleanup. 2021-01-16 18:27:39 -08:00
Leonardo Zide
e86ec2300a Fixed wrong PLI images. 2021-01-16 15:14:23 -08:00
Leonardo Zide
8c94738cb6 Changed default font. 2021-01-16 15:14:05 -08:00
Leonardo Zide
61517b21d0 Customizable PLI. 2021-01-16 14:43:24 -08:00
Leonardo Zide
19e439c32b Better page update after a property changes. 2021-01-16 11:11:59 -08:00
Leonardo Zide
4c8141e573 Refactored the property system. 2021-01-15 18:28:41 -08:00
Leonardo Zide
7001229337 More generic property system. 2021-01-15 17:50:15 -08:00
Leonardo Zide
142eb5c82f Working background color. 2021-01-15 15:40:06 -08:00
Leonardo Zide
239e753749 Working step number options. 2021-01-15 15:37:28 -08:00
Leonardo Zide
ec4044dcfa Use QGraphicsScene::selectionChanged. 2021-01-15 14:43:31 -08:00
Leonardo Zide
d4084ffb00 Added step number properties. 2021-01-15 14:24:44 -08:00
Leonardo Zide
26c34e3609 Initial background color support. 2021-01-14 18:19:58 -08:00
Leonardo Zide
449f405d17 Offset minifig accessories a bit. 2021-01-14 15:24:17 -08:00
Leonardo Zide
a85bbec789 Updated deprecated functions. 2021-01-14 14:51:43 -08:00
Leonardo Zide
dce4aa0644
Fixed typo. 2021-01-14 10:09:49 -08:00
Leonardo Zide
9009a974ad Case insensitive submodel compare. Fixes #533. 2021-01-13 15:36:12 -08:00
Leonardo Zide
5febd5f25f Fixed parsing step number. Fixes #599. 2021-01-13 11:39:55 -08:00
Leonardo Zide
661d002109 Fixed /w4 not getting set. 2021-01-13 11:11:31 -08:00
Leonardo Zide
1b0a47f692 Fixed aarch compile error. 2021-01-12 18:29:11 -08:00
Leonardo Zide
8f30690ee2
Merge pull request #596 from sisco0/fix-compile-warning-reorder
Fixed initialization order at compile time
2021-01-12 15:47:46 -08:00
Leonardo Zide
f74c2cb71c Updated version string. 2021-01-12 15:40:44 -08:00
Leonardo Zide
548bb3fe16 Updated version number. 2021-01-12 15:12:48 -08:00
Leonardo Zide
2a156cf182 Removed instructions from menu. 2021-01-12 15:10:38 -08:00
Leonardo Zide
b8a8cb6730 Removed direct GL function calls. 2021-01-12 14:29:56 -08:00
Leonardo Zide
4e4fc504da Removed unused param. 2021-01-12 13:58:05 -08:00
Leonardo Zide
92227eda8b Removed unused variable. 2021-01-12 13:48:04 -08:00
Leonardo Zide
c92c423e3f Added option to color grid origin lines. Fixes #372. 2021-01-11 18:49:57 -08:00
Leonardo Zide
e873ba2a35 Split console output into stdout and stderr. 2021-01-11 09:54:56 -08:00
Leonardo Zide
7222e8db14 Fixed default preview placement. 2021-01-11 08:59:29 -08:00
Leonardo Zide
9a681bff0f Print message when saving files from the command line. 2021-01-10 18:07:27 -08:00
Francisco J. Solis-Munoz
bdd4dcdf3d Fixed initialization order at compile time 2021-01-10 19:59:01 -06:00
Leonardo Zide
f13e4ad056 Refactored command line parsing. 2021-01-10 17:45:28 -08:00
Leonardo Zide
5ca460c0bf Set default surface format before creating lcApplication instance. Fixes #594 , #577. 2021-01-10 11:03:54 -08:00
Leonardo Zide
6bfc4ff9b1 Removed Tex2DMS functions. 2021-01-09 18:01:03 -08:00
Leonardo Zide
a0867c9b80 Framebuffer cleanup. 2021-01-09 17:57:24 -08:00
Leonardo Zide
31ce044a65 Cleanup. 2021-01-09 16:37:32 -08:00
Leonardo Zide
138f749053 Use part color for wireframe lines. 2021-01-09 16:02:23 -08:00
Leonardo Zide
601eb56322 Fixed edge around parts list images. 2021-01-08 15:11:02 -08:00
Leonardo Zide
dbb4c9e44b QGLWidget cleanup. 2021-01-08 11:25:24 -08:00
Leonardo Zide
ab9df4a712 Require Qt 5.4. 2021-01-08 10:57:39 -08:00
Leonardo Zide
b70fab3059 Require Qt5. 2021-01-08 10:35:52 -08:00
Leonardo Zide
e6397a98ac Added background override. 2021-01-07 17:04:19 -08:00
Leonardo Zide
5058455666 Better page layout. 2021-01-07 11:48:43 -08:00
Leonardo Zide
ea83db6987 Added Page Setup Dialog. 2021-01-07 10:46:57 -08:00
Leonardo Zide
1abc81e02f Qt4 fix. 2021-01-06 18:02:56 -08:00
Leonardo Zide
f89ae87c26 Fixed runtime warning when saving images. 2021-01-06 17:55:38 -08:00
Leonardo Zide
f4461756bd Added Page Setup controls. 2021-01-06 17:45:38 -08:00
Leonardo Zide
5c2a5aa167 Dockable page list widget. 2021-01-06 14:06:15 -08:00
Leonardo Zide
2d5d719902 Fixed wrong signal. 2021-01-06 13:40:16 -08:00
Leonardo Zide
47661710db Don't create widgets when saving images from the command line. 2021-01-06 09:55:03 -08:00
Leonardo Zide
39af536301 Multiple rows/columns instructions. 2021-01-05 18:48:12 -08:00
Leonardo Zide
e6d2c6bdce Maybe clang fix. 2021-01-05 15:43:23 -08:00
Leonardo Zide
52ab6c4f59 gcc fixes. 2021-01-05 15:19:53 -08:00
Leonardo Zide
f9c025f3b9 Show preview widget when double clicking. Fixes #589. 2021-01-05 12:32:03 -08:00
Leonardo Zide
176b238faa Array cleanup. 2021-01-05 12:27:45 -08:00
Leonardo Zide
cb710206b7 Moved key functions into a separate class. 2021-01-05 11:26:01 -08:00
Leonardo Zide
660bb38bdd Fixed typo. 2021-01-03 15:01:28 -08:00
Leonardo Zide
098ee45e5b Better ortho zoom. 2021-01-03 12:19:57 -08:00
Leonardo Zide
725901e97e Fixed Qt4 error. 2021-01-03 11:26:47 -08:00
Leonardo Zide
28c27d8326 Fixed hidden floating dockwidgets flashing at startup. Fixes #588. 2021-01-02 10:49:56 -08:00
Leonardo Zide
cfe3fc0284 Fixed zoom extents direction. Fixes #587. 2021-01-02 10:40:30 -08:00
Leonardo Zide
80f5eb5582 Reorganized application shutdown. 2021-01-02 10:23:51 -08:00
Leonardo Zide
72763ddc11 Create offscreen context at startup and reuse it. 2021-01-01 18:41:28 -08:00
Leonardo Zide
6b2f8fa68c Viewpoint name parsing cleanup. 2021-01-01 15:04:27 -08:00
Leonardo Zide
3d77537408 Clear placeholder model mesh. Fixes #586. 2021-01-01 14:28:08 -08:00
Leonardo Zide
2e2b1f0bb5 Resize view before setting camera when saving images from the command line. 2021-01-01 12:14:30 -08:00
Leonardo Zide
6c06e329e6 Customizable marquee colors. Fixes #544. 2020-12-31 15:54:28 -08:00
Leonardo Zide
24f3bbb45a Better ortho zoom extents math. 2020-12-31 14:46:31 -08:00
Leonardo Zide
69cfc71f3b Removed global placeholder mesh. 2020-12-31 14:23:08 -08:00
Leonardo Zide
499e648673 Use individual bounding boxes for zoom extents. 2020-12-31 10:22:12 -08:00
Leonardo Zide
e99c776878 More readable startup code. 2020-12-30 18:22:02 -08:00
Leonardo Zide
9f6c0abf23 Set MSAA from application. 2020-12-30 16:43:23 -08:00
Leonardo Zide
98411ecebc Added text color option. Fixes #581. 2020-12-30 13:44:08 -08:00
Leonardo Zide
801aab7cce Show error message if save option used without a file name. 2020-12-30 11:06:38 -08:00
Leonardo Zide
12089cca33 Removed properties widget margins. 2020-12-30 10:48:51 -08:00
Leonardo Zide
7ec71d8602 Reorganized view sphere and preview options. Fixes #584. 2020-12-30 10:39:04 -08:00
Leonardo Zide
855ca66018 Removed margins. 2020-12-29 19:27:40 -08:00
Leonardo Zide
58981f9580 Added option to paint selected pieces. Fixes #561. 2020-12-29 19:20:03 -08:00
Leonardo Zide
3358553e1d Moved clear functions to context. 2020-12-29 15:32:11 -08:00
Leonardo Zide
80adb54acf Always keep 1 context valid. 2020-12-29 14:42:59 -08:00
Leonardo Zide
6cc91c0f20 Use offscreen context for the parts list. 2020-12-29 12:23:36 -08:00
Leonardo Zide
1367a5d6f4 Fixed parts list icons when MSAA is on but not supported. 2020-12-28 18:10:54 -08:00
Leonardo Zide
129e0f886f Compile fix. 2020-12-28 17:54:24 -08:00
Leonardo Zide
125d4a1349 Compile fix. 2020-12-28 17:41:56 -08:00
Leonardo Zide
4ed04e4e25 Use an offscreen buffer when saving images from the command line. 2020-12-28 17:30:41 -08:00
Leonardo Zide
985fb8b778 Fixed MSAA check. 2020-12-28 14:36:04 -08:00
Leonardo Zide
0499e055e1 Crash fix #578. 2020-12-28 12:08:10 -08:00
Leonardo Zide
7c9e3a34ee Don't show context menu when a clickable tool is assigned to the right button. 2020-12-28 10:42:51 -08:00
Leonardo Zide
542304f82e Use recalculated up vector. Fixes #574. 2020-12-28 10:16:40 -08:00
Leonardo Zide
7ef1d7b733 Fixed crash when MSAA is not available. Fixes #573. 2020-12-28 09:42:13 -08:00
Leonardo Zide
4e6cbca31c Switch to QOpenGLWidget. 2020-12-27 13:05:55 -08:00
Leonardo Zide
2ccdc85f00 Workaround for what looks like a Qt crash when closing the app with a floating preview. 2020-12-26 18:16:01 -08:00
Leonardo Zide
24c9335c7f Added Q_OBJECT. 2020-12-26 18:15:35 -08:00
Leonardo Zide
81fb79b805 Use fewer draw calls for the axis. 2020-12-26 16:30:28 -08:00
Leonardo Zide
81817ac4ad Merged duplicate preview view sphere settings. 2020-12-26 16:00:51 -08:00
Leonardo Zide
18ad850e1a Fixed preview overlays and zoom extents. 2020-12-26 12:10:14 -08:00
Leonardo Zide
ddd8405c7e Color entire axis arrows. 2020-12-26 11:53:35 -08:00
Leonardo Zide
c26b52ea5e Fixed preview axis. Fixes #571. 2020-12-26 11:44:41 -08:00
Leonardo Zide
17cada38b6 Warning fix. 2020-12-26 11:09:15 -08:00
Leonardo Zide
7de5d4eb22 Renamed view class. 2020-12-25 10:54:33 -08:00