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

LeoCAD not recognize "ldconfig.ldr" stored in same folder with "complete.zip" #359

Closed
Symbian9 opened this issue Jun 17, 2019 · 6 comments

Comments

@Symbian9
Copy link
Contributor

commented Jun 17, 2019

Version: LeoCAD-Linux-50daa6a-x86_64.AppImage

Actual behavior

I just tried LDConfig.ldr UPDATE 2019-05-24 and UPDATE 2019-06-11.

If set "Custom parts library" as folder (e.i., ../ldraw) and replace ../ldraw/LDconfig.ldr file with custom LDConfig.ldr — LeoCAD recognize new colors.

pic.1

If set "Custom parts library" as ZIP and (e.i., ../complete.zip) and add in same folder ldrawunf.zip + custom ldconfig.ldr (or LDConfig.ldr) - LeoCAD recognize complete.zip and ldrawunf.zip, BUT ldconfig.ldr NOT recognized!

pic.2

Expected behavior

LeoCAD should recognize ldconfig.ldr (or LDConfig.ldr) placed in same folder where ZIP of "Custom parts library" stored.

REFERENCE

@trevorsandy

This comment has been minimized.

Copy link
Contributor

commented Jun 17, 2019

Couldn't you just put the ldconfig.ldr in the complete.zip as it would be when officially shipped ?

@Symbian9

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2019

Couldn't you just put the ldconfig.ldr in the complete.zip as it would be when officially shipped ?

This issue about importing custom ldconfig.ldr placed side-by-side with ZIP of "Custom parts library".

Main idea of this LeoCAD feature is set custom LDConfig from external file without need to merge it to ZIP.

@trevorsandy

This comment has been minimized.

Copy link
Contributor

commented Jun 17, 2019

Understood. Indeed, this is a nice enhancement - particularly for building instructions. I did not well understand your main idea from the title of the ticket. My understanding was LeoCAD should recognize a custom LDConfig.ldr file if placed in the same directory as the complete.zip.

I have already implemented this feature in the LeoCAD library bundled with LPub3D but instead of automatically, detecting the colour file in a specific location, the user must define the alternate colour file in the Preference settings, which also actively indicates that LeoCAD should use an alternate colour file.

Cheers,

@leozide

This comment has been minimized.

Copy link
Owner

commented Jun 17, 2019

I think there should be a configuration entry for both ldconfig.ldr and minifig.ini.

@Symbian9

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2019

there should be a configuration entry for both ldconfig.ldr and minifig.ini

Yeah. Add such fields in "Preferences" dialog, please.

@Symbian9

This comment has been minimized.

Copy link
Contributor Author

commented Jun 18, 2019

Here is mockup of "Custom LDConfig.ldr" and "Custom MLCad.ini" fields for "Preferences" window

pic.1

Those fields should recognize any plain text files with extensions: .ini, .ldr or .txt (maybe also .dat and .cfg).

LeoCAD should just check that "Custom LDConfig.ldr" file started with next two strings:

0 LDraw.org Configuration File
0 Name: LDConfig.ldr
...

And check that "Custom MLCad.ini" file started with next string:

; MLCad.ini
...

LeoCAD should run checks after click OK button, but before closing "Preferences" window. If checks will fail LeoCAD should show warning message:

Custom LDConfig.ldr (MLCad.ini) file is not correct or is broken.

Please, check it and fix or replace with correct file!

@leozide leozide closed this in 5a3abf1 Jun 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.