|
Blender V4.5
|
#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 2002 of file MANTA_main.cpp.
References callPythonFunction(), manta_main_module, and MANTA::with_debug.
Referenced by callPythonFunction(), 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 1201 of file MANTA_main.cpp.
References escapePath(), and result.
Referenced by MANTA::bakeData(), MANTA::bakeGuiding(), MANTA::bakeMesh(), MANTA::bakeNoise(), MANTA::bakeParticles(), escapePath(), 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.
References getBooleanString().
Referenced by getBooleanString().
|
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, getCacheFileEnding(), and MANTA::with_debug.
Referenced by MANTA::bakeData(), MANTA::bakeGuiding(), MANTA::bakeMesh(), MANTA::bakeNoise(), MANTA::bakeParticles(), getCacheFileEnding(), 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 2121 of file MANTA_main.cpp.
References callPythonFunction(), getPointer(), pyObjectToPointer(), and T.
Referenced by getPointer(), and MANTA::updatePointers().
|
static |
Definition at line 610 of file MANTA_main.cpp.
References manta_python_main_module_activate().
Referenced by manta_python_main_module_activate().
|
static |
Definition at line 622 of file MANTA_main.cpp.
References manta_python_main_module_backup().
Referenced by manta_python_main_module_backup().
|
static |
Definition at line 645 of file MANTA_main.cpp.
References manta_main_module, and manta_python_main_module_clear().
Referenced by manta_python_main_module_clear().
|
static |
Copied from PyC_DefaultNameSpace in Blender. with some differences:
Definition at line 596 of file MANTA_main.cpp.
References manta_python_main_module_create().
Referenced by manta_python_main_module_create(), and manta_python_main_module_ensure().
|
static |
Definition at line 653 of file MANTA_main.cpp.
References manta_main_module, manta_python_main_module_create(), and manta_python_main_module_ensure().
Referenced by manta_python_main_module_ensure().
|
static |
Definition at line 629 of file MANTA_main.cpp.
References manta_python_main_module_restore().
Referenced by manta_python_main_module_restore().
|
static |
Definition at line 2087 of file MANTA_main.cpp.
References pyObjectToDouble(), and result.
Referenced by MANTA::getTimestep(), and pyObjectToDouble().
|
static |
Definition at line 2106 of file MANTA_main.cpp.
References pyObjectToLong(), and result.
Referenced by MANTA::getFrame(), and pyObjectToLong().
|
static |
Definition at line 2061 of file MANTA_main.cpp.
References in, pyObjectToPointer(), result, and str.
Referenced by getPointer(), and pyObjectToPointer().
|
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().