Hmm ok, maybe I try that tomorrow. 
What about the other way around? Do I have the possibilty to manipulate the OSB 
loading process somehow? So if my attachments are written but not read I'll be 
fine, too...

Thanks,
Michael

-------- Original-Nachricht --------
> Datum: Mon, 23 May 2011 09:40:43 -0500
> Von: Carsten Neumann <carsten_neum...@gmx.net>
> An: opensg-users@lists.sourceforge.net
> Betreff: Re: [Opensg-users] OpenSG1.8 - Avoid to save attachments to OSB

>       Hello Michael,
> 
> On 05/23/2011 07:42 AM, Michael Raab wrote:
> > osg::MyAttachmentPtr proto = osg::MyAttachmentPtr::dcast(
> > osg::MyAttachment::getClassType().getPrototype());
> > if( proto != osg::NullFC )
> > {
> > beginEditCP(proto, osg::Attachment::InternalFieldMask);
> > proto->setInternal(true);
> > endEditCP(proto, osg::Attachment::InternalFieldMask);
> > }
> >
> > But setting that internal flag seems to not to avoid to save that
> attachment to OSB.
> 
> argh, it seems the 1.x OSB writer ignores that setting, sorry about that.
> I'm not sure it is flexible enough for this case, but you could try 
> registering your handler class for loading MyAttachment from OSB.
> You can use OSGNFIOGenericAtt.{h,cpp} as a starting point and have 
> almost empty read/writeFC functions:
> 
> FieldContainerPtr NFIOMyAttachment::readFC(
>      const std::string &/*typeName*/)
> {
>      skipFCFields();
> 
>      return NullFC;
> }
> 
> void NFIOMyAttachment::writeFC(const FieldContainerPtr &/*fc*/)
> {
>      writeEndMarker();
> }
> 
> I'm just not sure if the loader can deal with the NullFC returned from 
> readFC and what exactly will happen with fields in other containers that 
> contain pointer to the attachment.
> 
>       Cheers,
>               Carsten
> 
> ------------------------------------------------------------------------------
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its 
> next-generation tools to help Windows* and Linux* C/C++ and Fortran 
> developers boost performance applications - including clusters. 
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to