[Bf-extensions-cvs] [57ec6828] master: remove again those unwanted prints, sorry about this

Kalle-Samuli Riihikoski noreply at git.blender.org
Fri Mar 1 14:50:30 CET 2019


Commit: 57ec6828de00ca17a7aa581420929fe85fb0f170
Author: Kalle-Samuli Riihikoski
Date:   Fri Mar 1 15:49:11 2019 +0200
Branches: master
https://developer.blender.org/rBA57ec6828de00ca17a7aa581420929fe85fb0f170

remove again those unwanted prints, sorry about this

===================================================================

M	io_coat3D/__init__.py
M	io_coat3D/tex.py

===================================================================

diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index 48d33a09..c030a347 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -229,9 +229,6 @@ def updatemesh(objekti, proxy):
 
     #Mesh Copy
 
-    print('SAAAMULI-RIIHI')
-    print('objekti', len(objekti.data.vertices))
-    print('objekti', len(proxy.data.vertices))
     for ind, v in enumerate(objekti.data.vertices):
         v.co = proxy.data.vertices[ind].co
 
@@ -301,7 +298,6 @@ class SCENE_OT_opencoat(bpy.types.Operator):
             active_3dcoat = exe_path
 
             if running() == False:
-                print('tulele tanne')
                 os.popen('"' + active_3dcoat + '" ' + coat3D)
             else:
                 importfile = bpy.context.scene.coat3D.exchangedir
@@ -441,7 +437,6 @@ class SCENE_OT_export(bpy.types.Operator):
 
         if (coat3D.bake_textures):
             bake_location = folder_objects + os.sep + 'Bake'
-            print('bake_location:', bake_location)
             if (os.path.isdir(bake_location)):
                 shutil.rmtree(bake_location)
                 os.makedirs(bake_location)
@@ -450,7 +445,6 @@ class SCENE_OT_export(bpy.types.Operator):
 
         temp_string = ''
         for objekti in bpy.context.selected_objects:
-            print('Main OBJ:', objekti)
             mod_mat_list[objekti.name] = []
             objekti.coat3D.applink_scale = objekti.scale
 
@@ -507,8 +501,6 @@ class SCENE_OT_export(bpy.types.Operator):
                     res_size = 8192
 
 
-
-
                 if(len(bake_list) > 0):
                     index_bake_tex = 0
                     while(index_bake_tex < len(bake_list)):
@@ -521,7 +513,6 @@ class SCENE_OT_export(bpy.types.Operator):
                             objekti.material_slots[bake_mat_index].material.node_tree.nodes.active = bake_node
 
                             bake_index += 1
-                        print('final_material_indexs: ' , final_material_indexs)
                         if(bpy.context.scene.render.engine != 'CYCLES'):
                             bpy.context.scene.render.engine = 'CYCLES'
                         bpy.context.scene.render.bake.use_pass_direct = False
@@ -542,7 +533,6 @@ class SCENE_OT_export(bpy.types.Operator):
                                 toi += "/"
                             final_bake_name = toi[:-1]
                             bpy.data.images[bake_image].save()
-                            print('Baking OBJ:', objekti)
                             temp_string += '''\n[script ImportTexture("''' + bake_list[index_bake_tex][1] + '''","''' + objekti.material_slots[bake_mat_index].material.name + '''","''' +  final_bake_name + '''");]'''
 
                             bake_index += 1
@@ -557,11 +547,7 @@ class SCENE_OT_export(bpy.types.Operator):
                             if (image.name.startswith('ApplinkBake') == True):
                                 bpy.data.images.remove(image)
 
-
-
-
                         index_bake_tex += 1
-                    print('Folder_location: ', folder_objects)
 
         bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
         if(len(bpy.context.selected_objects) > 1 and coat3D.type != 'vox'):
@@ -575,7 +561,6 @@ class SCENE_OT_export(bpy.types.Operator):
             coat3D.bring_retopo = False
             bpy.ops.export_scene.fbx(filepath=coa.applink_address,global_scale = 0.01, use_selection=True, use_mesh_modifiers=coat3D.exportmod, axis_forward='-Z', axis_up='Y')
 
-        print('testi: ', importfile)
         file = open(importfile, "w")
         file.write("%s"%(checkname))
         file.write("\n%s"%(checkname))
@@ -658,7 +643,6 @@ class SCENE_OT_import(bpy.types.Operator):
                 if(image.filepath == texturepath[3] and image.users == 0):
                     bpy.data.images.remove(image)
 
-
         kokeilu = coat3D.exchangedir
         Blender_folder = ("%s%sBlender"%(kokeilu,os.sep))
         Blender_export = Blender_folder
@@ -667,7 +651,7 @@ class SCENE_OT_import(bpy.types.Operator):
         Blender_export += ('%sexport.txt'%(os.sep))
         new_applink_address = 'False'
         new_object = False
-        print('mitas: ', Blender_export)
+
         if(os.path.isfile(Blender_export)):
             obj_pathh = open(Blender_export)
             new_object = True
@@ -718,7 +702,6 @@ class SCENE_OT_import(bpy.types.Operator):
                                     import_type.append(coat3D.type)
 
             if(import_list or coat3D.importmesh):
-                print('import_list:', import_list)
                 for idx, list in enumerate(import_list):
                     bpy.ops.import_scene.fbx(filepath=list, global_scale = 0.01,axis_forward='X',use_custom_normals=False)
                     cache_objects = bpy.data.objects.keys()
@@ -728,9 +711,7 @@ class SCENE_OT_import(bpy.types.Operator):
                         bpy.data.objects[cache_object].coat3D.applink_address = list
                         cache_base.append(cache_object)
 
-
                 bpy.ops.object.select_all(action='DESELECT')
-
                 new_materials = bpy.data.materials.keys()
                 new_objects = bpy.data.objects.keys()
                 new_images = bpy.data.images.keys()
@@ -743,6 +724,7 @@ class SCENE_OT_import(bpy.types.Operator):
                     bpy.data.objects[mark_mesh].data.coat3D.name = '3DC'
                 for c_index in diff_mat:
                     bpy.data.materials.remove(bpy.data.materials[c_index])
+
             '''The main Applink Object Loop'''
 
             remove_path = True
@@ -798,8 +780,6 @@ class SCENE_OT_import(bpy.types.Operator):
                                 export_file.close()
                                 coat3D.remove_path = True
 
-
-
                             bpy.ops.object.select_all(action='DESELECT')
                             obj_proxy.select_set(True)
 
@@ -847,10 +827,7 @@ class SCENE_OT_import(bpy.types.Operator):
                                 for index, material in enumerate(objekti.material_slots):
                                     obj_proxy.material_slots[index-1].material = material.material
 
-                                print('Montako1: ', len(objekti.material_slots))
-                                print('Montako2: ', len(obj_proxy.material_slots))
                                 updatemesh(objekti,obj_proxy)
-
                                 bpy.context.view_layer.objects.active = objekti
 
 
@@ -874,13 +851,11 @@ class SCENE_OT_import(bpy.types.Operator):
                                 coat3D.importmesh = False
 
                             objekti.select_set(True)
-                        print('Montako: ', len(objekti.material_slots))
                         if(coat3D.importtextures):
                             is_new = False
                             tex.matlab(objekti,mat_list,texturelist,is_new)
                         objekti.select_set(False)
                     else:
-                        print('JAAKO TAHAN KOHTAAN 2')
                         mat_list = []
                         if (objekti.material_slots):
                             for obj_mat in objekti.material_slots:
@@ -898,7 +873,6 @@ class SCENE_OT_import(bpy.types.Operator):
             bpy.ops.object.select_all(action='DESELECT')
             if(import_list):
                 for del_obj in diff_objects:
-                    print('diff_objects', diff_objects)
 
                     if(bpy.context.collection.all_objects[del_obj].coat3D.type == 'vox' and bpy.context.collection.all_objects[del_obj].coat3D.delete_proxy_mesh == False):
                         bpy.context.collection.all_objects[del_obj].select_set(True)
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py
index 99fdc599..cb0d2ec8 100644
--- a/io_coat3D/tex.py
+++ b/io_coat3D/tex.py
@@ -60,7 +60,6 @@ def UVTiling(objekti, texturelist):
             uvtiles_index.append([poly.material_index, objekti.data.uv_layers.active.data[loop_index].uv[0]])
         if (len(final_material_indexs) == len(objekti.material_slots)):
             break
-    print(final_material_indexs)
 
     for texture_info in texturelist:
         name = texture_info[0]
@@ -71,18 +70,16 @@ def UVTiling(objekti, texturelist):
                 texture_info[0] = objekti.material_slots[list_tiles[0]].material.name
 
 
-    print('uvtiles_index', uvtiles_index)
+
     return texturelist
 
 
 def readtexturefolder(objekti, mat_list, texturelist, is_new): #read textures from texture file
 
     create_nodes = False
-    print('texturelist:', texturelist)
     if texturelist[0][0].startswith('100'):
         print('This is UVTiling')
         texturelist = UVTiling(objekti, texturelist)
-    print('texturelist:', texturelist)
 
     for index_mat in objekti.material_slots:
 
@@ -302,6 +299,7 @@ def CreateTextureLine(type, act_material, main_mat, texcoat, coat3D, notegroup,
         disp_node = main_material.nodes.new('ShaderNodeDisplacement')
         node.location = -630, -1160
         disp_node.location = 90, -460
+        disp_node.inputs[2].default_value = 0.1
         disp_node.name = '3DC_dispnode'
 
     node.name = '3DC_' + type['name']
@@ -372,8 +370,6 @@ def createExtraNodes(act_material, node, type):
     curvenode.name = '3DC_RGBCurve'
     huenode = act_material.nodes.new('ShaderNodeHueSaturation')
     huenode.name = '3DC_HueSaturation'
-    print('tieto:', type)
-    print('ttoto: ', type['rampnode'])
     if(type['rampnode'] == 'yes'):
         rampnode = act_material.nodes.new('ShaderNodeValToRGB')
         rampnode.name = '3DC_ColorRamp'



More information about the Bf-extensions-cvs mailing list