Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/blender/python.cpp')
-rw-r--r--intern/cycles/blender/python.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/intern/cycles/blender/python.cpp b/intern/cycles/blender/python.cpp
index 8b2b331f73e..9e42f6b8b60 100644
--- a/intern/cycles/blender/python.cpp
+++ b/intern/cycles/blender/python.cpp
@@ -15,6 +15,7 @@
#include "util/debug.h"
#include "util/foreach.h"
+#include "util/guiding.h"
#include "util/log.h"
#include "util/md5.h"
#include "util/opengl.h"
@@ -59,8 +60,6 @@ static void debug_flags_sync_from_scene(BL::Scene b_scene)
{
DebugFlagsRef flags = DebugFlags();
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
- /* Synchronize shared flags. */
- flags.viewport_static_bvh = get_enum(cscene, "debug_bvh_type");
/* Synchronize CPU flags. */
flags.cpu.avx2 = get_boolean(cscene, "debug_use_cpu_avx2");
flags.cpu.avx = get_boolean(cscene, "debug_use_cpu_avx");
@@ -140,8 +139,6 @@ static PyObject *init_func(PyObject * /*self*/, PyObject *args)
BlenderSession::headless = headless;
- DebugFlags().running_inside_blender = true;
-
Py_RETURN_NONE;
}
@@ -538,7 +535,7 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args)
socket_type = "NodeSocketBool";
data_type = BL::NodeSocket::type_BOOLEAN;
if (param->validdefault) {
- default_boolean = (bool)param->idefault[0];
+ default_boolean = bool(param->idefault[0]);
}
}
else {
@@ -1012,6 +1009,15 @@ void *CCL_python_module_init()
PyModule_AddStringConstant(mod, "osl_version_string", "unknown");
#endif
+ if (ccl::guiding_supported()) {
+ PyModule_AddObject(mod, "with_path_guiding", Py_True);
+ Py_INCREF(Py_True);
+ }
+ else {
+ PyModule_AddObject(mod, "with_path_guiding", Py_False);
+ Py_INCREF(Py_False);
+ }
+
#ifdef WITH_EMBREE
PyModule_AddObject(mod, "with_embree", Py_True);
Py_INCREF(Py_True);