[sldev] Re: [VWR] change an object?

Anna Gulaev annagulaev at gmail.com
Tue Feb 26 12:02:38 PST 2008


Nope, today it doesn't work.

So, how do you modify an object?


On 2/26/08, Anna Gulaev <annagulaev at gmail.com> wrote:
>
> Update: here's something that seems to work.
>
>         LLVolumeParams params;
>         profileparams = params.getProfileParams();
>         profileparams.setCurveType( LL_PCODE_PROFILE_CIRCLE);
>         object->updateVolume( params);
>
>
> On 2/25/08, Anna Gulaev wrote:
> >
> > I'd like to be able to change the shape of an object.
> >
> > I have an object of this type...
> >
> >         LLViewerObject *object
> >
> > I'm able to get its parameters like this...
> >
> >
> > object->getVolume()->getParams().getProfileParams().getCurveType();
> >
> > I'd like to change its parameters, something like this...
> >
> >         params = object->getVolume()->getParams();
> >         profileparams = params.getProfileParams();
> >
> >         profileparams.setCurveType( LL_PCODE_PROFILE_CIRCLE);
> >
> > If I take a peak at the curve type now...
> >
> >         llinfos << (int) profileparams.getCurveType() << llendl;
> >
> > I can see that it's been changed. Now to tell the server about it...
> >
> >         object->updateVolume( params);
> >
> > And this does...nothing. I can follow through with a debugger to find
> > the point at which it decides to do nothing. That goes something like
> > this...
> >
> > LLViewerObject::setVolume
> >         LLPrimitive::setVolume
> >                 if ( volume_params == mVolumep->getParams() && (
> > volume_detail == mVolumep->getDetail())
> >
> > It passes that conditional and returns FALSE, without updating geometry.
> > Since I don't know what it's *supposed* to do, I don't know if this is good
> > or bad, but it looks to me like it's deciding that nothing has changed. Am I
> > not supposed to make changes  to the original parameters? Do I need to make
> > changes to a copy? I tried that and got the same results.
> >
> > Is there a concise snippet of code somewhere that shows how to make a
> > change--any change--to an object?
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/sldev/attachments/20080226/d4559761/attachment.htm


More information about the SLDev mailing list