Thats right. I just ran into the same problem and I
fixed it by browsing through the FAQ's.

You need to set the capabilities of the Sape3D object.

so do  :: object.getShape().setCapability(  );

Well, just set the capabilities and then ::

object.getAppearance().set whatever.

All the best,
Romil.


--- Mike Pilone <[EMAIL PROTECTED]> wrote:

> Darren,
>
> You will need to keep a reference to the objects in
> the scenegraph, or set
> the ALOW_CHILDREN_READ capabilities on the group to
> allow you to traverse
> the tree yourself. Normally the first solution is
> easier.
>
> As for the capabilities, it depends on what you want
> to do. If you want to
> modify color, set the ALLOW_APPEARANCE_READ on the
> shape and
> ALLOW_COLORING_ATTRIBUTES_WRITE on the appearance.
> My names might be a bit
> off, I don't have the docs in front of me. If you
> try to do something that
> is not allowed Java3D will throw an exception with a
> reasonable message that
> explains the capability needed.
>
> -mike
>
>
> -----Original Message-----
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED]
> On Behalf Of darren ireland
> Sent: Thursday, September 23, 2004 8:55 PM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] altering added objects
>
> i have a basic scenegraph containing a box. i have
> added a mousePressed()
> functionthat adds extra objects to the scenegraph on
> each mouse click. i was
> wondering how i could reference previously added
> objects so that i can
> changer their attributes, in particular their
> colours.
>
> for example if i click the mouse several times and
> add 5 objects, on the 6th
> click i would like to make the 1st added object
> change colour, on the 7th
> click make the second object change colour, etc.
>
> is there a way to do this? do i have to add
> allow_write or something like it
> to each added object?
>
> ________________________________
>
> Discover saving: Earn 5.25% p.a variable rate with
> ING Direct
> <http://g.msn.com/8HMBENAU/2755??PS=47575>
>
===========================================================================
> 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".
>




__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail

===========================================================================
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".

Reply via email to