File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,17 @@ def get_label_at_grid_point(index):
193193 import pyvista as pv
194194
195195 active_scalars = None
196- if parse (pv .__version__ ) >= parse ("0.35.2" ):
196+ if parse (pv .__version__ ) >= parse ("0.42.0" ):
197+ # Get actors of active renderer
198+ actors = list (self ._plotter .actors .values ())
199+ for actor in actors :
200+ mapper = actor .mapper if hasattr (actor , "mapper" ) else None
201+ if mapper :
202+ dataset = mapper .dataset
203+ if type (dataset ) is pv .core .pointset .UnstructuredGrid :
204+ active_scalars = dataset .active_scalars
205+ break
206+ elif parse (pv .__version__ ) >= parse ("0.35.2" ):
197207 for data_set in self ._plotter ._datasets :
198208 if type (data_set ) is pv .core .pointset .UnstructuredGrid :
199209 active_scalars = data_set .active_scalars
You can’t perform that action at this time.
0 commit comments