Hi Akos,
On Wed, 2003-11-12 at 10:35, Akos Balazs wrote:
> Hi Dirk,
>
> Sorry to do a followup on such an old mail, but I've managed to run into
> new problems - as usual. :-)))
new problem, new fun. ;)
> I did that and it works great on the cluent, but doesn't work on the
> servers for some reason... :-\
>
> I add a blendchunk to all materials to handle the alpha-keys, and a
> polygonchunk to be able to switch to wireframe if necessary.
>
> Here's the relevant code:
>
> ----------------------------------------------------------------------
> // Traverse the loaded scene and add alpha-keys to all materials
> // Plus add the support for wireframe (polygonchunk)
> Action::ResultE addChunks(NodePtr& node)
> {
> if(node->getCore()->getType().isDerivedFrom(
> ChunkMaterial::getClassType()))
A ChunkMaterial can't be derived from NodeCore, so this doesn't do
anything. You'll have to check for Geometry and get the Material from
the Geometry.
> {
> ChunkMaterialPtr m = ChunkMaterialPtr::dcast(node->getCore());
> if ( checkIfChunksPresent( m ) == false )
> {
> beginEditCP( m, ChunkMaterial::ChunksFieldId );
^^
You need to use the Mask, not the ID for begin/endEdit. this applies to
all cases, I hope you're not doing this everywhere in your program. Then
again, I can't think of any case where you would need to use the Id, you
can probably just replace Id with Mask and be fine.
> The funny thing is that the polygonchunk works on the servers aswell (i.e.
> I can switch to and from wireframe) so the material changes _are_
> propagated but the blending doesn't work at all. ;(
That is strange. Did you begin/endEdit the BlendChunk when changing its
parameters?
> BTW Gerrit's VRML loader creates MaterialGroups, that's why I was playing
> with the beginEditCP/endEditpCP calls above but there was no difference
> whatsoever.
Try the Mask, and make sure you begin/endEdit the BlendCHunk. If that
doesn't help we'll have to look for something else.
Dirk
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users