1
Fork 0

Organize CATs bake options, disable other collections when baking

This commit is contained in:
redstrate 2021-08-12 07:53:49 -04:00
parent 57dc44c43f
commit bd3cf17f60

View file

@ -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()