|
Blender V5.0
|
#include <algorithm>#include <fstream>#include <iostream>#include <sstream>#include <zlib.h>#include <Python.h>#include <manta.h>#include "MANTA_main.h"#include "fluid_script.h"#include "liquid_script.h"#include "smoke_script.h"#include "BLI_fileops.h"#include "BLI_path_utils.hh"#include "BLI_utildefines.h"#include "DNA_fluid_types.h"#include "DNA_modifier_types.h"Go to the source code of this file.
Functions | |
| static PyObject * | manta_python_main_module_create (const char *filename) |
| static void | manta_python_main_module_activate (PyObject *mod_main) |
| static void | manta_python_main_module_backup (PyObject **r_main_mod) |
| static void | manta_python_main_module_restore (PyObject *main_mod) |
| static void | manta_python_main_module_clear () |
| static PyObject * | manta_python_main_module_ensure () |
| static string | getCacheFileEnding (char cache_format) |
| static string | getBooleanString (int value) |
| static string | escapePath (string const &s) |
| static PyObject * | callPythonFunction (string varName, string functionName, bool isAttribute=false) |
| static void * | pyObjectToPointer (PyObject *inputObject) |
| static double | pyObjectToDouble (PyObject *inputObject) |
| static long | pyObjectToLong (PyObject *inputObject) |
| template<class T> | |
| static T * | getPointer (string pyObjectName, string pyFunctionName) |
Variables | |
| static PyObject * | manta_main_module = nullptr |
|
static |
Definition at line 2001 of file MANTA_main.cpp.
References manta_main_module, Py_DECREF(), and MANTA::with_debug.
Referenced by MANTA::getFrame(), getPointer(), and MANTA::getTimestep().
|
static |
Dirty hack: Needed to format paths from python code that is run via #PyRun_String.
Definition at line 1200 of file MANTA_main.cpp.
References result.
Referenced by MANTA::bakeData(), MANTA::bakeGuiding(), MANTA::bakeMesh(), MANTA::bakeNoise(), MANTA::bakeParticles(), MANTA::readData(), MANTA::readGuiding(), MANTA::readMesh(), MANTA::readNoise(), MANTA::readParticles(), MANTA::writeData(), and MANTA::writeNoise().
|
static |
Definition at line 756 of file MANTA_main.cpp.
|
static |
Definition at line 732 of file MANTA_main.cpp.
References FLUID_DOMAIN_EXTENSION_BINOBJ, FLUID_DOMAIN_EXTENSION_OBJ, FLUID_DOMAIN_EXTENSION_OPENVDB, FLUID_DOMAIN_EXTENSION_RAW, FLUID_DOMAIN_EXTENSION_UNI, FLUID_DOMAIN_FILE_BIN_OBJECT, FLUID_DOMAIN_FILE_OBJECT, FLUID_DOMAIN_FILE_OPENVDB, FLUID_DOMAIN_FILE_RAW, FLUID_DOMAIN_FILE_UNI, and MANTA::with_debug.
Referenced by MANTA::bakeData(), MANTA::bakeGuiding(), MANTA::bakeMesh(), MANTA::bakeNoise(), MANTA::bakeParticles(), MANTA::hasData(), MANTA::hasGuiding(), MANTA::hasMesh(), MANTA::hasNoise(), MANTA::hasParticles(), MANTA::readData(), MANTA::readGuiding(), MANTA::readMesh(), MANTA::readNoise(), MANTA::readParticles(), MANTA::writeData(), and MANTA::writeNoise().
Definition at line 2120 of file MANTA_main.cpp.
References callPythonFunction(), pyObjectToPointer(), and T.
Referenced by MANTA::updatePointers().
|
static |
Definition at line 610 of file MANTA_main.cpp.
|
static |
Definition at line 622 of file MANTA_main.cpp.
|
static |
Definition at line 645 of file MANTA_main.cpp.
References manta_main_module, and Py_DECREF().
|
static |
Copied from PyC_DefaultNameSpace in Blender. with some differences:
Definition at line 596 of file MANTA_main.cpp.
Referenced by manta_python_main_module_ensure().
|
static |
Definition at line 653 of file MANTA_main.cpp.
References manta_main_module, and manta_python_main_module_create().
|
static |
Definition at line 629 of file MANTA_main.cpp.
|
static |
Definition at line 2086 of file MANTA_main.cpp.
References Py_DECREF(), and result.
Referenced by MANTA::getTimestep().
|
static |
Definition at line 2105 of file MANTA_main.cpp.
References Py_DECREF(), and result.
Referenced by MANTA::getFrame().
|
static |
Definition at line 2060 of file MANTA_main.cpp.
References in, Py_DECREF(), result, and str.
Referenced by getPointer().
|
static |
Mantaflow stores many variables in the globals() dict of the main module. To be able to access these variables, the same main module has to be used every time.
Unfortunately, we also depend on the fact that mantaflow dumps variables into this module using #PyRun_String. So we can't easily create a separate module without changing mantaflow.
Definition at line 643 of file MANTA_main.cpp.
Referenced by callPythonFunction(), manta_python_main_module_clear(), and manta_python_main_module_ensure().