mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Some fixes for Blender 2.8?
This commit is contained in:
@@ -134,13 +134,15 @@ def import_ifc(filename, use_names, process_relations, blender_booleans):
|
|||||||
for mat in mats:
|
for mat in mats:
|
||||||
props = {}
|
props = {}
|
||||||
if mat.has_diffuse:
|
if mat.has_diffuse:
|
||||||
props['diffuse_color'] = mat.diffuse
|
alpha = 1.
|
||||||
if mat.has_specular:
|
if mat.has_transparency and mat.transparency > 0:
|
||||||
props['specular_color'] = mat.specular
|
alpha = 1. - mat.transparency
|
||||||
if mat.has_transparency and mat.transparency > 0:
|
props['diffuse_color'] = mat.diffuse + (alpha,)
|
||||||
props['transparency'] = mat.transparency
|
# @todo
|
||||||
if mat.has_specularity:
|
# if mat.has_specular:
|
||||||
props['specular_intensity'] = mat.specularity
|
# props['specular_color'] = mat.specular
|
||||||
|
# if mat.has_specularity:
|
||||||
|
# props['specular_intensity'] = mat.specularity
|
||||||
add_material(mat.name, props)
|
add_material(mat.name, props)
|
||||||
|
|
||||||
faces = me.polygons if hasattr(me, 'polygons') else me.faces
|
faces = me.polygons if hasattr(me, 'polygons') else me.faces
|
||||||
@@ -263,8 +265,10 @@ def import_ifc(filename, use_names, process_relations, blender_booleans):
|
|||||||
mod.operation = "DIFFERENCE"
|
mod.operation = "DIFFERENCE"
|
||||||
mod.object = opening_ob
|
mod.object = opening_ob
|
||||||
|
|
||||||
txt = bpy.data.texts.new(f"{bpy.path.basename(filename)}.log")
|
if hasattr(iterator, 'getLog'):
|
||||||
txt.from_string(iterator.getLog())
|
# @todo
|
||||||
|
txt = bpy.data.texts.new(f"{bpy.path.basename(filename)}.log")
|
||||||
|
txt.from_string(iterator.getLog())
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user