Search path discussion


RE: Search path discussion
#34
I'm writing this as a reply to the original post instead of replying to one of the sub-posts. What I say will probably refer to multiple threads. Based on everything written here, I would like to make the following suggestion for the official LDraw search path:
  1. 0 FILE references in the currently active MPD. Note: an MPD in this context is any LDraw file that contains 0 FILE lines. "Currently active" in this context means that the files are only visible inside the MPD, and are not visible to any other files.
  2. The directory containing the top-level model opened by the user. (Note: I think this dates to ldraw.exe. We can decide that it's not a good idea, but I don't personally think we should do that.)
  3. <LDraw Directory>\p
  4. <LDraw Directory>\parts
  5. <LDraw Directory>\models
I could see adding an entry either before or after 2 that is the directory containing the current LDraw file.

The first hit found when searching for files in the above order would be used. 

Additionally, it should be noted that many tools add the following two entries to the end of their search path, but they are not part of the LDraw standard:
  1. <LDraw Directory>\Unofficial\p
  2. <LDraw Directory>\Unofficial\parts
Just as a note, to the best of my knowledge, LDView was the first program to support the Unofficial directory, and it did so as part of its feature that automatically downloads unofficial files from the LDraw Parts Tracker. Downloading unofficial parts into the main LDraw directories was clearly a bad idea, and I chose "Unofficial" as a directory to hold them. As far as I know, no other programs automatically download files into the Unofficial directory, but various other programs include it in their search path (presumably due to LDView's auto-download feature).
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Search path discussion - by Orion Pobursky - 2021-03-16, 13:26
RE: Search path discussion - by Travis Cobbs - 2021-03-16, 22:11
RE: Search path discussion - by Travis Cobbs - 2021-03-16, 22:09
RE: Search path discussion - by Travis Cobbs - 2021-03-17, 19:27
RE: Search path discussion - by Travis Cobbs - 2021-04-14, 18:09
RE: Search path discussion - by Travis Cobbs - 2021-04-15, 20:14
RE: Search path discussion - by Cam's Bricks - 2022-03-15, 11:08
RE: Search path discussion - by N. W. Perry - 2022-03-15, 17:12
RE: Search path discussion - by Travis Cobbs - 2022-03-15, 21:34
RE: Search path discussion - by Travis Cobbs - 2022-03-16, 16:37
RE: Search path discussion - by Travis Cobbs - 2022-03-16, 23:53
RE: Search path discussion - by Travis Cobbs - 2022-03-19, 21:02

Forum Jump:


Users browsing this thread: 5 Guest(s)