Hi Robert,

I've tried your modification and it works fine.
Thanks,

                Luc


De : osg-users [mailto:[email protected]] De la part 
de Robert Osfield
Envoyé : vendredi 21 novembre 2014 18:26
À : OpenSceneGraph Users
Objet : Re: [osg-users] Dae plugin, textures not visible (related to 
Geode/Geometry changes ?)

Hi Luc,

I haven't tested it yet but the following is what I'm thinking of (file also 
attached), could you try it out and let me know how you get on.
Was about to fire off this email and wait for feedback, but have decided to go 
ahead and check this change into svn/trunk.  If there are issues we can amend 
it.

Robert.


Index: src/osg/CopyOp.cpp
===================================================================
--- src/osg/CopyOp.cpp  (revision 14485)
+++ src/osg/CopyOp.cpp  (working copy)
@@ -33,7 +33,6 @@
 }

 COPY_OP( Object,                   DEEP_COPY_OBJECTS )
-COPY_OP( Node,                     DEEP_COPY_NODES )
 COPY_OP( StateSet,                 DEEP_COPY_STATESETS )
 COPY_OP( Image,                    DEEP_COPY_IMAGES )
 COPY_OP( Uniform,                  DEEP_COPY_UNIFORMS )
@@ -49,6 +48,16 @@
     return const_cast<Referenced*>(ref);
 }

+Node* CopyOp::operator() (const Node* node) const
+{
+    if (!node) return 0;
+
+    const Drawable* drawable = node->asDrawable();
+    if (drawable) return operator()(drawable);
+    else if (_flags&DEEP_COPY_NODES) return osg::clone(node, *this);
+    else return const_cast<Node*>(node);
+}
+
 StateAttribute* CopyOp::operator() (const StateAttribute* attr) const
 {
     if (attr && _flags&DEEP_COPY_STATEATTRIBUTES)
[X]<http://www.1spatial.com>





[http://www.1spatial.com/wp-content/themes/1spatial/images/youtube.png]<http://www.youtube.com/user/1SpatialGroup>
 [http://www.1spatial.com/wp-content/themes/1spatial/images/facebook.png] 
<https://www.facebook.com/1Spatial>  
[http://www.1spatial.com/wp-content/themes/1spatial/images/linkedIn.png] 
<http://www.linkedin.com/company/1spatial>  
[http://www.1spatial.com/wp-content/themes/1spatial/images/twitter.png] 
<http://www.twitter.com/1spatial>

________________________________

1Spatial France SAS

Les informations contenues dans cet e-mail sont confidentielles et uniquement 
adressées au destinataire. Les opinions qui y sont exprimées peuvent être 
celles de l'auteur et ne représentent pas nécessairement celles du Groupe 
1Spatial. Cet e-mail a été scanné et est garanti sans aucun virus. 1Spatial 
France SAS est une société de droit français, membre du Groupe 1Spatial. Siège 
Social : Immeuble AXEO2, 23-25 Avenue Aristide Briand, 94110 Arcueil, France. 
RCS CRETEIL 334 416 336
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to