PDA

View Full Version : Retrieving a color from an INI


RobertMayer
04-21-2008, 09:43 AM
Alright guys,
Here's another one I'm tossing your way. I'm running on Caffine, in the middle of packing for a move back up to NJ, and I got an idea, and I can't think it any further through.
What I want to do is save and retrieve a color setting from an INI file to be used in a color pallette.
The problem is no matter how I format the color data I cannot seem to 3DMax to recognize it as color data. "Unable to convert (whatever I try) to color." is what I get.

Any ideas?

zortech
04-21-2008, 10:59 AM
I am looping through all ui elements and use the following line to save the value:

setIniSetting pIniSavePath "ColorPicker" dlgUiControl.name (dlgUiControl.color as string)


load the value:

dlgUiControl.color = execute (getIniSetting pIniSavePath "ColorPicker" dlgUiControl.name)


And what is going to be saved in the ini file is:

[ColorPicker]
TestColorPicker=(color 255 0 0)


This works fine for me, thanks to Bobo for sharing this way of saving ini settings :)

CGTalk Moderation
04-21-2008, 10:59 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.