Page 1 of 1

How to detect octane version

Posted: Tue Oct 16, 2018 12:01 pm
by usitnikov
Hi guys, i can't found how get octane version from cinema4d python API, can you please help me in this question? :?:

Re: How to detect octane version

Posted: Tue Oct 16, 2018 12:09 pm
by aoktar
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

Re: How to detect octane version

Posted: Tue Oct 16, 2018 12:27 pm
by usitnikov
Can you please write it on python, if it possible.

Re: How to detect octane version

Posted: Tue Oct 16, 2018 12:34 pm
by aoktar
usitnikov wrote:Can you please write it on python, if it possible.
Sorry not have time but you get it as start point.

Re: How to detect octane version

Posted: Fri Oct 19, 2018 9:32 am
by usitnikov
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?

Re: How to detect octane version

Posted: Mon Oct 22, 2018 10:10 am
by aoktar
here

Re: How to detect octane version

Posted: Mon Oct 22, 2018 11:10 am
by usitnikov

Code: Select all

a = documents.GetActiveDocument().GetDataInstance()
b = a.GetContainerInstance(1029499)
b.GetLong(c4d.SET_OCTANE_VERSION, -1)
Work for me, thx.

Re: How to detect octane version

Posted: Mon Oct 22, 2018 11:13 am
by aoktar
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