mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
validate mesh has UV safe code
This commit is contained in:
parent
0f90ca4a7a
commit
b1f2967622
1 changed files with 4 additions and 3 deletions
|
|
@ -36,9 +36,10 @@ class ValidateMeshHasUvs(pyblish.api.InstancePlugin):
|
|||
invalid = []
|
||||
for obj in set(instance):
|
||||
try:
|
||||
if obj.type == 'MESH':
|
||||
# Make sure we are in object mode.
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
if isinstance(obj, bpy.types.Object) and obj.type == 'MESH':
|
||||
if obj.mode != 'OBJECT':
|
||||
# Make sure we are in object mode.
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
if not cls.has_uvs(obj):
|
||||
invalid.append(obj)
|
||||
except RuntimeError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue