Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello, I am using a RangeData in my UserData. I am trying to set the value of a knot in the RangeData Gui but nothing is changing despite rs.SetSelectedKnot(knot) returning True. Is this a bug or am I doing something wrong? Thanks for any insight. (I'm using R19)
rs = op[c4d.ID_USERDATA,1] #get my rangeSlider v = op[c4d.ID_USERDATA,2] #Get a Float rs.SetCurrentValue(v) print rs.GetCurrentValue() knot = rs.GetSelectedKnot() rs.SetKnotValue(knot, v) rs.SetSelectedKnot(knot) c4d.EventAdd()
Hi @gsmetzer I've moved your topic since it's related to Cinema 4D API itself. I also added tags to your post and mark the topic as a question. Don't worry but the next time try to setup your topic correctly, see Q&A New Functionality and How to Post Questions.
Regarding your issue, rs = op[c4d.ID_USERDATA,1] #get my rangeSlider performs a copy of the RangeData to the rs variable. So you have to assign it back at the end of your code op[c4d.ID_USERDATA,1] = rs
rs = op[c4d.ID_USERDATA,1] #get my rangeSlider
op[c4d.ID_USERDATA,1] = rs
Cheers, Maxime.
Thank You, How embarrassing I forgot to write back to the UserData. (I shouldn't code late at night) Solved.