File: 0013-Fix-vview-vtk9.patch

package info (click to toggle)
siconos 4.4.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 78,600 kB
  • sloc: cpp: 160,976; ansic: 129,998; fortran: 33,051; python: 20,958; xml: 1,244; sh: 385; makefile: 318
file content (51 lines) | stat: -rw-r--r-- 2,088 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From: Stephen Sinclair <radarsat1@gmail.com>
Date: Wed, 8 Sep 2022 10:40:12 +0000
Subject: Fix vview for vtk9

From commit bb1e2ed5ff5d701dd62b542f7afae13dcd3df026 of upstream
repository after release.
---


diff --git a/io/swig/io/vview.py b/io/swig/io/vview.py
index a6e372a33..3a1197546 100644
--- a/io/swig/io/vview.py
+++ b/io/swig/io/vview.py
@@ -1057,13 +1057,12 @@ class IOReader(VTKPythonAlgorithmBase):
                             self.ids_at_time[mu] = None
 
             else:
-                # for mu in self._mu_coefs:
-                #     self.cpa_at_time[mu] = [[nan, nan, nan]]
-                #     self.cpb_at_time[mu] = [[nan, nan, nan]]
-                #     self.cn_at_time[mu] =  [[nan, nan, nan]]
-                #     self.cf_at_time[mu] =  [[nan, nan, nan]]
-                #     self.ids_at_time[mu] = None
-                pass
+                for mu in self._mu_coefs:
+                    self.cpa_at_time[mu] = [[nan, nan, nan]]
+                    self.cpb_at_time[mu] = [[nan, nan, nan]]
+                    self.cn_at_time[mu] =  [[nan, nan, nan]]
+                    self.cf_at_time[mu] =  [[nan, nan, nan]]
+                    self.ids_at_time[mu] = None
             if self._with_contact_forces:
                 for mu in self._mu_coefs:
                     self.cpa[mu] = numpy_support.numpy_to_vtk(
@@ -1757,6 +1756,7 @@ class VView(object):
             assert shape_type == 'primitive'
             primitive = self.io.shapes()[shape_name].attrs['primitive']
             attrs = self.io.shapes()[shape_name][:][0]
+
             if primitive == 'Sphere':
                 source = vtk.vtkSphereSource()
                 source.SetRadius(attrs[0])
@@ -2515,6 +2515,9 @@ class VView(object):
             slider_widget.AddObserver("InteractionEvent", self.input_observer.time)
         else:
             self.input_observer = InputObserver(self)
+
+        self.input_observer.set_opacity()
+
         self.interactor_renderer.AddObserver('KeyPressEvent', self.input_observer.key)
 
         self.interactor_renderer.AddObserver(