2023-08-16 00:20:26 +10:00
|
|
|
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
2023-05-31 16:19:06 +02:00
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
2011-02-27 20:10:08 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup pythonintern
|
2011-02-27 20:10:08 +00:00
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#pragma once
|
2009-06-17 20:33:34 +00:00
|
|
|
|
2025-01-07 12:39:13 +01:00
|
|
|
#include <Python.h>
|
|
|
|
|
|
2021-12-02 17:24:04 +11:00
|
|
|
/**
|
|
|
|
|
* For faster execution we keep a special dictionary for py-drivers, with
|
|
|
|
|
* the needed modules and aliases.
|
|
|
|
|
*/
|
2025-06-28 00:15:23 +00:00
|
|
|
[[nodiscard]] int bpy_pydriver_create_dict();
|
2021-12-02 17:24:04 +11:00
|
|
|
/**
|
|
|
|
|
* For PyDrivers
|
|
|
|
|
* (drivers using one-line Python expressions to express relationships between targets).
|
|
|
|
|
*/
|
2011-02-14 04:15:25 +00:00
|
|
|
extern PyObject *bpy_pydriver_Dict;
|
2009-06-17 20:33:34 +00:00
|
|
|
|
2022-07-12 16:05:13 +10:00
|
|
|
extern bool BPY_driver_secure_bytecode_test_ex(PyObject *expr_code,
|
2023-07-21 02:18:59 +02:00
|
|
|
PyObject *py_namespace_array[],
|
2022-07-12 16:05:13 +10:00
|
|
|
const bool verbose,
|
|
|
|
|
const char *error_prefix);
|
|
|
|
|
extern bool BPY_driver_secure_bytecode_test(PyObject *expr_code,
|
2023-07-21 02:18:59 +02:00
|
|
|
PyObject *py_namespace,
|
2022-07-12 16:05:13 +10:00
|
|
|
const bool verbose);
|