diff options
author | Vilem Duha <vilem.duha@gmail.com> | 2019-04-04 00:55:50 +0300 |
---|---|---|
committer | Vilem Duha <vilem.duha@gmail.com> | 2019-04-04 00:55:50 +0300 |
commit | c3c7663ed4e7c8d5e5cb1bdb6ee20c7ed19d47a5 (patch) | |
tree | 50cf74dc75c7131296949ebbbbb4e258b4a79a01 /blenderkit | |
parent | 0a26f6cce99ce064c48a75c2df7533b2b3156d42 (diff) |
silencing print outputs.
Diffstat (limited to 'blenderkit')
-rw-r--r-- | blenderkit/append_link.py | 5 | ||||
-rw-r--r-- | blenderkit/asset_inspector.py | 7 | ||||
-rw-r--r-- | blenderkit/bg_blender.py | 4 | ||||
-rw-r--r-- | blenderkit/categories.py | 4 | ||||
-rw-r--r-- | blenderkit/ratings.py | 2 | ||||
-rw-r--r-- | blenderkit/search.py | 10 | ||||
-rw-r--r-- | blenderkit/ui.py | 3 | ||||
-rw-r--r-- | blenderkit/upload.py | 2 | ||||
-rw-r--r-- | blenderkit/upload_bg.py | 4 | ||||
-rw-r--r-- | blenderkit/version_checker.py | 2 |
10 files changed, 16 insertions, 27 deletions
diff --git a/blenderkit/append_link.py b/blenderkit/append_link.py index 7be4d795..fef0c25f 100644 --- a/blenderkit/append_link.py +++ b/blenderkit/append_link.py @@ -46,7 +46,7 @@ def append_material(file_name, matname=None, link=False, fake_user=True): for m in data_from.materials: if m == matname or matname is None: data_to.materials = [m] - print(m, type(m)) + # print(m, type(m)) matname = m break; @@ -133,10 +133,7 @@ def append_particle_system(file_name, obnames=[], location=(0, 0, 0), link=False count = max(2, int(count / ratio)) ps.display_percentage = min(ps.display_percentage, max(1, int(100 * threshold / total_count))) - print('count', count) - print('total count', total_count) ps.count = count - print('got here') bpy.ops.object.particle_system_add() target_object.particle_systems[-1].settings = ps diff --git a/blenderkit/asset_inspector.py b/blenderkit/asset_inspector.py index 7c5d24f7..1db9f6b4 100644 --- a/blenderkit/asset_inspector.py +++ b/blenderkit/asset_inspector.py @@ -129,8 +129,6 @@ def check_render_engine(props, obs): props.engine = 'BLENDER_GAME' # write to object properties. - print(materials) - print(shaders) props.materials = '' props.shaders = '' for m in materials: @@ -141,7 +139,6 @@ def check_render_engine(props, obs): s = s.lower() s = s.replace('_', ' ') props.shaders += (s + ', ') - print(props.shaders) def check_printable(props, obs): @@ -164,9 +161,7 @@ def check_printable(props, obs): printable = True for item in info: - print(item) passed = item[0].endswith(' 0') - print('passed', passed) if not passed: print(item[0]) printable = False @@ -274,7 +269,6 @@ def countObs(props, obs): for ob in obs: otype = ob.type.lower() ob_types[otype] = ob_types.get(otype, 0) + 1 - print(count, ob_types) props.object_count = count @@ -295,7 +289,6 @@ def check_modifiers(props, obs): smt = m.flow_settings.smoke_flow_type if smt == 'BOTH' or smt == 'FIRE': modifiers.append('fire') - print(mtype) # for mt in modifiers: effectmodifiers = ['soft body', 'fluid simulation', 'particle system', 'collision', 'smoke', 'cloth', diff --git a/blenderkit/bg_blender.py b/blenderkit/bg_blender.py index e594fa9a..f1681831 100644 --- a/blenderkit/bg_blender.py +++ b/blenderkit/bg_blender.py @@ -180,14 +180,14 @@ class KillBgProcess(bpy.types.Operator): if self.process_type == 'THUMBNAILER': props.is_generating_thumbnail = False global blenderkit_bg_process - print('killing', self.process_source, self.process_type) + # print('killing', self.process_source, self.process_type) # then go kill the process. this wasn't working for unsetting props and that was the reason for changing to the method above. processes = bg_processes for p in processes: tcom = p[1] - print(tcom.process_type, self.process_type) + # print(tcom.process_type, self.process_type) if tcom.process_type == self.process_type: source = eval(tcom.eval_path) print(source.bl_rna.name, self.process_source) diff --git a/blenderkit/categories.py b/blenderkit/categories.py index e4ff9be1..e7fd72bd 100644 --- a/blenderkit/categories.py +++ b/blenderkit/categories.py @@ -50,7 +50,7 @@ def copy_categories(): categories_filepath = os.path.join(tempdir, 'categories.json') if not os.path.exists(categories_filepath): source_path = paths.get_addon_file(subpath='data' + os.sep + 'categories.json') - print('attempt to copy categories from: %s to %s' % (categories_filepath, source_path)) + # print('attempt to copy categories from: %s to %s' % (categories_filepath, source_path)) try: shutil.copy(source_path, categories_filepath) except: @@ -78,7 +78,7 @@ def fetch_categories(API_key): with open(categories_filepath, 'w') as s: json.dump(categories, s, indent=4) except: - print('category fetching failed') + # print('category fetching failed') if not os.path.exists(categories_filepath): source_path = paths.get_addon_file(subpath='data' + os.sep + 'categories.json') shutil.copy(source_path, categories_filepath) diff --git a/blenderkit/ratings.py b/blenderkit/ratings.py index 6928b87a..7601a98f 100644 --- a/blenderkit/ratings.py +++ b/blenderkit/ratings.py @@ -88,7 +88,7 @@ def upload_rating(asset): asset_data = asset['asset_data'] bkit_ratings = asset.bkit_ratings - print('rating asset', asset_data['name'], asset_data['asset_base_id']) + # print('rating asset', asset_data['name'], asset_data['asset_base_id']) url = paths.get_bkit_url() + 'assets/' + asset['asset_data']['id'] + '/rating/' ratings = [ diff --git a/blenderkit/search.py b/blenderkit/search.py index 6a202f09..040ee7ea 100644 --- a/blenderkit/search.py +++ b/blenderkit/search.py @@ -227,7 +227,7 @@ def timer_update(): # TODO might get moved to handle all blenderkit stuff. props.report = error props.search_error = True - print('finished search thread') + # print('finished search thread') mt('preview loading finished') return .2 @@ -272,7 +272,7 @@ def load_previews(): img.reload() i += 1 - print('previews loaded') + # print('previews loaded') # line splitting for longer texts... @@ -594,7 +594,7 @@ class Searcher(threading.Thread): nresults.append(d) rdata['results'] = nresults - print('number of results: ', len(rdata.get('results', []))) + # print('number of results: ', len(rdata.get('results', []))) if self.stopped(): print('stopping search : ' + query['keywords']) return @@ -671,7 +671,7 @@ class Searcher(threading.Thread): thread.join() # print(x) del (thumb_sml_download_threads[tk]) - print('fetched thumbnail ', i) + # print('fetched thumbnail ', i) i += 1 if self.stopped(): print('stopping search : ' + query['keywords']) @@ -908,7 +908,7 @@ def search(own=False, category='', get_next=False, free_only=False): if category != '': query['category'] = category - print('searching') + # print('searching') props.is_searching = True params = { diff --git a/blenderkit/ui.py b/blenderkit/ui.py index 40e9b1d8..4973b6c3 100644 --- a/blenderkit/ui.py +++ b/blenderkit/ui.py @@ -939,7 +939,7 @@ class AssetBarOperator(bpy.types.Operator): return {'CANCELLED'} if self.area not in areas or self.area.type != 'VIEW_3D': - print('search areas') + # print('search areas') # stopping here model by now - because of: # switching layouts or maximizing area now fails to assign new area throwing the bug # internal error: modal gizmo-map handler has invalid area @@ -1225,7 +1225,6 @@ class AssetBarOperator(bpy.types.Operator): utils.selection_set(sel) if not ui_props.has_hit: - print('select fun') return {'RUNNING_MODAL'} else: diff --git a/blenderkit/upload.py b/blenderkit/upload.py index 3be1650a..c1611525 100644 --- a/blenderkit/upload.py +++ b/blenderkit/upload.py @@ -681,7 +681,7 @@ class ModelUploadOperator(Operator): # and is used for linking to scene metadata_only = self.metadata_only if props.name_changed: - print('has to reupload whole data, name has changed.') + # print('has to reupload whole data, name has changed.') self.metadata_only = False props.name_changed = False diff --git a/blenderkit/upload_bg.py b/blenderkit/upload_bg.py index 60ee4690..681193ec 100644 --- a/blenderkit/upload_bg.py +++ b/blenderkit/upload_bg.py @@ -97,8 +97,8 @@ def upload_files(filepath, upload_data, files): upload_response = requests.put(upload['s3UploadUrl'], data=upload_in_chunks(f['file_path'], chunk_size, f['type']), stream=True, verify=True) - print('upload response') - print(upload_response.text) + # print('upload response') + # print(upload_response.text) uploaded = True except Exception as e: bg_blender.progress('Upload %s failed, retrying' % f['type']) diff --git a/blenderkit/version_checker.py b/blenderkit/version_checker.py index ad5e23a5..055ab464 100644 --- a/blenderkit/version_checker.py +++ b/blenderkit/version_checker.py @@ -60,7 +60,7 @@ def compare_versions(module): ver_online = data['addonVersion2.8'].split('.') ver_online_float = int(ver_online[0]) + .01 * int(ver_online[1]) + .0001 * int(ver_online[2]) - print('versions: installed-%s, online-%s' % (str(ver_local_float), str(ver_online_float))) + # print('versions: installed-%s, online-%s' % (str(ver_local_float), str(ver_online_float))) if ver_online_float > ver_local_float: return True except: |