Hi All,
 
I am trying to set the transparency of a VRML node object.  I can change the transparency of the VRML node object through the applet if the initial value in the VRML file is greater than 0 initially.  If the value is initially 0 in the VRML file, I cannot get the transparency of the VRML node to change.  Is this a bug or am I doing something wrong?
 
 
Following is the code snippet that modifies the transparency.  ("selectedNode" is the TransfromGroup of the VRML node that I'm am trying to modify.)
 
  Enumeration enum = selectedNode.getAllChildren();
  while (enum.hasMoreElements())
  {
   obj = enum.nextElement();
   if (obj instanceof Shape3D)
   {
    shapeNode = (Shape3D)obj;
    appearance = shapeNode.getAppearance();
    ta = appearance.getTransparencyAttributes();
    ta.setTransparency(transparencyValue);
    appearance.setTransparencyAttributes(ta);
    shapeNode.setAppearance(appearance);
   }
  }
 
Thanks for you help and your time,
 
Dean

Reply via email to