Jump to content

How can I make sure the viewer knows the correct link order of prims?


Sara Nova
 Share

You are about to reply to a thread that has been inactive for 522 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I use a custom build of Cool VL Viewer to which I've added additional Lua scripting functionality for manipulating prims. I have it set up to perform automatic modifications to my attachments, to do things like color coordination, and automatic positioning/scaling to fit an avatar that swaps parts frequently. When I add an attachment to this system, my code stores some data about the prims, like their original position (in case any of my filters end up moving them around, e.g. for changing the length of flexi hair) and which labels ("targets") I've assigned to each face for purposes of applying colors and the like. This data is associated with each prim via its link number, determined by its position in the list returned by calling LLViewerObject::getChildren() on its root prim. (Don't worry; this is nowhere near enough data to recreate the object from scratch. I could do the same with LSL; it would just be laggy and harder to maintain.)

This has remained stable and accurate for some time, but yesterday I started running into a problem where it was no longer giving me the accurate link order, seemingly being randomized each time I reattach something. This was not caused by any change in the viewer, nor in my Lua code, so I can only conclude that there was some kind of change in the server related to the order in which it sends prim updates. (I have verified that the actual link order as reported by LSL has not changed.) This has caused all of the prims to become jumbled up as it thinks they're in the wrong location and tries to "fix" it, often resulting in an ugly mass of prims that looks nothing like it's supposed to.

I know that it's possible to determine the accurate link order from viewer-side code, as Firestorm's previous/next prim buttons show the accurate order. (Cool VL Viewer's previous/next buttons, by contrast, show the jumbled order.) I looked at how Firestorm does it, and it just uses the same getChildren() method I'm using, so clearly there's some difference elsewhere in the code that makes that always return the right order. But I don't know where to look. Does anyone have any advice?

Link to comment
Share on other sites

3 hours ago, Wulfie Reanimator said:

To be fair, Firestorm also has the link order jumbled immediately after linking something new to a linkset.

Re-rezzing will fix it, though attachments are unaffected (since they're always rezzed first).

Okay, well if attachments are unaffected, then doing it the way Firestorm does it would work for my needs. I'm just not sure what that is that it's doing.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 522 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...