Page 1 of 1

On the fly conversion checkbox state

Posted: Thu Nov 25, 2021 12:17 pm
by HHbomb
Hi NZ!
OctaneMaxFPI.OCMGetUserConfigValueInt "EnableOnTheFlyMaterialConversion" give same value ( 0 ) regardless of the state of the checkbox... how can we have the state ? Thanks

Re: On the fly conversion checkbox state

Posted: Fri Dec 24, 2021 3:30 am
by neonZorglub
HHbomb wrote:Hi NZ!
OctaneMaxFPI.OCMGetUserConfigValueInt "EnableOnTheFlyMaterialConversion" give same value ( 0 ) regardless of the state of the checkbox... how can we have the state ? Thanks
Hi HHbomb,
As this is a check box, it is a Bool, not an Int, so you need to use the functions:
to read:
OctaneMaxFPI.OCMGetUserConfigValueBool "EnableOnTheFlyMaterialConversion"
(will return true or false)

and to set the value:
OctaneMaxFPI.OCMSetUserConfigValueBool "EnableOnTheFlyMaterialConversion" true
or
OctaneMaxFPI.OCMSetUserConfigValueBool "EnableOnTheFlyMaterialConversion" false

Alternatively, you can set the value as a string, this will be converted to the correct boolean type:
OctaneMaxFPI.OCMSetUserConfigValue "EnableOnTheFlyMaterialConversion" "1"
OctaneMaxFPI.OCMSetUserConfigValue "EnableOnTheFlyMaterialConversion" "0"
OctaneMaxFPI.OCMSetUserConfigValue "EnableOnTheFlyMaterialConversion" "true"
OctaneMaxFPI.OCMSetUserConfigValue "EnableOnTheFlyMaterialConversion" "false"

Re: On the fly conversion checkbox state

Posted: Mon Dec 27, 2021 1:24 pm
by HHbomb
Hi,
Thank you.
I really don't know where I saw "OctaneMaxFPI.OCMGetUserConfigValueInt" instead of "...bool"
It works fine now !
Thanks