Search path discussion


RE: Search path discussion
#48
(2022-03-20, 21:34)Lars C. Hassing Wrote: Hi guys,
it's been a while, I got involved in other projects in 2008
and haven't really followed LDraw since then,
though I did spend a lot of time with LDraw 1998-2008.
Welcome back.


(2022-03-20, 21:34)Lars C. Hassing Wrote: ...........
If an .mpd file with "0 FILE xxx.dat" is met and xxx.dat has already been seen and loaded,
you will get a warning and the second xxx.dat is skipped.
The first xxx.dat can be referenced from anywhere.
...........
l3p and L3Lab cannot cope with two MPD files in PARTS both having the same "0 FILE xxx.dat" line.
...........
/* Hmm, MPD scoping says that MPD subfiles are public. However,
L3xx allows nested MPDs which makes scoping somewhat unclear.
Right above you are warned if the same filename appeared in
another MPD (or elsewhere). MPD subfiles of a part or a
primitive should be kept private...
-and not cleared in FreeModel() */

which suggests that I had some thoughts about scoping back then
(for technical reasons/conflicts from a programmers perspective, not about the logical application/usage)
but at that time it was never an issue.
So basically everything loaded is public/global?

This is fine when loading a single model tree with the purpose to generate pov code.

But I really don't think it should become the standard.

Strict local scoping ensuring every ldraw file (mpd or plain) lives in a closed container so it only has to be loaded once and always looks the same (except for colors) no matter what file references it.

Otherwise working with multiple models/files in a single program will become an instance administrative nightmare.
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
RE: Search path discussion - by Roland Melkert - 2022-03-20, 21:51

Forum Jump:


Users browsing this thread: 2 Guest(s)