Notifications
Clear all
[Closed] Retrieving a color from an INI
Apr 21, 2008 9: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?
1 Reply
Apr 21, 2008 9:43 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