UI: Disable "Render Active Object" for previews of incompatible object types
Object types like empties, lamps and cameras don't have geometry that can be
rendered by regular render engines. Attempting to render them for an asset
preview doesn't work.
36c5606fc3 already fixed a crash in this situation, resulting in an empty
preview. But better to entirely disallow this action, with useful feedback in
the UI.
This commit is contained in:
@@ -60,6 +60,10 @@ static bool lib_id_preview_editing_poll(bContext *C)
|
||||
CTX_wm_operator_poll_msg_set(C, "Data-block does not support previews");
|
||||
return false;
|
||||
}
|
||||
if (!ED_preview_id_is_supported(id)) {
|
||||
CTX_wm_operator_poll_msg_set(C, "Object type does not support previews");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user