Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldraw-thubnailer generates thumbnails only for .ldr files #77

Open
nathaneltitane opened this issue Sep 19, 2023 · 11 comments
Open

ldraw-thubnailer generates thumbnails only for .ldr files #77

nathaneltitane opened this issue Sep 19, 2023 · 11 comments
Assignees

Comments

@nathaneltitane
Copy link

Describe the bug
ldraw-thumnailer seems to generate thumbs only for ldr file extension, not mpd.

To Reproduce
Steps to reproduce the behavior:
install ldview
restart computer
check ldraw files for thumbnail

Expected behavior
ldraw-thumnailer should generate thumbnails for all supported ldraw spec file types

Screenshots
image

Platform (please complete the following information):
image

Additional context
image

@tcobbs
Copy link
Owner

tcobbs commented Sep 19, 2023

While mpd as a file extension is officially deprecated by LDraw (in favor of always using ldr for all user-generated LDraw files), it is specific enough that it does seem like it should be supported. I've assigned this to @pbartfai to take a look.

@nathaneltitane
Copy link
Author

nathaneltitane commented Sep 19, 2023

if that's the case I'll just rename my mpd files to ldr and call it a day.

Thanks!

EDIT:

Although, this is still relevant:

https://www.ldraw.org/article/47.html

and this as well:

https://wiki.ldraw.org/wiki/LDR

@tcobbs-bentley
Copy link

I do feel that ldraw-thumbnailer should support the mpd file extension. Having said that, if you look at the first link (to the MPD spec) you will note that all of the sample files have an ldr file extension. IMO, the wiki pages for LDR files should be updated to explicitly state that they can contain MPDs, and the wiki for MPD should also explicitly state that ldr is the preferred extension for MPD files.

@nathaneltitane
Copy link
Author

nathaneltitane commented Sep 19, 2023

I do feel that ldraw-thumbnailer should support the mpd file extension. Having said that, if you look at the first link (to the MPD spec) you will note that all of the sample files have an ldr file extension. IMO, the wiki pages for LDR files should be updated to explicitly state that they can contain MPDs, and the wiki for MPD should also explicitly state that ldr is the preferred extension for MPD files.

Sounds good. Out of habit, I've always discerned between mpd and ldr (mpd explicitly being the format I use when building multi-part model asssemblies)

@nathaneltitane
Copy link
Author

@pbartfai @tcobbs on a side note, was taking anothe rlook at the thumbnailer - was looking to modify it (just for the sake of it to have it render using leocad)

does the thumbnailer explicitly call LDView anywhere else other than in /usr/bin/ldraw-thumbnailer?

What woudl it take to have it render with any other render capable LDraw compatible software other than the image/render-specific arguments?

Explicitly setting the arguments in ldraw-thumbnailer gets it to render but not when replacing the file under /usr/bin/

please see attached:

ldraw-thumbnailer.txt

@pbartfai
Copy link
Collaborator

pbartfai commented Sep 20, 2023

@nathaneltitane when you double click on .mpd file will it be opened with LDView? So is the file type properly detected?
Which file manager do you use? Dolphin?
Is the problem experienced with Gnome? (It worked on my Gnome/Nautilus)

@nathaneltitane
Copy link
Author

nathaneltitane commented Sep 20, 2023

@nathaneltitane when you double click on .mpd file will it be opened with LDView? So is the file type properly detected? Which file manager do you use? Dolphin? Is the problem experienced with Gnome? (It worked on my Gnome/Nautilus)

Hi @pbartfai:

I am currently running KDE (been 4 years actually) - Dolphin is my main file manager - I haven't tried with Gnome/Nautilus

As far as opening the file (mpd or ldr) with LDView, I first had to assign the file type to LDView for some odd reason as KDE did not automatically associate the file type (even though the mimetype seems to be expressed correctly - I have no issues with LeoCAD)

EDIT:

I had a look at LPub3d's mimetype strings and Trevor seems to add 'application/x-multi-part-ldraw' to the 'MimeType=' line of his .desktop files.

I've manually added it to the relevant .desktop entries in charge of thumbnailing for LDView, restarted my computer and both the ldr and mpd are now thumbnailed.

EDIT 2:

Confirmed:

I reinstalled LDView to undo changes, cleared the home cache directory, restarted and now only the ldr file has a thumbnail after initialization. The MimeType declaration is what's bugging it.

Please update all MimeType entries to

MimeType=application/x-ldraw;application/x-multipart-ldraw;application/x-multi-part-ldraw;

pbartfai added a commit that referenced this issue Sep 20, 2023
@nathaneltitane
Copy link
Author

nathaneltitane commented Sep 22, 2023

@pbartfai

To continue on the mimetype saga, I've had a look at the files under QT/desktop

Attached are the modified files to reflect the missing x-multi-part-ldraw entries in those files

Also, the plugin entry label has been renamed to 'LDraw Models' to better reflect the file type, rather than simply have 'LDView' in the checkbox menu selections

desktop.tar.gz
kde5.tar.gz

@nathaneltitane
Copy link
Author

More issues about the thumbnailer - I decided to move upstream and install Debian 12 Gnome

Neither my custom leocad thumbnailer nor the packaged LDView one are functioning either..

Bit of an annoyance...

@pbartfai
Copy link
Collaborator

Please note Gnome thumbnail runs in bubblewrap jail. Qt version of LDView is not compatible with that. OSMesa works fine. The script /usr/bin/ldraw-thumbnailer detect it and will fallback to OSMesa if it is available.

@nathaneltitane
Copy link
Author

I understand now why the leocad rendering would not work then. thanks for the clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants