How to detect octane version

Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderators: ChrisHekman, aoktar

Post Reply
usitnikov
Licensed Customer
Posts: 4
Joined: Fri Sep 30, 2016 5:28 am

Hi guys, i can't found how get octane version from cinema4d python API, can you please help me in this question? :?:
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

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
usitnikov
Licensed Customer
Posts: 4
Joined: Fri Sep 30, 2016 5:28 am

Can you please write it on python, if it possible.
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

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
usitnikov
Licensed Customer
Posts: 4
Joined: Fri Sep 30, 2016 5:28 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?
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

here
Attachments
a1.jpg
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
usitnikov
Licensed Customer
Posts: 4
Joined: Fri Sep 30, 2016 5:28 am

Code: Select all

a = documents.GetActiveDocument().GetDataInstance()
b = a.GetContainerInstance(1029499)
b.GetLong(c4d.SET_OCTANE_VERSION, -1)
Work for me, thx.
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

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
Post Reply

Return to “Maxon Cinema 4D”