FieldData& aData = myAnimator->getFieldData( 0 );
_PTR(SObject) aField = aData.myField;
+ if(!aField) return;
+
_PTR(ChildIterator) anIter = aStudy->NewChildIterator(aField);
anIter->Next(); // First is reference on support
for(int index = 1; anIter->More(); anIter->Next(), index++)
{
if(MYDEBUG) MESSAGE("Prs3d_i::~Prs3d_i - this = "<<this);
ProcessVoidEvent(new TInvokeSignalEvent(myRemoveActorsFromRendererSignal));
+ SetCResult( NULL );
}
if(GetCResult() == theResult)
return;
- if(theResult)
+ if(theResult) {
SetStudyDocument(theResult->GetStudyDocument());
+ theResult->Register();
+ }
+ if(myResult) {
+ myResult->Destroy();
+ }
VISU::TSetModified aModified(this);
#include <Bnd_Box.hxx>
#ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
#else
static int MYDEBUG = 0;
#endif
myIsBuildParts(false),
myIsPartsDone(false)
{
+ if(MYDEBUG) MESSAGE("Result_i::Result_i - this = "<<this);
myStudy = VISU::GetStudy(myStudyDocument);
}
myIsAllDone(false),
myIsBuildParts(false),
myIsPartsDone(false)
-{}
+{
+ if(MYDEBUG) MESSAGE("Result_i::Result_i - this = "<<this);
+}
//---------------------------------------------------------------
aNewData.myNbFrames = 0;
aNewData.myPrsType = VISU::TSCALARMAP;
aNewData.myOffset[0] = aNewData.myOffset[1] = aNewData.myOffset[2] = 0;
+
+ // initialize myResult in aNewData
+ _PTR(SObject) aSObj = theField->GetFather();
+ aSObj = aSObj->GetFather();
+ aSObj = aSObj->GetFather();
+ CORBA::Object_var anObject = VISU::ClientSObjectToObject(aSObj);
+ if (CORBA::is_nil(anObject)) return false;
+ aNewData.myResult = dynamic_cast<VISU::Result_i*>(VISU::GetServant(anObject).in());
+
VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(aNewData.myField);
if(VISU::Storable::FindValue(aMap,"myComment") != "FIELD")
return false;
return aRes;
}
-void VISU_TimeAnimation::generatePresentations(CORBA::Long theFieldNum) {
+void VISU_TimeAnimation::generatePresentations(CORBA::Long theFieldNum)
+{
+ int nbf = myFieldsLst.size();
+ if( theFieldNum<0 || theFieldNum>nbf-1 )
+ return;
+
FieldData& aData = myFieldsLst[theFieldNum];
// Delete previous presentations
for (anIter->Init(); anIter->More(); anIter->Next()) {
_PTR(SObject) aRefObj = anIter->Value();
_PTR(SObject) aFieldObj;
+
if (!aRefObj->ReferencedObject(aFieldObj) )
continue;
+ int nbAttr = aFieldObj->GetAllAttributes().size();
+ //std::string name1 = aFieldObj->GetName();
+ if(nbAttr<1)
+ continue;
+
addField(aFieldObj);
if ( isRangeDefined() || isSequenceDefined() )
myFieldsAbsFrames.pop_back();
#include "VISUConfig.hh"
+#include "VISU_Result_i.hh"
+#include "SALOME_GenericObjPointer.hh"
+
#include <vector>
#include <qobject.h>
namespace VISU
{
- class Result_i;
+ //class Result_i;
class ColoredPrs3d_i;
class ExecutionState;
}
std::vector<VISU_Actor*> myActors; // Actors
std::vector<double> myTiming; // time values
CORBA::Float myOffset[3];
+ typedef SALOME::GenericObjPtr<VISU::Result_i> TResultPtr;
+ TResultPtr myResult;
};