Parts search paths


Parts search paths
#1
I was wondering if there is an official specification for parts folder priorities and limitations, I looked at the LDraw file format spec and it is somewhat vague in this area.

When loading an MPD file I search folders in this order:

- MPD subfiles
- unofficial parts folder
- unofficial p folder
- parts folder
- p folder
- MPD folder

And as for restrictions, should a file inside the MPD take priority over another file in the library (including primitives)? For example, if the MPD has a file called stud.dat, should it replace the studs in a part in the library?

It would be great to have some clarity on this to ensure consistency between applications.
Reply
RE: Parts search paths
#2
(2019-11-25, 22:29)Leonardo Zide Wrote: And as for restrictions, should a file inside the MPD take priority over another file in the library (including primitives)? For example, if the MPD has a file called stud.dat, should it replace the studs in a part in the library?

Yes.
Reply
RE: Parts search paths
#3
(2019-11-25, 22:36)Orion Pobursky Wrote: Yes.

What about if there's a file called stud.dat in the same folder as the mpd, should it be loaded instead of the one inside the mpd?

And if you're loading a plain ldr file and there's a file called stud.dat in the same folder as the ldr, does this stud.dat take priority over the one in the library as well?
Reply
RE: Parts search paths
#4
(2019-11-26, 19:25)Leonardo Zide Wrote: What about if there's a file called stud.dat in the same folder as the mpd, should it be loaded instead of the one inside the mpd?
I would expect the embedded file to have priority. If the person who prepared the mpd embedded the file, it's to use that file and not another.
Quote:And if you're loading a plain ldr file and there's a file called stud.dat in the same folder as the ldr, does this stud.dat take priority over the one in the library as well?
That's the default behaviour I think.
Reply
RE: Parts search paths
#5
(2019-11-26, 19:31)Philippe Hurbain Wrote: That's the default behaviour I think.

Would it be possible to remove this uncertainty (even you said "I think") by having the official spec state the correct search order?

From what you're saying it should be:

MPD subfiles
Model folder
Unoficial/P
Unoficial/Parts
P
Parts

Does P come before Parts or the other way?
Reply
RE: Parts search paths
#6
(2019-11-26, 23:13)Leonardo Zide Wrote: Would it be possible to remove this uncertainty (even you said "I think") by having the official spec state the correct search order?

From what you're saying it should be:

MPD subfiles
Model folder
Unoficial/P
Unoficial/Parts
P
Parts

Does P come before Parts or the other way?

In LDView, P comes before Parts. Furthermore, <LDrawDir>/Models is also at the end of the list (due to original LDRAW.EXE having that in its search path). Whether that's a good thing or a bad thing is debatable.

I think it would be reasonable to codify the list in a spec.
Reply
RE: Parts search paths
#7
(2019-11-26, 23:13)Leonardo Zide Wrote: Would it be possible to remove this uncertainty (even you said "I think") by having the official spec state the correct search order?
My restriction was more on a functional side: I have been caught many times by loading a model on the web and open it directly while it is in my temp folder... and then old weird part files sitting there may appear in the model and somehow break it!!!

As Travis said it would be a nice thing to clarify (and write) these rules.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)