From 9b8fe0034181843d55f36b425b5fe99b6c27409a Mon Sep 17 00:00:00 2001 From: mkr Date: Wed, 1 Nov 2006 08:43:49 +0000 Subject: [PATCH] Fix for bug PAL11537 : Create an animation given several med files (add consecutive animation mode) : renaming "consecutive" -> "succcessive". Add python script for testing. --- src/VISU_SWIG/Makefile.in | 2 +- src/VISU_SWIG/visu_view3d.py | 30 +++++++++++++++++++++--------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/VISU_SWIG/Makefile.in b/src/VISU_SWIG/Makefile.in index 98950247..b654db9e 100644 --- a/src/VISU_SWIG/Makefile.in +++ b/src/VISU_SWIG/Makefile.in @@ -42,7 +42,7 @@ SWIG_DEF = libVISU_Swig.i EXPORT_PYSCRIPTS = libVISU_Swig.py batchmode_visu.py batchmode_visu_table.py batchmode_visu_view3d.py \ visu_med.py visu_view3d.py visu.py visu_gui.py visu_prs_example.py \ visu_table.py visu_big_table.py visu_view.py visu_delete.py \ - visu_swig_test.py visu_split_views.py \ + visu_swig_test.py visu_split_views.py visu_succcessive_animation.py \ VISU_Example_01.py VISU_Example_02.py VISU_Example_03.py VISU_Example_04.py \ VISU_Example_05.py VISU_Example_06.py VISU_Example_07.py EXPORT_SHAREDPYSCRIPTS = VISU_shared_modules.py diff --git a/src/VISU_SWIG/visu_view3d.py b/src/VISU_SWIG/visu_view3d.py index 8d1c94a0..369cacd6 100644 --- a/src/VISU_SWIG/visu_view3d.py +++ b/src/VISU_SWIG/visu_view3d.py @@ -34,7 +34,7 @@ aDelay = 0 #mySession = batchmode_visu.mySession myViewManager = myVisu.GetViewManager(); - +""" myView = myViewManager.Create3DView(); myView.SetTitle("The window will be soon destroyed!") print "myViewManager.Create3DView()" @@ -251,33 +251,45 @@ print "myViewManager.CreateXYPlot()" time.sleep(aDelay) myView.Display(aContainer) - - +""" myView = myViewManager.Create3DView(); myView.SetTitle("The viewer for Animation") print "myViewManager.Create3DView()" time.sleep(aDelay) -medFile = "TimeStamps.med" -myFieldName = "vitesse"; +medFile = "carre_en_quad4.med" #"TimeStamps.med" +myFieldName = "fieldnodedouble" #"vitesse"; -medFile = os.getenv('DATA_DIR') + '/MedFiles/' + medFile +medFile = os.getenv('DATA_DIR') + medFile myResult = myVisu.ImportFile(medFile) anAnim = myVisu.CreateAnimation(myView); aSObj = myStudy.FindObjectIOR(myResult.GetID()) aSObj = aSObj.FindSubObject(1)[1] aSObj = aSObj.FindSubObject(3)[1] -aSObj = aSObj.FindSubObject(2)[1] -anAnim.addField(aSObj) +aSObj = aSObj.FindSubObject(1)[1] #(2)[1] +#anAnim.addField(aSObj) + +medFile1 = "pointe.med" #"hexa_28320_ELEM.med" +myFieldName1 = "fieldnodedouble" #"vitesse_elem_dom_pb1"; + +medFile1 = os.getenv('DATA_DIR') + medFile1 +myResult1 = myVisu.ImportFile(medFile1) + +aSObj1 = myStudy.FindObjectIOR(myResult1.GetID()) +aSObj1 = aSObj1.FindSubObject(1)[1] +aSObj1 = aSObj1.FindSubObject(3)[1] +aSObj1 = aSObj1.FindSubObject(1)[1] #(2)[1] +anAnim.addField(aSObj1) + anAnim.setPresentationType(0,VISU.TISOSURFACE) print "Generate presentations" anAnim.generatePresentations(0) print "Generate frames" anAnim.generateFrames() print "Start Animation" -anAnim.setSpeed(99) +anAnim.setSpeed(1) #anAnim.setCycling(1) anAnim.startAnimation() myView.FitAll() -- 2.39.2