mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
save ifcblobtexture and ifcpixeltexture to .blend file
This commit is contained in:
@@ -278,6 +278,7 @@ class Loader(blenderbim.core.tool.Loader):
|
|||||||
bpy_image.pixels[:] = (
|
bpy_image.pixels[:] = (
|
||||||
np.asarray(pil_image.convert("RGBA"), dtype=np.float32) * byte_to_normalized
|
np.asarray(pil_image.convert("RGBA"), dtype=np.float32) * byte_to_normalized
|
||||||
).ravel()
|
).ravel()
|
||||||
|
bpy_image.pack()
|
||||||
return bpy_image
|
return bpy_image
|
||||||
|
|
||||||
# IfcPixelTexture
|
# IfcPixelTexture
|
||||||
@@ -308,6 +309,7 @@ class Loader(blenderbim.core.tool.Loader):
|
|||||||
|
|
||||||
bpy_image = bpy.data.images.new("pixel_texture", width=width, height=height)
|
bpy_image = bpy.data.images.new("pixel_texture", width=width, height=height)
|
||||||
bpy_image.pixels[:] = blender_pixel_data
|
bpy_image.pixels[:] = blender_pixel_data
|
||||||
|
bpy_image.pack()
|
||||||
return bpy_image
|
return bpy_image
|
||||||
|
|
||||||
if reflectance_method in ["PHYSICAL", "NOTDEFINED"]:
|
if reflectance_method in ["PHYSICAL", "NOTDEFINED"]:
|
||||||
|
|||||||
Reference in New Issue
Block a user