workaround [#25845] Empty UI panels
- now writing to RNA is disabled when inside render() call. - disallow calling operators when writes are disabled. Rendering runs in a thread so running operators from the thread is not safe unless rendering becomes a blocking operator again.
This commit is contained in:
@@ -138,6 +138,11 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!pyrna_write_check()) {
|
||||
PyErr_Format(PyExc_SystemError, "Calling operator \"bpy.ops.%s\" error, can't modify blend data in this state (drawing/rendering)", opname);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(context_str) {
|
||||
if(RNA_enum_value_from_id(operator_context_items, context_str, &context)==0) {
|
||||
char *enum_str= BPy_enum_as_string(operator_context_items);
|
||||
|
||||
Reference in New Issue
Block a user