Kynn,
TransformGroup tg = new TransformGroup();
tg.setCapability(Group.ALLOW_CHILDREN_EXTEND);
tg.setCapability(Group.ALLOW_CHILDREN_READ);
tg.setCapability(Group.ALLOW_CHILDREN_WRITE);
BranchGroup bg = new BranchGroup();
bg.setCapability(BranchGroup.ALLOW_DETACH);
tg.addChild(bg);
allows me to call
bg.detach();
or
tg.removeChild(0);
without generating any exceptions when the scene is live & compiled.
Hope this helps,
-Jean Laleuf
[EMAIL PROTECTED]
-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Kynn Jones
Sent: Sunday, July 01, 2001 4:19 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] How to remove BG children from live TG?
Following up on my own post here:
I just tried setting the ALLOW_DETACH capability for the branchgroup
nodes to be removed, and I got a different error when removeChild() is
invoked:
javax.media.j3d.RestrictedAccessException: Group: only a BranchGroup node
may be removed
This is truly infuriating, since the nodes to be removed are indeed
branchnodes, and now they have the ALLOW_DETACH bit set...
KJ
Date: 1 Jul 2001 15:51:00 -0400
From: <[EMAIL PROTECTED]>
I get a "CapabilityNotSetException: Group: no capability to detach
BranchGroup" when I attempt removeChildren() on a live TransformGroup.
I created this transform group like this:
TransformGroup tg = new TransformGroup();
...
tg.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
tg.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);
tg.setCapability(TransformGroup.ALLOW_CHILDREN_EXTEND);
but apparently these are not the capabilities I need to delete a
BranchGroup child from tg. I have not been able to find any other
capability I could set to fix this. How can I get this to work?
Thanks!
KJ
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".