silencing print outputs.
This commit is contained in:
parent
0a26f6cce9
commit
c3c7663ed4
|
@ -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
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 = [
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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'])
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue