Scripts (making some changes to the scripts dir):

- moved bpydata/ to scripts/bpydata/ and added a config/ subdir to it;
- created scripts/bpymodules for py modules (also got rid of those "mod_"'s appended to the files);
- updated scripts accordingly.

This will require you to "reinstall" (just copy the scripts/ dir over your older one) if you have a .blender/scripts/ dir somewhere.  Otherwise some scripts won't work.  You can use the updated "Help->System->System Information" script here to check all is fine.  An installer script yet to be written will help users with these issues, specially to make the user defined dir have the same structure expected from the default scripts dir, so the basic facilities (module search; saved config data; scripts: installer, help browser, config editor) are also available for a user's own collection of written and downloaded scripts.

BPython:
- slikdigit's crash was because he had no <home or blender exe location>/.blender/:
  proper check added and also now if all else fails the <cvsblender>/release/scripts/ dir is also searched for scripts.  All this registration dirs stuff is a little messy (installation!), so please report any troubles (I only tested on linux).
- slight change in error report in BPY_interface.c's BPY_menu_do_python; remembering to set globaldict pointer to NULL there, too.
- moved bpy_gethome() to EXPP_interface.[ch]
- "//" as user defined python dir is ignored while looking for scripts, considering it's only a default some users use, not really meant for a scripts dir.
This commit is contained in:
2005-03-21 05:26:52 +00:00
parent 12107e6af2
commit 62147bba30
34 changed files with 696 additions and 346 deletions

View File

@@ -52,7 +52,7 @@ Notes:<br>
# | Read and write LightWave Object File Format (*.lwo) |
# +---------------------------------------------------------+
import Blender, mod_meshtools
import Blender, meshtools
import struct, chunk, os, cStringIO, time, operator
# =============================
@@ -81,10 +81,10 @@ def read(filename):
verts = read_verts(lwochunk)
elif lwochunk.chunkname == "POLS" and form_type == "LWO2": # Faces v6.0
faces = read_faces_6(lwochunk)
mod_meshtools.create_mesh(verts, faces, objname)
meshtools.create_mesh(verts, faces, objname)
elif lwochunk.chunkname == "POLS" and form_type == "LWOB": # Faces v5.5
faces = read_faces_5(lwochunk)
mod_meshtools.create_mesh(verts, faces, objname)
meshtools.create_mesh(verts, faces, objname)
else: # Misc Chunks
lwochunk.skip()
@@ -95,7 +95,7 @@ def read(filename):
if form_type == "LWO2": fmt = " (v6.0 Format)"
if form_type == "LWOB": fmt = " (v5.5 Format)"
message = "Successfully imported " + os.path.basename(filename) + fmt + seconds
mod_meshtools.print_boxed(message)
meshtools.print_boxed(message)
# ==================
# === Read Verts ===
@@ -106,7 +106,7 @@ def read_verts(lwochunk):
#$verts = []
verts = [None] * numverts
for i in range(numverts):
if not i%100 and mod_meshtools.show_progress:
if not i%100 and meshtools.show_progress:
Blender.Window.DrawProgressBar(float(i)/numverts, "Reading Verts")
x, y, z = struct.unpack(">fff", data.read(12))
#$verts.append((x, z, y))
@@ -143,7 +143,7 @@ def read_faces_5(lwochunk):
faces = []
i = 0
while i < lwochunk.chunksize:
if not i%100 and mod_meshtools.show_progress:
if not i%100 and meshtools.show_progress:
Blender.Window.DrawProgressBar(float(i)/lwochunk.chunksize, "Reading Faces")
facev = []
numfaceverts, = struct.unpack(">H", data.read(2))
@@ -186,7 +186,7 @@ def read_faces_6(lwochunk):
return ""
i = 0
while(i < lwochunk.chunksize-4):
if not i%100 and mod_meshtools.show_progress:
if not i%100 and meshtools.show_progress:
Blender.Window.DrawProgressBar(float(i)/lwochunk.chunksize, "Reading Faces")
facev = []
numfaceverts, = struct.unpack(">H", data.read(2))