Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Packages/DV3D/Application.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ def hideWidgets(self):
def showWidgets(self):
self.plot.showWidgets()

if __name__ == '__main__':

from DistributedPointCollections import kill_all_zombies
kill_all_zombies()
8 changes: 6 additions & 2 deletions Packages/DV3D/StructuredDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,10 @@ def getTransVarDataCube( self, varName, transVar, decimation, **args ):
if decimation: decimationFactor = decimation[0]+1

args1 = {}
order = 'xyt' if ( timeBounds == None) else 'xyz' if levaxis else 'xy'
if ( timeBounds == None):
order = 'xyt' if timeaxis is not None else 'xy'
else:
order = 'xyz' if levaxis is not None else 'xy'
try:
nts = self.timeRange[1]
if ( timeIndex <> None ) and useTimeIndex:
Expand Down Expand Up @@ -756,7 +759,8 @@ def getTransVarDataCube( self, varName, transVar, decimation, **args ):
try:
rv = transVar( **args1 )
except Exception, err:
print>>sys.stderr, "Error Reading Variable", str(err)
print>>sys.stderr, "Error Reading Variable, args = ", str(args1)
traceback.print_exc()
return CDMSDataset.NullVariable

memoryLogger.log("Create Mask")
Expand Down
19 changes: 11 additions & 8 deletions Packages/DV3D/StructuredGridPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,17 @@ def processVerticalScalingCommand( self, args, config_function ):
if args and args[0] == "StartConfig":
ispec = self.inputSpecs[ 0 ]
wbounds = ispec.getDataBounds()
self.zscaleBoxWidget = vtk.vtkBoxWidget()
self.zscaleBoxWidget.SetInteractor( self.renderWindowInteractor )
self.zscaleBoxWidget.SetPlaceFactor(1.0)
self.zscaleBoxWidget.HandlesOff()
self.zscaleBoxWidget.SetEnabled(1)
oprop = self.zscaleBoxWidget.GetOutlineProperty()
oprop.SetColor( 0.0, 0.0, 0.0 )
oprop.SetLineWidth( 2.0 )
self.zscaleBoxWidget.On()
self.zscaleBoxWidget.PlaceWidget(wbounds)
# print " >>>>>>>>>>>>>>>>>>>>> Place box widget: ", str( wbounds )
elif args and args[0] == "Init":
self.parameter_initializing = True
ispec = self.inputSpecs[ 0 ]
Expand All @@ -80,21 +89,15 @@ def processVerticalScalingCommand( self, args, config_function ):
# verticalScale.setValues( [ zsval ] )
self.setZScale( zsval )
verticalScale.setValue( 'count', 1 )
self.zscaleBoxWidget = vtk.vtkBoxWidget()
self.zscaleBoxWidget.SetInteractor( self.renderWindowInteractor )
self.zscaleBoxWidget.SetPlaceFactor(1.0)
self.zscaleBoxWidget.HandlesOff()
oprop = self.zscaleBoxWidget.GetOutlineProperty()
oprop.SetColor( 0.0, 0.0, 0.0 )
oprop.SetLineWidth( 2.0 )
self.parameter_initializing = False
elif args and args[0] == "EndConfig":
vscale = verticalScale.getValues()
self.setZScale( vscale )
self.zscaleBoxWidget.Off()
self.zscaleBoxWidget.SetEnabled(0)
self.zscaleBoxWidget = None
self.processConfigParameterChange( verticalScale )
elif args and args[0] == "InitConfig":
self.zscaleBoxWidget.SetEnabled(1)
self.updateTextDisplay( config_function.label )
bbar = self.getInteractionButtons()
self.skipIndex = 2
Expand Down
17 changes: 9 additions & 8 deletions Packages/vcs/Lib/VTKPlots.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ def configureEvent(self,obj,ev):
self.oldCursor = cursor
return

if self.get3DPlot() is not None:
return

sz = self.renWin.GetSize()
if self._lastSize == sz:
# We really only care about resize event
Expand Down Expand Up @@ -1409,23 +1412,21 @@ def put_img_on_canvas(self,filename,zoom=1,xOffset=0,yOffset=0,*args,**kargs):

def hideGUI(self):
plot = self.get3DPlot()
if plot: plot.hideWidgets()

if self.bg is False:
if plot:
plot.hideWidgets()
elif self.bg is False:
from vtk_ui.manager import get_manager
manager = get_manager(self.renWin.GetInteractor())
if manager:
self.renWin.RemoveRenderer(manager.renderer)

def showGUI(self):
plot = self.get3DPlot()

if plot: plot.showWidgets()

if self.bg is False:
if plot:
plot.showWidgets()
elif self.bg is False:
from vtk_ui.manager import get_manager
manager = get_manager(self.renWin.GetInteractor())

if manager:
# Set the UI renderer's layer on top of what's there right now
layer = self.renWin.GetNumberOfLayers() + 1
Expand Down