Michael. 
Thanks for replying-back. My goal is to modify the appearance of a live object. But it 
gives me error saying 
 javax.media.j3d.RestrictedAccessException: Cannot modify capability bits
Is there any way i can do that?i.e Modify the appearance of a live object. 
thanks
venu
 
 
-----Original Message----- 
From: Michael Pfeiffer [mailto:[EMAIL PROTECTED] 
Sent: Mon 10/13/2003 6:44 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Re: [JAVA3D] appearance problem



        In your example a3 is a reference to a Appearance object which belongs to a
        object which seems to be live. And it is exactly like the error message
        says: you can't modify the capability bits of an object which is live.
        
        Appearance a3 = new Appearance();
        a3 = shape.getAppearance();
        
        is a little bit senseles: You create a new Appearance a3 and overwrite it
        immediately afterwards. Modify the capability bits directly after the
        creation of your new Appearance object and everything should work fine.
        
        On Tue, 14 Oct 2003 02:12:36 +0530, venu satya <[EMAIL PROTECTED]>
        wrote:
        
        > Hi Java3D people
        > I have a problem here. I a trying to change the appearance of a shape3d
        > object.
        > when i set the appearance to a new appearance it works fine. but when i
        > try
        > to get the old appearance and modify it, it gives me the error
        > javax.media.j3d.RestrictedAccessException: Cannot modify capability bits
        > on
        > a live or compiled object
        > Any clue how i can overcome this.
        > here is the code
        >
        >
        > Appearance a3 = new Appearance();
        > a3 = shape.getAppearance();
        >
        > a3.setCapability(Appearance.ALLOW_RENDERING_ATTRIBUTES_WRITE);
        > a3.setCapability(Appearance.ALLOW_RENDERING_ATTRIBUTES_READ);
        > a3.setCapability(shape1.ALLOW_APPEARANCE_READ);
        > a3.setCapability(shape1.ALLOW_APPEARANCE_WRITE);
        > r= new RenderingAttributes();
        > r.setVisible(false);
        > a4.setRenderingAttributes(r);
        > shape.setAppearance(a4);
        >
        > thanks
        > venu
        >
        > _________________________________________________________________
        > Make glass paintings? Are you a good artist?
        > http://server1.msn.co.in/features/general/diwali.asp Sell your Diwlai
        > creations online.
        >
        > ===========================================================================
        > 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".
        >
        
        
        
        --
        --
        Virtual Worlds Productions
        Software Development Group
        http://www.virtualworlds.de
        
        ===========================================================================
        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