PDA

View Full Version : Dynamic UI, spinner problem


GMS-575
09-30-2008, 07:50 AM
Hi Folks,

i'm trying to create a dynamic ui with the stringstream method. i have setup my spinners to control the subdiv values of vray materials and everything works fine until i try to setup the events for the spinners.

here is the messed up code:

for i = 1 to spinnerArray.count do
format "on GM_spinner% changed value do %.reflection_subdivs = value\n" i spinnerArray[i] to:rolloutSS

and i get this error message

-- Syntax error: at keyword parameter, expected <factor>
-- In line: on GM_spinner1 changed value do vray_mat_01:V

Cheers

LoneRobot
09-30-2008, 08:42 AM
Hi G.M!

it's possibly the output from your spinner array variable isn't giving the correct syntax for the rollout. (the colon sign seems to cause the error) The way to test this is to ouptut the stringstream to a script and check the code directly. There is a global controls variable attached to the rollout class, and it contains an array of all the controls on the rollout, in the order they are created. this might help you in retrieving the right variable to format in your script.

GMS-575
09-30-2008, 10:42 AM
i found the problem...i had to declare the array global, now it works :D

CGTalk Moderation
09-30-2008, 10:42 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.