Cleanup: use doxy sections, update comments missed from refactor

This commit is contained in:
2020-07-24 13:58:32 +10:00
parent 698af2e774
commit ba99b12287
2 changed files with 204 additions and 179 deletions

View File

@@ -411,8 +411,10 @@ static PyObject *bpy_pydriver_depsgraph_as_pyobject(struct Depsgraph *depsgraph)
return pyrna_struct_CreatePyObject(&depsgraph_ptr);
}
/* Adds a variable 'depsgraph' to the driver variables. This can then be used to obtain evaluated
* datablocks, and the current view layer and scene. See T75553. */
/**
* Adds a variable 'depsgraph' to the driver variables. This can then be used to obtain evaluated
* data-blocks, and the current view layer and scene. See T75553.
*/
static void bpy_pydriver_namespace_add_depsgraph(PyObject *driver_vars,
struct Depsgraph *depsgraph)
{
@@ -428,17 +430,18 @@ static void bpy_pydriver_namespace_add_depsgraph(PyObject *driver_vars,
}
}
/* This evals py driver expressions, 'expr' is a Python expression that
* should evaluate to a float number, which is returned.
/**
* This evaluates Python driver expressions, `driver_orig->expression`
* is a Python expression that should evaluate to a float number, which is returned.
*
* (old)note: PyGILState_Ensure() isn't always called because python can call
* the bake operator which intern starts a thread which calls scene update
* which does a driver update. to avoid a deadlock check PyC_IsInterpreterActive()
* if PyGILState_Ensure() is needed - see [#27683]
* which does a driver update. to avoid a deadlock check #PyC_IsInterpreterActive()
* if #PyGILState_Ensure() is needed, see T27683.
*
* (new)note: checking if python is running is not threadsafe [#28114]
* (new)note: checking if python is running is not thread-safe T28114
* now release the GIL on python operator execution instead, using
* PyEval_SaveThread() / PyEval_RestoreThread() so we don't lock up blender.
* #PyEval_SaveThread() / #PyEval_RestoreThread() so we don't lock up blender.
*
* For copy-on-write we always cache expressions and write errors in the
* original driver, otherwise these would get freed while editing. Due to