Hi Terry,

What I was looking for originally was a way to artificially create a
complete change list from an existing model.  I would think that would
be a simpler way to reestablish a broken connection because you
wouldn't have to keep a record of all changes since the start of the
client.  Has this method been considered?

Yes I actually wanted the same but that's not so easy to implement so I
hacked this workaround.

Andreas


Again, I'm probably not seeing the real problem, but what makes this
difficult?  From what I gather from the OpenSG docs, a ChangeList can
contain items for create, destroy, change, addref, and subref. Couldn't we just traverse a graph and compile a ChangeList full of
create and addref items?  I haven't written much traversal code, but I
don't remember it being so bad.  I'd be willing to try writing this,
unless there's some big obstacle I haven't thought of.
- Terry

Not everything is referenced in the scenegraph (Window, Viewport, Camera, ...) so this doesn't work. You could iterate over the FieldContainer list.

const vector<FieldContainerPtr> &fcs = *FieldContainerFactory::the()->getFieldContainerStore();

for(int i=0;i<fcs.size();++i)
{
    FieldContainerPtr fc = fcs[i];
    if(fc != NullFC)
    {
        // create a changelist.
    }
}

I tried it once and it didn't work I think it was a problem with prototypes or reference counts. If you like you can try to code it. I think this approach is much nicer than my hack.

Andreas



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to