# HG changeset patch # User Santeri Piippo # Date 1376832818 -10800 # Node ID 3327a32436f49e137fa4fb7af91800742c541598 # Parent ae4fea87d6a122fa903f1f245a1027f1e447fe51 added support for logoed studs diff -r ae4fea87d6a1 -r 3327a32436f4 changelog.txt --- a/changelog.txt Sun Aug 18 16:04:36 2013 +0300 +++ b/changelog.txt Sun Aug 18 16:33:38 2013 +0300 @@ -13,6 +13,7 @@ - Fixed: Checking the Hi-Res option would not allow segment values over 16. - Added support for multiple spaces before the ring number. - Added new action "Add History Line" for quickly inserting 0 !HISTORY lines to headers +- Added support for logoed studs, this should satisfy Steffen. :p - Added support for '0 BFC CLIP' and '0 BFC NOCLIP' and added auto-correction from errorneous MLCAD syntax ('0 BFC CERTIFY CLIP'). - When an external program is attempted to be used without a binary path defined, one will be asked diff -r ae4fea87d6a1 -r 3327a32436f4 src/configDialog.cpp --- a/src/configDialog.cpp Sun Aug 18 16:04:36 2013 +0300 +++ b/src/configDialog.cpp Sun Aug 18 16:33:38 2013 +0300 @@ -50,6 +50,7 @@ extern_cfg (str, net_downloadpath); extern_cfg (bool, net_guesspaths); extern_cfg (bool, net_autoclose); +extern_cfg (bool, io_logostuds); extern_cfg (str, prog_ytruder); extern_cfg (str, prog_rectifier); @@ -120,6 +121,7 @@ ui->blackEdges->setChecked (gl_blackedges); // ui->scemanticInlining->setChecked (edit_schemanticinline); ui->implicitFiles->setChecked (gui_implicitfiles); + ui->m_logostuds->setChecked (io_logostuds); } // ============================================================================= @@ -589,6 +591,7 @@ net_downloadpath = dlg.getUI()->downloadPath->text(); net_guesspaths = dlg.getUI()->guessNetPaths->isChecked(); net_autoclose = dlg.getUI()->autoCloseNetPrompt->isChecked(); + io_logostuds = dlg.getUI()->m_logostuds->isChecked(); if (net_downloadpath.value.right (1) != DIRSLASH) net_downloadpath += DIRSLASH; diff -r ae4fea87d6a1 -r 3327a32436f4 src/file.cpp --- a/src/file.cpp Sun Aug 18 16:04:36 2013 +0300 +++ b/src/file.cpp Sun Aug 18 16:33:38 2013 +0300 @@ -34,6 +34,7 @@ cfg (str, io_ldpath, ""); cfg (str, io_recentfiles, ""); +cfg (bool, io_logostuds, false); extern_cfg (str, net_downloadpath); static bool g_loadingMainFile = false; @@ -176,6 +177,26 @@ // ============================================================================= // ----------------------------------------------------------------------------- File* openLDrawFile (str relpath, bool subdirs) { + { + File* logofile; + + // Special exception for logoed studs: + // stud.dat -> stud-logo.dat + // stud2.dat -> stud2-logo.dat + // NOTE: This is probably going to change in the very near future! + if ( + relpath == "stud.dat" && + (logofile = openLDrawFile ("stud-logo.dat", subdirs)) != null + ) + return logofile; + + if ( + relpath == "stud2.dat" && + (logofile = openLDrawFile ("stud2-logo.dat", subdirs)) != null + ) + return logofile; + } + print ("%1: Try to open %2\n", __func__, relpath); File* f = new File; str fullPath; diff -r ae4fea87d6a1 -r 3327a32436f4 src/ui/config.ui --- a/src/ui/config.ui Sun Aug 18 16:04:36 2013 +0300 +++ b/src/ui/config.ui Sun Aug 18 16:33:38 2013 +0300 @@ -7,7 +7,7 @@ 0 0 513 - 377 + 351 @@ -190,41 +190,73 @@ - - - Makes colored objects (non-16 and 24) appear colored in the list view. A red triangle will, for instance, have its entry written in red text. This can be useful to locate colored objects. - - - Colorize objects in list view - - - - - - - Polygons' front sides become green and back sides red. - - - Red/green BFC view (incomplete) - - - - - - - Makes all edgelines appear black. If this is not set, edge lines take their color as defined in LDConfig.ldr. - - - Black edges - - - - - - - List implicitly loaded files - - + + + + + + + Makes all edgelines appear black. If this is not set, edge lines take their color as defined in LDConfig.ldr. + + + Black edges + + + + + + + Polygons' front sides become green and back sides red. + + + Red/green BFC view (incomplete) + + + + + + + Makes colored objects (non-16 and 24) appear colored in the list view. A red triangle will, for instance, have its entry written in red text. This can be useful to locate colored objects. + + + Colorize objects in list view + + + + + + + List implicitly loaded files + + + + + + + + + + + Use logoed studs + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + +