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/util/util_path.cpp')
-rw-r--r--intern/cycles/util/util_path.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index 5df262fcbbb..cd3067f7650 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-#include "util_debug.h"
-#include "util_md5.h"
-#include "util_path.h"
-#include "util_string.h"
+#include "util/util_debug.h"
+#include "util/util_md5.h"
+#include "util/util_path.h"
+#include "util/util_string.h"
#include <OpenImageIO/filesystem.h>
#include <OpenImageIO/strutil.h>
@@ -45,7 +45,7 @@ OIIO_NAMESPACE_USING
# include <shlwapi.h>
#endif
-#include "util_windows.h"
+#include "util/util_windows.h"
CCL_NAMESPACE_BEGIN
@@ -320,17 +320,18 @@ static char *path_specials(const string& sub)
{
static bool env_init = false;
static char *env_shader_path;
- static char *env_kernel_path;
+ static char *env_source_path;
if(!env_init) {
env_shader_path = getenv("CYCLES_SHADER_PATH");
- env_kernel_path = getenv("CYCLES_KERNEL_PATH");
+ /* NOTE: It is KERNEL in env variable for compatibility reasons. */
+ env_source_path = getenv("CYCLES_KERNEL_PATH");
env_init = true;
}
if(env_shader_path != NULL && sub == "shader") {
return env_shader_path;
}
- else if(env_shader_path != NULL && sub == "kernel") {
- return env_kernel_path;
+ else if(env_shader_path != NULL && sub == "source") {
+ return env_source_path;
}
return NULL;
}
@@ -814,7 +815,7 @@ string path_source_replace_includes(const string& source,
/* Use line directives for better error messages. */
line = line_directive(filepath, 1)
+ token.replace(0, n_end + 1, "\n" + text + "\n")
- + line_directive(path_join(path, source_filename), i);
+ + line_directive(path_join(path, source_filename), i + 1);
}
}
}