diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-23 21:52:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-23 21:52:20 +0400 |
commit | 4a04f7206914a49f5f95adc5eb786237f1a9f547 (patch) | |
tree | 78aed2fa481f972fac0965f814bebebe9d71ae65 /source/blender/blenkernel | |
parent | f1cea89d99f0c80bdccd2ba1359142b5ff14cdb9 (diff) |
remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n
Diffstat (limited to 'source/blender/blenkernel')
172 files changed, 393 insertions, 665 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 2c3ffc296ba..5e403849289 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 7d3de68c005..67efb7752ea 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h index da389c6f1d0..44aebdf6205 100644 --- a/source/blender/blenkernel/BKE_anim.h +++ b/source/blender/blenkernel/BKE_anim.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index cf49c479fe3..cba6b0ef257 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index a0660490baf..8836999bc9b 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_array_mallocn.h b/source/blender/blenkernel/BKE_array_mallocn.h index 42c4c2ebdd0..45ca4a5e694 100644 --- a/source/blender/blenkernel/BKE_array_mallocn.h +++ b/source/blender/blenkernel/BKE_array_mallocn.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -25,7 +23,7 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** -*/ + */ #ifndef BKE_ARRAY_MALLOCN_H #define BKE_ARRAY_MALLOCN_H diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index f5684810e14..71771b6077d 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index 5c28fa88503..9739a5eacf2 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h index aabfcfaa0f6..2c6449eb290 100644 --- a/source/blender/blenkernel/BKE_bmeshCustomData.h +++ b/source/blender/blenkernel/BKE_bmeshCustomData.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_bmfont.h b/source/blender/blenkernel/BKE_bmfont.h index ef7323fc4c3..5f23121b802 100644 --- a/source/blender/blenkernel/BKE_bmfont.h +++ b/source/blender/blenkernel/BKE_bmfont.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_bmfont_types.h b/source/blender/blenkernel/BKE_bmfont_types.h index 658302e9f1d..a4d37069cab 100644 --- a/source/blender/blenkernel/BKE_bmfont_types.h +++ b/source/blender/blenkernel/BKE_bmfont_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_boids.h b/source/blender/blenkernel/BKE_boids.h index 36ca0cde87d..18e8be1512e 100644 --- a/source/blender/blenkernel/BKE_boids.h +++ b/source/blender/blenkernel/BKE_boids.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_booleanops_mesh.h b/source/blender/blenkernel/BKE_booleanops_mesh.h index aecd3385662..7c989ea17e6 100644 --- a/source/blender/blenkernel/BKE_booleanops_mesh.h +++ b/source/blender/blenkernel/BKE_booleanops_mesh.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index ebb9714cd1b..32418384795 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_bullet.h b/source/blender/blenkernel/BKE_bullet.h index 2756ded3a08..5eb653f69d1 100644 --- a/source/blender/blenkernel/BKE_bullet.h +++ b/source/blender/blenkernel/BKE_bullet.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index b497698f660..c3f5ae7fbf0 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h index 07158f5f3fa..c71c86e110d 100644 --- a/source/blender/blenkernel/BKE_cdderivedmesh.h +++ b/source/blender/blenkernel/BKE_cdderivedmesh.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index a5c88000db2..2dfe9fd3402 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index 4048ee2f457..acb3ae03816 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h index 758789683d5..fd3a3fea2bb 100644 --- a/source/blender/blenkernel/BKE_colortools.h +++ b/source/blender/blenkernel/BKE_colortools.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 7254536b555..3f9edf41e3c 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 02fc70e41e8..9282f0ef29a 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 4eb8e5a8d96..f3922f43cbc 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_customdata_file.h b/source/blender/blenkernel/BKE_customdata_file.h index 030d46fc1a6..f32a4b1e6a8 100644 --- a/source/blender/blenkernel/BKE_customdata_file.h +++ b/source/blender/blenkernel/BKE_customdata_file.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index 64cea929573..15d3c86c315 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index f36073ba841..59b7712a5a4 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h index 1eed0aaca00..2d863201767 100644 --- a/source/blender/blenkernel/BKE_displist.h +++ b/source/blender/blenkernel/BKE_displist.h @@ -1,5 +1,4 @@ /* - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 12f9383cefb..59a361c010d 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 08798a6ddf0..27e9140ba77 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -215,10 +213,12 @@ struct FCurve *rna_get_fcurve(struct PointerRNA *ptr, struct PropertyRNA *prop, int binarysearch_bezt_index(struct BezTriple array[], float frame, int arraylen, short *replace); /* get the time extents for F-Curve */ -void calc_fcurve_range(struct FCurve *fcu, float *min, float *max, const short selOnly); +void calc_fcurve_range(struct FCurve *fcu, float *min, float *max, + const short do_sel_only, const short do_min_length); /* get the bounding-box extents for F-Curve */ -void calc_fcurve_bounds(struct FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, const short selOnly); +void calc_fcurve_bounds(struct FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, + const short do_sel_only); /* .............. */ diff --git a/source/blender/blenkernel/BKE_fluidsim.h b/source/blender/blenkernel/BKE_fluidsim.h index f6070cd81f0..a68009dda37 100644 --- a/source/blender/blenkernel/BKE_fluidsim.h +++ b/source/blender/blenkernel/BKE_fluidsim.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_font.h b/source/blender/blenkernel/BKE_font.h index 214ae03b453..e164294b9a2 100644 --- a/source/blender/blenkernel/BKE_font.h +++ b/source/blender/blenkernel/BKE_font.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index a59d43d315d..bc9134b40b8 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h index 4898bb28c8d..dbb1107c228 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h index e497f43e46d..554314c419a 100644 --- a/source/blender/blenkernel/BKE_group.h +++ b/source/blender/blenkernel/BKE_group.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index 9f7d4aeb0d3..ee18a41dbfe 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_idcode.h b/source/blender/blenkernel/BKE_idcode.h index e46ad450c31..57855a7082f 100644 --- a/source/blender/blenkernel/BKE_idcode.h +++ b/source/blender/blenkernel/BKE_idcode.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index 2ba23d4a944..10c02f54b2e 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 8181ad6421c..c7e269a3b75 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -63,7 +61,9 @@ int BKE_imtype_is_movie(int imtype); struct anim *openanim(char * name, int flags, int streamindex); void image_de_interlace(struct Image *ima, int odd); - + +void make_local_image(struct Image *ima); + void tag_image_time(struct Image *ima); void free_old_images(void); diff --git a/source/blender/blenkernel/BKE_ipo.h b/source/blender/blenkernel/BKE_ipo.h index ea98c226e67..d21b0597976 100644 --- a/source/blender/blenkernel/BKE_ipo.h +++ b/source/blender/blenkernel/BKE_ipo.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index c29320ef13c..c055bb2004b 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h index 2936338e760..57c05637d50 100644 --- a/source/blender/blenkernel/BKE_lattice.h +++ b/source/blender/blenkernel/BKE_lattice.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index 0d6d41109b4..77ce7a50956 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -52,6 +50,7 @@ void *copy_libblock(void *rt); void copy_libblock_data(struct ID *id, const struct ID *id_from, const short do_action); void id_lib_extern(struct ID *id); +void BKE_library_filepath_set(struct Library *lib, const char *filepath); void id_us_plus(struct ID *id); void id_us_min(struct ID *id); int id_make_local(struct ID *id, int test); @@ -60,6 +59,7 @@ int id_copy(struct ID *id, struct ID **newid, int test); int id_unlink(struct ID *id, int test); int new_id(struct ListBase *lb, struct ID *id, const char *name); +void id_clear_lib_data(struct ListBase *lb, struct ID *id); struct ListBase *which_libbase(struct Main *mainlib, short type); diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index c25882d1dd6..2f587d3b29c 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index 0e0348e78e9..8e7645d721e 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h index c4119e99780..3dde54fd811 100644 --- a/source/blender/blenkernel/BKE_mball.h +++ b/source/blender/blenkernel/BKE_mball.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 347263bb290..07c6fb8b09c 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 28950e4b2eb..a47cefe6f65 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index ba23b2d79c0..4f1262cd523 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h index 1880e1e6728..ab5c2b19707 100644 --- a/source/blender/blenkernel/BKE_navmesh_conversion.h +++ b/source/blender/blenkernel/BKE_navmesh_conversion.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h index 49c1f8acd24..773c5ced1cb 100644 --- a/source/blender/blenkernel/BKE_nla.h +++ b/source/blender/blenkernel/BKE_nla.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index b75a8cb29ec..a819a464d3f 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index b1943fdf97c..393568c6b60 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h index f1c7356e6b0..606d6167937 100644 --- a/source/blender/blenkernel/BKE_packedFile.h +++ b/source/blender/blenkernel/BKE_packedFile.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 89733f1623c..e14db31607a 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index c417b1efe4f..c4284d2cf0a 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_plugin_types.h b/source/blender/blenkernel/BKE_plugin_types.h index a7842b526ce..73c6dae35cf 100644 --- a/source/blender/blenkernel/BKE_plugin_types.h +++ b/source/blender/blenkernel/BKE_plugin_types.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index fcfa6ccf9f4..110e6e851c8 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_property.h b/source/blender/blenkernel/BKE_property.h index 10014a4611d..ce0ea3dcc9a 100644 --- a/source/blender/blenkernel/BKE_property.h +++ b/source/blender/blenkernel/BKE_property.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h index 253f3ea9ac1..784f8a63757 100644 --- a/source/blender/blenkernel/BKE_report.h +++ b/source/blender/blenkernel/BKE_report.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_sca.h b/source/blender/blenkernel/BKE_sca.h index 0db0b71c102..cfcc0e146d8 100644 --- a/source/blender/blenkernel/BKE_sca.h +++ b/source/blender/blenkernel/BKE_sca.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 943712167c6..5c214b2892a 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index bc443b4a3a6..5b6d7e3cd96 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_script.h b/source/blender/blenkernel/BKE_script.h index 304e46fe2c5..d8ceaf23652 100644 --- a/source/blender/blenkernel/BKE_script.h +++ b/source/blender/blenkernel/BKE_script.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 9cb4dfae534..e64de965db5 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -217,9 +215,7 @@ typedef enum { SEQ_STRIPELEM_IBUF_ENDSTILL } seq_stripelem_ibuf_t; -void seq_stripelem_cache_init(void); void seq_stripelem_cache_destruct(void); - void seq_stripelem_cache_cleanup(void); /* returned ImBuf is properly refed and has to be freed */ diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h index 9deb71a3474..d1fef8b0ce1 100644 --- a/source/blender/blenkernel/BKE_shrinkwrap.h +++ b/source/blender/blenkernel/BKE_shrinkwrap.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h index 087cabc5c3d..1dd82c1d8e6 100644 --- a/source/blender/blenkernel/BKE_sketch.h +++ b/source/blender/blenkernel/BKE_sketch.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_smoke.h b/source/blender/blenkernel/BKE_smoke.h index 16e5336bcc1..51acef44f52 100644 --- a/source/blender/blenkernel/BKE_smoke.h +++ b/source/blender/blenkernel/BKE_smoke.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h index 6aea9344070..c889aa83b9a 100644 --- a/source/blender/blenkernel/BKE_softbody.h +++ b/source/blender/blenkernel/BKE_softbody.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index 3728dd41089..57746f3a68f 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_speaker.h b/source/blender/blenkernel/BKE_speaker.h index 111bd86fdd3..d309c048f1a 100644 --- a/source/blender/blenkernel/BKE_speaker.h +++ b/source/blender/blenkernel/BKE_speaker.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_subsurf.h b/source/blender/blenkernel/BKE_subsurf.h index 30142c12601..dcbd045f62d 100644 --- a/source/blender/blenkernel/BKE_subsurf.h +++ b/source/blender/blenkernel/BKE_subsurf.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h index c684271cbbf..a0a270422c7 100644 --- a/source/blender/blenkernel/BKE_suggestions.h +++ b/source/blender/blenkernel/BKE_suggestions.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index bf80b033fbd..2a613522686 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h index 9fb93f60fd5..de72428b3d7 100644 --- a/source/blender/blenkernel/BKE_texture.h +++ b/source/blender/blenkernel/BKE_texture.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h index 269941597b0..1f54e4eeef0 100644 --- a/source/blender/blenkernel/BKE_unit.h +++ b/source/blender/blenkernel/BKE_unit.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h index f65b937a54b..3222167c56e 100644 --- a/source/blender/blenkernel/BKE_utildefines.h +++ b/source/blender/blenkernel/BKE_utildefines.h @@ -1,5 +1,4 @@ /* - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * @@ -25,7 +24,7 @@ * Contributor(s): none yet. * * ***** END GPL LICENSE BLOCK ***** -*/ + */ /** \file BKE_utildefines.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_world.h b/source/blender/blenkernel/BKE_world.h index 6c8d1ba7945..fe25279dcfb 100644 --- a/source/blender/blenkernel/BKE_world.h +++ b/source/blender/blenkernel/BKE_world.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_writeavi.h b/source/blender/blenkernel/BKE_writeavi.h index 19cc1ae2dbf..f2502cf25f7 100644 --- a/source/blender/blenkernel/BKE_writeavi.h +++ b/source/blender/blenkernel/BKE_writeavi.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h index 8345f0f5d2e..2b10f1b246c 100644 --- a/source/blender/blenkernel/BKE_writeffmpeg.h +++ b/source/blender/blenkernel/BKE_writeffmpeg.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/BKE_writeframeserver.h b/source/blender/blenkernel/BKE_writeframeserver.h index 8b2022076bb..2117a23b938 100644 --- a/source/blender/blenkernel/BKE_writeframeserver.h +++ b/source/blender/blenkernel/BKE_writeframeserver.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index bfadff06400..1930e7223f9 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -1,4 +1,3 @@ -# $Id$ # ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software; you can redistribute it and/or @@ -24,11 +23,6 @@ # # ***** END GPL LICENSE BLOCK ***** -if(WITH_CODEC_FFMPEG) - # FFMPEG gives warnigns which are hard to avoid across multiple versions. - remove_strict_flags() -endif() - set(INC . ../avi @@ -305,6 +299,10 @@ if(WITH_CODEC_FFMPEG) ${FFMPEG_INCLUDE_DIRS} ) add_definitions(-DWITH_FFMPEG) + + remove_strict_flags_file( + intern/writeffmpeg.c + ) endif() if(WITH_PYTHON) diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index ef4f320602b..2dd14281253 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/BME_Customdata.c b/source/blender/blenkernel/intern/BME_Customdata.c index 512866a6d87..8a6426eb3d5 100644 --- a/source/blender/blenkernel/intern/BME_Customdata.c +++ b/source/blender/blenkernel/intern/BME_Customdata.c @@ -3,7 +3,6 @@ * * Custom Data functions for Bmesh * - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/BME_conversions.c b/source/blender/blenkernel/intern/BME_conversions.c index 8b5cfe1b882..ce1da6132cd 100644 --- a/source/blender/blenkernel/intern/BME_conversions.c +++ b/source/blender/blenkernel/intern/BME_conversions.c @@ -3,7 +3,6 @@ * * BMesh mesh level functions. * - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/BME_eulers.c b/source/blender/blenkernel/intern/BME_eulers.c index bbd439dcb93..25970dd8d91 100644 --- a/source/blender/blenkernel/intern/BME_eulers.c +++ b/source/blender/blenkernel/intern/BME_eulers.c @@ -3,7 +3,6 @@ * * BMesh Euler construction API. * - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/BME_mesh.c b/source/blender/blenkernel/intern/BME_mesh.c index e34f2ee1e50..1b5761fb94e 100644 --- a/source/blender/blenkernel/intern/BME_mesh.c +++ b/source/blender/blenkernel/intern/BME_mesh.c @@ -3,7 +3,6 @@ * * BMesh mesh level functions. * - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/BME_structure.c b/source/blender/blenkernel/intern/BME_structure.c index c385ad4fcda..6d8a8339e46 100644 --- a/source/blender/blenkernel/intern/BME_structure.c +++ b/source/blender/blenkernel/intern/BME_structure.c @@ -3,7 +3,6 @@ * * Low level routines for manipulating the BMesh structure. * - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c index a95d149f058..d1c258cbc93 100644 --- a/source/blender/blenkernel/intern/BME_tools.c +++ b/source/blender/blenkernel/intern/BME_tools.c @@ -3,7 +3,6 @@ * * Functions for changing the topology of a mesh. * - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c index bf9acb224d5..4793e83df53 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.c +++ b/source/blender/blenkernel/intern/CCGSubSurf.c @@ -1,4 +1,3 @@ -/* $Id$ */ /** \file blender/blenkernel/intern/CCGSubSurf.c * \ingroup bke diff --git a/source/blender/blenkernel/intern/CCGSubSurf.h b/source/blender/blenkernel/intern/CCGSubSurf.h index 1835e63727d..457ad2af353 100644 --- a/source/blender/blenkernel/intern/CCGSubSurf.h +++ b/source/blender/blenkernel/intern/CCGSubSurf.h @@ -1,4 +1,3 @@ -/* $Id$ */ /** \file blender/blenkernel/intern/CCGSubSurf.h * \ingroup bke diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index f9bd76e4ef0..0c99735f73e 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 8b9f5ac98d3..ac0697ddbf9 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -139,19 +137,14 @@ void make_local_action(bAction *act) // XXX: double-check this; it used to be just single-user check, but that was when fake-users were still default if ((act->id.flag & LIB_FAKEUSER) && (act->id.us<=1)) { - act->id.lib= NULL; - act->id.flag= LIB_LOCAL; - new_id(&bmain->action, (ID *)act, NULL); + id_clear_lib_data(&bmain->action, (ID *)act); return; } BKE_animdata_main_cb(bmain, make_localact_init_cb, &mlac); if (mlac.local && mlac.lib==0) { - act->id.lib= NULL; - act->id.flag= LIB_LOCAL; - //make_local_action_channels(act); - new_id(&bmain->action, (ID *)act, NULL); + id_clear_lib_data(&bmain->action, (ID *)act); } else if (mlac.local && mlac.lib) { mlac.actn= copy_action(act); @@ -883,7 +876,7 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_ /* get extents for this curve */ // TODO: allow enabling/disabling this? - calc_fcurve_range(fcu, &nmin, &nmax, FALSE); + calc_fcurve_range(fcu, &nmin, &nmax, FALSE, TRUE); /* compare to the running tally */ min= MIN2(min, nmin); diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index da6dd5bd39d..716f3ed2726 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 3cf14fa45ab..13abf18e20c 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index fbbce58414e..c1675faf053 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -143,9 +141,7 @@ void make_local_armature(bArmature *arm) if (arm->id.lib==NULL) return; if (arm->id.us==1) { - arm->id.lib= NULL; - arm->id.flag= LIB_LOCAL; - new_id(&bmain->armature, (ID*)arm, NULL); + id_clear_lib_data(&bmain->armature, (ID *)arm); return; } @@ -157,9 +153,7 @@ void make_local_armature(bArmature *arm) } if(local && lib==0) { - arm->id.lib= NULL; - arm->id.flag= LIB_LOCAL; - new_id(&bmain->armature, (ID *)arm, NULL); + id_clear_lib_data(&bmain->armature, (ID *)arm); } else if(local && lib) { bArmature *armn= copy_armature(arm); diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index b2bcd9aa6aa..4cbdbeb890d 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -63,6 +61,7 @@ #include "BLI_callbacks.h" #include "IMB_imbuf.h" +#include "IMB_moviecache.h" #include "BKE_blender.h" #include "BKE_context.h" @@ -113,6 +112,7 @@ void free_blender(void) BLI_cb_finalize(); seq_stripelem_cache_destruct(); + IMB_moviecache_destruct(); free_nodesystem(); } diff --git a/source/blender/blenkernel/intern/bmesh_private.h b/source/blender/blenkernel/intern/bmesh_private.h index d2b1d9fd566..b114f38cdd5 100644 --- a/source/blender/blenkernel/intern/bmesh_private.h +++ b/source/blender/blenkernel/intern/bmesh_private.h @@ -3,7 +3,6 @@ * * low level, 'private' function prototypes for bmesh kernel. * - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c index d73d7509644..f1e6de9a0c4 100644 --- a/source/blender/blenkernel/intern/bmfont.c +++ b/source/blender/blenkernel/intern/bmfont.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 2a478d4ffe2..3ae81c70d4f 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/booleanops_mesh.c b/source/blender/blenkernel/intern/booleanops_mesh.c index 4e8a3b33827..8dbf2c1c828 100644 --- a/source/blender/blenkernel/intern/booleanops_mesh.c +++ b/source/blender/blenkernel/intern/booleanops_mesh.c @@ -1,7 +1,6 @@ #if 0 /* - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 4ab9d085de3..45558329d4d 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -183,6 +181,7 @@ void free_brush(Brush *brush) static void extern_local_brush(Brush *brush) { id_lib_extern((ID *)brush->mtex.tex); + id_lib_extern((ID *)brush->clone.image); } void make_local_brush(Brush *brush) @@ -200,10 +199,9 @@ void make_local_brush(Brush *brush) if(brush->id.lib==NULL) return; if(brush->clone.image) { - /* special case: ima always local immediately */ - brush->clone.image->id.lib= NULL; - brush->clone.image->id.flag= LIB_LOCAL; - new_id(&bmain->brush, (ID *)brush->clone.image, NULL); + /* special case: ima always local immediately. Clone image should only + have one user anyway. */ + id_clear_lib_data(&bmain->brush, (ID *)brush->clone.image); extern_local_brush(brush); } @@ -215,9 +213,7 @@ void make_local_brush(Brush *brush) } if(local && lib==0) { - brush->id.lib= NULL; - brush->id.flag= LIB_LOCAL; - new_id(&bmain->brush, (ID *)brush, NULL); + id_clear_lib_data(&bmain->brush, (ID *)brush); extern_local_brush(brush); /* enable fake user by default */ diff --git a/source/blender/blenkernel/intern/bullet.c b/source/blender/blenkernel/intern/bullet.c index e4a02434cba..9fcb4389c62 100644 --- a/source/blender/blenkernel/intern/bullet.c +++ b/source/blender/blenkernel/intern/bullet.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 79229c49b4d..ee160a13fa2 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index 4d37d8e0606..25f9f17f201 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index d30476d44f8..444d17ad004 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 26ee62e035b..09030575438 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 83003809a37..98a434a7d8b 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 8eff86d846e..c244c26ad7f 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 2aeb726f623..18c08b617de 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 2e9ad11c6ca..4d93f2cba05 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -257,10 +255,7 @@ void make_local_curve(Curve *cu) if(cu->id.lib==NULL) return; if(cu->id.us==1) { - cu->id.lib= NULL; - cu->id.flag= LIB_LOCAL; - - new_id(&bmain->curve, (ID *)cu, NULL); + id_clear_lib_data(&bmain->curve, (ID *)cu); extern_local_curve(cu); return; } @@ -273,10 +268,7 @@ void make_local_curve(Curve *cu) } if(local && lib==0) { - cu->id.lib= NULL; - cu->id.flag= LIB_LOCAL; - - new_id(&bmain->curve, (ID *)cu, NULL); + id_clear_lib_data(&bmain->curve, (ID *)cu); extern_local_curve(cu); } else if(local && lib) { diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index d59a9eed363..f2f3ade52bb 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/customdata_file.c b/source/blender/blenkernel/intern/customdata_file.c index ab639897866..d65f08ed7a3 100644 --- a/source/blender/blenkernel/intern/customdata_file.c +++ b/source/blender/blenkernel/intern/customdata_file.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index f18f533d460..0f6828cc358 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index d3c5942b685..c9df8a135fe 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index fb67c07cfe9..6ae556874bb 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index e3e769253f1..c4543df0d16 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 0303f580e67..3529b7b9e6d 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -435,7 +433,8 @@ int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short /* ...................................... */ /* helper for calc_fcurve_* functions -> find first and last BezTriple to be used */ -static void get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple **last, const short selOnly) +static void get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple **last, + const short do_sel_only) { /* init outputs */ *first = NULL; @@ -446,7 +445,7 @@ static void get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple return; /* only include selected items? */ - if (selOnly) { + if (do_sel_only) { BezTriple *bezt; unsigned int i; @@ -477,11 +476,12 @@ static void get_fcurve_end_keyframes (FCurve *fcu, BezTriple **first, BezTriple /* Calculate the extents of F-Curve's data */ -void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, const short selOnly) +void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, + const short do_sel_only) { float xminv=999999999.0f, xmaxv=-999999999.0f; float yminv=999999999.0f, ymaxv=-999999999.0f; - short foundvert=0; + short foundvert= FALSE; unsigned int i; if (fcu->totvert) { @@ -490,7 +490,7 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo if (xmin || xmax) { /* get endpoint keyframes */ - get_fcurve_end_keyframes(fcu, &bezt_first, &bezt_last, selOnly); + get_fcurve_end_keyframes(fcu, &bezt_first, &bezt_last, do_sel_only); if (bezt_first) { BLI_assert(bezt_last != NULL); @@ -505,11 +505,12 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo BezTriple *bezt; for (bezt=fcu->bezt, i=0; i < fcu->totvert; bezt++, i++) { - if ((selOnly == 0) || BEZSELECTED(bezt)) { + if ((do_sel_only == 0) || BEZSELECTED(bezt)) { if (bezt->vec[1][1] < yminv) yminv= bezt->vec[1][1]; if (bezt->vec[1][1] > ymaxv) ymaxv= bezt->vec[1][1]; + foundvert= TRUE; } } } @@ -530,11 +531,11 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo yminv= fpt->vec[1]; if (fpt->vec[1] > ymaxv) ymaxv= fpt->vec[1]; + + foundvert= TRUE; } } } - - foundvert=1; } if (foundvert) { @@ -557,43 +558,50 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo } /* Calculate the extents of F-Curve's keyframes */ -void calc_fcurve_range (FCurve *fcu, float *start, float *end, const short selOnly) +void calc_fcurve_range (FCurve *fcu, float *start, float *end, + const short do_sel_only, const short do_min_length) { float min=999999999.0f, max=-999999999.0f; - short foundvert=0; + short foundvert= FALSE; if (fcu->totvert) { if (fcu->bezt) { BezTriple *bezt_first= NULL, *bezt_last= NULL; /* get endpoint keyframes */ - get_fcurve_end_keyframes(fcu, &bezt_first, &bezt_last, selOnly); - + get_fcurve_end_keyframes(fcu, &bezt_first, &bezt_last, do_sel_only); + if (bezt_first) { BLI_assert(bezt_last != NULL); - + min= MIN2(min, bezt_first->vec[1][0]); max= MAX2(max, bezt_last->vec[1][0]); + + foundvert= TRUE; } } else if (fcu->fpt) { min= MIN2(min, fcu->fpt[0].vec[0]); max= MAX2(max, fcu->fpt[fcu->totvert-1].vec[0]); + + foundvert= TRUE; } - foundvert=1; } - /* minimum length is 1 frame */ - if (foundvert) { - if (min == max) max += 1.0f; - *start= min; - *end= max; + if (foundvert == FALSE) { + min= max= 0.0f; } - else { - *start= 0.0f; - *end= 1.0f; + + if (do_min_length) { + /* minimum length is 1 frame */ + if (min == max) { + max += 1.0f; + } } + + *start= min; + *end= max; } /* ----------------- Status Checks -------------------------- */ diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c index 9247646b927..bf432785064 100644 --- a/source/blender/blenkernel/intern/fluidsim.c +++ b/source/blender/blenkernel/intern/fluidsim.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index d5c54893128..95c0aa60991 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 068e70bbb50..0761b8f14c7 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index fa493315d4b..adbc0f03528 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index d96b00f7990..cd025ecb559 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -1,5 +1,4 @@ /* - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c index 07bb4666134..bcbce2bc1c2 100644 --- a/source/blender/blenkernel/intern/icons.c +++ b/source/blender/blenkernel/intern/icons.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/idcode.c b/source/blender/blenkernel/intern/idcode.c index 063b5e961e0..d305499d3a1 100644 --- a/source/blender/blenkernel/intern/idcode.c +++ b/source/blender/blenkernel/intern/idcode.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c index 04fc41e41cc..ac4b936cb41 100644 --- a/source/blender/blenkernel/intern/idprop.c +++ b/source/blender/blenkernel/intern/idprop.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 37982e7fec9..5f7d2d40acc 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -62,10 +60,14 @@ #include "DNA_camera_types.h" #include "DNA_sequence_types.h" #include "DNA_userdef_types.h" +#include "DNA_brush_types.h" +#include "DNA_mesh_types.h" +#include "DNA_meshdata_types.h" #include "BLI_blenlib.h" #include "BLI_threads.h" #include "BLI_utildefines.h" +#include "BLI_bpath.h" #include "BKE_bmfont.h" #include "BKE_global.h" @@ -315,6 +317,132 @@ Image *copy_image(Image *ima) return nima; } +static void extern_local_image(Image *UNUSED(ima)) +{ + /* Nothing to do: images don't link to other IDs. This function exists to + match id_make_local pattern. */ +} + +void make_local_image(struct Image *ima) { + Main *bmain= G.main; + Tex *tex; + Brush *brush; + Mesh *me; + int local=0, lib=0; + + /* - only lib users: do nothing + * - only local users: set flag + * - mixed: make copy + */ + + if(ima->id.lib==NULL) return; + + /* Can't take short cut here: must check meshes at least because of bogus + texface ID refs. - z0r */ +#if(0) + if(ima->id.us==1) { + id_clear_lib_data(&bmain->image, (ID *)ima); + extern_local_image(ima); + return; + } +#endif + + for(tex= bmain->tex.first; tex; tex= tex->id.next) { + if(tex->ima == ima) { + if(tex->id.lib) lib= 1; + else local= 1; + } + } + for(brush= bmain->brush.first; brush; brush= brush->id.next) { + if(brush->clone.image == ima) { + if(brush->id.lib) lib= 1; + else local= 1; + } + } + for(me= bmain->mesh.first; me; me= me->id.next) { + if(me->mtface) { + MTFace *tface; + int a, i; + + for(i=0; i<me->fdata.totlayer; i++) { + if(me->fdata.layers[i].type == CD_MTFACE) { + tface= (MTFace*)me->fdata.layers[i].data; + + for(a=0; a<me->totface; a++, tface++) { + if(tface->tpage == ima) { + if(me->id.lib) lib=1; + else local= 1; + } + } + } + } + } + } + + if(local && lib==0) { + id_clear_lib_data(&bmain->image, (ID *)ima); + extern_local_image(ima); + } + else if(local && lib) { + Image *iman= copy_image(ima); + iman->id.us= 0; + + /* Remap paths of new ID using old library as base. */ + bpath_traverse_id((ID *)iman, bpath_relocate_visitor, + ((ID *)ima)->lib->filepath); + + tex= bmain->tex.first; + while(tex) { + if(tex->id.lib==NULL) { + if(tex->ima==ima) { + tex->ima = iman; + iman->id.us++; + ima->id.us--; + } + } + tex= tex->id.next; + } + brush= bmain->brush.first; + while(brush) { + if(brush->id.lib==NULL) { + if(brush->clone.image==ima) { + brush->clone.image = iman; + iman->id.us++; + ima->id.us--; + } + } + brush= brush->id.next; + } + /* Transfer references in texfaces. Texfaces don't add to image ID + user count *unless* there are no other users. See + readfile.c:lib_link_mtface. */ + me= bmain->mesh.first; + while(me) { + if(me->mtface) { + MTFace *tface; + int a, i; + + for(i=0; i<me->fdata.totlayer; i++) { + if(me->fdata.layers[i].type == CD_MTFACE) { + tface= (MTFace*)me->fdata.layers[i].data; + + for(a=0; a<me->totface; a++, tface++) { + if(tface->tpage == ima) { + tface->tpage = iman; + if(iman->id.us == 0) { + tface->tpage->id.us= 1; + } + id_lib_extern((ID*)iman); + } + } + } + } + } + me= me->id.next; + } + } +} + void BKE_image_merge(Image *dest, Image *source) { ImBuf *ibuf; diff --git a/source/blender/blenkernel/intern/image_gen.c b/source/blender/blenkernel/intern/image_gen.c index f4d1ff4241d..751980f61e8 100644 --- a/source/blender/blenkernel/intern/image_gen.c +++ b/source/blender/blenkernel/intern/image_gen.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index cef3eee8c5e..313143f362b 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 609f6cd38f1..85e00bcea06 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 3baf8e04b90..5ac8780e4a2 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index cbff9c2337e..ebf5492625b 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -257,9 +255,7 @@ void make_local_lattice(Lattice *lt) if(lt->id.lib==NULL) return; if(lt->id.us==1) { - lt->id.lib= NULL; - lt->id.flag= LIB_LOCAL; - new_id(&bmain->latt, (ID *)lt, NULL); + id_clear_lib_data(&bmain->latt, (ID *)lt); return; } @@ -271,9 +267,7 @@ void make_local_lattice(Lattice *lt) } if(local && lib==0) { - lt->id.lib= NULL; - lt->id.flag= LIB_LOCAL; - new_id(&bmain->latt, (ID *)lt, NULL); + id_clear_lib_data(&bmain->latt, (ID *)lt); } else if(local && lib) { Lattice *ltn= copy_lattice(lt); diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 1dc53811fc0..0c2ca4c68b3 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1,6 +1,4 @@ -/* - * $Id$ - * +/* * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -76,7 +74,7 @@ #include "BLI_blenlib.h" #include "BLI_dynstr.h" #include "BLI_utildefines.h" - +#include "BLI_bpath.h" #include "BKE_animsys.h" #include "BKE_context.h" @@ -110,6 +108,7 @@ #include "BKE_gpencil.h" #include "BKE_fcurve.h" #include "BKE_speaker.h" +#include "BKE_utildefines.h" #include "RNA_access.h" @@ -196,7 +195,8 @@ int id_make_local(ID *id, int test) if(!test) make_local_texture((Tex*)id); return 1; case ID_IM: - return 0; /* not implemented */ + if(!test) make_local_image((Image*)id); + return 1; case ID_LT: if(!test) { make_local_lattice((Lattice*)id); @@ -1248,6 +1248,16 @@ int new_id(ListBase *lb, ID *id, const char *tname) return result; } +/* Pull an ID out of a library (make it local). Only call this for IDs that + don't have other library users. */ +void id_clear_lib_data(ListBase *lb, ID *id) +{ + bpath_traverse_id(id, bpath_relocate_visitor, id->lib->filepath); + id->lib= NULL; + id->flag= LIB_LOCAL; + new_id(lb, id, NULL); +} + /* next to indirect usage in read/writefile also in editobject.c scene.c */ void clear_id_newpoins(void) { @@ -1463,3 +1473,21 @@ void name_uiprefix_id(char *name, ID *id) strcpy(name+3, id->name+2); } + +void BKE_library_filepath_set(Library *lib, const char *filepath) +{ + BLI_strncpy(lib->name, filepath, sizeof(lib->name)); + BLI_strncpy(lib->filepath, filepath, sizeof(lib->filepath)); + + /* not essential but set filepath is an absolute copy of value which + * is more useful if its kept in sync */ + if (strncmp(lib->filepath, "//", 2) == 0) { + /* note that the file may be unsaved, in this case, setting the + * filepath on an indirectly linked path is not allowed from the + * outliner, and its not really supported but allow from here for now + * since making local could cause this to be directly linked - campbell + */ + const char *basepath= lib->parent ? lib->parent->filepath : G.main->name; + BLI_path_abs(lib->filepath, basepath); + } +} diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index ebd05ab9bf8..12d92d57e86 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -296,15 +294,16 @@ void make_local_material(Material *ma) */ if(ma->id.lib==NULL) return; - if(ma->id.us==1) { - ma->id.lib= NULL; - ma->id.flag= LIB_LOCAL; - new_id(&bmain->mat, (ID *)ma, NULL); + /* One local user; set flag and return. */ + if(ma->id.us==1) { + id_clear_lib_data(&bmain->mat, (ID *)ma); extern_local_material(ma); return; } - + + /* Check which other IDs reference this one to determine if it's used by + lib or local */ /* test objects */ ob= bmain->object.first; while(ob) { @@ -357,14 +356,13 @@ void make_local_material(Material *ma) } mb= mb->id.next; } - - if(local && lib==0) { - ma->id.lib= NULL; - ma->id.flag= LIB_LOCAL; - new_id(&bmain->mat, (ID *)ma, NULL); + /* Only local users. */ + if(local && lib==0) { + id_clear_lib_data(&bmain->mat, (ID *)ma); extern_local_material(ma); } + /* Both user and local, so copy. */ else if(local && lib) { man= copy_material(ma); diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 05d07ddf918..2c6a3b80d94 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -158,9 +156,7 @@ void make_local_mball(MetaBall *mb) if(mb->id.lib==NULL) return; if(mb->id.us==1) { - mb->id.lib= NULL; - mb->id.flag= LIB_LOCAL; - new_id(&bmain->mball, (ID *)mb, NULL); + id_clear_lib_data(&bmain->mball, (ID *)mb); extern_local_mball(mb); return; @@ -174,10 +170,7 @@ void make_local_mball(MetaBall *mb) } if(local && lib==0) { - mb->id.lib= NULL; - mb->id.flag= LIB_LOCAL; - - new_id(&bmain->mball, (ID *)mb, NULL); + id_clear_lib_data(&bmain->mball, (ID *)mb); extern_local_mball(mb); } else if(local && lib) { diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 9574c886ccc..a5bf39d895c 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -243,39 +241,26 @@ Mesh *copy_mesh(Mesh *me) return men; } -static void make_local_tface(Main *bmain, Mesh *me) +static void expand_local_mesh(Mesh *me) { - MTFace *tface; - Image *ima; - int a, i; - - for(i=0; i<me->fdata.totlayer; i++) { - if(me->fdata.layers[i].type == CD_MTFACE) { - tface= (MTFace*)me->fdata.layers[i].data; - - for(a=0; a<me->totface; a++, tface++) { - /* special case: ima always local immediately */ - if(tface->tpage) { - ima= tface->tpage; - if(ima->id.lib) { - ima->id.lib= NULL; - ima->id.flag= LIB_LOCAL; - new_id(&bmain->image, (ID *)ima, NULL); + id_lib_extern((ID *)me->texcomesh); + + if(me->mtface) { + MTFace *tface; + int a, i; + + for(i=0; i<me->fdata.totlayer; i++) { + if(me->fdata.layers[i].type == CD_MTFACE) { + tface= (MTFace*)me->fdata.layers[i].data; + + for(a=0; a<me->totface; a++, tface++) { + if(tface->tpage) { + id_lib_extern((ID *)tface->tpage); } } } } } -} - -static void expand_local_mesh(Main *bmain, Mesh *me) -{ - id_lib_extern((ID *)me->texcomesh); - - if(me->mtface) { - /* why is this an exception? - should not really make local when extern'ing - campbell */ - make_local_tface(bmain, me); - } if(me->mat) { extern_local_matarar(me->mat, me->totcol); @@ -295,11 +280,8 @@ void make_local_mesh(Mesh *me) if(me->id.lib==NULL) return; if(me->id.us==1) { - me->id.lib= NULL; - me->id.flag= LIB_LOCAL; - - new_id(&bmain->mesh, (ID *)me, NULL); - expand_local_mesh(bmain, me); + id_clear_lib_data(&bmain->mesh, (ID *)me); + expand_local_mesh(me); return; } @@ -311,11 +293,8 @@ void make_local_mesh(Mesh *me) } if(local && lib==0) { - me->id.lib= NULL; - me->id.flag= LIB_LOCAL; - - new_id(&bmain->mesh, (ID *)me, NULL); - expand_local_mesh(bmain, me); + id_clear_lib_data(&bmain->mesh, (ID *)me); + expand_local_mesh(me); } else if(local && lib) { Mesh *men= copy_mesh(me); diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 4d735f1d54b..0dac4b8cd80 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -117,9 +115,10 @@ static int search_face_cmp(const void *v1, const void *v2) } +#define PRINT if(do_verbose) printf + int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totvert, MEdge *medges, unsigned int totedge, MFace *mfaces, unsigned int totface, const short do_verbose, const short do_fixes) { -# define PRINT if(do_verbose) printf # define REMOVE_EDGE_TAG(_med) { _med->v2= _med->v1; do_edge_free= 1; } # define REMOVE_FACE_TAG(_mf) { _mf->v3=0; do_face_free= 1; } @@ -284,7 +283,6 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve PRINT("BKE_mesh_validate: finished\n\n"); -# undef PRINT # undef REMOVE_EDGE_TAG # undef REMOVE_FACE_TAG @@ -305,12 +303,57 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve return (do_face_free || do_edge_free || do_edge_recalc); } +static int mesh_validate_customdata(CustomData *data, short do_verbose, const short do_fixes) +{ + int i= 0, has_fixes= 0; + + while(i<data->totlayer) { + CustomDataLayer *layer= &data->layers[i]; + int mask= 1 << layer->type; + int ok= 1; + + if((mask&CD_MASK_MESH)==0) { + PRINT("CustomDataLayer type %d which isn't in CD_MASK_MESH is stored in Mehs structure\n", layer->type); + + if(do_fixes) { + CustomData_free_layer(data, layer->type, 0, i); + ok= 0; + has_fixes= 1; + } + } + + if(ok) + i++; + } + + return has_fixes; +} + +#undef PRINT + +int BKE_mesh_validate_all_customdata(CustomData *vdata, CustomData *edata, CustomData *fdata, short do_verbose, const short do_fixes) +{ + int vfixed= 0, efixed= 0, ffixed= 0; + + vfixed= mesh_validate_customdata(vdata, do_verbose, do_fixes); + efixed= mesh_validate_customdata(edata, do_verbose, do_fixes); + ffixed= mesh_validate_customdata(fdata, do_verbose, do_fixes); + + return vfixed || efixed || ffixed; +} + int BKE_mesh_validate(Mesh *me, int do_verbose) { + int layers_fixed= 0, arrays_fixed= 0; + if(do_verbose) { printf("MESH: %s\n", me->id.name+2); } - return BKE_mesh_validate_arrays(me, me->mvert, me->totvert, me->medge, me->totedge, me->mface, me->totface, do_verbose, TRUE); + + layers_fixed= BKE_mesh_validate_all_customdata(&me->vdata, &me->edata, &me->fdata, do_verbose, TRUE); + arrays_fixed= BKE_mesh_validate_arrays(me, me->mvert, me->totvert, me->medge, me->totedge, me->mface, me->totface, do_verbose, TRUE); + + return layers_fixed || arrays_fixed; } int BKE_mesh_validate_dm(DerivedMesh *dm) diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 2056762e627..bbc1b596889 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 749930d4278..6579d7a01f4 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c index f670486484b..e3b5b83964e 100644 --- a/source/blender/blenkernel/intern/navmesh_conversion.c +++ b/source/blender/blenkernel/intern/navmesh_conversion.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 15513675c7a..fd5c7912e1f 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index cb1f52a6265..6a3e0353a07 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -1041,6 +1039,7 @@ static void ntreeMakeLocal_LinkNew(void *calldata, ID *owner_id, bNodeTree *ntre void ntreeMakeLocal(bNodeTree *ntree) { + Main *bmain= G.main; bNodeTreeType *treetype= ntreeGetType(ntree->type); MakeLocalCallData cd; @@ -1051,9 +1050,7 @@ void ntreeMakeLocal(bNodeTree *ntree) if(ntree->id.lib==NULL) return; if(ntree->id.us==1) { - ntree->id.lib= NULL; - ntree->id.flag= LIB_LOCAL; - new_id(NULL, (ID *)ntree, NULL); + id_clear_lib_data(&bmain->nodetree, (ID *)ntree); return; } @@ -1067,9 +1064,7 @@ void ntreeMakeLocal(bNodeTree *ntree) /* if all users are local, we simply make tree local */ if(cd.local && cd.lib==0) { - ntree->id.lib= NULL; - ntree->id.flag= LIB_LOCAL; - new_id(NULL, (ID *)ntree, NULL); + id_clear_lib_data(&bmain->nodetree, (ID *)ntree); } else if(cd.local && cd.lib) { /* this is the mixed case, we copy the tree and assign it to local users */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 2b6db72bd07..6e09aefeea2 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -758,9 +756,7 @@ void make_local_camera(Camera *cam) if(cam->id.lib==NULL) return; if(cam->id.us==1) { - cam->id.lib= NULL; - cam->id.flag= LIB_LOCAL; - new_id(&bmain->camera, (ID *)cam, NULL); + id_clear_lib_data(&bmain->camera, (ID *)cam); return; } @@ -772,9 +768,7 @@ void make_local_camera(Camera *cam) } if(local && lib==0) { - cam->id.lib= NULL; - cam->id.flag= LIB_LOCAL; - new_id(&bmain->camera, (ID *)cam, NULL); + id_clear_lib_data(&bmain->camera, (ID *)cam); } else if(local && lib) { Camera *camn= copy_camera(cam); @@ -923,9 +917,7 @@ void make_local_lamp(Lamp *la) if(la->id.lib==NULL) return; if(la->id.us==1) { - la->id.lib= NULL; - la->id.flag= LIB_LOCAL; - new_id(&bmain->lamp, (ID *)la, NULL); + id_clear_lib_data(&bmain->lamp, (ID *)la); return; } @@ -939,9 +931,7 @@ void make_local_lamp(Lamp *la) } if(local && lib==0) { - la->id.lib= NULL; - la->id.flag= LIB_LOCAL; - new_id(&bmain->lamp, (ID *)la, NULL); + id_clear_lib_data(&bmain->lamp, (ID *)la); } else if(local && lib) { lan= copy_lamp(la); @@ -1093,6 +1083,7 @@ Object *add_only_object(int type, const char *name) /* ob->pad3 == Contact Processing Threshold */ ob->m_contactProcessingThreshold = 1.; ob->obstacleRad = 1.; + ob->col_group = ob->col_mask = 1; /* NT fluid sim defaults */ ob->fluidsimFlag = 0; @@ -1470,9 +1461,8 @@ void make_local_object(Object *ob) ob->proxy= ob->proxy_from= NULL; if(ob->id.us==1) { - ob->id.lib= NULL; - ob->id.flag= LIB_LOCAL; - new_id(&bmain->object, (ID *)ob, NULL); + id_clear_lib_data(&bmain->object, (ID *)ob); + extern_local_object(ob); } else { for(sce= bmain->scene.first; sce && ELEM(0, lib, local); sce= sce->id.next) { @@ -1483,9 +1473,8 @@ void make_local_object(Object *ob) } if(local && lib==0) { - ob->id.lib= NULL; - ob->id.flag= LIB_LOCAL; - new_id(&bmain->object, (ID *)ob, NULL); + id_clear_lib_data(&bmain->object, (ID *)ob); + extern_local_object(ob); } else if(local && lib) { Object *obn= copy_object(ob); @@ -1508,8 +1497,6 @@ void make_local_object(Object *ob) } } } - - extern_local_object(ob); } /* diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 70b0b7727c4..ea1dbec8a27 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index ddeb42d608e..56ce853bfb9 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 8a83dcac765..f478c8faf07 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -3612,9 +3610,7 @@ void make_local_particlesettings(ParticleSettings *part) if(part->id.lib==0) return; if(part->id.us==1) { - part->id.lib= 0; - part->id.flag= LIB_LOCAL; - new_id(&bmain->particle, (ID *)part, 0); + id_clear_lib_data(&bmain->particle, (ID *)part); expand_local_particlesettings(part); return; } @@ -3631,9 +3627,7 @@ void make_local_particlesettings(ParticleSettings *part) } if(local && lib==0) { - part->id.lib= 0; - part->id.flag= LIB_LOCAL; - new_id(&bmain->particle, (ID *)part, 0); + id_clear_lib_data(&bmain->particle, (ID *)part); expand_local_particlesettings(part); } else if(local && lib) { diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index cebefe81495..c28bbfa0554 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index d4753f30ef2..fa9d94eb24d 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/property.c b/source/blender/blenkernel/intern/property.c index e0e2876f79e..f9d470e48d8 100644 --- a/source/blender/blenkernel/intern/property.c +++ b/source/blender/blenkernel/intern/property.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index 4926edaeec2..ffa9e027108 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c index a75a075dfc1..f7eda6bd9b3 100644 --- a/source/blender/blenkernel/intern/sca.c +++ b/source/blender/blenkernel/intern/sca.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 5ea635d8c30..6b3786663df 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index ef1b75e5913..02e6fe945f3 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -1,5 +1,4 @@ /* - * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** * diff --git a/source/blender/blenkernel/intern/script.c b/source/blender/blenkernel/intern/script.c index 77a79a6c8a4..5fadebc80f8 100644 --- a/source/blender/blenkernel/intern/script.c +++ b/source/blender/blenkernel/intern/script.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/seqcache.c b/source/blender/blenkernel/intern/seqcache.c index 88e9d9209d4..c5761dcc456 100644 --- a/source/blender/blenkernel/intern/seqcache.c +++ b/source/blender/blenkernel/intern/seqcache.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -19,6 +17,8 @@ * * Peter Schlaile <peter [at] schlaile [dot] de> 2010 * + * Contributor(s): Sergey Sharybin + * * ***** END GPL LICENSE BLOCK ***** */ @@ -28,22 +28,15 @@ #include <stddef.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> + +#include "BLO_sys_types.h" /* for intptr_t */ #include "MEM_guardedalloc.h" -#include "MEM_CacheLimiterC-Api.h" #include "DNA_sequence_types.h" #include "BKE_sequencer.h" -#include "BLI_utildefines.h" -#include "BLI_ghash.h" -#include "BLI_mempool.h" -#include <pthread.h> -#include "IMB_imbuf.h" -#include "IMB_imbuf_types.h" +#include "IMB_moviecache.h" typedef struct seqCacheKey { @@ -53,20 +46,9 @@ typedef struct seqCacheKey seq_stripelem_ibuf_t type; } seqCacheKey; -typedef struct seqCacheEntry -{ - ImBuf * ibuf; - MEM_CacheLimiterHandleC * c_handle; -} seqCacheEntry; - -static GHash * hash = NULL; -static MEM_CacheLimiterC * limitor = NULL; -static struct BLI_mempool * entrypool = NULL; -static struct BLI_mempool * keypool = NULL; -static int ibufs_in = 0; -static int ibufs_rem = 0; - -static unsigned int HashHash(const void *key_) +static struct MovieCache *moviecache = NULL; + +static unsigned int seqcache_hashhash(const void *key_) { const seqCacheKey *key = (seqCacheKey*) key_; unsigned int rval = seq_hash_render_data(&key->context); @@ -78,7 +60,7 @@ static unsigned int HashHash(const void *key_) return rval; } -static int HashCmp(const void *a_, const void *b_) +static int seqcache_hashcmp(const void *a_, const void *b_) { const seqCacheKey * a = (seqCacheKey*) a_; const seqCacheKey * b = (seqCacheKey*) b_; @@ -107,109 +89,37 @@ static int HashCmp(const void *a_, const void *b_) return seq_cmp_render_data(&a->context, &b->context); } -static void HashKeyFree(void *key) -{ - BLI_mempool_free(keypool, key); -} - -static void HashValFree(void *val) -{ - seqCacheEntry* e = (seqCacheEntry*) val; - - if (e->ibuf) { - /* fprintf(stderr, "Removing: %p, cnt: %d\n", e->ibuf, - e->ibuf->refcounter); */ - IMB_freeImBuf(e->ibuf); - MEM_CacheLimiter_unmanage(e->c_handle); - ibufs_rem++; - } - - e->ibuf = NULL; - e->c_handle = NULL; - - BLI_mempool_free(entrypool, e); -} - -static void IMB_seq_cache_destructor(void * p) -{ - seqCacheEntry* e = (seqCacheEntry*) p; - - if (e && e->ibuf) { - /* fprintf(stderr, "Removing: %p, cnt: %d\n", e->ibuf, - e->ibuf->refcounter); */ - IMB_freeImBuf(e->ibuf); - ibufs_rem++; - - e->ibuf = NULL; - e->c_handle = NULL; - } -} - -void seq_stripelem_cache_init(void) -{ - hash = BLI_ghash_new(HashHash, HashCmp, "seq stripelem cache hash"); - limitor = new_MEM_CacheLimiter( IMB_seq_cache_destructor ); - - entrypool = BLI_mempool_create(sizeof(seqCacheEntry), 64, 64, 0); - keypool = BLI_mempool_create(sizeof(seqCacheKey), 64, 64, 0); -} - void seq_stripelem_cache_destruct(void) { - if (!entrypool) { - return; - } - BLI_ghash_free(hash, HashKeyFree, HashValFree); - delete_MEM_CacheLimiter(limitor); - BLI_mempool_destroy(entrypool); - BLI_mempool_destroy(keypool); + if(moviecache) + IMB_moviecache_free(moviecache); } void seq_stripelem_cache_cleanup(void) { - if (!entrypool) { - seq_stripelem_cache_init(); + if(moviecache) { + IMB_moviecache_free(moviecache); + moviecache = IMB_moviecache_create(sizeof(seqCacheKey), seqcache_hashhash, + seqcache_hashcmp, NULL); } - - /* fprintf(stderr, "Stats before cleanup: in: %d rem: %d\n", - ibufs_in, ibufs_rem); */ - - BLI_ghash_free(hash, HashKeyFree, HashValFree); - hash = BLI_ghash_new(HashHash, HashCmp, "seq stripelem cache hash"); - - /* fprintf(stderr, "Stats after cleanup: in: %d rem: %d\n", - ibufs_in, ibufs_rem); */ - } struct ImBuf * seq_stripelem_cache_get( SeqRenderData context, struct Sequence * seq, float cfra, seq_stripelem_ibuf_t type) { - seqCacheKey key; - seqCacheEntry * e; - if (!seq) { - return NULL; - } + if(moviecache && seq) { + seqCacheKey key; - if (!entrypool) { - seq_stripelem_cache_init(); - } + key.seq = seq; + key.context = context; + key.cfra = cfra - seq->start; + key.type = type; - key.seq = seq; - key.context = context; - key.cfra = cfra - seq->start; - key.type = type; - - e = (seqCacheEntry*) BLI_ghash_lookup(hash, &key); - - if (e && e->ibuf) { - IMB_refImBuf(e->ibuf); - - MEM_CacheLimiter_touch(e->c_handle); - return e->ibuf; + return IMB_moviecache_get(moviecache, &key); } + return NULL; } @@ -217,39 +127,21 @@ void seq_stripelem_cache_put( SeqRenderData context, struct Sequence * seq, float cfra, seq_stripelem_ibuf_t type, struct ImBuf * i) { - seqCacheKey * key; - seqCacheEntry * e; + seqCacheKey key; if (!i) { return; } - ibufs_in++; - - if (!entrypool) { - seq_stripelem_cache_init(); + if(!moviecache) { + moviecache = IMB_moviecache_create(sizeof(seqCacheKey), seqcache_hashhash, + seqcache_hashcmp, NULL); } - key = (seqCacheKey*) BLI_mempool_alloc(keypool); - - key->seq = seq; - key->context = context; - key->cfra = cfra - seq->start; - key->type = type; - - IMB_refImBuf(i); - - e = (seqCacheEntry*) BLI_mempool_alloc(entrypool); - - e->ibuf = i; - e->c_handle = NULL; - - BLI_ghash_remove(hash, key, HashKeyFree, HashValFree); - BLI_ghash_insert(hash, key, e); - - e->c_handle = MEM_CacheLimiter_insert(limitor, e); + key.seq = seq; + key.context = context; + key.cfra = cfra - seq->start; + key.type = type; - MEM_CacheLimiter_ref(e->c_handle); - MEM_CacheLimiter_enforce_limits(limitor); - MEM_CacheLimiter_unref(e->c_handle); + IMB_moviecache_put(moviecache, &key, i); } diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index 943066537d5..3699cf40aa8 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index cf03a8d3f36..6b319e6b5e1 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -1326,6 +1324,10 @@ static void seq_proxy_build_frame(SeqRenderData context, quality = seq->strip->proxy->quality; ibuf->ftype= JPG | quality; + /* unsupported feature only confuses other s/w */ + if(ibuf->depth==32) + ibuf->depth= 24; + BLI_make_existing_file(name); ok = IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat); @@ -2503,9 +2505,6 @@ static void *seq_prefetch_thread(void * This_) for (e = prefetch_done.first; e; e = e->next) { if (s_last > e->monoton_cfra) { - if (e->ibuf) { - IMB_cache_limiter_unref(e->ibuf); - } BLI_remlink(&prefetch_done, e); MEM_freeN(e); } @@ -2583,9 +2582,6 @@ static void seq_stop_threads() } for (e = prefetch_done.first; e; e = e->next) { - if (e->ibuf) { - IMB_cache_limiter_unref(e->ibuf); - } BLI_remlink(&prefetch_done, e); MEM_freeN(e); } diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index d2d22aa213a..e47dcd68ce1 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/sketch.c b/source/blender/blenkernel/intern/sketch.c index a5afc0afda1..faf382f9ffc 100644 --- a/source/blender/blenkernel/intern/sketch.c +++ b/source/blender/blenkernel/intern/sketch.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index c1833b39b8b..ac2a840c95a 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index cd147f4dbed..28925a7b170 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 02e381fe9b4..ceaba2502d9 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/speaker.c b/source/blender/blenkernel/intern/speaker.c index ae29230423f..fb6a473f04d 100644 --- a/source/blender/blenkernel/intern/speaker.c +++ b/source/blender/blenkernel/intern/speaker.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -89,9 +87,7 @@ void make_local_speaker(Speaker *spk) if(spk->id.lib==NULL) return; if(spk->id.us==1) { - spk->id.lib= NULL; - spk->id.flag= LIB_LOCAL; - new_id(&bmain->speaker, (ID *)spk, NULL); + id_clear_lib_data(&bmain->speaker, (ID *)spk); return; } @@ -105,9 +101,7 @@ void make_local_speaker(Speaker *spk) } if(local && lib==0) { - spk->id.lib= NULL; - spk->id.flag= LIB_LOCAL; - new_id(&bmain->speaker, (ID *)spk, NULL); + id_clear_lib_data(&bmain->speaker, (ID *)spk); } else if(local && lib) { Speaker *spkn= copy_speaker(spk); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 0d9f27e4fa9..115b26452e1 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/suggestions.c b/source/blender/blenkernel/intern/suggestions.c index 8a8bb6dd76a..48bc4926a85 100644 --- a/source/blender/blenkernel/intern/suggestions.c +++ b/source/blender/blenkernel/intern/suggestions.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index b5fc76a8551..69af2570d0c 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 7d720aed62c..b7fc2835f63 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -816,6 +814,10 @@ Tex *localize_texture(Tex *tex) /* ------------------------------------------------------------------------- */ +static void extern_local_texture(Tex *tex) { + id_lib_extern((ID *)tex->ima); +} + void make_local_texture(Tex *tex) { Main *bmain= G.main; @@ -834,18 +836,9 @@ void make_local_texture(Tex *tex) if(tex->id.lib==NULL) return; - /* special case: ima always local immediately */ - if(tex->ima) { - tex->ima->id.lib= NULL; - tex->ima->id.flag= LIB_LOCAL; - new_id(&bmain->image, (ID *)tex->ima, NULL); - } - if(tex->id.us==1) { - tex->id.lib= NULL; - tex->id.flag= LIB_LOCAL; - new_id(&bmain->tex, (ID *)tex, NULL); - + id_clear_lib_data(&bmain->tex, (ID *)tex); + extern_local_texture(tex); return; } @@ -899,9 +892,8 @@ void make_local_texture(Tex *tex) } if(local && lib==0) { - tex->id.lib= NULL; - tex->id.flag= LIB_LOCAL; - new_id(&bmain->tex, (ID *)tex, NULL); + id_clear_lib_data(&bmain->tex, (ID *)tex); + extern_local_texture(tex); } else if(local && lib) { texn= copy_texture(tex); diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 8aeef0d84b1..01b090f2967 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 7d278f37cfb..150bf7157d9 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -162,9 +160,7 @@ void make_local_world(World *wrld) if(wrld->id.lib==NULL) return; if(wrld->id.us==1) { - wrld->id.lib= NULL; - wrld->id.flag= LIB_LOCAL; - new_id(NULL, (ID *)wrld, NULL); + id_clear_lib_data(&bmain->world, (ID *)wrld); return; } @@ -176,9 +172,7 @@ void make_local_world(World *wrld) } if(local && lib==0) { - wrld->id.lib= NULL; - wrld->id.flag= LIB_LOCAL; - new_id(NULL, (ID *)wrld, NULL); + id_clear_lib_data(&bmain->world, (ID *)wrld); } else if(local && lib) { World *wrldn= copy_world(wrld); diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index b989d44c391..03091a08c58 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 7b414f7746a..da1412dac0d 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1,5 +1,4 @@ /* - * $Id$ * * ffmpeg-write support * @@ -397,6 +396,20 @@ static void set_ffmpeg_property_option(AVCodecContext* c, IDProperty * prop) } } +static int ffmpeg_proprty_valid(AVCodecContext *c, const char *prop_name, IDProperty *curr) +{ + int valid= 1; + + if(strcmp(prop_name, "video")==0) { + if(strcmp(curr->name, "bf")==0) { + /* flash codec doesn't support b frames */ + valid&= c->codec_id!=CODEC_ID_FLV1; + } + } + + return valid; +} + static void set_ffmpeg_properties(RenderData *rd, AVCodecContext *c, const char * prop_name) { IDProperty * prop; @@ -415,7 +428,8 @@ static void set_ffmpeg_properties(RenderData *rd, AVCodecContext *c, const char iter = IDP_GetGroupIterator(prop); while ((curr = IDP_GroupIterNext(iter)) != NULL) { - set_ffmpeg_property_option(c, curr); + if(ffmpeg_proprty_valid(c, prop_name, curr)) + set_ffmpeg_property_option(c, curr); } } @@ -1088,7 +1102,7 @@ IDProperty *ffmpeg_property_add(RenderData *rd, char * type, int opt_index, int idp_type = IDP_FLOAT; break; case FF_OPT_TYPE_STRING: - val.str = " "; + val.str = (char *)" "; idp_type = IDP_STRING; break; case FF_OPT_TYPE_CONST: @@ -1188,6 +1202,9 @@ void ffmpeg_set_preset(RenderData *rd, int preset) { int isntsc = (rd->frs_sec != 25); + if(rd->ffcodecdata.properties) + IDP_FreeProperty(rd->ffcodecdata.properties); + switch (preset) { case FFMPEG_PRESET_VCD: rd->ffcodecdata.type = FFMPEG_MPEG1; @@ -1218,8 +1235,11 @@ void ffmpeg_set_preset(RenderData *rd, int preset) case FFMPEG_PRESET_DVD: rd->ffcodecdata.type = FFMPEG_MPEG2; rd->ffcodecdata.video_bitrate = 6000; - rd->xsch = 720; - rd->ysch = isntsc ? 480 : 576; + + /* Don't set resolution, see [#21351] + * rd->xsch = 720; + * rd->ysch = isntsc ? 480 : 576; */ + rd->ffcodecdata.gop_size = isntsc ? 18 : 15; rd->ffcodecdata.rc_max_rate = 9000; rd->ffcodecdata.rc_min_rate = 0; @@ -1322,8 +1342,8 @@ void ffmpeg_verify_image_type(RenderData *rd) rd->ffcodecdata.video_bitrate <= 1) { rd->ffcodecdata.codec = CODEC_ID_MPEG2VIDEO; - /* Don't set preset, disturbs render resolution. - * ffmpeg_set_preset(rd, FFMPEG_PRESET_DVD); */ + + ffmpeg_set_preset(rd, FFMPEG_PRESET_DVD); } if(rd->ffcodecdata.type == FFMPEG_OGG) { rd->ffcodecdata.type = FFMPEG_MPEG2; @@ -1357,4 +1377,3 @@ void ffmpeg_verify_image_type(RenderData *rd) } #endif - diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c index d42b952617f..ae65b913283 100644 --- a/source/blender/blenkernel/intern/writeframeserver.c +++ b/source/blender/blenkernel/intern/writeframeserver.c @@ -1,5 +1,4 @@ /* - * $Id$ * * Frameserver * Makes Blender accessible from TMPGenc directly using VFAPI (you can diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h index 2db288192cc..e287606921b 100644 --- a/source/blender/blenkernel/nla_private.h +++ b/source/blender/blenkernel/nla_private.h @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or |