After flattening a node the get_shader() function no longer returns the shader but returns None. Also if you parent any children to the node after flattening they won't inherent the shader.
node.set_shader(shader)
node.get_shader() #Returns the shader
node.flatten_light()
node.get_shader() #Returns None
After flattening a node the get_shader() function no longer returns the shader but returns None. Also if you parent any children to the node after flattening they won't inherent the shader.