feat: add gp modifers to the object test

This commit is contained in:
Swann 2020-12-03 14:58:10 +01:00
parent 19c5ca0928
commit 6fddbb6f5e
No known key found for this signature in database
GPG Key ID: E1D3641A7C43AACB

View File

@ -25,6 +25,13 @@ MOFIFIERS_TYPES = [
'EXPLODE', 'FLUID', 'OCEAN', 'PARTICLE_INSTANCE',
'SOFT_BODY', 'SURFACE']
GP_MODIFIERS_TYPE = [
'GP_ARRAY', 'GP_BUILD', 'GP_MIRROR', 'GP_MULTIPLY',
'GP_SIMPLIFY', 'GP_SUBDIV', 'GP_ARMATURE',
'GP_HOOK', 'GP_LATTICE', 'GP_NOISE', 'GP_OFFSET',
'GP_SMOOTH', 'GP_THICK', 'GP_TIME', 'GP_COLOR',
'GP_OPACITY', 'GP_TEXTURE', 'GP_TINT']
CONSTRAINTS_TYPES = [
'CAMERA_SOLVER', 'FOLLOW_TRACK', 'OBJECT_SOLVER', 'COPY_LOCATION',
'COPY_ROTATION', 'COPY_SCALE', 'COPY_TRANSFORMS', 'LIMIT_DISTANCE',
@ -33,7 +40,8 @@ CONSTRAINTS_TYPES = [
'LOCKED_TRACK', 'STRETCH_TO', 'TRACK_TO', 'ACTION',
'ARMATURE', 'CHILD_OF', 'FLOOR', 'FOLLOW_PATH', 'PIVOT', 'SHRINKWRAP']
#temporary disabled 'SPLINE_IK' until its fixed
# temporary disabled 'SPLINE_IK' until its fixed
def test_object(clear_blend):
bpy.ops.mesh.primitive_cube_add(
@ -43,7 +51,10 @@ def test_object(clear_blend):
# Add modifiers
for mod_type in MOFIFIERS_TYPES:
datablock.modifiers.new(mod_type,mod_type)
datablock.modifiers.new(mod_type, mod_type)
for mod_type in GP_MODIFIERS_TYPE:
datablock.grease_pencil_modifiers.new(mod_type,mod_type)
# Add constraints
for const_type in CONSTRAINTS_TYPES:
@ -54,7 +65,6 @@ def test_object(clear_blend):
datablock.shape_key_add(name='shape')
datablock.shape_key_add(name='shape2')
implementation = BlObject()
expected = implementation._dump(datablock)
bpy.data.objects.remove(datablock)