Hi,

On Mon, 2007-08-27 at 11:59 +0200, Johan Robben wrote:
> >> I have currently only one critical VRML requirement, I need to be able to
> >> get the name from a material.
> >> For example: 
> >> 
> >> appearance Appearance { material DEF YELLOW_MATERIAL Material {
> diffuseColor 1 1 0 } }
> >> 
> >> I need to be able to extract YELLOW_MATERIAL. I have managed to extract
> >> the
> >> name I give to an appearance, but I do not know how to extract the
> material
> >> name. Is this possible with the regular VRML loader? If not, how do I
> >> activate the experimental VRML loader ?
> 
> > If the current VRML loader sets the name, it ought to be on the 
> > MaterialChunk in the ChunkMaterial (which I'd suspect is the appearance).
> 
> I thought so as well, but I did not manage to get the name out of those
> classes.

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,
                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