• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: SVC-38
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Delerium Hannibal
Votes: 50
Watchers: 9
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

llSetPrimitiveParams has issues with multiple parameters in one call

Created: 05/Mar/07 01:29 AM   Updated: 18/Nov/08 10:38 AM
Return to search
Component/s: Scripts
Affects Version/s: 1.13.1.5
Fix Version/s: None

Environment: N/A
Issue Links:
Duplicate
 
Relates
 

Linden Lab Issue ID: DEV-3842


 Description  « Hide
Two issues with this command.

1. Calling PRIM_TYPE resets and locks PRIM_FLEXIBLE, even for non-type change parameters. Meaning, you change a simple thing like hollow, and it turns off flexi, and takes a completely seperate call to turn it back on. Calling flexible will fail in any parameter set that also calls type. So to change the hollow on a box that has flexi turned on, it takes two calls, one to change the hollow, and one to reset the flexi.

2. Working with individual sides with PRIM_COLOR and PRIM_TEXTURE is broken. These two constants can't be used in the same call when dealing with individual sides, as the first set called will set the entire prim to the last entry once the second set gets called. example:

This works: (sets the color to green for all sides but side number 1, and sets side number 1 to black, then changes texture to blank)
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, <0, 1, 0>, 1,PRIM_COLOR, 0, <0, 0, 0>, 1]);
llSetPrimitiveParams([PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1, 1,0>, <0, 0, 0>, 0]);
This does not:
llSetPrimitiveParams([PRIM_COLOR, ALL_SIDES, <0, 1, 0>, 1,PRIM_COLOR, 0, <0, 0, 0>, 1,PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1, 1,0>, <0, 0, 0>, 0]);



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Lex Neva added a comment - 05/Mar/07 08:55 AM
In your last example, when you say it "does not work", what is the actual result? I kind of got lost in your explanation.

Delerium Hannibal added a comment - 05/Mar/07 07:16 PM
it recolors the entire prim to the last entry. (black in this case) instead of coloring most of it green and one side black. it doesn't silently fail, or give errors, it just does not work as intended. The first set of commands paints the whole object green except side 0, which will be black, then sets the texture to "blank". The second command paints the entire prim black, and sets the texture to "blank".

Lex Neva added a comment - 06/Mar/07 10:06 AM
Wow, that sure is freaky. Nice catch. You should submit a bug-report in-world, too. I'll go ahead and vote for this issue.

Delerium Hannibal added a comment - 06/Mar/07 08:19 PM
I did the bug report first, then a friend told me to post it here too, so I did.

Heather Goodliffe added a comment - 14/Apr/07 08:35 PM
I've seen this issue too, thanks for posting it.

Haravikk Mistral added a comment - 24/May/07 04:08 AM
Currently tearing hair out because of this one. Please fix it while I still have some of my lucious, flowing, golden locks left!

Bloodsong Termagant added a comment - 28/May/07 05:11 PM
apparently this issue is propagated through to llSetLinkParams, because i get the same results when trying to change different faces.

these parameters DO NOT apply properly to different faces (only the first parameter is applied to all subsequently called faces):
colour
shine
bump

this parameter DOES apply properly to different faces:
texture


Bloodsong Termagant added a comment - 04/Jul/07 06:01 AM
this is still broken in the beta (1.8...something? gah, numbers!)

i'd really like to see this fixed. soon! i have two products on hold waiting for this to work.... :/


Vandalite Defiant added a comment - 15/Jul/07 09:54 PM
There IS a workaround to the problem with the parameters that work with sides, although it's really annoying to code for:

if you stride each side of the call so that ALL the parameters are passed for that side, and then ALL the parameters are passed for the next side, and repeat for each side, you'll get the desired results.

sorta like this:
llSetPrimitiveParams( [
PRIM_COLOR, 0, <0.0,0.0,0.0>, 1.0,
PRIM_BUMP_SHINY, 0, 0,
PRIM_COLOR, 1, <1.0,0.0,0.0>, 1.0,
PRIM_BUMP_SHINY, 1, 0
] );
without that second PRIM_COLOR command, the second BUMP_SHINY call would end up affecting both face 1 and 2. Repeat for any other faces you want to edit.

also, did anyone test the PRIM_TEXGEN param? is it affected the same as the other two? What about PRIM_FULLBRIGHT?


Talarus Luan added a comment - 25/Oct/07 10:14 PM
I discovered this issue tonight, and the way it is working leads me to suspect the possible nature of the problem.

Any time you do a set of rules which look like:

[PRIM_FOO,1,<other params>,PRIM_FOO,2,<other params>,PRIM_FOO,3,<other params>,PRIM_BAR,ALL_SIDES,<other params>]

it seems to apply the last PRIM_FOO setting on all the sides as well, instead of just the specified side. If you rearrange it like so, it works:

[PRIM_BAR,ALL_SIDES,<other params>,PRIM_FOO,1,<other params>,PRIM_FOO,2,<other params>,PRIM_FOO,3,<other params>]

So, I figure what is happening is that it is buffering changes for different sides, but when it hits an ALL_SIDES, it tells the last rule of each type to also be set to ALL_SIDES.

Anyway, that's the best workaround I can come up with. Do the ALL_SIDES rules first, then do all the individual side rules afterwards.


Gaius Goodliffe added a comment - 01/Dec/07 05:46 AM
Talarus: I don't think so. I've had this occur in rule lists where ALL_SIDES is never used at all, so whatever the problem is, it's more subtle than something happening when you hit an ALL_SIDES.

WarKirby Magojiro added a comment - 04/Jan/08 06:03 AM
This has been around for too long _

kelly linden added a comment - 07/Feb/08 11:02 AM
I have made changes to this logic in the havok4 beta (not yet released to early adopters - but soon!). Please do test it out, I am looking for feedback. In particular:
  • Did the changes break work arounds you are using for the currently screwed up behavior? If so what are the exact sequences you are using and the exact resutls you are needing. If you don't want to post this publicly you can email me directly (kelly@lindenlab.com) or give me examples and explanations in world (Kelly Linden).
  • Are there still weird or unintuitive behaviors in the way it works now - ie is it still broken. I haven't marked this resolved because I have not thoroughly tested all the given examples in comments in the havok4 branch. I was actually working on a different bug (SVC-1146), but this is closely related.

WarKirby Magojiro added a comment - 08/Feb/08 07:15 AM
Kelly, why in the havok Beta? What does this have to do with havok?

Dale Innis added a comment - 14/Feb/08 05:49 AM
Unsurprisingly, this bug seems to be in llSetLinkPrimitiveParams() as well.

Cheshyr Pontchartrain added a comment - 24/Feb/08 09:26 AM
Kelly, I'm working on a transforming object in Havok4 and am still seeing these bugs. Although less pronounced than they were in Havok1, the problem is not gone. Unfortunately, it's also not consistent. In the following example, the script should turn prim #6 on a linked set into a door.

llSetLinkPrimitiveParams(6, [
PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.375000, 0.875000, 0.0>, 0.0, ZERO_VECTOR, <1.0, 1.0, 0.0>, ZERO_VECTOR,
PRIM_TEXTURE, ALL_SIDES, "ede92e5c-575e-5fbc-5206-efd9846be708", <2.0, 1.0, 0.0>, <-0.5, 0.0, 0.0>, 0.0,
PRIM_SIZE, <0.061093, 2.394506, 3.092508>,
PRIM_BUMP_SHINY, ALL_SIDES, PRIM_SHINY_LOW, PRIM_BUMP_NONE,
PRIM_COLOR, ALL_SIDES, <1.0, 1.0, 1.0>, 1.0,
PRIM_TEXGEN, ALL_SIDES, 0,
PRIM_TEXTURE, 1, "2406839b-b79a-e667-9433-42c1aafb79b7", <2.0, 1.0, 0.0>, <-0.5, 0.0, 0.0>, 0.0,
PRIM_TEXTURE, 3, "1dd519cd-e2f5-7094-bbdc-0c96c43b891d", <-2.0, 1.0, 0.0>, <-0.5, 0.0, 0.0>, 0.0 ]);

The shape transformations work correctly, but the door textures (face 1 and 3) are not applied until I run the script a second time.


Gregory Maurer added a comment - 20/Jul/08 07:43 PM
I just discovered the flexible bug myself. Interestingly enough, if you put flexible after PRIM_TYPE, it seems to work.

Cheshyr Pontchartrain added a comment - 18/Oct/08 07:28 AM
Any progress on this bug? I see there was an update October 11, but no indication of what changed.