How to detect octane version

Forums: How to detect octane version
Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderator: aoktar

How to detect octane version

Postby usitnikov » Tue Oct 16, 2018 12:01 pm

usitnikov Tue Oct 16, 2018 12:01 pm
Hi guys, i can't found how get octane version from cinema4d python API, can you please help me in this question? :?:
usitnikov
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Fri Sep 30, 2016 5:28 am

Re: How to detect octane version

Postby aoktar » Tue Oct 16, 2018 12:09 pm

aoktar Tue Oct 16, 2018 12:09 pm
BaseContainer *bc = mDoc->GetDataInstance();
BaseContainer *sceneBC = bc->GetContainerInstance(ID_OCTANE_LIVEPLUGIN);

version = sceneBC ->GetLong(SET_OCTANE_VERSION, -1);


if(version>0 && version<PLG_VERSION) info("Scene created in plugin version "+LS(version));


3080400 is 3.08.4
4000016 is V4.00.0-RC6
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15969
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Re: How to detect octane version

Postby usitnikov » Tue Oct 16, 2018 12:27 pm

usitnikov Tue Oct 16, 2018 12:27 pm
Can you please write it on python, if it possible.
usitnikov
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Fri Sep 30, 2016 5:28 am

Re: How to detect octane version

Postby aoktar » Tue Oct 16, 2018 12:34 pm

aoktar Tue Oct 16, 2018 12:34 pm
usitnikov wrote:Can you please write it on python, if it possible.

Sorry not have time but you get it as start point.
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15969
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Re: How to detect octane version

Postby usitnikov » Fri Oct 19, 2018 9:32 am

usitnikov Fri Oct 19, 2018 9:32 am
aoktar wrote:
BaseContainer *bc = mDoc->GetDataInstance();
BaseContainer *sceneBC = bc->GetContainerInstance(ID_OCTANE_LIVEPLUGIN);

version = sceneBC ->GetLong(SET_OCTANE_VERSION, -1);


if(version>0 && version<PLG_VERSION) info("Scene created in plugin version "+LS(version));


3080400 is 3.08.4
4000016 is V4.00.0-RC6


I try this, not work. :(

Code: Select all
renderer_id = documents.GetActiveDocument().GetActiveRenderData()[c4d.RDATA_RENDERENGINE]
a = documents.GetActiveDocument().GetDataInstance()
b = a.GetContainerInstance(renderer_id)
b.GetLong(c4d.SET_OCTANE_VERSION, -1)


renderer_id plugin name:OctaneRenderer id:1029525

Any body can help me?
usitnikov
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Fri Sep 30, 2016 5:28 am

Re: How to detect octane version

Postby aoktar » Mon Oct 22, 2018 10:10 am

aoktar Mon Oct 22, 2018 10:10 am
here
Attachments
a1.jpg
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15969
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Re: How to detect octane version

Postby usitnikov » Mon Oct 22, 2018 11:10 am

usitnikov Mon Oct 22, 2018 11:10 am
Code: Select all
a = documents.GetActiveDocument().GetDataInstance()
b = a.GetContainerInstance(1029499)
b.GetLong(c4d.SET_OCTANE_VERSION, -1)


Work for me, thx.
usitnikov
Licensed Customer
Licensed Customer
 
Posts: 4
Joined: Fri Sep 30, 2016 5:28 am

Re: How to detect octane version

Postby aoktar » Mon Oct 22, 2018 11:13 am

aoktar Mon Oct 22, 2018 11:13 am
usitnikov wrote:
Code: Select all
a = documents.GetActiveDocument().GetDataInstance()
b = a.GetContainerInstance(1029499)
b.GetLong(c4d.SET_OCTANE_VERSION, -1)


Work for me, thx.

Here I defined the easiest ways for this and more....
viewtopic.php?f=87&t=56039&start=10#p348597
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15969
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Return to Maxon Cinema 4D


Who is online

Users browsing this forum: Bing [Bot] and 31 guests

Fri Apr 26, 2024 7:50 am [ UTC ]