API object.hide_render flag and its relation to collection visibility inconsistent #58823

Closed
opened 2018-12-05 21:41:34 +01:00 by Paul Melis · 5 comments

System Information
Operating system: Arch Linux
Graphics card: GTX 970

Blender Version
Broken: blender-2.80-26d5a3625ed-linux-glibc224-x86_64

Short description of error

According to https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Scene_and_Object_API#View_Layer_.26_Collection

collection hide status also matters in 2.8x. An object only linked in hidden collections will always be hidden, regardless of its own flag setting. This is similar to hiding a layer in 2.7x.

This seems to suggest that (when having a single collection and some object in it) setting the collection to hidden for rendering should hide the object for rendering as well. But when I disable the collection for rendering I still get the object's value for obj.hide_render and not True.

Or am I misinterpreting the release notes?

Exact steps for others to reproduce the error

See attached scene. Cube is visible for render, but its parent collection is not. Checking the hide_render flag of Cube gives False, while I would expect True.

**System Information** Operating system: Arch Linux Graphics card: GTX 970 **Blender Version** Broken: blender-2.80-26d5a3625ed-linux-glibc224-x86_64 **Short description of error** According to https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Scene_and_Object_API#View_Layer_.26_Collection > collection hide status also matters in 2.8x. An object only linked in hidden collections will always be hidden, regardless of its own flag setting. This is similar to hiding a layer in 2.7x. This seems to suggest that (when having a single collection and some object in it) setting the collection to hidden for rendering should hide the object for rendering as well. But when I disable the collection for rendering I still get the object's value for `obj.hide_render` and not `True`. Or am I misinterpreting the release notes? **Exact steps for others to reproduce the error** See attached scene. Cube is visible for render, but its parent collection is not. Checking the `hide_render` flag of Cube gives `False`, while I would expect `True`.
Author

Added subscriber: @PaulMelis

Added subscriber: @PaulMelis
Author
[collections.blend](https://archive.blender.org/developer/F5840751/collections.blend)

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2018-12-05 23:05:48 +01:00

object.hide_render does not tell you if the object is hidden, it only returns the value of the property as set by the user. This is the same as in 2.7x.

To find out which objects are visible in the render, you can loop over depsgraph.object_instances.

`object.hide_render` does not tell you if the object is hidden, it only returns the value of the property as set by the user. This is the same as in 2.7x. To find out which objects are visible in the render, you can loop over `depsgraph.object_instances`.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#58823
No description provided.