Revision: 28621
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28621
Author:   campbellbarton
Date:     2010-05-06 19:12:44 +0200 (Thu, 06 May 2010)

Log Message:
-----------
option to use the linked path or the local path for pointcache.
needed for sintels hair to be baked locally.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_object.py
    trunk/blender/release/scripts/ui/properties_physics_common.py
    trunk/blender/source/blender/blenkernel/intern/pointcache.c
    trunk/blender/source/blender/makesdna/DNA_object_force.h
    trunk/blender/source/blender/makesrna/intern/rna_object_force.c

Modified: trunk/blender/release/scripts/ui/properties_object.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_object.py       2010-05-06 
16:37:39 UTC (rev 28620)
+++ trunk/blender/release/scripts/ui/properties_object.py       2010-05-06 
17:12:44 UTC (rev 28621)
@@ -156,7 +156,7 @@
         wide_ui = context.region.width > narrowui
 
         split = layout.split(percentage=0.8, align=True)
-        split.operator("object.group_link", text="Link to Group")
+        split.operator("object.group_link", text="Add to Group")
         split.operator("object.group_add", text="", icon='ZOOMIN')
 
         # XXX, this is bad practice, yes, I wrote it :( - campbell

Modified: trunk/blender/release/scripts/ui/properties_physics_common.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_common.py       
2010-05-06 16:37:39 UTC (rev 28620)
+++ trunk/blender/release/scripts/ui/properties_physics_common.py       
2010-05-06 17:12:44 UTC (rev 28621)
@@ -73,6 +73,8 @@
             sub.prop(cache, "disk_cache")
             col.label(text=cache.info)
 
+            sub = col.column()
+            sub.prop(cache, "use_library_path", "Use Lib Path")
 
         layout.separator()
 

Modified: trunk/blender/source/blender/blenkernel/intern/pointcache.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/pointcache.c 2010-05-06 
16:37:39 UTC (rev 28620)
+++ trunk/blender/source/blender/blenkernel/intern/pointcache.c 2010-05-06 
17:12:44 UTC (rev 28621)
@@ -1076,7 +1076,7 @@
                char file[MAX_PTCACHE_PATH]; /* we dont want the dir, only the 
file */
                char *blendfilename;
 
-               blendfilename= (lib)? lib->filename: G.sce;
+               blendfilename= (lib && (pid->cache->flag & 
PTCACHE_IGNORE_LIBPATH)==0) ? lib->filename: G.sce;
 
                BLI_split_dirfile(blendfilename, NULL, file);
                i = strlen(file);

Modified: trunk/blender/source/blender/makesdna/DNA_object_force.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_object_force.h    2010-05-06 
16:37:39 UTC (rev 28620)
+++ trunk/blender/source/blender/makesdna/DNA_object_force.h    2010-05-06 
17:12:44 UTC (rev 28621)
@@ -365,6 +365,8 @@
 #define PTCACHE_FRAMES_SKIPPED         256
 #define PTCACHE_EXTERNAL                       512
 #define PTCACHE_READ_INFO                      1024
+/* dont use the filename of the blendfile the data is linked from (write a 
local cache) */
+#define PTCACHE_IGNORE_LIBPATH         2048
 
 /* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */
 #define PTCACHE_REDO_NEEDED                    258

Modified: trunk/blender/source/blender/makesrna/intern/rna_object_force.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_object_force.c     
2010-05-06 16:37:39 UTC (rev 28620)
+++ trunk/blender/source/blender/makesrna/intern/rna_object_force.c     
2010-05-06 17:12:44 UTC (rev 28621)
@@ -746,6 +746,11 @@
        RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_EXTERNAL);
        RNA_def_property_ui_text(prop, "External", "Read cache from an external 
location");
        RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
+    
+       prop= RNA_def_property(srna, "use_library_path", PROP_BOOLEAN, 
PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", 
PTCACHE_IGNORE_LIBPATH);
+       RNA_def_property_ui_text(prop, "Library Path", "Use this files path 
when library linked indo another file.");
+       RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
 
        prop= RNA_def_property(srna, "point_cache_list", PROP_COLLECTION, 
PROP_NONE);
        RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", 
"rna_iterator_listbase_next", "rna_iterator_listbase_end", 
"rna_iterator_listbase_get", 0, 0, 0);


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to