Hi,
Im using the ogremeshexporter script. Usually it needs me to add /ogrepkg into the .blender/scripts directory wherever blender is installed.
That directory/package is then loaded by main script by passing it a directory (eg: “~~~.blender/scripts/ogrepkg”.
This however adds the exporter to all blender files, as it becomes part of the default menu. Instead I want to load it only in the one file ( well multple files, but all will be "Save As…"ed from teh one file.).
I’ve opened all the /ogrepkg .py files into the Blender Text editor and made them internal. Now I’m asking how I can set a registry key that will reference the internal scripts. ( as in the “from Blender import Registry” Registry).
I’m new to blender scripting, but not to blender or python. I think what I’m looking for is a function in the API that tells me the current blender filename, from there I should be able to construct that directory string to the internal scripts yes?
eg:
name = Blender.getCurrerntFileName()
reg = {}
reg[0] = name + “scripts/main.py”
… etc loading the scripts into the dictionary
Registry.setKey(“OgrePackage”, reg)
Then from there I know that It will load them fine ( because the backup way of checking where to load from is to check the Registry else prompt for a file. When It prompts for a file, I can only select the .blend file, I cannot “delve deeper” into the .blend file…
Thanks for any help. I’m not sure if I’ve described it properly, but hopefully youll get the idea.