secondlife / jira-archive

3 stars 0 forks source link

[BUG-232026] Allow llSetLinkPrimitiveParamsFast to not affect certain parameters #9385

Open sl-service-account opened 2 years ago

sl-service-account commented 2 years ago

How would you like the feature to work?

Add variables (PRIM_SAME, or maybe PRIM_SAME_INTEGER, PRIM_SAME_FLOAT, PRIM_SAME_KEY, etc) that "pass through" underlying values, keeping them the same as if you hadn't used the llSetLinkPrimitiveParams command at all.

Why is this feature important to you? How would it benefit the community?

This would make it significantly easier (or in certain cases possible) to alter some parts of a param without knowing or reconstructing the entire param. For example: changing the colour of a specular map currently requires the script to know the specular UUID (or be able to fetch via llGetLinkPrimitiveParams, which means it needs to be full perm). Instead, with this, you could use a command like llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_SPECULAR, targFace, PRIM_SAME_KEY, PRIM_SAME_VECTOR, PRIM_SAME_VECTOR, PRIM_SAME_FLOAT, newColour, PRIM_SAME_INTEGER, PRIM_SAME_INTEGER]) to only target the specific value you wish to change. While it is sometimes possible to do something similar with either alternative commands (like llSetLinkColor), or by gathering the pieces you want to remain the same via llGetLinkPrimitiveParams, this would be expand that functionality to all of the params that don't have stand alone commands, while being far more efficient than the llGetLinkPrimitiveParams method (to not mention actually working for the PRIM_TEXTURE, PRIM_NORMAL, and PRIM_SPECULAR params while the object is not full perm). This would give scripters more leeway into making things change while keeping script usage low.

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-232026 | | Summary | Allow llSetLinkPrimitiveParamsFast to not affect certain parameters | | Type | New Feature Request | | Priority | Unset | | Status | Accepted | | Resolution | Accepted | | Reporter | Alkaia Exonar (alkaia.exonar) | | Created at | 2022-04-13T05:08:23Z | | Updated at | 2022-04-13T18:27:37Z | ``` { 'Build Id': 'unset', 'Business Unit': ['Platform'], 'Date of First Response': '2022-04-13T03:41:21.931-0500', 'How would you like the feature to work?': 'Add variables (PRIM_SAME, or maybe PRIM_SAME_INTEGER, PRIM_SAME_FLOAT, PRIM_SAME_KEY, etc) that "pass through" underlying values, keeping them the same as if you hadn\'t used the llSetLinkPrimitiveParams command at all.', 'ReOpened Count': 0.0, 'Severity': 'Unset', 'Target Viewer Version': 'viewer-development', 'Why is this feature important to you? How would it benefit the community?': "This would make it significantly easier (or in certain cases possible) to alter some parts of a param without knowing or reconstructing the entire param. For example: changing the colour of a specular map currently requires the script to know the specular UUID (or be able to fetch via llGetLinkPrimitiveParams, which means it needs to be full perm). Instead, with this, you could use a command like llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_SPECULAR, targFace, PRIM_SAME_KEY, PRIM_SAME_VECTOR, PRIM_SAME_VECTOR, PRIM_SAME_FLOAT, newColour, PRIM_SAME_INTEGER, PRIM_SAME_INTEGER]) to only target the specific value you wish to change. While it is sometimes possible to do something similar with either alternative commands (like llSetLinkColor), or by gathering the pieces you want to remain the same via llGetLinkPrimitiveParams, this would be expand that functionality to all of the params that don't have stand alone commands, while being far more efficient than the llGetLinkPrimitiveParams method (to not mention actually working for the PRIM_TEXTURE, PRIM_NORMAL, and PRIM_SPECULAR params while the object is not full perm). This would give scripters more leeway into making things change while keeping script usage low. ", } ```
sl-service-account commented 2 years ago

Chaser Zaks commented at 2022-04-13T08:41:22Z

While I do like this, it may be a bit difficult to implement, as PRIM_SAME_STRING would be a magic value like JSON_INVALID, but you can't really do the same with floats, integers, vectors, etc, as they are numeric, which means making a specific value like 0xFFFFFFFF a invalid number.

sl-service-account commented 2 years ago

Kyle Linden commented at 2022-04-13T18:27:32Z

Thank you for the suggestion. We may implement some version of this request at a future date.