]> git.pld-linux.org Git - packages/cura.git/blob - cura-dont-show-nc-stls.patch
- initial from FC
[packages/cura.git] / cura-dont-show-nc-stls.patch
1 diff -urN Cura-15.02.1.org/Cura/gui/sceneView.py Cura-15.02.1/Cura/gui/sceneView.py
2 --- Cura-15.02.1.org/Cura/gui/sceneView.py      2015-02-18 21:22:48.000000000 +0100
3 +++ Cura-15.02.1/Cura/gui/sceneView.py  2015-05-14 22:34:56.020409418 +0200
4 @@ -1320,105 +1320,16 @@
5  
6                 size = [profile.getMachineSettingFloat('machine_width'), profile.getMachineSettingFloat('machine_depth'), profile.getMachineSettingFloat('machine_height')]
7  
8 -               machine_type = profile.getMachineSetting('machine_type')
9 -               if machine_type not in self._platformMesh:
10 -                       self._platformMesh[machine_type] = None
11 -
12 -                       filename = None
13 -                       texture_name = None
14 -                       offset = [0,0,0]
15 -                       texture_offset = [0,0,0]
16 -                       texture_scale = 1.0
17 -                       if machine_type == 'ultimaker2' or machine_type == 'ultimaker2extended':
18 -                               filename = resources.getPathForMesh('ultimaker2_platform.stl')
19 -                               offset = [-9,-37,145]
20 -                               texture_name = 'Ultimaker2backplate.png'
21 -                               texture_offset = [9,150,-5]
22 -                       elif machine_type == 'ultimaker2go':
23 -                               filename = resources.getPathForMesh('ultimaker2go_platform.stl')
24 -                               offset = [0,-42,145]
25 -                               texture_offset = [0,105,-5]
26 -                               texture_name = 'Ultimaker2backplate.png'
27 -                               texture_scale = 0.9
28 -                       elif machine_type == 'ultimaker_plus':
29 -                               filename = resources.getPathForMesh('ultimaker2_platform.stl')
30 -                               offset = [0,-37,145]
31 -                               texture_offset = [0,150,-5]
32 -                               texture_name = 'UltimakerPlusbackplate.png'
33 -                       elif machine_type == 'ultimaker':
34 -                               filename = resources.getPathForMesh('ultimaker_platform.stl')
35 -                               offset = [0,0,2.5]
36 -                       elif machine_type == 'Witbox':
37 -                               filename = resources.getPathForMesh('Witbox_platform.stl')
38 -                               offset = [0,-37,145]
39 -
40 -                       if filename is not None:
41 -                               meshes = meshLoader.loadMeshes(filename)
42 -                               if len(meshes) > 0:
43 -                                       self._platformMesh[machine_type] = meshes[0]
44 -                                       self._platformMesh[machine_type]._drawOffset = numpy.array(offset, numpy.float32)
45 -                                       self._platformMesh[machine_type].texture = None
46 -                                       if texture_name is not None:
47 -                                               self._platformMesh[machine_type].texture = openglHelpers.loadGLTexture(texture_name)
48 -                                               self._platformMesh[machine_type].texture_offset = texture_offset
49 -                                               self._platformMesh[machine_type].texture_scale = texture_scale
50 -               if self._platformMesh[machine_type] is not None:
51 -                       mesh = self._platformMesh[machine_type]
52 -                       glColor4f(1,1,1,0.5)
53 -                       self._objectShader.bind()
54 -                       self._renderObject(mesh, False, False)
55 -                       self._objectShader.unbind()
56 -
57 -                       #For the Ultimaker 2 render the texture on the back plate to show the Ultimaker2 text.
58 -                       if mesh.texture is not None:
59 -                               glBindTexture(GL_TEXTURE_2D, mesh.texture)
60 -                               glEnable(GL_TEXTURE_2D)
61 -                               glPushMatrix()
62 -                               glColor4f(1,1,1,1)
63 -
64 -                               glTranslate(mesh.texture_offset[0], mesh.texture_offset[1], mesh.texture_offset[2])
65 -                               glScalef(mesh.texture_scale, mesh.texture_scale, mesh.texture_scale)
66 -                               h = 50
67 -                               d = 8
68 -                               w = 100
69 -                               glEnable(GL_BLEND)
70 -                               glBlendFunc(GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA)
71 -                               glEnable(GL_ALPHA_TEST)
72 -                               glAlphaFunc(GL_GREATER, 0.0)
73 -                               glBegin(GL_QUADS)
74 -                               glTexCoord2f(1, 0)
75 -                               glVertex3f( w, 0, h)
76 -                               glTexCoord2f(0, 0)
77 -                               glVertex3f(-w, 0, h)
78 -                               glTexCoord2f(0, 1)
79 -                               glVertex3f(-w, 0, 0)
80 -                               glTexCoord2f(1, 1)
81 -                               glVertex3f( w, 0, 0)
82 -
83 -                               glTexCoord2f(1, 0)
84 -                               glVertex3f(-w, d, h)
85 -                               glTexCoord2f(0, 0)
86 -                               glVertex3f( w, d, h)
87 -                               glTexCoord2f(0, 1)
88 -                               glVertex3f( w, d, 0)
89 -                               glTexCoord2f(1, 1)
90 -                               glVertex3f(-w, d, 0)
91 -                               glEnd()
92 -                               glDisable(GL_TEXTURE_2D)
93 -                               glDisable(GL_ALPHA_TEST)
94 -                               glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
95 -                               glPopMatrix()
96 -               else:
97 -                       glColor4f(0,0,0,1)
98 -                       glLineWidth(3)
99 -                       glBegin(GL_LINES)
100 -                       glVertex3f(-size[0] / 2, -size[1] / 2, 0)
101 -                       glVertex3f(-size[0] / 2, -size[1] / 2, 10)
102 -                       glVertex3f(-size[0] / 2, -size[1] / 2, 0)
103 -                       glVertex3f(-size[0] / 2+10, -size[1] / 2, 0)
104 -                       glVertex3f(-size[0] / 2, -size[1] / 2, 0)
105 -                       glVertex3f(-size[0] / 2, -size[1] / 2+10, 0)
106 -                       glEnd()
107 +               glColor4f(0,0,0,1)
108 +               glLineWidth(3)
109 +               glBegin(GL_LINES)
110 +               glVertex3f(-size[0] / 2, -size[1] / 2, 0)
111 +               glVertex3f(-size[0] / 2, -size[1] / 2, 10)
112 +               glVertex3f(-size[0] / 2, -size[1] / 2, 0)
113 +               glVertex3f(-size[0] / 2+10, -size[1] / 2, 0)
114 +               glVertex3f(-size[0] / 2, -size[1] / 2, 0)
115 +               glVertex3f(-size[0] / 2, -size[1] / 2+10, 0)
116 +               glEnd()
117  
118                 glDepthMask(False)
119  
This page took 0.087336 seconds and 4 git commands to generate.