Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow changing element size of the static array property on the Editor #101313

Closed

Conversation

TokageItLab
Copy link
Member

The static hint for array property makes the array static.

It prevents movement, but does not prevent array size changes. Fix this by hiding the "Clear button" and "Add element button" as well as the Move element grabber.

@TokageItLab TokageItLab added this to the 4.4 milestone Jan 8, 2025
@TokageItLab TokageItLab requested review from a team January 8, 2025 20:46
@TokageItLab TokageItLab changed the title Disallow changing element size of the static array property on Editor Disallow changing element size of the static array property on the Editor Jan 8, 2025
@aaronfranke
Copy link
Member

Why would static need to be kept the same size? Static is not the same as constant.

@TokageItLab
Copy link
Member Author

I don't know clearly what static means, since there are no properties that use static internally to begin with.

However, considering the purpose, it is probably to generate a static array dependent on a specific property and let the user edit the properties in the array.

If you change the count of elements in this generated array, it loses consistency with the fact that it was “generated dependent on a specific property”.

For example, what I am doing now is to specify a root bone and an end bone and generate an array with all joints in between as elements, but it must prevent the user from changing the count of elements. Rather, I don't see why only movable is prohibited in static mode.

@fire
Copy link
Member

fire commented Jan 10, 2025

@aaronfranke

Why would static need to be kept the same size? Static is not the same as constant.

I think tokage would be ok if we renamed it, but kept the same functionaility.

@TokageItLab
Copy link
Member Author

I sent #101422 as alternative.

@TokageItLab
Copy link
Member Author

Superseded by #101409

@TokageItLab TokageItLab added archived and removed bug labels Jan 13, 2025
@TokageItLab TokageItLab removed this from the 4.4 milestone Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants