29 bpy_path_is_autoexec_doc,
30 ".. function:: is_autoexec(path, *, skip_overrides=False, canonicalize=False, "
31 "strip_filename=False)\n"
33 " Return false when a directory is excluded from running scripts automatically,\n"
34 " see :class:`bpy.types.PreferencesFilePaths.autoexec_paths`.\n"
36 " .. note:: The preference to enable automatic script execution & any command line\n"
37 " override are checked unless ``skip_overrides`` is set,\n"
38 " see :class:`bpy.types.PreferencesFilePaths.use_scripts_auto_execute`.\n"
40 " :param path: The directory to check, expected to end with a path separator,\n"
41 " must not be empty.\n"
42 " :type path: str | bytes\n"
43 " :param skip_overrides: Only check the excluded paths, skipping the preference to enable\n"
44 " automatic script execution & any command line override.\n"
45 " When false, the result is the default for \"Trusted Source\" when opening the path.\n"
46 " :type skip_overrides: bool\n"
47 " :param canonicalize: Resolve the path first,\n"
48 " disable when it's known to be resolved.\n"
49 " :type canonicalize: bool\n"
50 " :param strip_filename: Use the directory of `path`, otherwise it is a directory already.\n"
51 " :type strip_filename: bool\n"
52 " :return: True when blend-files in the directory are trusted to run scripts.\n"
57 bool skip_overrides =
false;
58 bool canonicalize =
false;
59 bool strip_filename =
false;
61 static const char *_keywords[] = {
62 "path",
"skip_overrides",
"canonicalize",
"strip_filename",
nullptr};
63 static _PyArg_Parser _parser = {
73 if (!_PyArg_ParseTupleAndKeywordsFast(args,
88 PyObject *
result =
nullptr;
89 if (path_data.
value_len == 0) [[unlikely]] {
90 PyErr_SetString(PyExc_ValueError,
"is_autoexec: path must not be empty");
96 .skip_overrides = skip_overrides,
97 .canonicalize = canonicalize,
98 .strip_filename = strip_filename,
100 result = PyBool_FromLong(is_autoexec);
110 METH_VARARGS | METH_KEYWORDS,
111 bpy_path_is_autoexec_doc},
112 {
nullptr,
nullptr, 0,
nullptr},
PyObject * PyC_FrozenSetFromStrings(const char **strings)
int PyC_ParseBool(PyObject *o, void *p)
static PyObject * bpy_path_is_autoexec(PyObject *, PyObject *args, PyObject *kw)
PyDoc_STRVAR(bpy_bm_new_doc, ".. function:: new(*, use_operators=True)\n" "\n" " :param use_operators: Support calling operators in :mod:`bmesh.ops` (uses some " "extra memory per vert/edge/face).\n" " :type use_operators: bool\n" " :return: Return a new, empty BMesh.\n" " :rtype: :class:`bmesh.types.BMesh`\n")
const char * imb_ext_image[]
const char * imb_ext_audio[]
const char * imb_ext_movie[]
PyObject * BPyInit__bpy_path()
int PyC_ParseUnicodeAsBytesAndSize(PyObject *o, void *p)
bool BKE_autoexec_default_trust_source(const char *path, const AutoExec_Params ¶ms)
static PyMethodDef _bpy_path_methods[]
static PyModuleDef _bpy_path_module_def