Updates to Web Viewer to allow values outside of 'uisoftmin' and 'uisoftmax'#2930
Updates to Web Viewer to allow values outside of 'uisoftmin' and 'uisoftmax'#2930paytonGilbertson wants to merge 8 commits into
Conversation
`mx_rgbtohsv` and `xm_hsvtorgb` had hardcoded output alpha set to `1.0`. The alpha channel should forward the preexisting alpha value `_in.a` unchanged.
Signed-off-by: Payton Gilbertson <pgilbertson@ilm.com>
|
This looks very promising, thanks @paytonGilbertson! As it turns out, we introduced a subtle bug in the MaterialX Web Viewer yesterday, and I've written up a proposed fix at #2931. Since your work depends on the correct functioning of the Web Viewer, I'd like to review and merge the fix above before reviewing your improvement, so that your work can be tested in the full context of the working viewer. |
kwokcb
left a comment
There was a problem hiding this comment.
I think you need to keep track of a soft and hard min/max as if there is a soft min/max but no hard min/max it will compute a different step size with this change.
|
@paytonGilbertson In addition to Bernard's review note above, which sounds logical to me, I'll just mention that #2931 has now been merged to main, and you can merge from main to your PR if you'd like to test with the full range of material examples. |
| if (nodeDefInput.hasAttribute('uistep')) | ||
| step = nodeDefInput.getAttribute('uistep').split(',').map(Number); | ||
| } | ||
| for (let i = 0; i < 4; ++i) |
There was a problem hiding this comment.
Sorry for being nit-picky + lack of clarity and in the previous comment. Step is computed based on both hard / soft min / max. So to preserve previous logic soft min / max still needs to be stored somewhere and used here. Maybe just keep a stepMinValue and stepMaxValue ?
(#1817) Allow for users to manually input values outside of the soft min and soft max in the web viewer
Changes made in
viewer.js