diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-23 13:29:55 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-05-23 15:17:14 +0300 |
commit | 08690be3b5b89e8dc806fa5af9335a39740bb9e0 (patch) | |
tree | 7e5e7759df657b1dc4423f0840d6f49febb14b5f /source/blender/editors/space_image | |
parent | 07c48c91126adc05dd4b34ed1e064586b4e90af8 (diff) |
Compositor: FileOutput
The File output node stores it settings locally, but the stereo settings
were not displayed, making users only able to use the default settings
of the node.
The cause of not displaying the buttons are was a NULL-pointer check in
`uiTemplateImageFormatViews`. The NULL pointer was used to check if
multiview was enabled. in case of the file output node this check was
performed by the node, so the nullpointer check could be ignored.
Reviewed By: brecht
Maniphest Tasks: T62767
Differential Revision: https://developer.blender.org/D4929
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index b32f5ef6d9e..26512cb232d 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -1155,25 +1155,24 @@ void uiTemplateImageFormatViews(uiLayout *layout, PointerRNA *imfptr, PointerRNA { ImageFormatData *imf = imfptr->data; - if (ptr == NULL) { - return; + if (ptr != NULL) { + uiItemR(layout, ptr, "use_multiview", 0, NULL, ICON_NONE); + if (!RNA_boolean_get(ptr, "use_multiview")) { + return; + } } - uiItemR(layout, ptr, "use_multiview", 0, NULL, ICON_NONE); - - if (RNA_boolean_get(ptr, "use_multiview")) { - if (imf->imtype != R_IMF_IMTYPE_MULTILAYER) { - PropertyRNA *prop; - PointerRNA stereo3d_format_ptr; + if (imf->imtype != R_IMF_IMTYPE_MULTILAYER) { + PropertyRNA *prop; + PointerRNA stereo3d_format_ptr; - prop = RNA_struct_find_property(imfptr, "stereo_3d_format"); - stereo3d_format_ptr = RNA_property_pointer_get(imfptr, prop); + prop = RNA_struct_find_property(imfptr, "stereo_3d_format"); + stereo3d_format_ptr = RNA_property_pointer_get(imfptr, prop); - uiTemplateViewsFormat(layout, imfptr, &stereo3d_format_ptr); - } - else { - uiTemplateViewsFormat(layout, imfptr, NULL); - } + uiTemplateViewsFormat(layout, imfptr, &stereo3d_format_ptr); + } + else { + uiTemplateViewsFormat(layout, imfptr, NULL); } } |