various utf8 compatibility fixes
- OBJ import/export now work with non utf8 paths. (all exporters and importers need changes like this) - strip non utf8 chars from new ID blocks (also applies to renaming) - set the file rename button to allow non-utf8 chars.
This commit is contained in:
@@ -892,7 +892,7 @@ def load_obj(filepath,
|
||||
This function passes the file and sends the data off
|
||||
to be split into objects and then converted into mesh objects
|
||||
'''
|
||||
print('\nimporting obj "%s"' % filepath)
|
||||
print('\nimporting obj %r' % filepath)
|
||||
|
||||
if SPLIT_OBJECTS or SPLIT_GROUPS or SPLIT_MATERIALS:
|
||||
POLYGROUPS = False
|
||||
@@ -935,7 +935,7 @@ def load_obj(filepath,
|
||||
# so we need to know weather
|
||||
context_multi_line= ''
|
||||
|
||||
print('\tparsing obj file "%s"...' % filepath)
|
||||
print("\tparsing obj file...")
|
||||
time_sub= time.time()
|
||||
# time_sub= sys.time()
|
||||
|
||||
@@ -1220,7 +1220,7 @@ def load_obj(filepath,
|
||||
# time_new= sys.time()
|
||||
|
||||
print('%.4f sec' % (time_new-time_sub))
|
||||
print('finished importing: "%s" in %.4f sec.' % (filepath, (time_new-time_main)))
|
||||
print('finished importing: %r in %.4f sec.' % (filepath, (time_new-time_main)))
|
||||
|
||||
|
||||
DEBUG= True
|
||||
@@ -1467,7 +1467,7 @@ class IMPORT_OT_obj(bpy.types.Operator):
|
||||
# to the class instance from the operator settings before calling.
|
||||
|
||||
|
||||
filepath = StringProperty(name="File Path", description="Filepath used for importing the OBJ file", maxlen= 1024, default= "")
|
||||
filepath = StringProperty(name="File Path", description="Filepath used for importing the OBJ file", maxlen= 1024, default= "", subtype='FILE_PATH')
|
||||
|
||||
CREATE_SMOOTH_GROUPS = BoolProperty(name="Smooth Groups", description="Surround smooth groups by sharp edges", default= True)
|
||||
CREATE_FGONS = BoolProperty(name="NGons as FGons", description="Import faces with more then 4 verts as fgons", default= True)
|
||||
|
||||
Reference in New Issue
Block a user