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
This commit is contained in:
Jeroen Bakker 2019-05-23 12:29:55 +02:00
parent 07c48c9112
commit 08690be3b5
1 changed files with 14 additions and 15 deletions

View File

@ -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 (imf->imtype != R_IMF_IMTYPE_MULTILAYER) {
PropertyRNA *prop;
PointerRNA stereo3d_format_ptr;
if (RNA_boolean_get(ptr, "use_multiview")) {
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);
}
}