Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cryoem/eman2
Browse files Browse the repository at this point in the history
  • Loading branch information
g5v991x committed Oct 4, 2024
2 parents 363285a + 0e77802 commit 336971d
Show file tree
Hide file tree
Showing 16 changed files with 596 additions and 243 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.14)
PROJECT(EMAN
VERSION 2.99.63
VERSION 2.99.64
LANGUAGES CXX
)

Expand Down
2 changes: 1 addition & 1 deletion libpyEM/qtgui/em3Dfonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def render(self):
glMaterial(GL_FRONT, GL_AMBIENT, self.colors[self.currentcolor]["ambient"])
glMaterial(GL_FRONT, GL_DIFFUSE, self.colors[self.currentcolor]["diffuse"])
glMaterial(GL_FRONT, GL_SPECULAR, self.colors[self.currentcolor]["specular"])
# glMaterial(GL_FRONT, GL_SHININESS, self.colors[self.currentcolor]["shininess"])
glMaterial(GL_FRONT, GL_SHININESS, self.colors[self.currentcolor]["shininess"])
glColor(self.colors[self.currentcolor]["diffuse"])

glClearColor(self.bgR,self.bgG,self.bgB,self.bg_a)
Expand Down
2 changes: 1 addition & 1 deletion libpyEM/qtgui/emannotate2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ def __draw_hud(self):
glMaterial(GL_FRONT,GL_AMBIENT,(0.2, 1.0, 0.2,1.0))
glMaterial(GL_FRONT,GL_DIFFUSE,(0.2, 1.0, 0.9,1.0))
glMaterial(GL_FRONT,GL_SPECULAR,(1.0, 0.5, 0.2,1.0))
# glMaterial(GL_FRONT,GL_SHININESS,20.0)
glMaterial(GL_FRONT,GL_SHININESS,20.0)
enable_depth = glIsEnabled(GL_DEPTH_TEST)
glDisable(GL_DEPTH_TEST)
glColor(1.0,1.0,1.0)
Expand Down
10 changes: 5 additions & 5 deletions libpyEM/qtgui/emglobjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def draw_frame(self, ftest=False):
# and is the default color of the frame
glMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,(.2,.2,.8,1.0))
glMaterial(GL_FRONT,GL_SPECULAR,(.8,.8,.8,1.0))
# glMaterial(GL_FRONT,GL_SHININESS,50.0)
glMaterial(GL_FRONT,GL_SHININESS,50.0)

glMatrixMode(GL_PROJECTION)
glPushMatrix()
Expand All @@ -371,7 +371,7 @@ def draw_frame(self, ftest=False):
# and is the default color of the frame
glMaterial(GL_FRONT,GL_AMBIENT,(.2,.2,.8,1.0))
glMaterial(GL_FRONT,GL_SPECULAR,(.8,.8,.8,1.0))
# glMaterial(GL_FRONT,GL_SHININESS,50.0)
glMaterial(GL_FRONT,GL_SHININESS,50.0)

#draw the cylinders around the edges of the frame
glPushMatrix()
Expand Down Expand Up @@ -724,7 +724,7 @@ def draw_frame(self, ftest=False):
# and is the default color of the frame
glMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,(.2,.2,.8,1.0))
glMaterial(GL_FRONT,GL_SPECULAR,(.8,.8,.8,1.0))
# glMaterial(GL_FRONT,GL_SHININESS,50.0)
glMaterial(GL_FRONT,GL_SHININESS,50.0)

glMatrixMode(GL_PROJECTION)
glPushMatrix()
Expand All @@ -740,7 +740,7 @@ def draw_frame(self, ftest=False):
# and is the default color of the frame
glMaterial(GL_FRONT,GL_AMBIENT,(.2,.2,.8,1.0))
glMaterial(GL_FRONT,GL_SPECULAR,(.8,.8,.8,1.0))
# glMaterial(GL_FRONT,GL_SHININESS,50.0)
glMaterial(GL_FRONT,GL_SHININESS,50.0)

#draw the cylinders around the edges of the frame
glPushMatrix()
Expand Down Expand Up @@ -1757,7 +1757,7 @@ def draw_volume_bounds(width,height,depth,color=True):
glMaterial(GL_FRONT, GL_AMBIENT, [1, 1, 1,1.0])
glMaterial(GL_FRONT, GL_DIFFUSE, [1, 1, 1,1.0])
glMaterial(GL_FRONT, GL_SPECULAR, [0.774597, 0.774597, 0.774597,1.0])
# glMaterial(GL_FRONT, GL_SHININESS, 128.0)
glMaterial(GL_FRONT, GL_SHININESS, 128.0)

glNormal(0,1,0)

Expand Down
2 changes: 1 addition & 1 deletion libpyEM/qtgui/emimage2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ def __draw_hud(self):
glMaterial(GL_FRONT,GL_AMBIENT,(0.2, 1.0, 0.2,1.0))
glMaterial(GL_FRONT,GL_DIFFUSE,(0.2, 1.0, 0.9,1.0))
glMaterial(GL_FRONT,GL_SPECULAR,(1.0 , 0.5, 0.2,1.0))
# glMaterial(GL_FRONT,GL_SHININESS,20.0)
glMaterial(GL_FRONT,GL_SHININESS,20.0)
enable_depth = glIsEnabled(GL_DEPTH_TEST)
glDisable(GL_DEPTH_TEST)
glColor(1.0,1.0,1.0)
Expand Down
2 changes: 1 addition & 1 deletion libpyEM/qtgui/emimage3diso.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def render(self):
glMaterial(GL_FRONT, GL_AMBIENT, self.colors[self.isocolor]["ambient"])
glMaterial(GL_FRONT, GL_DIFFUSE, self.colors[self.isocolor]["diffuse"])
glMaterial(GL_FRONT, GL_SPECULAR, self.colors[self.isocolor]["specular"])
# glMaterial(GL_FRONT, GL_SHININESS, self.colors[self.isocolor]["shininess"])
glMaterial(GL_FRONT, GL_SHININESS, self.colors[self.isocolor]["shininess"])
glMaterial(GL_FRONT, GL_EMISSION, self.colors[self.isocolor]["emission"])
glColor(self.colors[self.isocolor]["ambient"])
glPushMatrix()
Expand Down
8 changes: 4 additions & 4 deletions libpyEM/qtgui/emimage3dsym.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ def load_gl_color(self,frac):
glMaterial(GL_FRONT,GL_DIFFUSE,diffuse)
glMaterial(GL_FRONT,GL_SPECULAR,specular)
glMaterial(GL_FRONT,GL_EMISSION,emission)
# glMaterial(GL_FRONT,GL_SHININESS,shininess)
glMaterial(GL_FRONT,GL_SHININESS,shininess)

def load_color_2(self):
glColor(self.a2)
glMaterial(GL_FRONT,GL_AMBIENT,self.a2)
glMaterial(GL_FRONT,GL_DIFFUSE,self.d2)
glMaterial(GL_FRONT,GL_SPECULAR,self.s2)
glMaterial(GL_FRONT,GL_EMISSION,self.e2)
# glMaterial(GL_FRONT,GL_SHININESS,self.h2)
glMaterial(GL_FRONT,GL_SHININESS,self.h2)


class EulerData(object):
Expand Down Expand Up @@ -570,14 +570,14 @@ def load_gl_color(self,name):
glMaterial(GL_FRONT,GL_DIFFUSE,color["diffuse"])
glMaterial(GL_FRONT,GL_SPECULAR,color["specular"])
glMaterial(GL_FRONT,GL_EMISSION,color["emission"])
# glMaterial(GL_FRONT,GL_SHININESS,color["shininess"])
glMaterial(GL_FRONT,GL_SHININESS,color["shininess"])

def gl_color(self,color):
glColor(*color)
glMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,color)
glMaterial(GL_FRONT,GL_SPECULAR,[0,0,0,1])
glMaterial(GL_FRONT,GL_EMISSION,(0,0,0,1.0))
# glMaterial(GL_FRONT,GL_SHININESS,64.0)
glMaterial(GL_FRONT,GL_SHININESS,64.0)

def trace_great_arcs(self, points):

Expand Down
4 changes: 2 additions & 2 deletions libpyEM/qtgui/emimagemx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,7 @@ def load_set_color(self,set):
c = [color[0],color[1],color[2],1.0]
glMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,c)
glMaterial(GL_FRONT,GL_SPECULAR,c)
# glMaterial(GL_FRONT,GL_SHININESS,100.0)
glMaterial(GL_FRONT,GL_SHININESS,100.0)
# if set == 0:
# glMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,(.2,.2,.8,1.0))
# glMaterial(GL_FRONT,GL_SPECULAR,(.2,.2,.8,1.0))
Expand Down Expand Up @@ -2118,7 +2118,7 @@ def draw(self):
glNormal(0,0,1) # this normal is fine for everything that is drawn here
# this provides some defaults for specular and shininess
glMaterial(GL_FRONT,GL_SPECULAR,(.8,1,1,1.0))
# glMaterial(GL_FRONT,GL_SHININESS,20.0)
glMaterial(GL_FRONT,GL_SHININESS,20.0)

# The scroll bar - the long bar that defines the extent
glBegin(GL_QUADS)
Expand Down
14 changes: 7 additions & 7 deletions libpyEM/qtgui/emlights.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ def cylinder_to_from(self,next,prev):
glMaterial(GL_FRONT, GL_AMBIENT, self.colors["emerald"]["ambient"])
glMaterial(GL_FRONT, GL_DIFFUSE, self.colors["emerald"]["diffuse"])
glMaterial(GL_FRONT, GL_SPECULAR, self.colors["emerald"]["specular"])
# glMaterial(GL_FRONT, GL_SHININESS, self.colors["emerald"]["shininess"])
glMaterial(GL_FRONT, GL_SHININESS, self.colors["emerald"]["shininess"])
glutSolidTorus(.05,0.25,16,16)
glScalef(0.2,0.2,length)
glMaterial(GL_FRONT, GL_AMBIENT, self.colors["ruby"]["ambient"])
glMaterial(GL_FRONT, GL_DIFFUSE, self.colors["ruby"]["diffuse"])
glMaterial(GL_FRONT, GL_SPECULAR, self.colors["ruby"]["specular"])
# glMaterial(GL_FRONT, GL_SHININESS, self.colors["ruby"]["shininess"])
glMaterial(GL_FRONT, GL_SHININESS, self.colors["ruby"]["shininess"])
glCallList(self.cylinderdl) #FIXME: this cylinder isn't visible on Mac OS
glPopMatrix()

Expand Down Expand Up @@ -170,7 +170,7 @@ def draw_lights(self):
glMaterial(GL_FRONT, GL_DIFFUSE, self.colors["obsidian"]["diffuse"])
glMaterial(GL_FRONT, GL_SPECULAR, self.colors["obsidian"]["specular"])
glMaterial(GL_FRONT, GL_EMISSION, self.colors["obsidian"]["emission"])
# glMaterial(GL_FRONT, GL_SHININESS, self.colors["obsidian"]["shininess"])
glMaterial(GL_FRONT, GL_SHININESS, self.colors["obsidian"]["shininess"])

glPushMatrix()
n = 12
Expand All @@ -183,7 +183,7 @@ def draw_lights(self):
glMaterial(GL_FRONT, GL_DIFFUSE, self.colors[color]["diffuse"])
glMaterial(GL_FRONT, GL_SPECULAR, self.colors[color]["specular"])
glMaterial(GL_FRONT, GL_EMISSION, self.colors[color]["emission"])
# glMaterial(GL_FRONT, GL_SHININESS, self.colors[color]["shininess"])
glMaterial(GL_FRONT, GL_SHININESS, self.colors[color]["shininess"])
rot = 180.0*i/(n-1)
glPushMatrix()
glTranslate(0,0,-.5)
Expand Down Expand Up @@ -292,7 +292,7 @@ def draw_light_cocoon(self):
glMaterial(GL_FRONT, GL_DIFFUSE, yellow)
glMaterial(GL_FRONT, GL_SPECULAR, yellow)
glMaterial(GL_FRONT, GL_EMISSION, [0,0,0,0])
# glMaterial(GL_FRONT, GL_SHININESS, 32)
glMaterial(GL_FRONT, GL_SHININESS, 32.0)
glColor(*yellow)

glEnable(GL_BLEND)
Expand Down Expand Up @@ -354,7 +354,7 @@ def draw_inside_light(self):
glMaterial(GL_FRONT, GL_DIFFUSE, yellow)
glMaterial(GL_FRONT, GL_SPECULAR, yellow)
glMaterial(GL_FRONT, GL_EMISSION, [0,0,0,0])
# glMaterial(GL_FRONT, GL_SHININESS, 32)
glMaterial(GL_FRONT, GL_SHININESS, 32.0)
glColor(*yellow)

glEnable(GL_BLEND)
Expand Down Expand Up @@ -597,7 +597,7 @@ def render(self):
glMaterial(GL_FRONT, GL_DIFFUSE, self.colors[self.currentcolor]["diffuse"])
glMaterial(GL_FRONT, GL_SPECULAR, self.colors[self.currentcolor]["specular"])
glMaterial(GL_FRONT, GL_EMISSION, self.colors[self.currentcolor]["emission"])
# glMaterial(GL_FRONT, GL_SHININESS, self.colors[self.currentcolor]["shininess"])
glMaterial(GL_FRONT, GL_SHININESS, self.colors[self.currentcolor]["shininess"])
glColor(self.colors[self.currentcolor]["ambient"])

glEnable(GL_NORMALIZE)
Expand Down
8 changes: 4 additions & 4 deletions libpyEM/qtgui/empdbitem3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def load_gl_color(self,name):
glMaterial(GL_FRONT,GL_DIFFUSE,color["diffuse"])
glMaterial(GL_FRONT,GL_SPECULAR,color["specular"])
glMaterial(GL_FRONT,GL_EMISSION,color["emission"])
# glMaterial(GL_FRONT,GL_SHININESS,color["shininess"])
glMaterial(GL_FRONT,GL_SHININESS,color["shininess"])

def setLabel(self, label): self.label = label
def current_text(self): return self.text
Expand Down Expand Up @@ -519,7 +519,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)
if self.first_render_flag: self.first_render_flag = False
glPushMatrix()
Expand Down Expand Up @@ -1102,7 +1102,7 @@ def load_gl_color(self,name):
glMaterial(GL_FRONT,GL_DIFFUSE,color["diffuse"])
glMaterial(GL_FRONT,GL_SPECULAR,color["specular"])
glMaterial(GL_FRONT,GL_EMISSION,color["emission"])
# glMaterial(GL_FRONT,GL_SHININESS,color["shininess"])
glMaterial(GL_FRONT,GL_SHININESS,color["shininess"])

def getEvalString(self):
return "EMSphereModel()"
Expand Down Expand Up @@ -1169,7 +1169,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)
if self.first_render_flag: self.first_render_flag = False
glPushMatrix()
Expand Down
2 changes: 1 addition & 1 deletion libpyEM/qtgui/empdbviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def load_gl_color(self,name):
glMaterial(GL_FRONT,GL_DIFFUSE,color["diffuse"])
glMaterial(GL_FRONT,GL_SPECULAR,color["specular"])
glMaterial(GL_FRONT,GL_EMISSION,color["emission"])
# glMaterial(GL_FRONT,GL_SHININESS,color["shininess"])
glMaterial(GL_FRONT,GL_SHININESS,color["shininess"])
def makeStick (self, res, index1, index2): #draws a cylinder between two atoms once the index for start and stop is given
n = [0,0,0]
p = [0,0,0]
Expand Down
16 changes: 8 additions & 8 deletions libpyEM/qtgui/emshapeitem3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)

glEnable(GL_BLEND)
Expand Down Expand Up @@ -310,7 +310,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)

# The box itself along with normal vectors
Expand Down Expand Up @@ -411,7 +411,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)

quadratic = gluNewQuadric()
Expand Down Expand Up @@ -481,7 +481,7 @@ def renderShape(self):
#glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)
#glColor(1.0,1.0,1.0)
if len(self.data)>3:
Expand Down Expand Up @@ -581,7 +581,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)

glPushMatrix()
Expand Down Expand Up @@ -782,7 +782,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)

glPushMatrix()
Expand Down Expand Up @@ -865,7 +865,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)

glPushMatrix()
Expand Down Expand Up @@ -983,7 +983,7 @@ def renderShape(self):
glDisable(GL_COLOR_MATERIAL)
glMaterialfv(GL_FRONT, GL_DIFFUSE, self.diffuse)
glMaterialfv(GL_FRONT, GL_SPECULAR, self.specular)
# glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialf(GL_FRONT, GL_SHININESS, self.shininess)
glMaterialfv(GL_FRONT, GL_AMBIENT, self.ambient)

glEnable(GL_NORMALIZE)
Expand Down
2 changes: 1 addition & 1 deletion libpyEM/qtgui/valslider.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ def paintGL(self):
glMaterialfv(GL_FRONT, GL_DIFFUSE, [1.0,1.0,1.0,1.0])
glMaterialfv(GL_FRONT, GL_SPECULAR, [1.0,1.0,1.0,1.0])
glLightfv(self.light, GL_POSITION, self.lightposition)
# glMaterialf(GL_FRONT, GL_SHININESS, 25.0)
glMaterialf(GL_FRONT, GL_SHININESS, 25.0)
quad = GLU.gluNewQuadric()
GLU.gluQuadricDrawStyle(quad, GLU.GLU_FILL)
GLU.gluQuadricNormals(quad, GLU.GLU_SMOOTH)
Expand Down
Loading

0 comments on commit 336971d

Please sign in to comment.