Page 7 of 8
Re: ==== Octane useful scripts ====
Posted: Tue Apr 09, 2024 8:00 am
by HSchoenberger
aoktar wrote:I don't understand your request. You have two different point to read numbers, current plugin version or saved version number in to scene. What do you want to get exactly if scene version number overwritten?
>You have two different point to read numbers
There is only one.
If you take a look at the script, it retrieves the version from the scene:
bc = doc[ID_OCTANE_LIVEPLUGIN]
print ("Octane version=",bc[c4d.SET_OCTANE_VERSION])
And I need the version number of the plugin currently loaded in C4D.
Re: ==== Octane useful scripts ====
Posted: Tue Apr 09, 2024 1:37 pm
by aoktar
HSchoenberger wrote:aoktar wrote:I don't understand your request. You have two different point to read numbers, current plugin version or saved version number in to scene. What do you want to get exactly if scene version number overwritten?
>You have two different point to read numbers
There is only one.
If you take a look at the script, it retrieves the version from the scene:
bc = doc[ID_OCTANE_LIVEPLUGIN]
print ("Octane version=",bc[c4d.SET_OCTANE_VERSION])
And I need the version number of the plugin currently loaded in C4D.
It's another info published a few page back
viewtopic.php?f=87&t=56039&start=30#p422511
Re: ==== Octane useful scripts ====
Posted: Tue Apr 16, 2024 1:27 pm
by HSchoenberger
If I follow your link, then I see the same script you already mentioned.
It does not work.
It reads the version from the document.
You are referring to this script, right?
Code: Select all
ID_OCTANE_LIVEPLUGIN = 1029499
def main():
bc = doc[ID_OCTANE_LIVEPLUGIN]
data = c4d.plugins.GetWorldPluginData(ID_OCTANE_LIVEPLUGIN)
print("data",data[13]) #OPENGL_SAMPLES
print("data",data[85]) #PREFS_LOCALDB_PATH
print("data",data[70]) #PREFS_NG_CAT_MAT_COLOR
octPrefs = data[131]
print("OCIO_USEOTHERCFG:",octPrefs[5]) #OCIO_USEOTHERCFG
print("OCIO_INTERM_GUESS:",octPrefs[7]) #OCIO_INTERM_GUESS
print("OCIO_CFG_FILE:",octPrefs[1]) #OCIO_CFG_FILE
print ("Octane version=",bc[30])
print ("Octane version=",bc[c4d.SET_OCTANE_VERSION])
print ("Lock resolution=", bc[c4d.SET_LOCKRES])
print ("Check camera updates=", bc[c4d.SET_CHECK_CAMERA])
print ("Default environment color=", bc[c4d.SET_DEF_ENV_COLOR])
print ("Kernel tip=", bc[c4d.SET_KERNEL_TYPE])
print ("DL Max samples=", bc[c4d.SET_DIRECT_MAXSAMPLES])
print ("PT Max samples=", bc[c4d.SET_PATHTRACE_MAXSAMPLES])
Re: ==== Octane useful scripts ====
Posted: Tue Apr 16, 2024 6:53 pm
by aoktar
If I follow your link, then I see the same script you already mentioned.
It does not work.
It reads the version from the document.
You are referring to this script, right?
Sorry try this
Code: Select all
data = c4d.plugins.GetWorldPluginData(1031195)
print("version",data[5001])
print("number",data[5000])
Re: ==== Octane useful scripts ====
Posted: Mon Apr 22, 2024 1:25 pm
by HSchoenberger
Thanks, that works
Re: ==== Octane useful scripts ====
Posted: Thu Jul 04, 2024 4:29 pm
by mili123
import c4d
from c4d import gui
ID_OCTANE_LIVEPLUGIN = 1029499
ID_OCTANE_CAMERATAG = 1029524
def main():
doc = c4d.documents.GetActiveDocument()
sBC = doc.GetDataInstance()
data = sBC.GetContainerInstance(ID_OCTANE_LIVEPLUGIN)
p_data = c4d.plugins.GetWorldPluginData(ID_OCTANE_LIVEPLUGIN)
if data:
data.SetFloat(c4d.SET_KERNEL_TYPE, 2)
data.SetFloat(c4d.SET_PATHTRACE_MAXSAMPLES, 1500)
data.SetFloat(c4d.SET_PATHTRACE_GICLAMP, 10)
data.SetFloat(c4d.SET_PATHTRACE_ADAPTIVE_SAMPLING, 1)
if p_data is not None:
p_data.SetFloat(62, 150)
p_data.SetFloat(144, 0)
c4d.EventAdd()
doc.SetChanged()
if __name__=='__main__':
main()
The value of date can be updated. How to update the modified content of p_data to the interface?
Re: ==== Octane useful scripts ====
Posted: Fri Jan 10, 2025 8:51 am
by W_RTF
Request a script to turn octane material preview on or off
I am a Python beginner, where can I find the octane api, can anyone give me some Pointers
Re: ==== Octane useful scripts ====
Posted: Fri Jan 10, 2025 9:29 am
by aoktar
W_RTF wrote:Request a script to turn octane material preview on or off
I am a Python beginner, where can I find the octane api, can anyone give me some Pointers
There are not an Octane API to use. All access are done by using data containers by using parameter IDs. These parameters are not accessible by any data, internal to software.
Re: ==== Octane useful scripts ====
Posted: Fri Jan 10, 2025 10:01 am
by W_RTF
aoktar wrote:W_RTF wrote:Request a script to turn octane material preview on or off
I am a Python beginner, where can I find the octane api, can anyone give me some Pointers
There are not an Octane API to use. All access are done by using data containers by using parameter IDs. These parameters are not accessible by any data, internal to software.
Thanks for your reply, mainly when adjusting the material, rendering the material ball will cause IPR slow, so I want to write such a script
Re: ==== Octane useful scripts ====
Posted: Fri Jan 10, 2025 11:12 am
by aoktar
W_RTF wrote:
Thanks for your reply, mainly when adjusting the material, rendering the material ball will cause IPR slow, so I want to write such a script
What's the advantage of it over manually switch off from menu?