minor improvements to libpython and setpath.sh
parent
454ad0bf54
commit
df12c58e77
10
setpath.sh
10
setpath.sh
|
@ -7,6 +7,16 @@
|
|||
# source setpath.sh for Zsh or Bash
|
||||
#
|
||||
|
||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
echo "The setpath.sh script must be sourced, not executed. In other words, run\n"
|
||||
echo "$ source setpath.sh\n"
|
||||
echo "If you wish to use the Mitsuba Python bindings, you should also specify"
|
||||
echo "your Python version /before/ sourcing setpath.sh, e.g.\n"
|
||||
echo "$ export MITSUBA_PYVER=3.3"
|
||||
echo "$ source setpath.sh"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$BASH_VERSION" ]; then
|
||||
MITSUBA_DIR=$(dirname "$BASH_SOURCE")
|
||||
export MITSUBA_DIR=$(builtin cd "$MITSUBA_DIR"; builtin pwd)
|
||||
|
|
|
@ -75,7 +75,11 @@ static bp::tuple shape_getNormalDerivative(const Shape *shape, const Intersectio
|
|||
return bp::make_tuple(dpdu, dpdv);
|
||||
}
|
||||
|
||||
static ref<Scene> loadScene(const fs::path &filename, const StringMap ¶ms) {
|
||||
static ref<Scene> loadScene1(const fs::path &filename) {
|
||||
return SceneHandler::loadScene(filename);
|
||||
}
|
||||
|
||||
static ref<Scene> loadScene2(const fs::path &filename, const StringMap ¶ms) {
|
||||
SceneHandler::ParameterMap pmap;
|
||||
for (StringMap::const_iterator it = params.begin(); it != params.end(); ++it)
|
||||
pmap[it->first]=it->second;
|
||||
|
@ -256,7 +260,8 @@ void export_render() {
|
|||
.def("request2DArray", &Sampler::request2DArray);
|
||||
|
||||
bp::class_<SceneHandler, boost::noncopyable>("SceneHandler", bp::no_init)
|
||||
.def("loadScene", &loadScene, BP_RETURN_VALUE)
|
||||
.def("loadScene", &loadScene1, BP_RETURN_VALUE)
|
||||
.def("loadScene", &loadScene2, BP_RETURN_VALUE)
|
||||
.staticmethod("loadScene");
|
||||
|
||||
BP_CLASS(RenderJob, Thread, (bp::init<const std::string &, Scene *, RenderQueue *>()))
|
||||
|
|
Loading…
Reference in New Issue