INNER CODE UNIT · Python

r1

bernhardstrobl/Pico3D · Blender/pico3d_blender_exporter.py:374

                    r1 = hex(int((colors.data[tri.loops[0]].color[0]) * 15))
                    g1 = hex(int((colors.data[tri.loops[0]].color[1]) * 15))
                    b1 = hex(int((colors.data[tri.loops[0]].color[2]) * 15))
                    
                    r2 = hex(int((colors.data[tri.loops[1]].color[0]) * 15))
                    g2 = hex(int((colors.data[tri.loops[1]].color[1]) * 15))
                    b2 = hex(int((colors.data[tri.loops[1]].color[2]) * 15))
                    
                    r3 = hex(int((colors.data[tri.loops[2]].color[0]) * 15))
                    g3 = hex(int((colors.data[tri.loops[2]].color[1]) * 15))
                    b3 = hex(int((colors.data[tri.loops[2]].color[2]) * 15))
                    

                                    
                    #Shader ID
                    #if all the colors are the same, we can use shader id 1 for simple flat shading
                    if (r1 == r2 == r3 and g1 == g2 == g3 and b1 == b2 == b3):
                        if glow:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…