Interfaces and Parameters

Interfaces and Parameters

Anonymous
Not applicable
304 Views
4 Replies
Message 1 of 5

Interfaces and Parameters

Anonymous
Not applicable
I have found and extraordinary bug working with interfaces and parameters.
I am currently writing a plugin that propagates information directly from the ui to parameters
like this:


rollout mapsRollout "Main"(
spinner TheValue_Spn
)

parameters maps rollout:mapsRollout (
TheValue type:#float ui:TheValue_Spn default:1.0f;
)


However the spinner only seems to propagate values on button up.
Or rather the viewport does not update. Even if I add the completeredraw
function. But if I add a line in the rollout code like:


rollout mapsRollout "Main"(
spinner TheValue_Spn

on TheValue_Sp changed value do ()
)


The callback seems to run on any value change and the viewport updates fine.
This seams a bit odd to me. If anyone have any answers to why this is I would be grateful.

If not this is the solution: Add an line in your ui that doesnt run anything, but picks up the values from the ui. This is most critical on spinners.

// K
0 Likes
305 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
What I see is inconsistency in the name of the rollout in the param block.
-- no bug here, you just use...
parameters maps rollout:Main
-- ...but 'Main' is the title of your rollout and
-- your rollout name is 'mapsRollout' so...
-- the next line will fix the connection:
parameters maps rollout:mapsRollout


cheers
0 Likes
Message 3 of 5

Anonymous
Not applicable
Thanks! I have edited the post above to fix the naming this was just an example and not my actual plugin. The naming is not the problem however as the first post states ;)- K
0 Likes
Message 4 of 5

Anonymous
Not applicable

rollout mapsRollout "Main"(
spinner TheValue_Spn

on TheValue_Sp changed value do ()
)

TheValue_Spn <--- missing "n"
0 Likes
Message 5 of 5

Anonymous
Not applicable
Ok, likely the naming is not the problem for you, I just noticed that after a quick reading the code.

Please note that this forum is used by many people (including unregistered), so that such comments are useful 😉
0 Likes