Commit graph

377 commits

Author SHA1 Message Date
Leonardo Zide
cb710206b7 Moved key functions into a separate class. 2021-01-05 11:26:01 -08:00
Leonardo Zide
72763ddc11 Create offscreen context at startup and reuse it. 2021-01-01 18:41:28 -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
7ec71d8602 Reorganized view sphere and preview options. Fixes #584. 2020-12-30 10:39:04 -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
4ed04e4e25 Use an offscreen buffer when saving images from the command line. 2020-12-28 17:30:41 -08:00
Leonardo Zide
7de5d4eb22 Renamed view class. 2020-12-25 10:54:33 -08:00
Leonardo Zide
939e80ab4b Renamed view files. 2020-12-25 10:43:22 -08:00
Leonardo Zide
c8eebe5d77 Detect files that have Name or Author on the first line. Fixes #568. 2020-12-24 12:10:47 -08:00
Leonardo Zide
e27b235936 Derive preview from view. 2020-12-24 11:32:56 -08:00
Leonardo Zide
95bf7e43ff Rotate view around the minifig center. 2020-12-23 18:45:34 -08:00
Leonardo Zide
bcfbaa3080 Crash fix. 2020-12-23 18:30:01 -08:00
Leonardo Zide
0282a88c87 Sort part counts numerically. 2020-12-23 18:07:12 -08:00
Leonardo Zide
d1991b9264 Moved Minifig Dialog. 2020-12-20 11:24:50 -08:00
Leonardo Zide
b77210db22 Use a regular View for the Minifig Wizard. 2020-12-19 16:05:29 -08:00
Leonardo Zide
de29c49608 Reorganized redraw. 2020-12-15 17:19:32 -08:00
Leonardo Zide
2d7aba8895 Use QString for object names. 2020-12-13 16:27:21 -08:00
Leonardo Zide
db7259b7a5 Fixed ugly border in the Minifig Wizard. 2020-12-06 19:33:15 -08:00
Leonardo Zide
60a0f9190d Widget merging. 2020-12-05 11:02:10 -08:00
Leonardo
366018ee8c Scoped lcTool. 2020-12-04 15:38:49 -08:00
Leonardo
256d3792b1 Widget cleanup. 2020-12-04 12:49:01 -08:00
Leonardo Zide
9e12b480ce Moved DrawBackground to lcGLWidget. 2020-11-26 12:07:41 -08:00
Leonardo Zide
ef2220ffdc Moved background color to global options. 2020-11-26 11:51:50 -08:00
Leonardo Zide
462897caf7 Handle some malformed mpd files. Fixes #533.
- Skip duplicate submodels
- Skip recursive includes
2020-11-25 19:54:32 -08:00
Leonardo Zide
6decd02761 Fixed crash on exit. Fixes #520. 2020-10-17 14:41:59 -07:00
Trevor SANDY
c5426abf24 3D Preview - update background from submodel properties. Treats #513 2020-10-13 01:26:39 +02:00
Trevor SANDY
a239e504ec 3D Preview
3D Preview - restore doc format
2020-10-03 16:20:59 +02:00
Leonardo Zide
cc68126a48 gcc fix. 2020-06-01 12:29:30 -07:00
Leonardo Zide
44fa79ecb6 Instructions Dialog mockup. 2020-05-31 18:46:36 -07:00
Leonardo Zide
9e8400cbba Support local transforms for translations. 2020-05-08 17:53:53 -07:00
Leonardo Zide
9fa660313a Use scoped enum. 2020-05-03 13:04:40 -07:00
Leonardo Zide
b94b401b06 Save files with OMR style header. 2020-05-03 12:11:51 -07:00
Leonardo Zide
53ed56e60f Added option to rotate pieces around their local center. Closes #430. 2020-04-26 20:01:35 -07:00
Leonardo Zide
acd7dd3f9a Allow highlight color to be set by the user. 2020-04-25 11:36:28 -07:00
Leonardo Zide
5a76f4c870 Scoped enums. 2020-04-18 19:45:21 -07:00
Leonardo Zide
a5c2e617d5 Array cleanup. 2020-04-18 19:38:29 -07:00
Leonardo Zide
ad45bb9a47 Paste pieces to the current step. Fixes #452. 2020-04-12 13:01:28 -07:00
Leonardo Zide
70da56bb05 More accurate bounding box calculation for submodels. 2020-04-11 11:04:27 -07:00
Johannes Sixt
ca73f3e3ad
Synthesis of Technic Universal Joints (#456)
* Split synth info initialzation by type.

We are going to remove the type enumeration and use a class hierarchy
instead. This preparation will then be helpful.

* Make Add...Parts() overrides of a virtual AddPart() function.

Since we have a class hierarchy for the different synthesized pieces, we
can now turn a case distinction into a virtual function call.

* Move initialization based on type to derived class constructors.

Move initialization of end transformations of flexible parts into
class lcSynthInfoCurved.

* Make GetDefaultControlPoints() virtual with overrides.

* Remove obsolete enum lcSynthType.

We have replaced its purpose by derived classes by now.

* Initialize shock absorbers' spring part ID early.

This removes the awkward early return that is needed in the if-else
cascade.

* Split lcSynthInfo into derived classes for curved and straight pieces.

* Only curved parts have varying sections, start, middle, and end properties.

Move the properties from the base class to the derived class that needs
them.

* Use derived classes to mark synthesized objects of different kinds.

We will extend the derived classes in the upcoming commits.

* PieceInfo is only needed to synthesize some hoses and shock absorbers.

* Initialize edge part IDs of flexible hoses early.

This removes another case distinction in AddParts().

* Verify the number of control points loaded from a model file.

* Synthesize Technic universal joints.

The direction of one end can be changed so that it points to the control
point.

* Technic universal joints need only the position of the control point.

* Synthesize legacy universal joints.
2020-03-30 12:17:08 -07:00
Leonardo Zide
90f1336a48 Scoped enums and constexpr. 2020-03-22 13:44:20 -07:00
Leonardo Zide
ade7334fa1 Support up to 10 control points and prevent the user from adding more. 2020-03-22 11:12:15 -07:00
Leonardo Zide
85a9b19b2c Warning fixes. 2020-02-24 14:31:08 -08:00
Leonardo Zide
e5d06a29a2 Renamed pipette to color picker and fixed indentation. 2020-02-15 11:14:12 -08:00
RenateZwei
aa3ead6504
Added color picker (#446)
Added color picker
2020-02-15 10:59:14 -08:00
Leonardo Zide
3b8b22493a Reorganized PLI function. 2020-01-20 15:39:20 -08:00
Leonardo Zide
6d818d48d2 Fixed HTML export not including submodels. Fixes #429. 2020-01-11 12:45:36 -08:00
Leonardo Zide
cbf534fcdf Added option to fade previous steps. 2020-01-01 17:06:17 -08:00
Leonardo Zide
1f441907ee Fixed crash loading files with invalid type 1 lines. Fixes #413. 2019-12-31 13:07:45 -08:00
Leonardo Zide
eae50b6836 Print submodels. Fixes #409. 2019-12-30 16:04:58 -08:00
Leonardo Zide
e9cdeed008 Sort piece insert preview with the rest of the scene. 2019-11-30 12:19:13 -08:00
Leonardo Zide
9e41edfef0 Fixed loading mpd files with consecutive NOFILE statements. 2019-11-26 12:13:22 -08:00
Leonardo Zide
5854cfce89 Added wrapper for glDepthMask. 2019-11-09 18:11:25 -08:00
Leonardo Zide
4493c3f6f2 Array cleanup. 2019-07-04 17:06:26 -07:00
Leonardo Zide
b42e3b7e31 Array cleanup. 2019-06-23 18:28:14 -07:00
Leonardo Zide
514c1e54ec Moved common includes to precompiled header. 2019-05-30 12:06:54 -07:00
Leonardo Zide
e45fe81ace Array cleanup. 2019-05-27 16:39:51 -07:00
Leonardo Zide
3070d25663 Support exporting flexible parts. Fixes #157. 2019-05-26 11:08:47 -07:00
Leonardo Zide
590422a30a Array cleanup. 2019-03-17 13:27:57 -07:00
Leonardo Zide
b18645b880 Fixed hidden parts being exported and shown in parts lists. 2019-03-13 14:36:40 -07:00
Leonardo Zide
b31d33fd67 Don't show hidden pieces in submodels. 2019-03-12 19:51:04 -07:00
Leonardo Zide
1d8988fbb4 Removed .svg extension from desktop file per @probonopd. 2019-03-10 14:06:01 -07:00
Thomas Cujé
cc2a5156f7 Place new submodel at origin. Fixes #314 2019-03-10 20:28:22 +01:00
Thomas Cujé
94d4e49ed4 Minor improvements
- Fix gcc fallthrough warnings
- Replace deprecated QT QStyleOptionViewItemV3
- Improve translator usage
- Use QString instead of QByteArray
2019-03-10 01:17:24 +01:00
Leonardo Zide
53935734eb Clean up for loops. 2019-03-09 09:50:34 -08:00
Leonardo Zide
319dd3a1a0 Preserve file case when loading a file from the same folder as the current project. Fixes #302. 2019-02-27 16:35:02 -08:00
Leonardo Zide
69d46cc4c4 Allow undoing hiding operations. Fixes #251. 2018-09-02 10:31:57 -07:00
Leonardo Zide
1c1a5fb599 Fixed model comments being duplicated every time undo is used. Fixes #247. 2018-08-01 14:05:01 -07:00
Leonardo Zide
152a3cf7b6 Fixed edit/find/select dialogs not working while editing a submodel. 2018-04-16 18:29:42 -07:00
Leonardo Zide
752ae54788 Fixed interface draw location in active submodels. 2018-04-07 17:17:32 -07:00
Leonardo Zide
718b31a2bd Fixed selection tinting when editing submodels. 2018-04-07 11:45:00 -07:00
Leonardo Zide
b30ffd1b59 Initial implementation of in place submodel editing. 2018-03-29 10:20:36 -07:00
Leonardo Zide
e0acb8f2b3 Fix case of part ids included in models before searching for them. Fixes #215. 2018-03-23 19:03:16 -07:00
jschwender
f1e5796580 Update lc_model.cpp (#208)
Fixed typo in undo string.
2018-02-28 14:07:24 -08:00
Leonardo Zide
51bbdb9b97 Added option to remove key frames from selected objects. 2018-02-24 12:47:19 -08:00
Leonardo Zide
172528ac1f Removed calls to foreach. 2018-02-21 16:12:18 -08:00
Leonardo Zide
10491629b7 Duplicate groups when duplicating pieces. Fixes #158. 2018-02-19 19:12:32 -08:00
Leonardo Zide
5ac11506b0 Fixed parts inside mpd files not drawing. Fixes #178. 2018-02-06 22:07:35 -08:00
Leonardo Zide
7ca156b3a7 Added commands for moving the camera relative to its current orientation. 2018-01-15 11:35:15 -08:00
Leonardo
804e0f6f53 Save MSAA images. Fixes #101. 2017-12-26 10:19:20 -08:00
Leonardo Zide
be3c96006f Removed old DoDialog function. 2017-12-10 18:12:31 -08:00
Leonardo Zide
db1bccfee0 Handle unicode characters on the command line. 2017-12-02 19:42:42 -08:00
Leonardo Zide
d6ba0262af Removed LC_POINTER_TO_INT 2017-12-02 12:33:28 -08:00
Leonardo Zide
636e013455 Removed lcint types. 2017-12-02 12:22:04 -08:00
Leonardo Zide
2071d6810a Don't require a known extension when saving images from the command line. 2017-11-24 11:48:46 -08:00
Leonardo Zide
6878d0157f Support selection mode on all selection tools. 2017-11-21 22:54:49 -08:00
leozide
848cdd9daf Added piece selection modes. 2017-11-21 17:58:36 -08:00
leozide
b1527356a2 Replaced 10 degrees snap with 22.5 degrees. Closes #139. 2017-11-20 16:16:41 -08:00
leozide
696189e171 Added Shift+LMB shortcut to remove selection. 2017-11-20 15:12:00 -08:00
Leonardo Zide
3a055a4724 Only show used parts in search dialog. 2017-11-19 14:12:27 -08:00
Leonardo Zide
470be6b7a9 New piece free movement mode. 2017-11-12 19:38:07 -08:00
Leonardo Zide
6ca7934681 Removed axis lock option. 2017-11-11 12:46:56 -08:00
leozide
fd19af8e73 Preserve focus when duplicating pieces. Fixes #130. 2017-11-03 11:38:47 -07:00
leozide
ecdcd50239 Updated inventory import to use the newly added LDraw ID. 2017-09-15 14:52:05 -07:00
Leonardo Zide
8486295a02 Move parts after importing inventory. 2017-08-26 15:49:46 -07:00
leozide
3fc53d9d5f Added shading options. Closes #104. 2017-08-25 12:57:14 -07:00
leo
d39ec689a5 Fixed Qt4. 2017-08-20 14:06:13 -07:00
Leonardo Zide
138ebdacda Import set inventories. 2017-08-20 13:47:53 -07:00
Leonardo Zide
02231b363b Support saving images larger than 2048. 2017-07-30 14:18:57 -07:00
Leonardo Zide
82528a2c7a Don't uppercase part names when saving. 2017-07-27 09:21:55 -07:00
leozide
5de0644c7b Save positions with 4 digits and rotations with 6. 2017-07-26 17:34:25 -07:00
Leonardo Zide
94eb5b8ae2 Store library pieces in a map. 2017-07-23 19:35:18 -07:00
Leonardo Zide
5cd85a1584 Preserve case of part names in files. 2017-07-22 20:54:33 -07:00
Leonardo Zide
3d7bfdafb0 New LDD importer. 2017-07-08 09:29:35 -07:00
Leonardo Zide
77a70758f8 Fixed static analysis warnings. 2017-07-02 20:12:17 -07:00
Leonardo Zide
bca9b205af Support loading textures from the same folder of the model being loaded. 2017-07-01 17:12:09 -07:00
Leonardo Zide
f0eb8bde96 Added LDD importer. Closes #29. 2017-06-25 18:20:34 -07:00
Leonardo Zide
05104162e9 Only highlight new pieces when the option is enabled. 2017-06-20 08:20:59 -07:00
Alistair Buxton
2de2e2c187 Highlight parts added in the current step. 2017-06-20 07:47:31 -07:00
Leonardo Zide
82a4afb7a9 OpenGL ES cleanup. 2017-04-26 22:24:54 -07:00
leozide
8da318037d Removed fog options. 2017-04-21 14:17:03 -07:00
leozide
a219c281f2 Qt4 fix. 2017-04-20 18:56:35 -07:00
leozide
0381a0c74f Static analysis fixes. 2017-04-20 17:53:42 -07:00
leozide
f7d61f33ce Updated code to use nullptr and override. 2017-04-13 17:26:40 -07:00
Leonardo Zide
b9726a2a99 Reorganized scene and context classes. 2017-04-01 16:53:54 -07:00
Leonardo Zide
49a88e1ab4 Fixed synth parts adding the wrong mesh to the scene when in a submodel. Fixes #42. 2017-03-26 18:28:31 -07:00
Leonardo Zide
7bd3abf6b4 Fixed issues splitting views. 2017-03-26 10:28:58 -07:00
Leonardo Zide
57b8732ed6 Context state cleanup. 2017-03-25 12:29:28 -07:00
leozide
eb7a8a86de Removed SetTextureMode. 2017-03-24 18:36:58 -07:00
Leonardo Zide
c85f0f7eea Disable normals for unlit passes. 2017-03-24 09:34:53 -07:00
Leonardo Zide
9b933b6c57 Fixed comments in saved files being moved in some cases. Fixes #35, #36. 2017-03-18 17:42:34 -07:00
leozide
d6efc97089 Removed SetLightingMode. 2017-03-17 15:53:26 -07:00
Leonardo Zide
acd5a485f0 Added a decal material to fix the texmap extension. 2017-03-12 13:51:14 -07:00
leozide
cf65201095 Added Duplicate Piece action. 2017-03-08 15:49:57 -08:00
leozide
f7aa4890ee Remove empty steps when moving pieces to a new model. 2017-03-03 12:14:32 -08:00
leozide
1794e8c9c2 Fixed invalid bounding box when no pieces are visible. 2017-03-03 12:07:04 -08:00
leozide
7e3f572b8e Added shaders for each material/lighting combination. 2017-02-28 15:20:34 -08:00
Leonardo Zide
3d1efcabec Added room in the meshes for normals. 2017-02-18 11:12:35 -08:00
Leonardo Zide
641f4803e2 Added select by color dialog. Closes #18. 2017-02-16 22:57:11 -08:00
Leonardo Zide
6094899dc2 Fixed clang analyzer warnings. 2017-02-12 18:05:20 -08:00
Leonardo Zide
6b3869ce90 Fixes for iOS. 2017-02-11 12:41:00 -08:00
Leonardo Zide
0f2e808477 Fixed printing. 2017-02-11 09:46:21 -08:00
Leonardo Zide
e22d127660 String cleanup. 2017-02-07 09:35:11 -08:00
Leonardo Zide
e7fe26d2a4 Stop caching the GL viewport since OSX changes it when making a context current. 2017-01-29 19:31:30 -08:00
Leonardo Zide
8c318cbdf1 Multithreaded piece loading. 2017-01-22 19:28:05 -08:00
Leonardo
fcf4b24d84 Fixed crash pasting. 2016-12-31 06:36:49 -08:00
Leonardo
7dbc27a7ce Removed old preview widget. 2016-12-28 13:30:31 -08:00
Leonardo Zide
eb1bc1cd31 First pass of the new parts list widget. 2016-12-16 09:14:19 -08:00
Leonardo Zide
b2b143af99 Fixed incorrect camera position when saving images from the command line. 2016-12-07 21:57:53 -08:00
Leonardo Zide
ccadcf7e1a Fixed file name formatting when saving an image from the command line. 2016-12-07 09:08:23 -08:00
Leonardo Zide
1cacf33e4b Fixed file loading. 2016-12-04 18:12:39 -08:00
Leonardo Zide
dcfccd8eeb Rewrote how loose model files are loaded. 2016-11-25 17:12:19 -08:00
Leonardo
d8f14c1937 Removed code accessing library internals. 2016-11-16 14:53:41 -08:00
Leonardo
a74e51cd04 Fixed line endings. 2016-10-05 14:28:52 -07:00
Leonardo Zide
5d86d5ac98 Fixed reading loose mpd files referenced by another file. 2016-09-25 17:15:30 -07:00
leo
6d483252c5 Clean up of some old dialog code. 2016-08-01 03:44:15 +00:00
leo
21504371dd Fixed Minifig Wizard crash when closing. 2016-06-15 01:14:43 +00:00
leo
d8191b0758 Added option to control which models to export to HTML. 2016-05-30 22:41:03 +00:00
leo
1e8adcd880 Fixed HTML export of models with only 1 step. 2016-05-29 16:42:47 +00:00