On the fly conversion checkbox state

Forums: 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 viewforum.php?f=18

On the fly conversion checkbox state

Postby HHbomb » Thu Nov 25, 2021 12:17 pm

HHbomb Thu Nov 25, 2021 12:17 pm
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 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1307
Joined: Wed Jun 30, 2010 8:45 pm

Re: On the fly conversion checkbox state

Postby neonZorglub » Fri Dec 24, 2021 3:30 am

neonZorglub Fri Dec 24, 2021 3:30 am
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"
neonZorglub
OctaneRender Team
OctaneRender Team
 
Posts: 897
Joined: Sun Jul 31, 2016 10:08 pm

Re: On the fly conversion checkbox state

Postby HHbomb » Mon Dec 27, 2021 1:24 pm

HHbomb Mon Dec 27, 2021 1:24 pm
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 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1307
Joined: Wed Jun 30, 2010 8:45 pm

Return to Autodesk 3Ds Max


Who is online

Users browsing this forum: No registered users and 15 guests

Thu Apr 18, 2024 11:54 pm [ UTC ]