![]() |
Concerning the p/8 and p/48 folders - Printable Version +- LDraw.org Discussion Forums (https://forums.ldraw.org) +-- Forum: General (https://forums.ldraw.org/forum-12.html) +--- Forum: Help (https://forums.ldraw.org/forum-13.html) +--- Thread: Concerning the p/8 and p/48 folders (/thread-20928.html) |
Concerning the p/8 and p/48 folders - Caleb - 2016-03-03 Hello! I am looking for information on the p/8 and p/48 folders in regards to their location when searching the library for a part. Allow me to explain. I am helping out with a Python-based .dat/.ldr parser (https://github.com/Tribex/LDRParser) that I eventually plan to use in my Blender import plugin (https://github.com/le717/LDR-Importer). As it stands, the parser does not support the 8/48 folders and I am looking into implementing it. I do have those folders supported in my plugin but lately I have begun to think I have implemented it incorrectly. I could not find a spec containing the info I am looking for, hence this topic. (If I am in the wrong section, please move it.) ![]() Currently, I have the search path set up as so (assume HighRes and LowRes are strings representing a three option, mutual selection (so basically, radio buttons). The third value is StandardRes but unused.): Code: ldrawDir = "C:/LDraw" My questions are: 1. Is this the correct search order I should be using? 2. Are use of the 8/48 mutual as I have it or not? 3. Any other errors I have in this code? Thanks! ![]() Re: Concerning the p/8 and p/48 folders - Travis Cobbs - 2016-03-04 These aren't intended to both be added to the LDraw search path at the same time. To the best of my knowledge, they are intended for two uses:
For the second usage, 48/ or 8/ is included in the part file itself prior to the dat filename. So, if a part has a large-radius circle, it can use 48/4-4cyli.dat instead of 4-4cyli.dat. The p/48/4-4cyli.dat file would then be picked up while processing the standard p part of the LDraw search path, not with a specific scan inside p/48. Programs are free to completely ignore the 8 and 48 directories. If they do so, they will work fine (as long as they append the full part name/path to each entry in their search path while searching for the part, and don't just take the filename part). |