Skip to content

Commit 345f6ec

Browse files
Merge pull request #45 from Geode-solutions/next
No commit message
2 parents 6b14f58 + edaf94f commit 345f6ec

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# CHANGELOG
22

33

4+
## v1.2.0-rc.1 (2025-01-14)
5+
6+
### Features
7+
8+
- **protocols**: Global custom_protocols to be able to add manually
9+
([`b4980d2`](https://github.com/Geode-solutions/OpenGeodeWeb-Viewer/commit/b4980d2fae2f547362a40c8f2b7ebe9691fff4a2))
10+
11+
412
## v1.1.3 (2025-01-14)
513

614

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@geode/opengeodeweb-viewer",
33
"scripts": {
4-
"json": "npm explore @geode/opengeodeweb-back -- npm run json opengeodeweb_viewer rpc rpc .",
4+
"json": "node ./node_modules/@geode/opengeodeweb-back/generate_schemas.js opengeodeweb_viewer rpc rpc .",
55
"test": "npm run json && pytest"
66
},
77
"dependencies": {

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55

66
[project]
77
name = "OpenGeodeWeb-Viewer"
8-
version = "1.1.3"
8+
version = "1.2.0-rc.1"
99
dynamic = ["dependencies"]
1010
authors = [
1111
{ name="Geode-solutions", email="[email protected]" },

src/opengeodeweb_viewer/vtkw_server.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Standard library imports
22
import argparse
33
import os
4-
import sys
54

65
# Third party imports
76
import vtk
@@ -31,6 +30,17 @@ class _Server(vtk_wslink.ServerProtocol):
3130
authKey = "wslink-secret"
3231
view = None
3332
debug = False
33+
custom_protocols = []
34+
mesh_protocols = VtkMeshView()
35+
model_protocols = VtkModelView()
36+
custom_protocols.append(VtkView())
37+
custom_protocols.append(VtkViewerView())
38+
custom_protocols.append(mesh_protocols)
39+
custom_protocols.append(VtkMeshPointsView())
40+
custom_protocols.append(VtkMeshEdgesView())
41+
custom_protocols.append(VtkMeshPolygonsView())
42+
custom_protocols.append(model_protocols)
43+
custom_protocols.append(VtkGenericView(mesh_protocols, model_protocols))
3444

3545
@staticmethod
3646
def add_arguments(parser):
@@ -53,16 +63,9 @@ def initialize(self):
5363
self.setSharedObject("db", dict())
5464

5565
# Custom API
56-
mesh_protocols = VtkMeshView()
57-
model_protocols = VtkModelView()
58-
self.registerVtkWebProtocol(VtkView())
59-
self.registerVtkWebProtocol(VtkViewerView())
60-
self.registerVtkWebProtocol(mesh_protocols)
61-
self.registerVtkWebProtocol(VtkMeshPointsView())
62-
self.registerVtkWebProtocol(VtkMeshEdgesView())
63-
self.registerVtkWebProtocol(VtkMeshPolygonsView())
64-
self.registerVtkWebProtocol(model_protocols)
65-
self.registerVtkWebProtocol(VtkGenericView(mesh_protocols, model_protocols))
66+
print("Nb protocols", len(_Server.custom_protocols))
67+
for protocol in _Server.custom_protocols:
68+
self.registerVtkWebProtocol(protocol)
6669

6770
# tell the C++ web app to use no encoding.
6871
# ParaViewWebPublishImageDelivery must be set to decode=False to match.

0 commit comments

Comments
 (0)