Skip to content

Commit

Permalink
Explicit check for None to prevent "ubo" error
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfHoekstra committed May 31, 2024
1 parent 333d4a3 commit b07ced0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions bluesky/ui/qtgl/glhelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,10 @@ def select(self):
def update_ubo(self, uboname, *args, **kwargs):
''' Update an uniform buffer object of this shader set. '''
ubo = self._ubos.get(uboname, None)
if not ubo:
if ubo is None:
raise KeyError('Uniform Buffer Object', uboname,
'not found in shader set.')
ubo.update(*args, **kwargs)

def set_shader_path(self, shader_path):
''' Set a search path for shader files. '''
self._spath = shader_path
Expand Down
2 changes: 1 addition & 1 deletion bluesky/ui/qtgl/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def serversChanged(self, server_id):

def nodesChanged(self, node_id):
if node_id not in self.nodes:
print(node_id, 'added to list')
#print(node_id, 'added to list')
server_id = node_id[:-1] + seqidx2id(0)
if server_id not in bs.net.servers:
server_id = b'0'
Expand Down
4 changes: 1 addition & 3 deletions setup-python.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
pip install PyQt6 numpy scipy matplotlib
pip install pandas pyopengl
pip install msgpack zmq pygame pyqtwebengine
pip install PyQt6 PyQt6-WebEngine pygame pyopengl numpy scipy pandas matplotlib msgpack zmq textual bluesky-simdata bluesky-guidata
pause

0 comments on commit b07ced0

Please sign in to comment.