← Back to team overview

yade-dev team mailing list archive

be carefully with python console and postProcessAttributes

 

Hi all, 
postProcessingAttributes used to initialize attributes
_after_ serialization / deserialization a object, but not to initialize the object after it
original creation. This is due to the fact that when
python-console was lacking, and used only C++ preprocessors, after
creation a model in the preprocessor it saved to a file, after which the file
loaded in SimulationController, and the simulation runs. Thus, this mechanism allows 
to initialize the attributes after initial creation an object in the preprocessor. 
However, with the advent of python-console this save/load step is omited.
Therefore, objects that require initialization after its creation,
initialized noncorrectly, so for such objects must explicitly call
postProcessingAttributes (or do save/load model before run a simulation).

Or is a bad idea to use postProcessingAttributes() to initialize, and better to use the mechanism of action() first call?

-- 
Best regards, Sergei D.



Follow ups

References