Hello Carsten,
I did as follows:
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.
Thanks,
Michael
-------- Original-Nachricht --------
> Datum: Tue, 17 May 2011 10:08:12 -0500
> Von: Carsten Neumann <[email protected]>
> An: [email protected]
> Betreff: Re: [Opensg-users] OpenSG1.8 - Avoid to save attachments to OSB
> Hello Michael,
>
> On 05/17/2011 09:30 AM, Michael Raab wrote:
> > can I set this in fcd or do I need to set it in the class constructor?
>
> it's a field in the base class of all attachments (Attachment), so you
> set it on an instance at runtime. If you want all instances of an
> attachment type to be internal by default, you can set the field on the
> prototype:
>
> YourAttachmentPtr proto = YourAttachment::getClassType().getPrototype();
> beginEditCP(proto, Attachment::InternalFieldMask);
> proto->setInternal(true);
> endEditCP(proto, Attachment::InternalFieldMask);
>
> All instances of YourAttachment created after this point will have the
> internal field set to true.
>
> > Do I need a beginEditCP() for this?
>
> yes.
>
> Cheers,
> Carsten
>
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users