On the fly conversion checkbox state

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
Post Reply
HHbomb
Licensed Customer
Posts: 1377
Joined: Wed Jun 30, 2010 8:45 pm
Contact:

Hi NZ!
OctaneMaxFPI.OCMGetUserConfigValueInt "EnableOnTheFlyMaterialConversion" give same value ( 0 ) regardless of the state of the checkbox... how can we have the state ? Thanks
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
neonZorglub
OctaneRender Team
Posts: 1018
Joined: Sun Jul 31, 2016 10:08 pm

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"
HHbomb
Licensed Customer
Posts: 1377
Joined: Wed Jun 30, 2010 8:45 pm
Contact:

Hi,
Thank you.
I really don't know where I saw "OctaneMaxFPI.OCMGetUserConfigValueInt" instead of "...bool"
It works fine now !
Thanks
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
Post Reply

Return to “Autodesk 3Ds Max”