[sldev] [HELP] getting UUID for uploaded texture in viewer
Stan Vernier
sv193702 at ohio.edu
Fri Nov 16 19:49:03 PST 2007
Your coworker is in the right direction, but my current problem is how to get a
hold of the pointer to the texture. I can see how to filter the inventory so
that only the texture I want shows up with a unique key as a file name, but not
how to get a pointer attached to it.
Thanks for the help so far.
Quoting "Kent Quirk (Q Linden)" <q at lindenlab.com>:
> I bounced this off one of my coworkers who I knew had recently been
> in
> this area. This is what he sent back:
>
> > I'm not sure if this is what he's asking for, but once you have a
> > pointer to the texture inventory item, you can add it to the target
>
> > object via the texture's assetUUID. For example (this is all
> > viewer-side code):
> >
> > void addTextureToTargetObject(LLInventoryItem *pTexture,
> > LLViewerObject *pTargetObject)
> > {
> > LLUUID assetId = pTexture->getAssetUUID();
> > LLViewerImage *pImage = gImageList.getImage(assetId);
> > pTargetObject->setTEImage(0,pImage);
> > }
> Hope this helps.
>
> Q
>
> Stan Vernier wrote:
> > I'm trying to modify the viewer to allow for someone to right click
> on
> > an object, use the pie menu to open a floater window and input a
> URL to
> > an image and have the image to become the texture on the object
> > automatically. The floater works, getting the image and uploading
> it to
> > SL works, I'm pretty sure I know the function to change the texture
> on
> > an object but I'm having trouble with getting the LLUUID for the
> > texture. Right now I'm getting a UUID, but it doesn't correspond
> to the
> > the result of right clicking on the image in the inventory and
> choosing
> > copy UUID.
> >
> > I know that there is one being created in the function
> > upload_new_resource in llviewermenufile.cpp but the
> upload_complete
> > function in llassetuploadresponders.cpp is using two different
> UUID's in
> > its llinfos message. Trying to find where the other two UUIDs are
> being
> > generated has got me tracing through about 4-5 other files with no
> > luck. Even if I did find them, getting a hold of the final UUID in
> my
> > function would be a pain. Is there any way to get the UUID from a
> > completely separate floater? I checked into if I'd be able to
> search
> > the inventory for the name of the texture, but only briefly. Anyone
> have
> > some ideas to try?
> >
> > _______________________________________________
> > Click here to unsubscribe or manage your list subscription:
> > /index.html
> >
>
More information about the SLDev
mailing list