Area Light Camera Visibility Does Not Work Via Python

Sub forum for bug reports
Forum rules
Before posting a bug report, please check the following:
1. That the issue has not already been disclosed
2. That the issue is specific to this plugin, and not Octane in general (Try reproducing it in Standalone)
Bugs related to the Octane Engine itself should be posted into the Standalone Support sub-forum.


All bug reports should include the information below, along with a detailed description of the issue and steps to reproduce it.
A. Operating System, including version (i.e. Win 7, OSX 10.11.2, Ubuntu 14.04, etc.)
B. Graphics Card(s) model (i.e. GTX 580 - 3GB, TITAN, etc.)
C. RAM Capacity (i.e. 6 GB)
D. Nvidia driver version (i.e. 7.50, 7.5.22)
E. OctaneRender Standalone version, if installed (i.e. 2.24.2, 2.23, etc.)
F. OctaneRender plugin version (i.e. v2.25 - 2.21)
G. Host application version, including build number if available (i.e. 3ds Max 2016 Build 18.0)
Post Reply
User avatar
Seggy
Licensed Customer
Posts: 51
Joined: Wed Jun 26, 2013 11:10 pm

Hi,

If you change an Octane mesh lights' visibility via python, it does not work.

Tested under the custom Octane Blender build: v2023.1.3.28.15
Python command:

Code: Select all

bpy.data.objects["My Light"].octane.camera_visibility = False
I'd expect that to turn the light off and on when toggled like it does when you click on the checkbox in the GUI.
Note that via python you will not see the GUI change until you click off and back on to the object properties tab.

Cheers,
Simon.
linograndiotoy
OctaneRender Team
Posts: 1354
Joined: Thu Feb 01, 2018 7:10 pm

It looks like a general issue with Python commands updates. We'll look into that. Thanks!
linograndiotoy
OctaneRender Team
Posts: 1354
Joined: Thu Feb 01, 2018 7:10 pm

Regarding the viewport update issue, it stems from a limitation in Blender. Specifically, Blender does not automatically trigger an update for add-on attributes when they are modified through a script. To address this, you need to manually call an update function.

In your case, you can use bpy.context.object.update_tag() to trigger the necessary update and resolve the issue. If you are writing scripts, you can include this function at the end of your update function to ensure the viewport updates correctly.
Andreas_Resch
Posts: 319
Joined: Sat Jul 28, 2018 6:29 am

Yeah. I can confirm that. Had the same issue when writing my addon.
Post Reply

Return to “Bug Reports”