Skip to content

Commit

Permalink
Fixed ambient occlusion not exporting properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
LoganFairbairn committed Jan 31, 2024
1 parent 6b08744 commit a134646
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/export_textures.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@

# List of material channels that use the emission node to bake and export their values.
emission_exporting_channels = (
'AMBIENT-OCCLUSION',
'SUBSURFACE-SCALE',
'SUBSURFACE-ANISOTROPY',
'SPECULAR-ANISOTROPIC',
Expand Down
4 changes: 4 additions & 0 deletions core/material_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ def get_material_layer_node(layer_node_name, layer_index=0, material_channel_nam
# Using specified names for nodes allows consistent access to specific nodes accross languages in Blender (as Blender's auto translate feature will translate default node names).
# This function also has the benefit of being able to return nodes in sub-node groups, if required.

if not getattr(bpy.context, 'active_object'):
debug_logging.log("Context has no attribute 'active_object'.")
return

if bpy.context.active_object == None:
return

Expand Down

0 comments on commit a134646

Please sign in to comment.