Merge branch 'blender-v3.4-release'

This commit is contained in:
Julien Duroure 2022-11-14 16:04:29 +01:00
commit 469b45ffcd
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (3, 5, 1),
"version": (3, 5, 2),
'blender': (3, 3, 0),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',

View File

@ -183,7 +183,7 @@ class SCENE_OT_gltf2_assign_to_variant(bpy.types.Operator):
@classmethod
def poll(self, context):
return len(bpy.data.scenes[0].gltf2_KHR_materials_variants_variants) > 0 \
and bpy.context.object.type == "MESH"
and bpy.context.object and bpy.context.object.type == "MESH"
def execute(self, context):
gltf2_active_variant = bpy.data.scenes[0].gltf2_active_variant
@ -216,7 +216,7 @@ class SCENE_OT_gltf2_reset_to_original(bpy.types.Operator):
@classmethod
def poll(self, context):
return bpy.context.object.type == "MESH" and len(context.object.data.gltf2_variant_default_materials) > 0
return bpy.context.object and bpy.context.object.type == "MESH" and len(context.object.data.gltf2_variant_default_materials) > 0
def execute(self, context):
obj = bpy.context.object
@ -240,7 +240,7 @@ class SCENE_OT_gltf2_assign_as_original(bpy.types.Operator):
@classmethod
def poll(self, context):
return bpy.context.object.type == "MESH"
return bpy.context.object and bpy.context.object.type == "MESH"
def execute(self, context):
obj = bpy.context.object