Hi Johan,
        
On Mon, 2007-08-27 at 17:12 +0200, Johan Robben wrote:
> >> in general the loader sets the name on everything it can.
> >> However, MaterialChunks are Attachments and those can not have
> attachments themselves. Therefore the VRML loader can not add a name
> attachment to the MaterialChunk.
> >> If you are in control of the VRML files you load (and therefore know
> their contents), you might get around this by looking for the Appearance's
> name instead.
> 
> >> Hope it helps,
> It definitely helps to understand OpenSG.
> 
> Is there a way to modify the VRML loader to put the name of the
> MaterialChunk on the MaterialGroup ? (I am not in control of the VRML files)

sort of ;) The attached patch adds an option to the loader (use
SceneFileHandler::the()->setOptions("pushNames=true") to enable it),
that puts the name of a VRML Material (OpenSG MaterialChunk) on the VRML
Appearance (OpenSG ChunkMaterial) unless that has a name of its own.
The patch itself is a horrible hack, but the only way Dirk and I could
come up with that did not involve even greater surgery ;)

        Hope it helps,
                Carsten


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to