diff --git a/__init__.py b/__init__.py index 2261583..de51fe4 100644 --- a/__init__.py +++ b/__init__.py @@ -122,6 +122,10 @@ class AvatarPrepOp(bpy.types.Operator): current_collection = context.view_layer.active_layer_collection.collection + # disable the original collections + recurLayerCollection(bpy.context.view_layer.layer_collection, 'original hair').exclude = True + recurLayerCollection(bpy.context.view_layer.layer_collection, 'Master').exclude = True + # context override c = {} obs = [] @@ -188,24 +192,31 @@ class AvatarBakeOp(bpy.types.Operator): def execute(self, context): bpy.ops.scene.avatar_prep(perform_quest_optimizations = False) - # bake! - context.scene.bake_use_decimation = True - context.scene.bake_quick_compare = False - context.scene.bake_max_tris = 32000 - 55 - context.scene.bake_pass_normal = True - context.scene.bake_normal_apply_trans = False - context.scene.bake_pass_ao = True - context.scene.bake_pass_questdiffuse = False + # bake options for PC context.scene.bake_resolution = 2048 - context.scene.bake_generate_uvmap = True - context.scene.bake_pass_diffuse = True - context.scene.bake_diffuse_vertex_colors = False + + context.scene.bake_use_decimation = True + context.scene.bake_max_tris = 32000 - 55 context.scene.bake_preserve_seams = True - context.scene.bake_pass_diffuse = True - context.scene.bake_uv_overlap_correction = 'REPROJECT' - context.scene.bake_diffuse_alpha_pack = 'SMOOTHNESS' + context.scene.bake_remove_doubles = False + + context.scene.bake_generate_uvmap = False context.scene.bake_prioritize_face = True context.scene.bake_face_scale = 2.0 + context.scene.bake_uv_overlap_correction = 'REPROJECT' + + context.scene.bake_quick_compare = False + + context.scene.bake_pass_diffuse = True + context.scene.bake_diffuse_vertex_colors = False + context.scene.bake_diffuse_alpha_pack = 'SMOOTHNESS' + + context.scene.bake_pass_normal = True + context.scene.bake_normal_apply_trans = False + + context.scene.bake_pass_ao = True + + context.scene.bake_pass_questdiffuse = False bpy.ops.cats_bake.bake() @@ -239,23 +250,30 @@ class AvatarBakeQuestOp(bpy.types.Operator): bpy.ops.scene.avatar_prep(perform_quest_optimizations = True) # bake! - context.scene.bake_use_decimation = True - context.scene.bake_quick_compare = False - context.scene.bake_max_tris = 7500 - 100 - context.scene.bake_pass_normal = True - context.scene.bake_pass_ao = True - context.scene.bake_pass_questdiffuse = True context.scene.bake_resolution = 1024 - context.scene.bake_generate_uvmap = True - context.scene.bake_diffuse_vertex_colors = False - context.scene.bake_normal_apply_trans = False + + context.scene.bake_use_decimation = True + context.scene.bake_max_tris = 7500 - 100 context.scene.bake_preserve_seams = True - context.scene.bake_pass_diffuse = True context.scene.bake_remove_doubles = True - context.scene.bake_uv_overlap_correction = 'NONE' - context.scene.bake_diffuse_alpha_pack = 'SMOOTHNESS' + + context.scene.bake_generate_uvmap = False context.scene.bake_prioritize_face = True context.scene.bake_face_scale = 5.0 + context.scene.bake_uv_overlap_correction = 'NONE' + + context.scene.bake_quick_compare = False + + context.scene.bake_pass_diffuse = True + context.scene.bake_diffuse_vertex_colors = False + context.scene.bake_diffuse_alpha_pack = 'SMOOTHNESS' + + context.scene.bake_pass_normal = True + context.scene.bake_normal_apply_trans = False + + context.scene.bake_pass_ao = True + + context.scene.bake_pass_questdiffuse = True bpy.ops.cats_bake.bake()