From 4f707eb4fe50e6be93595dc5f61154a77e051d15 Mon Sep 17 00:00:00 2001 From: dlannan Date: Wed, 2 Nov 2022 16:28:12 +1030 Subject: [PATCH] Fixed texture conversion. Added LightMatter auto-detect - not quite right yet. --- blender/addons/defender.zip | Bin 1656926 -> 1657167 bytes .../addons/defender/defoldsync/defoldCmds.py | 41 +++++++++++++++--- 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/blender/addons/defender.zip b/blender/addons/defender.zip index 27f130b10bddf5d1a05adcd280f725c13e8a17b8..9e49bc4dc53fcf4dbebde6c66b60241bb7ed2aae 100644 GIT binary patch delta 8306 zcmY*;WmptYxAnk)3=J|c3@zQ=-Hmj2NP~3afJjQ$ASI|scMRPP(lH<*-AGvUMZfob zzI%VH^Q^V@+WVaId#@$Gm`r_<%nhX2w@y1JqDs-`0P>;Q)P}ne{l_x;tLxRlHC%*x zuWj^Q4T?pXC;V+-+6Bh zx_3D+KJ-Q93(;DF2mONb7IYCAZmY%#99Jq{r!T-6a|p~oDC{+Jgf}Qs@vFZE*|GM-Cz>6v)84=A60w1g*uRg0jpPY?Txeg*~gJ_#UV`&V{=K~R1HhCJGl(lf|geYsR-kI zZmG3;TunaGJ;jvT1kRR zK?2N;t_soNNzKzmiDMkS>KnDSwsWW9FnoF% z?H{2H$!bO&zq5EaAprTlY`d$)ep8s>3k$~(Y&~6Bp%IXWEw)5E;iPE$i8SB%B7^-U z>=z?)$~pNhe8RgX1~d${B9_e8e1Z^ee)BCS?ME{uC^R2bXg^t{b#$HDu<4w1!{A$M z1xc4J6hDUK0$lriqHQIvLtoCh)lbw2$&R#B;<-D0W;Q3~rxE9FSSOCry4XQSB?#%H z_7!;UH-EAM1GEz2WqRwMaZ272r|Ai5uD=4BzQk_p`d%$FJ+bu3cR*$!Vp=kP{kMrO z8s=h&r)!j$0RCc4?W^?*j@urIOgpz<&-zy1S2hKb_AvgsoJXv)>mY5cd$+&64V|c8 zlXl#9xuEtyqQ%0C#-K<;WGs&4GoSL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>5;N%9B3hDcgXTEihaHC=OYK}op@*(SDyN!!{?**l z8iN7D2K1H{AcqKwl9z?6SaJ4+1mZtt{8EweTUYWC_{ff;9mjc0w4ty%XAr@XB+BY6 zDE>h`!$+vt%e3QJs1ynBQ6rzUk%SeE9E-PS;t9OE4~7q9Wqb(=+P1;?%b~siZJvEV zN%FAJ1^_!ue*CsL#sakHm?WJN5+#i}$^5UHJc-*`9^j^H^26J?GU>k}j2Q{>1xPOd zya2h883~1z|6fN_5T#L55H)@AKh}7Rk7j!Ezhhu_i0B&sOs$CMjjf0nHShkJoXs&T z+5hQNkr-i9k(e*QdI9zea9)7hI2DPvJ@9{GX0-8T|JkW@@WZHdfG;3uq|za@%la1= zeoClL_OF`9AR<8rIBA(Qo&$+|Q2_5>Di=~Bc5HyZo=I3115slZ1F@&!f8M0u7SxRb z{=`LC|B@HNi5nNfN$h6-<;a_pk|6!l%`8b9%`C|t;s10qaS$mo?*IRb7ZwZ#iNR7O zK_Hk57=#L20)walLFNca2^KssE-8={AjA?m)JOGCo#{V|rz@GmzMn?P}MHlcz3;$nx zS{9@TSomK=Tn?lL&^jS}IR-H-PY$F6NJS@lA=EG|`Ik-`{(poN<}Uv-BTDigA%>Zd z5@EuYl!1r{rljzqjQbJ4c<5lypNO$x%`Xa4Wf<&U0b~HcHzS2no0C$* iJQQDid@rG3OHvZp$O}Uf6ocU@fy7YpUV{)25dH_OumPX| diff --git a/blender/addons/defender/defoldsync/defoldCmds.py b/blender/addons/defender/defoldsync/defoldCmds.py index b18c7b5..29eab40 100644 --- a/blender/addons/defender/defoldsync/defoldCmds.py +++ b/blender/addons/defender/defoldsync/defoldCmds.py @@ -22,7 +22,8 @@ modulesNames = ['DefoldSyncUI'] -import bpy, time, queue, re, os, json, shutil +import bpy, time, queue, re, os, json, shutil, math +from io import BytesIO # ------------------------------------------------------------------------ @@ -279,6 +280,23 @@ def getImageNode( colors, index, matname, name, texture_path ): imgnode = link_node.image if imgnode and imgnode.type == 'IMAGE': return imgnode + elif link_node and link_node.type == 'MixRGB': + if link_node.mix == "Multiply": + color1node = link_node.inputs["Color1"] + color2node = link_node.inputs["Color2"] + if index == 'Base Color': + baseimg = False + if color2node and color2node.type == 'TEX_IMAGE': + imgnode = color2node.image + if imgnode and imagenode.type == 'IMAGE': + baseImg = imgnode + if color1node and color1node.type == 'TEX_IMAGE': + lightnode = color1node.image + if lightnode and lightnode.type == 'IMAGE' and lightnode.name.endswith('_baked'): + colors['Emission'] = lightnode + + if baseimg: + return baseimg # Handle metallic roughness and emission if they have just values set (make a little color texture) value_materials = ["metallic_color", "roughness_color", "emissive_color", "alpha_map"] @@ -316,16 +334,25 @@ def addTexture( matname, textures, name, color_node, index, texture_path, contex img = imgnode.filepath_from_user() basename = os.path.basename(img) splitname = os.path.splitext(basename) + print("[ IMG PATH ] " + str(img)) print("[ IMG BASE PATH ] " + str(basename)) + if splitname[1] != '.png' and splitname[1] != '.PNG': pngimg = os.path.join(texture_path , splitname[0] + ".png") - if(os.path.exists(pngimg) == False): - image = bpy.data.images.load(img) - imgnode.file_format='PNG' - image.save_render(pngimg) +# if(os.path.exists(pngimg) == False): + + imgnode.file_format='PNG' + image = bpy.data.images.load(img) + + image_settings = bpy.context.scene.render.image_settings + image_settings.file_format = "PNG" + image.file_format='PNG' + image.save_render(pngimg) + img = pngimg + # This is done for internal blender images (embedded) if os.path.exists(img) == False: img = os.path.join(texture_path , basename) imgnode.filepath = img @@ -434,8 +461,8 @@ def sceneMeshes(context, fhandle, temppath, texture_path, config): ErrorLine( config, " Unknown material type used.", str(mat.name), "ERROR") lightmap_enable = False - if(mat.name.endswith("_LightMap")): - lightmap_enable = True + #if(mat.name.endswith("_LightMap")): + lightmap_enable = True thisobj["matname"] = mat.name