Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified data/img/LineAngle1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/LineAngle2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/LineAngle3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/MK3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/MK3_bottom_alpha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/PrintBed04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/PrintBed04_GRID.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/checker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/arrow_down_objectadjust_hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/arrow_down_objectadjust_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/arrow_down_objectadjust_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/arrow_dropdownmenu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/arrow_dropdownmenu_bright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/arrow_up_objectadjust_hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/arrow_up_objectadjust_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/arrow_up_objectadjust_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/backarrow_hover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/backarrow_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/backarrow_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/button_mask_a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/button_mask_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/button_mask_c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/checkbox_dark_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/checkbox_dark_off_disabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/img/gui/checkbox_dark_off_hover.png
Binary file modified data/img/gui/checkbox_off.png
Binary file modified data/img/gui/checkbox_off_hover.png
Binary file modified data/img/gui/checkbox_on.png
Binary file modified data/img/gui/checkbox_on_disabled.png
Binary file modified data/img/gui/checkbox_on_hover.png
Binary file modified data/img/gui/colorchange_add_off.png
Binary file modified data/img/gui/colorchange_add_on.png
Binary file modified data/img/gui/colorchange_delete_off.png
Binary file modified data/img/gui/colorchange_delete_on.png
Binary file modified data/img/gui/deletebutton.png
Binary file modified data/img/gui/disable_checkbox_off.png
Binary file modified data/img/gui/disable_checkbox_on.png
Binary file modified data/img/gui/disable_down_objectadjust.png
Binary file modified data/img/gui/disable_up_objectadjust.png
Binary file modified data/img/gui/forwardarrow_hover.png
Binary file modified data/img/gui/forwardarrow_off.png
Binary file modified data/img/gui/forwardarrow_on.png
Binary file modified data/img/gui/help.png
Binary file modified data/img/gui/help_light_dissabled_s.png
Binary file modified data/img/gui/help_light_hover_s.png
Binary file modified data/img/gui/help_light_normal_s.png
Binary file modified data/img/gui/help_light_on_s.png
Binary file modified data/img/gui/info_icon.png
Binary file modified data/img/gui/multi_hover.png
Binary file modified data/img/gui/multi_off.png
Binary file modified data/img/gui/multi_on.png
Binary file modified data/img/gui/organize_hover.png
Binary file modified data/img/gui/organize_off.png
Binary file modified data/img/gui/organize_on.png
Binary file modified data/img/gui/placeonface_hover.png
Binary file modified data/img/gui/placeonface_off.png
Binary file modified data/img/gui/placeonface_on.png
Binary file modified data/img/gui/plusbutton.png
Binary file modified data/img/gui/popup_window.png
Binary file modified data/img/gui/remove_off.png
Binary file modified data/img/gui/remove_on.png
Binary file modified data/img/gui/reset_dark_hover_s.png
Binary file modified data/img/gui/reset_dark_normal_s.png
Binary file modified data/img/gui/reset_dark_on_s.png
Binary file modified data/img/gui/reset_light_dissabled_s.png
Binary file modified data/img/gui/reset_light_hover_s.png
Binary file modified data/img/gui/reset_light_normal_s.png
Binary file modified data/img/gui/reset_light_on_s.png
Binary file modified data/img/gui/rotate_hover.png
Binary file modified data/img/gui/rotate_off.png
Binary file modified data/img/gui/rotate_on.png
Binary file modified data/img/gui/scale_hover.png
Binary file modified data/img/gui/scale_off.png
Binary file modified data/img/gui/scale_on.png
Binary file modified data/img/gui/scalelock_off.png
Binary file modified data/img/gui/scalelock_off_disabled.png
Binary file modified data/img/gui/scalelock_off_hover.png
Binary file modified data/img/gui/scalelock_on.png
Binary file modified data/img/gui/scalelock_on_disabled.png
Binary file modified data/img/gui/scalelock_on_hover.png
Binary file modified data/img/gui/slider_knob.png
Binary file modified data/img/gui/slider_knob_2.png
Binary file modified data/img/gui/slider_path.png
Binary file modified data/img/gui/slider_path_vert.png
Binary file modified data/img/gui/support_hover.png
Binary file modified data/img/gui/support_off.png
Binary file modified data/img/gui/support_on.png
Binary file modified data/img/gui/tool_mask.png
Binary file modified data/img/gui/warning_icon.png
Binary file modified data/img/splashscreen.png
Binary file modified data/img/splashscreen_osx.png
10 changes: 5 additions & 5 deletions sceneRender.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,15 +245,15 @@ def set_z_rotation(self, angle):
#print("Z rot: " + str(self.zRot))

def texture_from_png(self, filename, gen_mipmap=True):
mode_to_bpp = {'1':1, 'L':8, 'P':8, 'RGB':24, 'RGBA':32, 'CMYK':32, 'YCbCr':24, 'I':32, 'F':32}

img = open(filename)
img = img.transpose(FLIP_TOP_BOTTOM)
bpp = mode_to_bpp[img.mode]
if bpp == 32:
if (img.mode in ('RGBA', 'LA') or
(img.mode == 'P' and 'transparency' in img.info)):
type = GL_RGBA
img = img.convert(mode='RGBA')
else:
type = GL_RGB
img = img.convert(mode='RGB')
img_data = numpy.array(list(img.getdata()), numpy.uint8)

texture = glGenTextures(1)
Expand Down Expand Up @@ -1747,4 +1747,4 @@ def _gl_vector(array, *args):
if len(args) > 0:
array = numpy.append(array, args)
vector = (GLfloat * len(array))(*array)
return vector
return vector