USD: Rename attr_import_mode option to property_import_mode
This rename creates separation between USD primvars/Blender geometry attributes - which are not controlled with this setting - and the concept of USD attributes+userProperties/Blender custom object properties - that this option deals with. Ref #134012 Pull Request: https://projects.blender.org/blender/blender/pulls/142301
This commit is contained in:
committed by
Jesse Yurkovich
parent
fe54725113
commit
c2cf3783c4
@@ -1731,35 +1731,35 @@ class USDImportTest(AbstractUSDTest):
|
||||
|
||||
infile = str(test_path1)
|
||||
bpy.ops.wm.open_mainfile(filepath=str(self.testdir / "empty.blend"))
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, attr_import_mode='USER')
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, property_import_mode='USER')
|
||||
self.assertEqual({'FINISHED'}, res, f"Unable to import USD file {infile}")
|
||||
self.assertEqual(len(bpy.data.objects), 4)
|
||||
assert_all_props_present(properties, "")
|
||||
|
||||
infile = str(test_path1)
|
||||
bpy.ops.wm.open_mainfile(filepath=str(self.testdir / "empty.blend"))
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, attr_import_mode='NONE')
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, property_import_mode='NONE')
|
||||
self.assertEqual({'FINISHED'}, res, f"Unable to import USD file {infile}")
|
||||
self.assertEqual(len(bpy.data.objects), 4)
|
||||
assert_no_props_present(properties, "")
|
||||
|
||||
infile = str(test_path2)
|
||||
bpy.ops.wm.open_mainfile(filepath=str(self.testdir / "empty.blend"))
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, attr_import_mode='ALL')
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, property_import_mode='ALL')
|
||||
self.assertEqual({'FINISHED'}, res, f"Unable to import USD file {infile}")
|
||||
self.assertEqual(len(bpy.data.objects), 4)
|
||||
assert_all_props_present(properties, custom_namespace)
|
||||
|
||||
infile = str(test_path2)
|
||||
bpy.ops.wm.open_mainfile(filepath=str(self.testdir / "empty.blend"))
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, attr_import_mode='USER')
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, property_import_mode='USER')
|
||||
self.assertEqual({'FINISHED'}, res, f"Unable to import USD file {infile}")
|
||||
self.assertEqual(len(bpy.data.objects), 4)
|
||||
assert_no_props_present(properties, custom_namespace)
|
||||
|
||||
infile = str(test_path3)
|
||||
bpy.ops.wm.open_mainfile(filepath=str(self.testdir / "empty.blend"))
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, attr_import_mode='ALL')
|
||||
res = bpy.ops.wm.usd_import(filepath=infile, property_import_mode='ALL')
|
||||
self.assertEqual({'FINISHED'}, res, f"Unable to import USD file {infile}")
|
||||
self.assertEqual(len(bpy.data.objects), 1)
|
||||
properties = [
|
||||
|
||||
Reference in New Issue
Block a user