Fill doublesidedness and transparency (TODO: figure out additive mapping/emulation) from material settings
This commit is contained in:
		| @@ -39,11 +39,18 @@ class FillSWBFMaterialProperties(bpy.types.Operator): | ||||
|  | ||||
|         for mat in mats: | ||||
|  | ||||
|             if mat.name in mats_visited: | ||||
|             if mat.name in mats_visited or not mat.swbf_msh_mat: | ||||
|                 continue | ||||
|             else: | ||||
|                 mats_visited.add(mat.name) | ||||
|  | ||||
|             mat.swbf_msh_mat.doublesided = not mat.use_backface_culling | ||||
|             mat.swbf_msh_mat.hardedged_transparency = (mat.blend_method == "CLIP") | ||||
|             mat.swbf_msh_mat.blended_transparency = (mat.blend_method == "BLEND") | ||||
|  | ||||
|  | ||||
|             # Below is all for filling the diffuse map/texture_0 fields | ||||
|  | ||||
|             try: | ||||
|                 for BSDF_node in [n for n in mat.node_tree.nodes if n.type == 'BSDF_PRINCIPLED']: | ||||
|                     base_col = BSDF_node.inputs['Base Color']  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 William Herald Snyder
					William Herald Snyder