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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-16 20:10:11 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-16 20:10:11 +0400
commitb4d453212ae2142d537f0824b3ff0627fca85277 (patch)
tree1e77c34be7e8dbeb66bd2bd35a5445f6d0a645c2 /intern/cycles/blender/blender_util.h
parentcb09ad43e1a26f1c742d310e27e562c8084c0194 (diff)
Fix #29292: cycles not loading linked image datablocks correctly.
Diffstat (limited to 'intern/cycles/blender/blender_util.h')
-rw-r--r--intern/cycles/blender/blender_util.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index c5cceff6242..ff6d55c6f3e 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -176,7 +176,13 @@ static inline string get_enum_identifier(PointerRNA& ptr, const char *name)
static inline string blender_absolute_path(BL::BlendData b_data, BL::ID b_id, const string& path)
{
if(path.size() >= 2 && path[0] == '/' && path[1] == '/') {
- string dirname = (b_id.library())? b_id.library().filepath(): b_data.filepath();
+ string dirname;
+
+ if(b_id.library())
+ dirname = blender_absolute_path(b_data, b_id.library(), b_id.library().filepath());
+ else
+ dirname = b_data.filepath();
+
return path_join(path_dirname(dirname), path.substr(2));
}