LDraw.org Discussion Forums
OMR: prefixing imported files - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: Administrative (https://forums.ldraw.org/forum-4.html)
+--- Forum: Standards Board (https://forums.ldraw.org/forum-5.html)
+--- Thread: OMR: prefixing imported files (/thread-6691.html)



OMR: prefixing imported files - Roland Melkert - 2012-11-10

It seems it's still somewhat unclear how to include unofficial parts in a OMR mpd, see:

http://forums.ldraw.org/showthread.php?tid=6659

It's unclear (jet somewhat implied imho) all the unofficial file's recursively used (also unofficial) files should be included in the mpd using the same prefix and as a result all the affected type 1 lines should be updated.


Re: OMR: prefixing imported files - Roland Melkert - 2012-11-20

No comments on this anybody? It seemed like a 'hot' topic in the other thread though.


Re: OMR: prefixing imported files - Orion Pobursky - 2012-11-20

I'll have comments, I'm just catching up on my 2 week backlog due to illness.


Re: OMR: prefixing imported files - Allen Smith - 2013-02-08

Sorry, I tend to glaze over when people start arguing about the format of OMR files. Mainly it's because I would feel a similar sentiment to this if I were constructing one myself.

Renaming unofficial parts in order to include them in a model is a whole lot of work. I sure wouldn't want to do it.

If the problem is trying to inline a submodel with the name "s\xxx.dat", that is asking for trouble. I would expect such a line to direct to LDraw\s or an external neighbor folder s\. No spec says it is supposed to try resolving to a submodel first.

Allen


OMR Philosophy (Was: Re: OMR: prefixing imported files) - Orion Pobursky - 2013-02-08

When I drafted the spec in 2011, I didn't intend for it to be used as a bludgeon to beat submitted files into shape but as an ideal. Frankly I was tired of have to scour the internet looking for a model. I wanted a central repository, blessed by the org as "official". At the same time, I want the OMR to be inclusive rather than exclusive. I do not want a model rejected simply because it doesn't follow the spec 100%.


Re: OMR Philosophy (Was: Re: OMR: prefixing imported files) - Roland Melkert - 2013-02-08

Allen Smith Wrote:If the problem is trying to inline a sub model with the name "s\xxx.dat", that is asking for trouble. I would expect such a line to direct to LDraw\s or an external neighbor folder s\. No spec says it is supposed to try resolving to a submodel first.

That's pretty much what that discussion was about. I think in your example things would be fixed if you just prefix the same string in front of all subparts aswell and adjust all type one lines of (the also inlined) other referring unofficial files. This should work even for s\ parts because type 1 lines are relative (so s\ or blah-s\ both are valid). This will also l prevent breaking the search order like you indicate.


Orion Pobursky Wrote:I do not want a model rejected simply because it doesn't follow the spec 100%.

I do like a mandatory uniform way of doing things, but I agree it needs to be practical not a burden.

Maybe we need to clear the sub-part thing up spec wise, but at the same time make it optional, so if the author puts a comment like 'needs unofficial library x' somewhere. It can be used as is.


Re: OMR Philosophy (Was: Re: OMR: prefixing imported files) - Allen Smith - 2013-02-08

Roland Melkert Wrote:
Allen Smith Wrote:If the problem is trying to inline a sub model with the name "s\xxx.dat", that is asking for trouble. I would expect such a line to direct to LDraw\s or an external neighbor folder s\. No spec says it is supposed to try resolving to a submodel first.

That's pretty much what that discussion was about. I think in your example things would be fixed if you just prefix the same string in front of all subparts aswell and adjust all type one lines of (the also inlined) other referring unofficial files. This should work even for s\ parts because type 1 lines are relative (so s\ or blah-s\ both are valid). This will also l prevent breaking the search order like you indicate.

We've stumbled into a really murky specification area. MPD search is explicitly undefined, so there's no telling what "s\xxx.dat" would resolve to if there's a submodel named s\xxx.dat. Yes, the prefix would essentially force the submodel to be used. But what a pain for someone writing the file.

Allen


Re: OMR Philosophy (Was: Re: OMR: prefixing imported files) - Roland Melkert - 2013-02-08

Allen Smith Wrote:But what a pain for someone writing the file.Allen

Yes, but it seems MPDCenter has solved for modeling authors (got a note from Michael). I think that's another reason to make the whole unofficial inlining optional in order to leave tools free to implement their own solutions.


Re: OMR Philosophy (Was: Re: OMR: prefixing imported files) - Roland Melkert - 2013-02-09

Thinking this over (and after another note from Michael) it might be better to keep the mandatory inlining (so the whole mpd is usable with only the official library), but drop the dictated way of doing it (prefix etc).

Do note this does not change the way the (non part) submodels are prefixed (although one could make a point on loosening those rules too).