structure opened this issue on Jun 27, 2019 ยท 94 posts
structure posted Wed, 03 November 2021 at 2:59 AM Forum Coordinator
adp001 posted at 3:50 PM Tue, 2 November 2021 - #4429791
this line :A shorter and less complicated version:
import os
import re
def get_library_pathes():
version = int(poser.Version().split(".")[0])
fname = os.path.join(os.environ["APPDATA"],
"Poser" if version < 11 else "Poser Pro", str(version),
"LibraryPrefs.xml")
re_libs = re.compile(r"<ContentFolder.*?folder=\"([^\"]+)\"")
with open(fname, "r") as fh:
for line in fh:
res = re.search(re_libs, line)
if res:
yield res.group(1)
if __name__ == "__main__":
for entry in get_library_pathes():
print(entry)
does not appear to working - I have set version to 12 - but it keeps using poser pro as the folder name .
Locked Out