Merge branch 'master' into blender2.8
This commit is contained in:
@@ -179,22 +179,24 @@ class SimpleImportTest(AbstractAlembicTest):
|
||||
|
||||
res = bpy.ops.wm.alembic_import(filepath=str(abc), as_background_job=False)
|
||||
self.assertEqual({'FINISHED'}, res)
|
||||
cube = bpy.context.active_object
|
||||
plane = bpy.context.active_object
|
||||
|
||||
# Check that the file loaded ok.
|
||||
bpy.context.scene.frame_set(6)
|
||||
self.assertAlmostEqual(-1, cube.data.vertices[0].co.x)
|
||||
self.assertAlmostEqual(-1, cube.data.vertices[0].co.y)
|
||||
self.assertAlmostEqual(0.5905638933181763, cube.data.vertices[0].co.z)
|
||||
mesh = plane.to_mesh(bpy.context.scene, True, 'RENDER')
|
||||
self.assertAlmostEqual(-1, mesh.vertices[0].co.x)
|
||||
self.assertAlmostEqual(-1, mesh.vertices[0].co.y)
|
||||
self.assertAlmostEqual(0.5905638933181763, mesh.vertices[0].co.z)
|
||||
|
||||
# Change path from absolute to relative. This should not break the animation.
|
||||
bpy.context.scene.frame_set(1)
|
||||
bpy.data.cache_files[fname].filepath = relpath
|
||||
bpy.context.scene.frame_set(6)
|
||||
|
||||
self.assertAlmostEqual(1, cube.data.vertices[3].co.x)
|
||||
self.assertAlmostEqual(1, cube.data.vertices[3].co.y)
|
||||
self.assertAlmostEqual(0.5905638933181763, cube.data.vertices[3].co.z)
|
||||
mesh = plane.to_mesh(bpy.context.scene, True, 'RENDER')
|
||||
self.assertAlmostEqual(1, mesh.vertices[3].co.x)
|
||||
self.assertAlmostEqual(1, mesh.vertices[3].co.y)
|
||||
self.assertAlmostEqual(0.5905638933181763, mesh.vertices[3].co.z)
|
||||
|
||||
def test_import_long_names(self):
|
||||
# This file contains very long names. The longest name is 4047 chars.
|
||||
|
@@ -123,6 +123,8 @@ def load_addons():
|
||||
|
||||
|
||||
def load_modules():
|
||||
VERBOSE = os.environ.get("BLENDER_VERBOSE") is not None
|
||||
|
||||
modules = []
|
||||
module_paths = []
|
||||
|
||||
@@ -161,6 +163,14 @@ def load_modules():
|
||||
module_names[mod] = mod_dir, mod_full
|
||||
del module_names
|
||||
|
||||
#
|
||||
# test we tested all files except for presets and templates
|
||||
ignore_paths = [
|
||||
os.sep + "presets" + os.sep,
|
||||
os.sep + "templates" + os.sep,
|
||||
] + ([(os.sep + f + os.sep) for f in BLACKLIST] +
|
||||
[(os.sep + f + ".py") for f in BLACKLIST])
|
||||
|
||||
#
|
||||
# now submodules
|
||||
for m in modules:
|
||||
@@ -199,7 +209,14 @@ def load_modules():
|
||||
# import failure.
|
||||
# - We want to catch all failures of this script instead of stopping on
|
||||
# a first big failure.
|
||||
traceback.print_exc()
|
||||
do_print = True
|
||||
if not VERBOSE:
|
||||
for ignore in ignore_paths:
|
||||
if ignore in submod_full:
|
||||
do_print = False
|
||||
break
|
||||
if do_print:
|
||||
traceback.print_exc()
|
||||
|
||||
#
|
||||
# check which filepaths we didn't load
|
||||
@@ -218,14 +235,6 @@ def load_modules():
|
||||
for f in loaded_files:
|
||||
source_files.remove(f)
|
||||
|
||||
#
|
||||
# test we tested all files except for presets and templates
|
||||
ignore_paths = [
|
||||
os.sep + "presets" + os.sep,
|
||||
os.sep + "templates" + os.sep,
|
||||
] + ([(os.sep + f + os.sep) for f in BLACKLIST] +
|
||||
[(os.sep + f + ".py") for f in BLACKLIST])
|
||||
|
||||
for f in source_files:
|
||||
for ignore in ignore_paths:
|
||||
if ignore in f:
|
||||
|
Reference in New Issue
Block a user