Commit: 56cb8efa41d255aa09ce5051c142eaefb2ea2422
Author: Kévin Dietrich
Date:   Mon Jun 20 14:10:47 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB56cb8efa41d255aa09ce5051c142eaefb2ea2422

Add missing CacheFile ID block handling code.

===================================================================

M       source/blender/blenkernel/intern/bpath.c
M       source/blender/blenkernel/intern/idcode.c
M       source/blender/blenkernel/intern/library.c
M       source/blender/blentranslation/BLT_translation.h
M       source/blender/editors/space_file/filesel.c
M       source/blender/makesdna/DNA_ID.h
M       source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/source/blender/blenkernel/intern/bpath.c 
b/source/blender/blenkernel/intern/bpath.c
index 76544e5..9e73128 100644
--- a/source/blender/blenkernel/intern/bpath.c
+++ b/source/blender/blenkernel/intern/bpath.c
@@ -48,6 +48,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "DNA_brush_types.h"
+#include "DNA_cachefile_types.h"
 #include "DNA_image_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_modifier_types.h"
@@ -653,6 +654,12 @@ void BKE_bpath_traverse_id(Main *bmain, ID *id, 
BPathVisitor visit_cb, const int
                        rewrite_path_fixed(clip->name, visit_cb, absbase, 
bpath_user_data);
                        break;
                }
+               case ID_CF:
+               {
+                       CacheFile *cache_file = (CacheFile *)id;
+                       rewrite_path_fixed(cache_file->filepath, visit_cb, 
absbase, bpath_user_data);
+                       break;
+               }
                default:
                        /* Nothing to do for other IDs that don't contain file 
paths. */
                        break;
diff --git a/source/blender/blenkernel/intern/idcode.c 
b/source/blender/blenkernel/intern/idcode.c
index 431f110..0ae8955 100644
--- a/source/blender/blenkernel/intern/idcode.c
+++ b/source/blender/blenkernel/intern/idcode.c
@@ -185,6 +185,7 @@ int BKE_idcode_to_idfilter(const short idcode)
                CASE_IDFILTER(AR);
                CASE_IDFILTER(BR);
                CASE_IDFILTER(CA);
+               CASE_IDFILTER(CF);
                CASE_IDFILTER(CU);
                CASE_IDFILTER(GD);
                CASE_IDFILTER(GR);
@@ -228,6 +229,7 @@ short BKE_idcode_from_idfilter(const int idfilter)
                CASE_IDFILTER(AR);
                CASE_IDFILTER(BR);
                CASE_IDFILTER(CA);
+               CASE_IDFILTER(CF);
                CASE_IDFILTER(CU);
                CASE_IDFILTER(GD);
                CASE_IDFILTER(GR);
diff --git a/source/blender/blenkernel/intern/library.c 
b/source/blender/blenkernel/intern/library.c
index 43b3653..622eb59 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -359,6 +359,8 @@ bool id_make_local(ID *id, bool test)
                        return false; /* not implemented */
                case ID_LS:
                        return false; /* not implemented */
+               case ID_CF:
+                       return false;  /* not implemented */
        }
 
        return false;
@@ -459,6 +461,8 @@ bool id_copy(ID *id, ID **newid, bool test)
                case ID_LS:
                        if (!test) *newid = (ID *)BKE_linestyle_copy(G.main, 
(FreestyleLineStyle *)id);
                        return true;
+               case ID_CF:
+                       return false;  /* not implemented */
        }
        
        return false;
diff --git a/source/blender/blentranslation/BLT_translation.h 
b/source/blender/blentranslation/BLT_translation.h
index e171506..1d76077 100644
--- a/source/blender/blentranslation/BLT_translation.h
+++ b/source/blender/blentranslation/BLT_translation.h
@@ -172,6 +172,7 @@ typedef struct {
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ARMATURE, "id_armature"),      
                                           \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_BRUSH, "id_brush"),            
                                           \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CAMERA, "id_camera"),          
                                           \
+       BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CACHEFILE, "id_cachefile"),    
                                           \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CURVE, "id_curve"),            
                                           \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, 
"id_fs_linestyle"),                                   \
        BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_GPENCIL, "id_gpencil"),        
                                           \
diff --git a/source/blender/editors/space_file/filesel.c 
b/source/blender/editors/space_file/filesel.c
index 7035dd0..8ba9944 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -215,7 +215,7 @@ short ED_fileselect_set_params(SpaceFile *sfile)
                                    FILTER_ID_GR | FILTER_ID_IM | FILTER_ID_LA 
| FILTER_ID_LS | FILTER_ID_LT | FILTER_ID_MA |
                                    FILTER_ID_MB | FILTER_ID_MC | FILTER_ID_ME 
| FILTER_ID_MSK | FILTER_ID_NT | FILTER_ID_OB |
                                    FILTER_ID_PA | FILTER_ID_PAL | FILTER_ID_PC 
| FILTER_ID_SCE | FILTER_ID_SPK | FILTER_ID_SO |
-                                   FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF 
| FILTER_ID_WO;
+                                   FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF 
| FILTER_ID_WO | FILTER_ID_CF;
 
                if (U.uiflag & USER_HIDE_DOT) {
                        params->flag |= FILE_HIDE_DOT;
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 23fb3e5..6a370bf 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -370,6 +370,7 @@ enum {
        FILTER_ID_VF        = (1 << 25),
        FILTER_ID_WO        = (1 << 26),
        FILTER_ID_PA        = (1 << 27),
+       FILTER_ID_CF        = (1 << 28),
 };
 
 #ifdef __cplusplus
diff --git a/source/blender/makesrna/intern/rna_space.c 
b/source/blender/makesrna/intern/rna_space.c
index 2c9ebdd..cbd06ea 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -3791,6 +3791,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
                {FILTER_ID_AR, "ARMATURE", ICON_ARMATURE_DATA, "Armatures", 
"Show/hide Armature data-blocks"},
                {FILTER_ID_BR, "BRUSH", ICON_BRUSH_DATA, "Brushes", "Show/hide 
Brushes data-blocks"},
                {FILTER_ID_CA, "CAMERA", ICON_CAMERA_DATA, "Cameras", 
"Show/hide Camera data-blocks"},
+               {FILTER_ID_CF, "CACHEFILE", ICON_FILE, "Cache Files", 
"Show/hide Cache File data-blocks"},
                {FILTER_ID_CU, "CURVE", ICON_CURVE_DATA, "Curves", "Show/hide 
Curve data-blocks"},
                {FILTER_ID_GD, "GREASE_PENCIL", ICON_GREASEPENCIL, "Grease 
Pencil", "Show/hide Grease pencil data-blocks"},
                {FILTER_ID_GR, "GROUP", ICON_GROUP, "Groups", "Show/hide Group 
data-blocks"},
@@ -3836,7 +3837,7 @@ static void rna_def_fileselect_params(BlenderRNA *brna)
             "IMAGE", ICON_IMAGE_DATA, "Images & Sounds", "Show/hide images, 
movie clips, sounds and masks"},
                {FILTER_ID_CA | FILTER_ID_LA | FILTER_ID_SPK | FILTER_ID_WO,
             "ENVIRONMENT", ICON_WORLD_DATA, "Environment", "Show/hide worlds, 
lamps, cameras and speakers"},
-               {FILTER_ID_BR | FILTER_ID_GD | FILTER_ID_PA | FILTER_ID_PAL | 
FILTER_ID_PC | FILTER_ID_TXT | FILTER_ID_VF,
+               {FILTER_ID_BR | FILTER_ID_GD | FILTER_ID_PA | FILTER_ID_PAL | 
FILTER_ID_PC | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_CF,
             "MISC", ICON_GREASEPENCIL, "Miscellaneous", "Show/hide other data 
types"},
            {0, NULL, 0, NULL, NULL}
        };

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

Reply via email to