yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #08177
Re: [Bug 903111] Re: O.load() gives error message
Ok, I found, what the problem in.
Please change the line 112 in userinput.py:
tempID = O.bodies.append(utils.sphere([O.bodies[ii].state.pos[0],O.bodies[ii].state.pos[1],O.bodies[ii].state.pos[2]],
material=SphereMat, radius=O.bodies[ii].shape.radius*rad, wire=False,
highlight=False))
on
tempID = O.bodies.append(utils.sphere([O.bodies[ii].state.pos[0],O.bodies[ii].state.pos[1],O.bodies[ii].state.pos[2]],
material=O.bodies[ii].material.id,
radius=O.bodies[ii].shape.radius*rad, wire=False, highlight=False))
SphereMat variable was not saved by O.save().
PS That is one of reason, why I do not use O.save. I have too many
local variables in my scripts....
Anton
--
You received this bug notification because you are a member of Yade
developers, which is the registrant for Yade.
https://bugs.launchpad.net/bugs/903111
Title:
O.load() gives error message
Status in Yet Another Dynamic Engine:
New
Bug description:
After saving my model and load it, this error occurs:
File "/home/me/YADE/YADE2981/bin/yade-bzr2981", line 183, in runScript
execfile(script,globals())
File "3-settling.py", line 5, in <module>
O.load(save_file_name2)
RuntimeError: Scene::postLoad: Internal inconsistency, shared materials not preserved when loaded; please report bug.
In Scene.cpp lines 62 to 66 are responsible for this meassage:
// this might be removed at some point, since it is checked by regression tests now
FOREACH(const shared_ptr<Body>& b, *bodies){
if(!b || !b->material || b->material->id<0) continue; // not a shared material
if(b->material!=materials[b->material->id]) throw std::logic_error("Scene::postLoad: Internal inconsistency, shared materials not preserved when loaded; please report bug.");
}
Can we safely remove these lines (see comment) to avoid the error
message?
To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/903111/+subscriptions
References