Merge remote-tracking branch 'origin/blender-v2.81-release'
This was neglected during the 2.81 development cycle.
This commit is contained in:
commit
29bbe142ea
|
@ -659,11 +659,14 @@ def draw_callback_2d_progress(self, context):
|
|||
for threaddata in download.download_threads:
|
||||
asset_data = threaddata[1]
|
||||
tcom = threaddata[2]
|
||||
|
||||
directory = paths.get_temp_dir('%s_search' % asset_data['asset_type'])
|
||||
tpath = os.path.join(directory, asset_data['thumbnail_small'])
|
||||
img = utils.get_hidden_image(tpath, asset_data['id'])
|
||||
|
||||
if tcom.passargs.get('downloaders'):
|
||||
for d in tcom.passargs['downloaders']:
|
||||
directory = paths.get_temp_dir('%s_search' % asset_data['asset_type'])
|
||||
tpath = os.path.join(directory, asset_data['thumbnail_small'])
|
||||
img = utils.get_hidden_image(tpath, 'rating_preview')
|
||||
|
||||
loc = view3d_utils.location_3d_to_region_2d(bpy.context.region, bpy.context.space_data.region_3d,
|
||||
d['location'])
|
||||
if loc is not None:
|
||||
|
|
|
@ -252,11 +252,12 @@ def get_hidden_image(tpath, bdata_name, force_reload=False):
|
|||
|
||||
img.filepath = tpath
|
||||
img.reload()
|
||||
img.colorspace_settings.name = 'Linear'
|
||||
elif force_reload:
|
||||
if img.packed_file is not None:
|
||||
img.unpack(method='USE_ORIGINAL')
|
||||
img.reload()
|
||||
img.colorspace_settings.name = 'Linear'
|
||||
img.colorspace_settings.name = 'Linear'
|
||||
return img
|
||||
|
||||
|
||||
|
|
|
@ -80,7 +80,8 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False):
|
|||
import bpy
|
||||
|
||||
# get the editmode data
|
||||
ob.update_from_editmode()
|
||||
if ob.mode == "EDIT":
|
||||
ob.update_from_editmode()
|
||||
|
||||
# get the modifiers
|
||||
if use_mesh_modifiers:
|
||||
|
@ -94,6 +95,7 @@ def faces_from_mesh(ob, global_matrix, use_mesh_modifiers=False):
|
|||
mesh = mesh_owner.to_mesh()
|
||||
except RuntimeError:
|
||||
return
|
||||
|
||||
if mesh is None:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue