Skip to content

Commit

Permalink
Blender lightmaps: set default color to white
Browse files Browse the repository at this point in the history
  • Loading branch information
lewa-j committed May 1, 2022
1 parent cdc8559 commit 3e7987d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions useful stuff/Blender/io_scene_gltf_lightmap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
bl_info = {
"name": "glTF lightmap Importer Extension",
"category": "Import",
"version": (1, 1, 0),
"version": (1, 2, 0),
"blender": (3, 1, 0),
'location': 'File > Import > glTF 2.0',
'description': 'Addon to add a lightmap feature to an imported glTF file.',
'isDraft': True,
'developer': "lewa_j",
'url': 'https://github.com/lewa-j',
'url': 'https://github.com/lewa-j/hlbsp-converter/tree/main/useful%20stuff/Blender/io_scene_gltf_lightmap',
}

glTF_extension_name = "EXT_materials_lightmap"
Expand Down Expand Up @@ -59,6 +59,7 @@ def gather_import_material_after_hook(self, gltf_material, vertex_color, blender
blender_mat.node_tree.links.new(emission_socket, node.outputs[0])
# Inputs
node.inputs['Fac'].default_value = 1.0
node.inputs['Color1'].default_value = [1.0, 1.0, 1.0, 1.0]
if base_color_node is not None:
blender_mat.node_tree.links.new(node.inputs['Color1'], base_color_node.outputs[0])
#blender_mat.node_tree.links.new(node.inputs['Color2'], emission_node.outputs[0])
Expand Down

0 comments on commit 3e7987d

Please # to comment.