`PRIM_RENDER_MATERIAL` + overrides in one `llSetLinkPrimitiveParamsFast` call do not apply
tracked
Aiwaiwa Hurricane
Doesn't seem to apply overrides when they are sent all at once right after
PRIM_RENDER_MATERIAL
.So this won't work:
llSetLinkPrimitiveParamsFast(LINK_THIS, [49,0,"aa904b20-3a56-29c6-03c5-cd53c9ce3484",48,0,"",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,0.000000,<1.000000, 0.452452, 0.452452>,0.800000,0,"","",45,0,"",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,1.570800,47,0,"",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,1.570800,1.000000,0.000000,46,0,"",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,1.570800,""]);
Split into two will work:
llSetLinkPrimitiveParamsFast(LINK_THIS, [49,0,"aa904b20-3a56-29c6-03c5-cd53c9ce3484"]);
llSetLinkPrimitiveParamsFast(LINK_THIS,[48,0,"",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,0.000000,<1.000000, 0.452452, 0.452452>,0.800000,0,"","",45,0,"",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,1.570800,47,0,"",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,1.570800,1.000000,0.000000,46,0,"",<1.000000, 1.000000, 0.000000>,<0.000000, 0.000000, 0.000000>,1.570800,""]);
Log In
Maestro Linden
tracked
Maestro Linden
I believe that Kristy Aurelia is correct about what's going on. I spoke with some other Lindens who are familiar with the GLTF materials system, and they agree this is a bug. Importing.
Maestro Linden
I can repro with the example script snippet. The order of arguments is PRIM_RENDER_MATERIAL, PRIM_GLTF_BASE_COLOR, PRIM_GLTF_NORMAL, PRIM_GLTF_METALLIC_ROUGHNESS, PRIM_GLTF_EMISSIVE.
I also see a failure in the overrides applying if I put the PRIM_RENDER_MATERIAL after the PRIM_GLTF_ parameters.
I do see that the arguments are generally executed from left to right; running this operation will resize the object to <2,2,2>:
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_SIZE, <1,1,1>, PRIM_SIZE, <2,2,2>])
Also, if I rez a sphere and then execute this operation to change it to a box _and_ change the color of face 5 to red, the operation behaves as expected - even though the object didn't have a face 5 prior to the script call:
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TYPE, PRIM_TYPE_BOX, 0, <0.000000, 1.000000, 0.000000>, 0.000000, <0.000000, 0.000000, 0.000000>, <1.000000, 1.000000, 0.000000>, <0.000000, 0.000000, 0.000000>, PRIM_COLOR, 5, <1,0,0>, 1.0]);
Aiwaiwa Hurricane
Maestro Linden Theorizing, this could also be some sort of a redundant command elimination technique that is not fully covering new cases.
Kristy Aurelia
My guess is because PRIM_RENDER_MATERIAL has higher value than the overrides, and applying a material does clear overrides. It executes them in that order effectively applying overrides first, then doing the material, which clears the overrides. And when it is split, it gets executed in proper order, which applies overrides after clearing.