Python render setting commands are incorrect in the Info view #49343

Closed
opened 2016-09-13 21:26:18 +02:00 by Justin Jensen · 8 comments

This applies to at least 2.77a and 2.78rc1

When I change certain render settings using the GUI, the Python command for that render setting shows up in the Info area. However, when I open up a console and try to duplicate these commands, I get the following error:

Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
AttributeError: 'Scene' object has no attribute 'file_format'

I haven't done a thorough search for this mismatch, but it's incorrect for the following settings:
bpy.context.scene.file_format
bpy.context.scene.color_depth
bpy.context.scene.color_mode
bpy.context.scene.exr_codec
bpy.context.scene.compression
bpy.context.scene.use_preview
bpy.context.scene.use_zbuffer

Thanks to this stackexchange post , I was able to figure out that the settings actually live in

bpy.context.scene.render.image_settings
This applies to at least 2.77a and 2.78rc1 When I change certain render settings using the GUI, the Python command for that render setting shows up in the Info area. However, when I open up a console and try to duplicate these commands, I get the following error: ``` Traceback (most recent call last): File "<blender_console>", line 1, in <module> AttributeError: 'Scene' object has no attribute 'file_format' ``` I haven't done a thorough search for this mismatch, but it's incorrect for the following settings: bpy.context.scene.file_format bpy.context.scene.color_depth bpy.context.scene.color_mode bpy.context.scene.exr_codec bpy.context.scene.compression bpy.context.scene.use_preview bpy.context.scene.use_zbuffer Thanks to [this stackexchange post ](http://blender.stackexchange.com/a/3062/1170), I was able to figure out that the settings actually live in ``` bpy.context.scene.render.image_settings
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @JustinJensen

Added subscriber: @JustinJensen
Philipp Oeser self-assigned this 2016-09-14 07:40:40 +02:00

Added subscriber: @mont29

Added subscriber: @mont29

Note that our code to guess full RNA path is not always working fully… should output a ... in path then, though, to indicate it could not fully resolve it.

Note that our code to guess full RNA path is not always working fully… should output a ... in path then, though, to indicate it could not fully resolve it.
Member

ImageFormatSettings were not setting their rna struct path, so a possible fix here D2228: possible fix for #49343

ImageFormatSettings were not setting their rna struct path, so a possible fix here [D2228: possible fix for #49343](https://archive.blender.org/developer/D2228)
Author

In #49343#391647, @mont29 wrote:
Note that our code to guess full RNA path is not always working fully… should output a ... in path then, though, to indicate it could not fully resolve it.

info_bug_screenshot.png

Yeah, I noticed that the tooltips put the '...' in there. However, as this screenshot shows, the Info area doesn't do the '...', so it leads me to believe that the settings are found in bpy.context.scene instead of bpy.context.scene.render.image_settings

> In #49343#391647, @mont29 wrote: > Note that our code to guess full RNA path is not always working fully… should output a ... in path then, though, to indicate it could not fully resolve it. ![info_bug_screenshot.png](https://archive.blender.org/developer/F360005/info_bug_screenshot.png) Yeah, I noticed that the tooltips put the '...' in there. However, as this screenshot shows, the Info area doesn't do the '...', so it leads me to believe that the settings are found in bpy.context.scene instead of bpy.context.scene.render.image_settings

This issue was referenced by blender/blender@f64aa4e0af

This issue was referenced by blender/blender@f64aa4e0afc71ccadc3fb0faea090a1f42cd7b35

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 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#49343
No description provided.