mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
tweak context override
This commit is contained in:
parent
28c626b694
commit
59dd912a76
2 changed files with 7 additions and 3 deletions
|
|
@ -40,7 +40,7 @@ def create_blender_context(active: Optional[bpy.types.Object] = None,
|
|||
'area': area,
|
||||
'region': region,
|
||||
'scene': bpy.context.scene,
|
||||
'active_object': selected[0],
|
||||
'active_object': active,
|
||||
'selected_objects': selected
|
||||
}
|
||||
return override_context
|
||||
|
|
|
|||
|
|
@ -55,9 +55,13 @@ class ExtractABC(pype.api.Extractor):
|
|||
selected = list()
|
||||
|
||||
for obj in instance:
|
||||
selected.append(obj)
|
||||
try:
|
||||
obj.select_set(True)
|
||||
selected.append(obj)
|
||||
except:
|
||||
continue
|
||||
|
||||
new_context = pype.blender.plugin.create_blender_context(active=None, selected=selected)
|
||||
new_context = pype.blender.plugin.create_blender_context(active=selected[0], selected=selected)
|
||||
|
||||
# We set the scale of the scene for the export
|
||||
scene.unit_settings.scale_length = 0.01
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue