diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-18 15:26:11 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-18 15:26:11 +0400 |
commit | 910f04ca6373510f463de2541576b479671dc2ef (patch) | |
tree | 544499dbbab4c371052e54cc1a32e7a60e64206a /source/blender/blenkernel | |
parent | f261d58b6dfd68ae936ed8b76c8399df7a34a071 (diff) | |
parent | f3bef40b0cf2a10bcffedae6c5235e3f5537670f (diff) |
Merged changes in the trunk up to revision 44221.
Conflicts resolved:
release/datafiles/blender_icons.png
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/blenkernel')
97 files changed, 505 insertions, 377 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index a887412bbf4..40e2a4082f6 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DERIVEDMESH_H -#define BKE_DERIVEDMESH_H +#ifndef __BKE_DERIVEDMESH_H__ +#define __BKE_DERIVEDMESH_H__ /** \file BKE_DerivedMesh.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 67efb7752ea..564cd235869 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ACTION_H -#define BKE_ACTION_H +#ifndef __BKE_ACTION_H__ +#define __BKE_ACTION_H__ /** \file BKE_action.h * \ingroup bke * \brief Blender kernel action and pose functionality. diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h index a55955c4d04..d605776ed50 100644 --- a/source/blender/blenkernel/BKE_anim.h +++ b/source/blender/blenkernel/BKE_anim.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ANIM_H -#define BKE_ANIM_H +#ifndef __BKE_ANIM_H__ +#define __BKE_ANIM_H__ /** \file BKE_anim.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 8e5b313b919..fb4a44b2c80 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ANIM_SYS_H -#define BKE_ANIM_SYS_H +#ifndef __BKE_ANIMSYS_H__ +#define __BKE_ANIMSYS_H__ /** \file BKE_animsys.h * \ingroup bke @@ -160,4 +160,4 @@ void animsys_evaluate_action_group(struct PointerRNA *ptr, struct bAction *act, /* ************************************* */ -#endif /* BKE_ANIM_SYS_H*/ +#endif /* __BKE_ANIMSYS_H__*/ diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 07d8d69f44e..b09122d022b 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ARMATURE_H -#define BKE_ARMATURE_H +#ifndef __BKE_ARMATURE_H__ +#define __BKE_ARMATURE_H__ /** \file BKE_armature.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 7236015054d..1c661b3804f 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BLENDER_H -#define BKE_BLENDER_H +#ifndef __BKE_BLENDER_H__ +#define __BKE_BLENDER_H__ /** \file BKE_blender.h * \ingroup bke @@ -41,8 +41,8 @@ extern "C" { /* these lines are grep'd, watch out for our not-so-awesome regex * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ -#define BLENDER_VERSION 261 -#define BLENDER_SUBVERSION 4 +#define BLENDER_VERSION 262 +#define BLENDER_SUBVERSION 0 #define BLENDER_MINVERSION 250 #define BLENDER_MINSUBVERSION 0 @@ -51,7 +51,7 @@ extern "C" { /* can be left blank, otherwise a,b,c... etc with no quotes */ #define BLENDER_VERSION_CHAR /* alpha/beta/rc/release, docs use this */ -#define BLENDER_VERSION_CYCLE rc +#define BLENDER_VERSION_CYCLE alpha extern char versionstr[]; /* from blender.c */ diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index c8df6c4f455..51fb0da61fa 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMESH_H -#define BKE_BMESH_H +#ifndef __BKE_BMESH_H__ +#define __BKE_BMESH_H__ /** \file BKE_bmesh.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h index 793410371df..bbdc6f39cff 100644 --- a/source/blender/blenkernel/BKE_bmeshCustomData.h +++ b/source/blender/blenkernel/BKE_bmeshCustomData.h @@ -26,8 +26,8 @@ */ -#ifndef BKE_BMESHCUSTOMDATA_H -#define BKE_BMESHCUSTOMDATA_H +#ifndef __BKE_BMESHCUSTOMDATA_H__ +#define __BKE_BMESHCUSTOMDATA_H__ /** \file BKE_bmeshCustomData.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmfont.h b/source/blender/blenkernel/BKE_bmfont.h index 71fd2ae3d67..6c0cbe3a51b 100644 --- a/source/blender/blenkernel/BKE_bmfont.h +++ b/source/blender/blenkernel/BKE_bmfont.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMFONT_H -#define BKE_BMFONT_H +#ifndef __BKE_BMFONT_H__ +#define __BKE_BMFONT_H__ /** \file BKE_bmfont.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmfont_types.h b/source/blender/blenkernel/BKE_bmfont_types.h index a4d37069cab..73ef0c3a2c3 100644 --- a/source/blender/blenkernel/BKE_bmfont_types.h +++ b/source/blender/blenkernel/BKE_bmfont_types.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMFONT_TYPES_H -#define BKE_BMFONT_TYPES_H +#ifndef __BKE_BMFONT_TYPES_H__ +#define __BKE_BMFONT_TYPES_H__ /** \file BKE_bmfont_types.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_boids.h b/source/blender/blenkernel/BKE_boids.h index 18e8be1512e..bb724c6632e 100644 --- a/source/blender/blenkernel/BKE_boids.h +++ b/source/blender/blenkernel/BKE_boids.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BOIDS_H -#define BKE_BOIDS_H +#ifndef __BKE_BOIDS_H__ +#define __BKE_BOIDS_H__ /** \file BKE_boids.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_booleanops_mesh.h b/source/blender/blenkernel/BKE_booleanops_mesh.h index 7c989ea17e6..2e48b664449 100644 --- a/source/blender/blenkernel/BKE_booleanops_mesh.h +++ b/source/blender/blenkernel/BKE_booleanops_mesh.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PyBooleanOps_h -#define BKE_PyBooleanOps_h +#ifndef __BKE_BOOLEANOPS_MESH_H__ +#define __BKE_BOOLEANOPS_MESH_H__ /** \file BKE_booleanops_mesh.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index 13f72634bda..f5cd2635ff7 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -26,8 +26,8 @@ * General operations for brushes. */ -#ifndef BKE_BRUSH_H -#define BKE_BRUSH_H +#ifndef __BKE_BRUSH_H__ +#define __BKE_BRUSH_H__ /** \file BKE_brush.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bullet.h b/source/blender/blenkernel/BKE_bullet.h index 5eb653f69d1..2103eea1041 100644 --- a/source/blender/blenkernel/BKE_bullet.h +++ b/source/blender/blenkernel/BKE_bullet.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BULLET_H -#define BKE_BULLET_H +#ifndef __BKE_BULLET_H__ +#define __BKE_BULLET_H__ /** \file BKE_bullet.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index 07f0c2fef7c..d3d8546ddae 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BVHUTILS_H -#define BKE_BVHUTILS_H +#ifndef __BKE_BVHUTILS_H__ +#define __BKE_BVHUTILS_H__ /** \file BKE_bvhutils.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h index 72e22dc1583..6d10219e74c 100644 --- a/source/blender/blenkernel/BKE_camera.h +++ b/source/blender/blenkernel/BKE_camera.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CAMERA_H -#define BKE_CAMERA_H +#ifndef __BKE_CAMERA_H__ +#define __BKE_CAMERA_H__ /** \file BKE_camera.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h index c71c86e110d..9b274a8a411 100644 --- a/source/blender/blenkernel/BKE_cdderivedmesh.h +++ b/source/blender/blenkernel/BKE_cdderivedmesh.h @@ -32,8 +32,8 @@ * mesh elements (vertices, edges and faces) as layers of custom element data. */ -#ifndef BKE_CDDERIVEDMESH_H -#define BKE_CDDERIVEDMESH_H +#ifndef __BKE_CDDERIVEDMESH_H__ +#define __BKE_CDDERIVEDMESH_H__ #include "BKE_DerivedMesh.h" diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 6d42b8dc80b..ec20e3234a3 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CLOTH_H -#define BKE_CLOTH_H +#ifndef __BKE_CLOTH_H__ +#define __BKE_CLOTH_H__ /** \file BKE_cloth.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index acb3ae03816..453c16bb8c8 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_COLLISIONS_H -#define BKE_COLLISIONS_H +#ifndef __BKE_COLLISION_H__ +#define __BKE_COLLISION_H__ /** \file BKE_collision.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h index b358209a0f4..1da0caf97c2 100644 --- a/source/blender/blenkernel/BKE_colortools.h +++ b/source/blender/blenkernel/BKE_colortools.h @@ -24,8 +24,8 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ -#ifndef BKE_COLORTOOLS_H -#define BKE_COLORTOOLS_H +#ifndef __BKE_COLORTOOLS_H__ +#define __BKE_COLORTOOLS_H__ /** \file BKE_colortools.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index 925d1180dbd..f834ad5e774 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CONSTRAINT_H -#define BKE_CONSTRAINT_H +#ifndef __BKE_CONSTRAINT_H__ +#define __BKE_CONSTRAINT_H__ /** \file BKE_constraint.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 0aefe2231a5..78354cd4713 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CONTEXT_H -#define BKE_CONTEXT_H +#ifndef __BKE_CONTEXT_H__ +#define __BKE_CONTEXT_H__ /** \file BKE_context.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index f0704741ebb..dd0c021f281 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CURVE_H -#define BKE_CURVE_H +#ifndef __BKE_CURVE_H__ +#define __BKE_CURVE_H__ /** \file BKE_curve.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 7ad25ac7e79..764088da47b 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -31,8 +31,8 @@ * \brief CustomData interface, see also DNA_customdata_types.h. */ -#ifndef BKE_CUSTOMDATA_H -#define BKE_CUSTOMDATA_H +#ifndef __BKE_CUSTOMDATA_H__ +#define __BKE_CUSTOMDATA_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenkernel/BKE_customdata_file.h b/source/blender/blenkernel/BKE_customdata_file.h index be7aaa70188..c4c41c20d80 100644 --- a/source/blender/blenkernel/BKE_customdata_file.h +++ b/source/blender/blenkernel/BKE_customdata_file.h @@ -18,8 +18,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CUSTOMDATA_FILE_H -#define BKE_CUSTOMDATA_FILE_H +#ifndef __BKE_CUSTOMDATA_FILE_H__ +#define __BKE_CUSTOMDATA_FILE_H__ /** \file BKE_customdata_file.h * \ingroup bke @@ -57,5 +57,5 @@ void cdf_remove(const char *filename); CDataFileLayer *cdf_layer_find(CDataFile *cdf, int type, const char *name); CDataFileLayer *cdf_layer_add(CDataFile *cdf, int type, const char *name, size_t datasize); -#endif /* BKE_CUSTOMDATA_FILE_H */ +#endif /* __BKE_CUSTOMDATA_FILE_H__ */ diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index 11747899aa9..2e9c94a3bb1 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DEFORM_H -#define BKE_DEFORM_H +#ifndef __BKE_DEFORM_H__ +#define __BKE_DEFORM_H__ /** \file BKE_deform.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index 5d475903feb..1bc85a64c77 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DEPSGRAPH_API -#define DEPSGRAPH_API +#ifndef __BKE_DEPSGRAPH_H__ +#define __BKE_DEPSGRAPH_H__ /** \file BKE_depsgraph.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h index 2d863201767..f43ec749a69 100644 --- a/source/blender/blenkernel/BKE_displist.h +++ b/source/blender/blenkernel/BKE_displist.h @@ -27,8 +27,8 @@ */ -#ifndef BKE_DISPLIST_H -#define BKE_DISPLIST_H +#ifndef __BKE_DISPLIST_H__ +#define __BKE_DISPLIST_H__ /** \file BKE_displist.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index 75b3c5b4f24..b6de8188536 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -11,8 +11,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DYNAMIC_PAINT_H_ -#define BKE_DYNAMIC_PAINT_H_ +#ifndef __BKE_DYNAMICPAINT_H__ +#define __BKE_DYNAMICPAINT_H__ struct bContext; struct wmOperator; @@ -88,4 +88,4 @@ void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, char* #define DPAINT_WAVE_OBSTACLE 1 #define DPAINT_WAVE_REFLECT_ONLY 2 -#endif /* BKE_DYNAMIC_PAINT_H_ */ +#endif /* __BKE_DYNAMICPAINT_H__ */ diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 3ebd57dde39..c2706ddb5c0 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_EFFECT_H -#define BKE_EFFECT_H +#ifndef __BKE_EFFECT_H__ +#define __BKE_EFFECT_H__ /** \file BKE_effect.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 27e9140ba77..d79d6a204b9 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_FCURVE_H -#define BKE_FCURVE_H +#ifndef __BKE_FCURVE_H__ +#define __BKE_FCURVE_H__ /** \file BKE_fcurve.h * \ingroup bke @@ -270,4 +270,4 @@ void fcurve_store_samples(struct FCurve *fcu, void *data, int start, int end, Fc } #endif -#endif /* BKE_FCURVE_H*/ +#endif /* __BKE_FCURVE_H__*/ diff --git a/source/blender/blenkernel/BKE_fluidsim.h b/source/blender/blenkernel/BKE_fluidsim.h index 2b2c7a4ff87..c2b1b1d6cad 100644 --- a/source/blender/blenkernel/BKE_fluidsim.h +++ b/source/blender/blenkernel/BKE_fluidsim.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_FLUIDSIM_H -#define BKE_FLUIDSIM_H +#ifndef __BKE_FLUIDSIM_H__ +#define __BKE_FLUIDSIM_H__ /** \file BKE_fluidsim.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_font.h b/source/blender/blenkernel/BKE_font.h index e164294b9a2..e94787cfd3c 100644 --- a/source/blender/blenkernel/BKE_font.h +++ b/source/blender/blenkernel/BKE_font.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_VFONT_H -#define BKE_VFONT_H +#ifndef __BKE_FONT_H__ +#define __BKE_FONT_H__ /** \file BKE_font.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index ee3edbb47e7..fab42b5667b 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GLOBAL_H -#define BKE_GLOBAL_H +#ifndef __BKE_GLOBAL_H__ +#define __BKE_GLOBAL_H__ /** \file BKE_global.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h index dbb1107c228..bb0216fe11c 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GPENCIL_H -#define BKE_GPENCIL_H +#ifndef __BKE_GPENCIL_H__ +#define __BKE_GPENCIL_H__ /** \file BKE_gpencil.h * \ingroup bke @@ -63,4 +63,4 @@ struct bGPDlayer *gpencil_layer_getactive(struct bGPdata *gpd); void gpencil_layer_setactive(struct bGPdata *gpd, struct bGPDlayer *active); void gpencil_layer_delactive(struct bGPdata *gpd); -#endif /* BKE_GPENCIL_H */ +#endif /* __BKE_GPENCIL_H__ */ diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h index 044a40658c3..6629f0bdf7f 100644 --- a/source/blender/blenkernel/BKE_group.h +++ b/source/blender/blenkernel/BKE_group.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GROUP_H -#define BKE_GROUP_H +#ifndef __BKE_GROUP_H__ +#define __BKE_GROUP_H__ /** \file BKE_group.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index ee18a41dbfe..85f259c3d94 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ICONS_H -#define BKE_ICONS_H +#ifndef __BKE_ICONS_H__ +#define __BKE_ICONS_H__ /** \file BKE_icons.h * \ingroup bke @@ -90,4 +90,4 @@ struct PreviewImage* BKE_previewimg_copy(struct PreviewImage *prv); /* retrieve existing or create new preview image */ struct PreviewImage* BKE_previewimg_get(struct ID *id); -#endif /* BKE_ICONS_H */ +#endif /* __BKE_ICONS_H__ */ diff --git a/source/blender/blenkernel/BKE_idcode.h b/source/blender/blenkernel/BKE_idcode.h index 57855a7082f..2188bed1bf7 100644 --- a/source/blender/blenkernel/BKE_idcode.h +++ b/source/blender/blenkernel/BKE_idcode.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ID_INFO_H -#define BKE_ID_INFO_H +#ifndef __BKE_IDCODE_H__ +#define __BKE_IDCODE_H__ /** \file BKE_idcode.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index fbe5bf2ef44..5a661f7c731 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef _BKE_IDPROP_H -#define _BKE_IDPROP_H +#ifndef __BKE_IDPROP_H__ +#define __BKE_IDPROP_H__ /** \file BKE_idprop.h * \ingroup bke @@ -204,4 +204,4 @@ void IDP_UnlinkProperty(struct IDProperty *prop); #define IDP_IDPArray(prop) ((IDProperty*)(prop)->data.pointer) #define IDP_Double(prop) (*(double*)&(prop)->data.val) -#endif /* _BKE_IDPROP_H */ +#endif /* __BKE_IDPROP_H__ */ diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 5cdc3537f5b..722ead80ad9 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_IMAGE_H -#define BKE_IMAGE_H +#ifndef __BKE_IMAGE_H__ +#define __BKE_IMAGE_H__ /** \file BKE_image.h * \ingroup bke @@ -54,10 +54,10 @@ int BKE_alphatest_ibuf(struct ImBuf *ibuf); int BKE_write_ibuf_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); int BKE_write_ibuf(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); int BKE_write_ibuf_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy); -void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, char imtype, const short use_ext, const short use_frames); +void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames); int BKE_add_image_extension(char *string, const char imtype); char BKE_ftype_to_imtype(const int ftype); -int BKE_imtype_to_ftype(char imtype); +int BKE_imtype_to_ftype(const char imtype); int BKE_imtype_is_movie(const char imtype); int BKE_imtype_supports_zbuf(const char imtype); diff --git a/source/blender/blenkernel/BKE_ipo.h b/source/blender/blenkernel/BKE_ipo.h index d21b0597976..547e7de7634 100644 --- a/source/blender/blenkernel/BKE_ipo.h +++ b/source/blender/blenkernel/BKE_ipo.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_IPO_H -#define BKE_IPO_H +#ifndef __BKE_IPO_H__ +#define __BKE_IPO_H__ /** \file BKE_ipo.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index c055bb2004b..c1f75baf8ff 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_KEY_H -#define BKE_KEY_H +#ifndef __BKE_KEY_H__ +#define __BKE_KEY_H__ /** \file BKE_key.h * \ingroup bke @@ -87,4 +87,4 @@ extern int slurph_opt; }; #endif -#endif // BKE_KEY_H +#endif // __BKE_KEY_H__ diff --git a/source/blender/blenkernel/BKE_lamp.h b/source/blender/blenkernel/BKE_lamp.h index cc9452ae155..50e25576320 100644 --- a/source/blender/blenkernel/BKE_lamp.h +++ b/source/blender/blenkernel/BKE_lamp.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LAMP_H -#define BKE_LAMP_H +#ifndef __BKE_LAMP_H__ +#define __BKE_LAMP_H__ /** \file BKE_lamp.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h index b5395309896..8a1529a7ad0 100644 --- a/source/blender/blenkernel/BKE_lattice.h +++ b/source/blender/blenkernel/BKE_lattice.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LATTICE_H -#define BKE_LATTICE_H +#ifndef __BKE_LATTICE_H__ +#define __BKE_LATTICE_H__ /** \file BKE_lattice.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index e8d6c85664b..e18a510ac07 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LIBRARY_TYPES_H -#define BKE_LIBRARY_TYPES_H +#ifndef __BKE_LIBRARY_H__ +#define __BKE_LIBRARY_H__ /** \file BKE_library.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index 7a7f6dfb6f9..b5fb0aca27f 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MAIN_H -#define BKE_MAIN_H +#ifndef __BKE_MAIN_H__ +#define __BKE_MAIN_H__ /** \file BKE_main.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index 0079ecb7d9c..3e73f6b9dd9 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MATERIAL_H -#define BKE_MATERIAL_H +#ifndef __BKE_MATERIAL_H__ +#define __BKE_MATERIAL_H__ /** \file BKE_material.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h index 3dde54fd811..e3b5a006edf 100644 --- a/source/blender/blenkernel/BKE_mball.h +++ b/source/blender/blenkernel/BKE_mball.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MBALL_H -#define BKE_MBALL_H +#ifndef __BKE_MBALL_H__ +#define __BKE_MBALL_H__ /** \file BKE_mball.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 30a4b154e31..ba6bf330b1e 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MESH_H -#define BKE_MESH_H +#ifndef __BKE_MESH_H__ +#define __BKE_MESH_H__ /** \file BKE_mesh.h * \ingroup bke @@ -213,4 +213,4 @@ void mesh_loops_to_mface_corners(struct CustomData *fdata, struct CustomData *ld } #endif -#endif /* BKE_MESH_H */ +#endif /* __BKE_MESH_H__ */ diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index f72bc5b93ec..895fe64bea8 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MODIFIER_H -#define BKE_MODIFIER_H +#ifndef __BKE_MODIFIER_H__ +#define __BKE_MODIFIER_H__ /** \file BKE_modifier.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h index eabbf459584..2d78e924c90 100644 --- a/source/blender/blenkernel/BKE_movieclip.h +++ b/source/blender/blenkernel/BKE_movieclip.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MOVIECLIP_H -#define BKE_MOVIECLIP_H +#ifndef __BKE_MOVIECLIP_H__ +#define __BKE_MOVIECLIP_H__ /** \file BKE_movieclip.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index 4f1262cd523..53a92f8c2ce 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MULTIRES_H -#define BKE_MULTIRES_H +#ifndef __BKE_MULTIRES_H__ +#define __BKE_MULTIRES_H__ /** \file BKE_multires.h * \ingroup bke @@ -94,5 +94,5 @@ void mdisp_apply_weight(const int S, const int corners, int x, int y, const int void mdisp_flip_disp(const int S, const int corners, const float axis_x[2], const float axis_y[2], float disp[3]); void mdisp_join_tris(struct MDisps *dst, struct MDisps *tri1, struct MDisps *tri2); -#endif // BKE_MULTIRES_H +#endif // __BKE_MULTIRES_H__ diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h index ab5c2b19707..8de53ed8b8e 100644 --- a/source/blender/blenkernel/BKE_navmesh_conversion.h +++ b/source/blender/blenkernel/BKE_navmesh_conversion.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NAVMESH_CONVERSION_H -#define BKE_NAVMESH_CONVERSION_H +#ifndef __BKE_NAVMESH_CONVERSION_H__ +#define __BKE_NAVMESH_CONVERSION_H__ struct DerivedMesh; diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h index 773c5ced1cb..921972c9fa8 100644 --- a/source/blender/blenkernel/BKE_nla.h +++ b/source/blender/blenkernel/BKE_nla.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NLA_H -#define BKE_NLA_H +#ifndef __BKE_NLA_H__ +#define __BKE_NLA_H__ /** \file BKE_nla.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 0cccd8a366b..ae2f9305894 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NODE_H -#define BKE_NODE_H +#ifndef __BKE_NODE_H__ +#define __BKE_NODE_H__ /** \file BKE_node.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 828b0b47e3a..ac703663864 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_OBJECT_H -#define BKE_OBJECT_H +#ifndef __BKE_OBJECT_H__ +#define __BKE_OBJECT_H__ /** \file BKE_object.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_ocean.h b/source/blender/blenkernel/BKE_ocean.h index c8ce3f8ce63..7c0d99b35ea 100644 --- a/source/blender/blenkernel/BKE_ocean.h +++ b/source/blender/blenkernel/BKE_ocean.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_OCEAN_H -#define BKE_OCEAN_H +#ifndef __BKE_OCEAN_H__ +#define __BKE_OCEAN_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h index 606d6167937..1eff20cbd57 100644 --- a/source/blender/blenkernel/BKE_packedFile.h +++ b/source/blender/blenkernel/BKE_packedFile.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PACKEDFILE_H -#define BKE_PACKEDFILE_H +#ifndef __BKE_PACKEDFILE_H__ +#define __BKE_PACKEDFILE_H__ /** \file BKE_packedFile.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 081b79b44d6..c048dad82eb 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PAINT_H -#define BKE_PAINT_H +#ifndef __BKE_PAINT_H__ +#define __BKE_PAINT_H__ /** \file BKE_paint.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index dbefbd95a15..c03ecca17cf 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PARTICLE_H -#define BKE_PARTICLE_H +#ifndef __BKE_PARTICLE_H__ +#define __BKE_PARTICLE_H__ /** \file BKE_particle.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_plugin_types.h b/source/blender/blenkernel/BKE_plugin_types.h index 73c6dae35cf..8f9706f9833 100644 --- a/source/blender/blenkernel/BKE_plugin_types.h +++ b/source/blender/blenkernel/BKE_plugin_types.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PLUGIN_TYPES_H -#define BKE_PLUGIN_TYPES_H +#ifndef __BKE_PLUGIN_TYPES_H__ +#define __BKE_PLUGIN_TYPES_H__ /** \file BKE_plugin_types.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index d1b0acf7142..38f0503b40d 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_POINTCACHE_H -#define BKE_POINTCACHE_H +#ifndef __BKE_POINTCACHE_H__ +#define __BKE_POINTCACHE_H__ /** \file BKE_pointcache.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_property.h b/source/blender/blenkernel/BKE_property.h index 779c83acf21..a29dc0e7be4 100644 --- a/source/blender/blenkernel/BKE_property.h +++ b/source/blender/blenkernel/BKE_property.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PROPERTY_H -#define BKE_PROPERTY_H +#ifndef __BKE_PROPERTY_H__ +#define __BKE_PROPERTY_H__ /** \file BKE_property.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h index 784f8a63757..fd372ae6d83 100644 --- a/source/blender/blenkernel/BKE_report.h +++ b/source/blender/blenkernel/BKE_report.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_REPORT_H -#define BKE_REPORT_H +#ifndef __BKE_REPORT_H__ +#define __BKE_REPORT_H__ /** \file BKE_report.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sca.h b/source/blender/blenkernel/BKE_sca.h index cfcc0e146d8..22b44511195 100644 --- a/source/blender/blenkernel/BKE_sca.h +++ b/source/blender/blenkernel/BKE_sca.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCA_H -#define BKE_SCA_H +#ifndef __BKE_SCA_H__ +#define __BKE_SCA_H__ /** \file BKE_sca.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 2df5e7ac2c6..e46d99ed873 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCENE_H -#define BKE_SCENE_H +#ifndef __BKE_SCENE_H__ +#define __BKE_SCENE_H__ /** \file BKE_scene.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 44b92f70519..c254144b812 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCREEN_H -#define BKE_SCREEN_H +#ifndef __BKE_SCREEN_H__ +#define __BKE_SCREEN_H__ /** \file BKE_screen.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_script.h b/source/blender/blenkernel/BKE_script.h index d8ceaf23652..7bd801a8177 100644 --- a/source/blender/blenkernel/BKE_script.h +++ b/source/blender/blenkernel/BKE_script.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCRIPT_H -#define BKE_SCRIPT_H +#ifndef __BKE_SCRIPT_H__ +#define __BKE_SCRIPT_H__ /** \file BKE_script.h * \ingroup bke @@ -46,4 +46,4 @@ void free_script (struct Script *script); } #endif -#endif /* BKE_SCRIPT_H */ +#endif /* __BKE_SCRIPT_H__ */ diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index ed0730b7f09..5c6058b1453 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SEQUENCER_H -#define BKE_SEQUENCER_H +#ifndef __BKE_SEQUENCER_H__ +#define __BKE_SEQUENCER_H__ /** \file BKE_sequencer.h * \ingroup bke @@ -341,4 +341,4 @@ extern SequencerDrawView sequencer_view3d_cb; extern ListBase seqbase_clipboard; extern int seqbase_clipboard_frame; -#endif // BKE_SEQUENCER_H +#endif // __BKE_SEQUENCER_H__ diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h index d1fef8b0ce1..446084053de 100644 --- a/source/blender/blenkernel/BKE_shrinkwrap.h +++ b/source/blender/blenkernel/BKE_shrinkwrap.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SHRINKWRAP_H -#define BKE_SHRINKWRAP_H +#ifndef __BKE_SHRINKWRAP_H__ +#define __BKE_SHRINKWRAP_H__ /** \file BKE_shrinkwrap.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h index 1dd82c1d8e6..76b3dbacf7f 100644 --- a/source/blender/blenkernel/BKE_sketch.h +++ b/source/blender/blenkernel/BKE_sketch.h @@ -19,8 +19,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SKETCH_H -#define BKE_SKETCH_H +#ifndef __BKE_SKETCH_H__ +#define __BKE_SKETCH_H__ /** \file BKE_sketch.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_smoke.h b/source/blender/blenkernel/BKE_smoke.h index 51acef44f52..1e97bc07f99 100644 --- a/source/blender/blenkernel/BKE_smoke.h +++ b/source/blender/blenkernel/BKE_smoke.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SMOKE_H_ -#define BKE_SMOKE_H_ +#ifndef __BKE_SMOKE_H__ +#define __BKE_SMOKE_H__ /** \file BKE_smoke.h * \ingroup bke @@ -45,4 +45,4 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData long long smoke_get_mem_req(int xres, int yres, int zres, int amplify); -#endif /* BKE_SMOKE_H_ */ +#endif /* __BKE_SMOKE_H__ */ diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h index c889aa83b9a..6714225f513 100644 --- a/source/blender/blenkernel/BKE_softbody.h +++ b/source/blender/blenkernel/BKE_softbody.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SOFTBODY_H -#define BKE_SOFTBODY_H +#ifndef __BKE_SOFTBODY_H__ +#define __BKE_SOFTBODY_H__ /** \file BKE_softbody.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index fdf1d09559d..8b01dbde531 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SOUND_H -#define BKE_SOUND_H +#ifndef __BKE_SOUND_H__ +#define __BKE_SOUND_H__ /** \file BKE_sound.h * \ingroup bke @@ -79,7 +79,7 @@ void sound_load(struct Main *main, struct bSound* sound); void sound_free(struct bSound* sound); -#ifdef AUD_CAPI +#ifdef __AUD_C_API_H__ AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume); #endif diff --git a/source/blender/blenkernel/BKE_speaker.h b/source/blender/blenkernel/BKE_speaker.h index d309c048f1a..fddcfb2c7f3 100644 --- a/source/blender/blenkernel/BKE_speaker.h +++ b/source/blender/blenkernel/BKE_speaker.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SPEAKER_H -#define BKE_SPEAKER_H +#ifndef __BKE_SPEAKER_H__ +#define __BKE_SPEAKER_H__ /** \file BKE_speaker.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_subsurf.h b/source/blender/blenkernel/BKE_subsurf.h index dcbd045f62d..5e56cc7b3be 100644 --- a/source/blender/blenkernel/BKE_subsurf.h +++ b/source/blender/blenkernel/BKE_subsurf.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SUBSURF_H -#define BKE_SUBSURF_H +#ifndef __BKE_SUBSURF_H__ +#define __BKE_SUBSURF_H__ /** \file BKE_subsurf.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h index a0a270422c7..6168b98ac4c 100644 --- a/source/blender/blenkernel/BKE_suggestions.h +++ b/source/blender/blenkernel/BKE_suggestions.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SUGGESTIONS_H -#define BKE_SUGGESTIONS_H +#ifndef __BKE_SUGGESTIONS_H__ +#define __BKE_SUGGESTIONS_H__ /** \file BKE_suggestions.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index f0c054560c4..504b859c183 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TEXT_H -#define BKE_TEXT_H +#ifndef __BKE_TEXT_H__ +#define __BKE_TEXT_H__ /** \file BKE_text.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h index a67a06ef9fb..2574c45eec2 100644 --- a/source/blender/blenkernel/BKE_texture.h +++ b/source/blender/blenkernel/BKE_texture.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TEXTURE_H -#define BKE_TEXTURE_H +#ifndef __BKE_TEXTURE_H__ +#define __BKE_TEXTURE_H__ /** \file BKE_texture.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h index f720050f59c..1be858ecf80 100644 --- a/source/blender/blenkernel/BKE_tracking.h +++ b/source/blender/blenkernel/BKE_tracking.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TRACKING_H -#define BKE_TRACKING_H +#ifndef __BKE_TRACKING_H__ +#define __BKE_TRACKING_H__ /** \file BKE_trackingp.h * \ingroup bke @@ -138,7 +138,7 @@ void BKE_tracking_detect_fast(struct MovieTracking *tracking, struct ListBase *t /* 2D stabilization */ void BKE_tracking_stabilization_data(struct MovieTracking *tracking, int framenr, int width, int height, float loc[2], float *scale, float *angle); struct ImBuf *BKE_tracking_stabilize(struct MovieTracking *tracking, int framenr, struct ImBuf *ibuf, float loc[2], float *scale, float *angle); -void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float scale, float angle, float mat[4][4]); +void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect, float loc[2], float scale, float angle, float mat[4][4]); /* Distortion/Undistortion */ void BKE_tracking_apply_intrinsics(struct MovieTracking *tracking, float co[2], float nco[2]); diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h index db586f6d262..e3ad49e2225 100644 --- a/source/blender/blenkernel/BKE_unit.h +++ b/source/blender/blenkernel/BKE_unit.h @@ -20,8 +20,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_UNIT_H -#define BKE_UNIT_H +#ifndef __BKE_UNIT_H__ +#define __BKE_UNIT_H__ /** \file BKE_unit.h * \ingroup bke @@ -76,4 +76,4 @@ double bUnit_GetScaler(void *usys_pt, int index); } #endif -#endif /* BKE_UNIT_H */ +#endif /* __BKE_UNIT_H__ */ diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h index a6a9bb0c0f6..39458cb3a13 100644 --- a/source/blender/blenkernel/BKE_utildefines.h +++ b/source/blender/blenkernel/BKE_utildefines.h @@ -33,8 +33,8 @@ */ -#ifndef BKE_UTILDEFINES_H -#define BKE_UTILDEFINES_H +#ifndef __BKE_UTILDEFINES_H__ +#define __BKE_UTILDEFINES_H__ #ifdef __cplusplus extern "C" { @@ -89,4 +89,4 @@ extern "C" { } #endif -#endif // BKE_UTILDEFINES_H +#endif // __BKE_UTILDEFINES_H__ diff --git a/source/blender/blenkernel/BKE_world.h b/source/blender/blenkernel/BKE_world.h index fe25279dcfb..16ff3acaf71 100644 --- a/source/blender/blenkernel/BKE_world.h +++ b/source/blender/blenkernel/BKE_world.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WORLD_H -#define BKE_WORLD_H +#ifndef __BKE_WORLD_H__ +#define __BKE_WORLD_H__ /** \file BKE_world.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeavi.h b/source/blender/blenkernel/BKE_writeavi.h index c906761f3d7..03174fb5284 100644 --- a/source/blender/blenkernel/BKE_writeavi.h +++ b/source/blender/blenkernel/BKE_writeavi.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEAVI_H -#define BKE_WRITEAVI_H +#ifndef __BKE_WRITEAVI_H__ +#define __BKE_WRITEAVI_H__ /** \file BKE_writeavi.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h index 4c42d1e4a6c..299f8e185cf 100644 --- a/source/blender/blenkernel/BKE_writeffmpeg.h +++ b/source/blender/blenkernel/BKE_writeffmpeg.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEFFMPEG_H -#define BKE_WRITEFFMPEG_H +#ifndef __BKE_WRITEFFMPEG_H__ +#define __BKE_WRITEFFMPEG_H__ /** \file BKE_writeffmpeg.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeframeserver.h b/source/blender/blenkernel/BKE_writeframeserver.h index 040550d8faa..cb607e1473c 100644 --- a/source/blender/blenkernel/BKE_writeframeserver.h +++ b/source/blender/blenkernel/BKE_writeframeserver.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEFRAMESERVER_H -#define BKE_WRITEFRAMESERVER_H +#ifndef __BKE_WRITEFRAMESERVER_H__ +#define __BKE_WRITEFRAMESERVER_H__ /** \file BKE_writeframeserver.h * \ingroup bke diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index 0338d10a66d..0db3c5615f5 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -27,8 +27,8 @@ * \ingroup bke */ -#ifndef DEPSGRAPH_PRIVATE -#define DEPSGRAPH_PRIVATE +#ifndef __DEPSGRAPH_PRIVATE_H__ +#define __DEPSGRAPH_PRIVATE_H__ #include "BKE_depsgraph.h" #include "DNA_constraint_types.h" diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index d47bf8cb436..9867292d2ab 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -89,6 +89,7 @@ short id_type_can_have_animdata (ID *id) case ID_LS: case ID_SPK: case ID_SCE: + case ID_MC: { return 1; } @@ -794,6 +795,9 @@ void BKE_animdata_main_cb (Main *mainptr, ID_AnimData_Edit_Callback func, void * /* speakers */ ANIMDATA_IDS_CB(mainptr->speaker.first); + /* movie clips */ + ANIMDATA_IDS_CB(mainptr->movieclip.first); + /* objects */ ANIMDATA_IDS_CB(mainptr->object.first); @@ -878,6 +882,9 @@ void BKE_all_animdata_fix_paths_rename (const char *prefix, const char *oldName, /* speakers */ RENAMEFIX_ANIM_IDS(mainptr->speaker.first); + /* movie clips */ + RENAMEFIX_ANIM_IDS(mainptr->movieclip.first); + /* objects */ RENAMEFIX_ANIM_IDS(mainptr->object.first); @@ -2342,6 +2349,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) /* speakers */ EVAL_ANIM_IDS(main->speaker.first, ADT_RECALC_ANIM); + /* movie clips */ + EVAL_ANIM_IDS(main->movieclip.first, ADT_RECALC_ANIM); + /* linestyles */ EVAL_ANIM_IDS(main->linestyle.first, ADT_RECALC_ANIM); diff --git a/source/blender/blenkernel/intern/bmesh_private.h b/source/blender/blenkernel/intern/bmesh_private.h index d0b03883e6e..10074813fae 100644 --- a/source/blender/blenkernel/intern/bmesh_private.h +++ b/source/blender/blenkernel/intern/bmesh_private.h @@ -35,8 +35,8 @@ */ -#ifndef BMESH_PRIVATE -#define BMESH_PRIVATE +#ifndef __BMESH_PRIVATE_H__ +#define __BMESH_PRIVATE_H__ #include "BKE_bmesh.h" diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c90faa7e0ca..69b32ce46f8 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -64,6 +64,7 @@ #include "BLI_mempool.h" #include "BLI_threads.h" +#include "BKE_animsys.h" #include "BKE_constraint.h" #include "BKE_library.h" #include "BKE_global.h" @@ -276,9 +277,10 @@ typedef struct MovieClipCache { struct { ImBuf *ibuf; int framenr; + int postprocess_flag; - float loc[2], scale, angle; - int proxy; + float loc[2], scale, angle, aspect; + int proxy, filter; short render_flag; } stabilized; } MovieClipCache; @@ -701,9 +703,10 @@ ImBuf *BKE_movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user return movieclip_get_postprocessed_ibuf(clip, user, clip->flag, postprocess_flag, 0); } -static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr) +static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr, int postprocess_flag) { MovieClipCache *cache = clip->cache; + MovieTracking *tracking = &clip->tracking; ImBuf *stableibuf; float tloc[2], tscale, tangle; short proxy = IMB_PROXY_NONE; @@ -722,6 +725,16 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int if(cache->stabilized.render_flag!=render_flag || cache->stabilized.proxy!=proxy) return NULL; + if(cache->stabilized.postprocess_flag != postprocess_flag) + return NULL; + + /* stabilization also depends on pixel aspect ratio */ + if(cache->stabilized.aspect != tracking->camera.pixel_aspect) + return NULL; + + if(cache->stabilized.filter != tracking->stabilization.filter) + return NULL; + stableibuf = cache->stabilized.ibuf; BKE_tracking_stabilization_data(&clip->tracking, framenr, stableibuf->x, stableibuf->y, tloc, &tscale, &tangle); @@ -739,9 +752,11 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int return stableibuf; } -static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int framenr) +static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, + int framenr, int postprocess_flag) { MovieClipCache *cache = clip->cache; + MovieTracking *tracking = &clip->tracking; ImBuf *stableibuf; float tloc[2], tscale, tangle; @@ -757,6 +772,8 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.scale = tscale; cache->stabilized.angle = tangle; cache->stabilized.framenr = framenr; + cache->stabilized.aspect = tracking->camera.pixel_aspect; + cache->stabilized.filter = tracking->stabilization.filter; if(clip->flag&MCLIP_USE_PROXY) { cache->stabilized.proxy= rendersize_to_proxy(user, clip->flag); @@ -767,6 +784,8 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.render_flag = 0; } + cache->stabilized.postprocess_flag = postprocess_flag; + IMB_refImBuf(stableibuf); return stableibuf; @@ -785,10 +804,10 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float if(clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) { MovieClipCache *cache= clip->cache; - stableibuf= get_stable_cached_frame(clip, user, framenr); + stableibuf= get_stable_cached_frame(clip, user, framenr, postprocess_flag); if(!stableibuf) - stableibuf= put_stabilized_frame_to_cache(clip, user, ibuf, framenr); + stableibuf= put_stabilized_frame_to_cache(clip, user, ibuf, framenr, postprocess_flag); if(loc) copy_v2_v2(loc, cache->stabilized.loc); if(scale) *scale= cache->stabilized.scale; @@ -889,6 +908,8 @@ static void free_buffers(MovieClip *clip) IMB_free_anim(clip->anim); clip->anim= FALSE; } + + BKE_free_animdata((ID *) clip); } void BKE_movieclip_reload(MovieClip *clip) diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index cd3933d3c44..f0b05846670 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -1365,6 +1365,35 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData if(pind->keyed || pind->cache || point_vel) mul_v3_fl(result->vel, 1.f/invdt); } + +static void interpolate_pathcache(ParticleCacheKey *first, float t, ParticleCacheKey *result) +{ + int i=0; + ParticleCacheKey *cur = first; + + /* scale the requested time to fit the entire path even if the path is cut early */ + t *= (first+first->steps)->time; + + while(i<first->steps && cur->time < t) + cur++; + + if(cur->time == t) + *result = *cur; + else { + float dt = (t-(cur-1)->time)/(cur->time-(cur-1)->time); + interp_v3_v3v3(result->co, (cur-1)->co, cur->co, dt); + interp_v3_v3v3(result->vel, (cur-1)->vel, cur->vel, dt); + interp_qt_qtqt(result->rot, (cur-1)->rot, cur->rot, dt); + result->time = t; + } + + /* first is actual base rotation, others are incremental from first */ + if(cur==first || cur-1==first) + copy_qt_qt(result->rot, first->rot); + else + mul_qt_qtqt(result->rot, first->rot, result->rot); +} + /************************************************/ /* Particles on a dm */ /************************************************/ @@ -2648,6 +2677,8 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle /* offset the child from the parent position */ offset_child(cpa, (ParticleKey*)(key[0]+k), par_rot, (ParticleKey*)child, part->childflat, part->childrad); } + + child->time = (float)k/(float)ctx->steps; } /* apply effectors */ @@ -3009,6 +3040,8 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) if(k==1) copy_v3_v3((ca-1)->vel, ca->vel); + + ca->time = (float)k/(float)steps; } /* First rotation is based on emitting face orientation. * This is way better than having flipping rotations resulting @@ -3089,6 +3122,9 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf if(edit->totcached && !(point->flag & PEP_EDIT_RECALC)) continue; + if(point->totkey == 0) + continue; + ekey = point->keys; pind.keyed = 0; @@ -4013,84 +4049,105 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey * CLAMP(t, 0.0f, 1.0f); if(p<totpart){ - pa = psys->particles + p; - pind.keyed = keyed; - pind.cache = cached ? psys->pointcache : NULL; - pind.epoint = NULL; - pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE); - /* pind.dm disabled in editmode means we dont get effectors taken into - * account when subdividing for instance */ - pind.dm = psys_in_edit_mode(sim->scene, psys) ? NULL : psys->hair_out_dm; - init_particle_interpolation(sim->ob, psys, pa, &pind); - do_particle_interpolation(psys, p, pa, t, &pind, state); - - if(pind.dm) { - mul_m4_v3(sim->ob->obmat, state->co); - mul_mat3_m4_v3(sim->ob->obmat, state->vel); - } - else if(!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) { - if((pa->flag & PARS_REKEY)==0) { - psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat); - mul_m4_v3(hairmat, state->co); - mul_mat3_m4_v3(hairmat, state->vel); - - if(sim->psys->effectors && (part->flag & PART_CHILD_GUIDE)==0) { - do_guides(sim->psys->effectors, state, p, state->time); - /* TODO: proper velocity handling */ - } + /* interpolate pathcache directly if it exist */ + if(psys->pathcache) { + ParticleCacheKey result; + interpolate_pathcache(psys->pathcache[p], t, &result); + copy_v3_v3(state->co, result.co); + copy_v3_v3(state->vel, result.vel); + copy_qt_qt(state->rot, result.rot); + } + /* otherwise interpolate with other means */ + else { + pa = psys->particles + p; + + pind.keyed = keyed; + pind.cache = cached ? psys->pointcache : NULL; + pind.epoint = NULL; + pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE); + /* pind.dm disabled in editmode means we dont get effectors taken into + * account when subdividing for instance */ + pind.dm = psys_in_edit_mode(sim->scene, psys) ? NULL : psys->hair_out_dm; + init_particle_interpolation(sim->ob, psys, pa, &pind); + do_particle_interpolation(psys, p, pa, t, &pind, state); + + if(pind.dm) { + mul_m4_v3(sim->ob->obmat, state->co); + mul_mat3_m4_v3(sim->ob->obmat, state->vel); + } + else if(!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) { + if((pa->flag & PARS_REKEY)==0) { + psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat); + mul_m4_v3(hairmat, state->co); + mul_mat3_m4_v3(hairmat, state->vel); + + if(sim->psys->effectors && (part->flag & PART_CHILD_GUIDE)==0) { + do_guides(sim->psys->effectors, state, p, state->time); + /* TODO: proper velocity handling */ + } - if(psys->lattice && edit==0) - calc_latt_deform(psys->lattice, state->co,1.0f); + if(psys->lattice && edit==0) + calc_latt_deform(psys->lattice, state->co,1.0f); + } } } } else if(totchild){ //invert_m4_m4(imat,ob->obmat); - cpa=psys->child+p-totpart; + /* interpolate childcache directly if it exists */ + if(psys->childcache) { + ParticleCacheKey result; + interpolate_pathcache(psys->childcache[p-totpart], t, &result); + copy_v3_v3(state->co, result.co); + copy_v3_v3(state->vel, result.vel); + copy_qt_qt(state->rot, result.rot); + } + else { + cpa=psys->child+p-totpart; - if(state->time < 0.0f) - t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL); + if(state->time < 0.0f) + t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL); - if(totchild && part->childtype==PART_CHILD_FACES){ - /* part->parents could still be 0 so we can't test with totparent */ - between=1; - } - if(between){ - int w = 0; - float foffset; - - /* get parent states */ - while(w<4 && cpa->pa[w]>=0){ - keys[w].time = state->time; - psys_get_particle_on_path(sim, cpa->pa[w], keys+w, 1); - w++; + if(totchild && part->childtype==PART_CHILD_FACES){ + /* part->parents could still be 0 so we can't test with totparent */ + between=1; } + if(between){ + int w = 0; + float foffset; + + /* get parent states */ + while(w<4 && cpa->pa[w]>=0){ + keys[w].time = state->time; + psys_get_particle_on_path(sim, cpa->pa[w], keys+w, 1); + w++; + } - /* get the original coordinates (orco) for texture usage */ - cpa_num=cpa->num; + /* get the original coordinates (orco) for texture usage */ + cpa_num=cpa->num; - foffset= cpa->foffset; - cpa_fuv = cpa->fuv; - cpa_from = PART_FROM_FACE; + foffset= cpa->foffset; + cpa_fuv = cpa->fuv; + cpa_from = PART_FROM_FACE; - psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,0,0,0,orco,0); + psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,0,0,0,orco,0); - /* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */ - //copy_v3_v3(cpa_1st,co); + /* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */ + //copy_v3_v3(cpa_1st,co); - //mul_m4_v3(ob->obmat,cpa_1st); + //mul_m4_v3(ob->obmat,cpa_1st); - pa = psys->particles + cpa->parent; + pa = psys->particles + cpa->parent; - if(part->type == PART_HAIR) - psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat); - else - unit_m4(hairmat); + if(part->type == PART_HAIR) + psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat); + else + unit_m4(hairmat); - pa=0; - } - else{ + pa=0; + } + else{ /* get the parent state */ keys->time = state->time; psys_get_particle_on_path(sim, cpa->parent, keys,1); @@ -4114,74 +4171,75 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey * } } - /* correct child ipo timing */ -#if 0 // XXX old animation system - if((part->flag&PART_ABS_TIME)==0 && part->ipo){ - calc_ipo(part->ipo, 100.0f*t); - execute_ipo((ID *)part, part->ipo); - } -#endif // XXX old animation system + /* correct child ipo timing */ + #if 0 // XXX old animation system + if((part->flag&PART_ABS_TIME)==0 && part->ipo){ + calc_ipo(part->ipo, 100.0f*t); + execute_ipo((ID *)part, part->ipo); + } + #endif // XXX old animation system - /* get different child parameters from textures & vgroups */ - memset(&ctx, 0, sizeof(ParticleThreadContext)); - ctx.sim = *sim; - ctx.dm = psmd->dm; - ctx.ma = ma; - /* TODO: assign vertex groups */ - get_child_modifier_parameters(part, &ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex); - - if(between){ - int w=0; + /* get different child parameters from textures & vgroups */ + memset(&ctx, 0, sizeof(ParticleThreadContext)); + ctx.sim = *sim; + ctx.dm = psmd->dm; + ctx.ma = ma; + /* TODO: assign vertex groups */ + get_child_modifier_parameters(part, &ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex); + + if(between){ + int w=0; + + state->co[0] = state->co[1] = state->co[2] = 0.0f; + state->vel[0] = state->vel[1] = state->vel[2] = 0.0f; + + /* child position is the weighted sum of parent positions */ + while(w<4 && cpa->pa[w]>=0){ + state->co[0] += cpa->w[w] * keys[w].co[0]; + state->co[1] += cpa->w[w] * keys[w].co[1]; + state->co[2] += cpa->w[w] * keys[w].co[2]; + + state->vel[0] += cpa->w[w] * keys[w].vel[0]; + state->vel[1] += cpa->w[w] * keys[w].vel[1]; + state->vel[2] += cpa->w[w] * keys[w].vel[2]; + w++; + } + /* apply offset for correct positioning */ + //add_v3_v3(state->co, cpa_1st); + } + else{ + /* offset the child from the parent position */ + offset_child(cpa, keys, keys->rot, state, part->childflat, part->childrad); + } - state->co[0] = state->co[1] = state->co[2] = 0.0f; - state->vel[0] = state->vel[1] = state->vel[2] = 0.0f; + par = keys; - /* child position is the weighted sum of parent positions */ - while(w<4 && cpa->pa[w]>=0){ - state->co[0] += cpa->w[w] * keys[w].co[0]; - state->co[1] += cpa->w[w] * keys[w].co[1]; - state->co[2] += cpa->w[w] * keys[w].co[2]; - - state->vel[0] += cpa->w[w] * keys[w].vel[0]; - state->vel[1] += cpa->w[w] * keys[w].vel[1]; - state->vel[2] += cpa->w[w] * keys[w].vel[2]; - w++; - } - /* apply offset for correct positioning */ - //add_v3_v3(state->co, cpa_1st); - } - else{ - /* offset the child from the parent position */ - offset_child(cpa, keys, keys->rot, state, part->childflat, part->childrad); - } + if(vel) + copy_particle_key(&tstate, state, 1); - par = keys; + /* apply different deformations to the child path */ + do_child_modifiers(sim, &ptex, par, par->rot, cpa, orco, hairmat, state, t); - if(vel) - copy_particle_key(&tstate, state, 1); + /* try to estimate correct velocity */ + if(vel){ + ParticleKey tstate; + float length = len_v3(state->vel); - /* apply different deformations to the child path */ - do_child_modifiers(sim, &ptex, par, par->rot, cpa, orco, hairmat, state, t); - - /* try to estimate correct velocity */ - if(vel){ - ParticleKey tstate; - float length = len_v3(state->vel); - - if(t>=0.001f){ - tstate.time=t-0.001f; - psys_get_particle_on_path(sim,p,&tstate,0); - sub_v3_v3v3(state->vel,state->co,tstate.co); - normalize_v3(state->vel); - } - else{ - tstate.time=t+0.001f; - psys_get_particle_on_path(sim,p,&tstate,0); - sub_v3_v3v3(state->vel,tstate.co,state->co); - normalize_v3(state->vel); - } + if(t>=0.001f){ + tstate.time=t-0.001f; + psys_get_particle_on_path(sim,p,&tstate,0); + sub_v3_v3v3(state->vel,state->co,tstate.co); + normalize_v3(state->vel); + } + else{ + tstate.time=t+0.001f; + psys_get_particle_on_path(sim,p,&tstate,0); + sub_v3_v3v3(state->vel,tstate.co,state->co); + normalize_v3(state->vel); + } - mul_v3_fl(state->vel, length); + mul_v3_fl(state->vel, length); + } } } } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 5a64da7354e..c00101c98ab 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3407,6 +3407,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra) ParticleSystem *psys = sim->psys; ParticleSettings *part = psys->part; ParticleEditSettings *pset = &sim->scene->toolsettings->particle; + Base *base; int distr=0, alloc=0, skip=0; if((psys->part->childtype && psys->totchild != get_psys_tot_child(sim->scene, psys)) || psys->recalc&PSYS_RECALC_RESET) @@ -3449,6 +3450,19 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra) } } + + /* particle instance modifier with "path" option need cached paths even if particle system doesn't */ + for (base = sim->scene->base.first; base; base= base->next) { + ModifierData *md = modifiers_findByType(base->object, eModifierType_ParticleInstance); + if(md) { + ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md; + if(pimd->flag & eParticleInstanceFlag_Path && pimd->ob == sim->ob && pimd->psys == (psys - (ParticleSystem*)sim->ob->particlesystem.first)) { + skip = 0; + break; + } + } + } + if(!skip) { psys_cache_paths(sim, cfra); @@ -4414,6 +4428,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys) if(psys->totpart == 0 && part->totpart == 0) { psys_free_path_cache(psys, NULL); free_hair(ob, psys, 0); + psys->flag |= PSYS_HAIR_DONE; } /* (re-)create hair */ else if(hair_needs_recalc(psys)) { diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 6fd89db10e7..bf9ed8b17e3 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2285,7 +2285,7 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra /* float offset; unused for now */ float time, nexttime; - /* TODO: this has to be sorter out once bsystem_time gets redone, */ + /* TODO: this has to be sorted out once bsystem_time gets redone, */ /* now caches can handle interpolating etc. too - jahka */ /* time handling for point cache: diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index d18a71d3c55..b2188754503 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -523,31 +523,12 @@ void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq, } -void calc_sequence_disp(Scene *scene, Sequence *seq) -{ - if(seq->startofs && seq->startstill) seq->startstill= 0; - if(seq->endofs && seq->endstill) seq->endstill= 0; - - seq->startdisp= seq->start + seq->startofs - seq->startstill; - seq->enddisp= seq->start+seq->len - seq->endofs + seq->endstill; - - seq->handsize= 10.0; /* 10 frames */ - if( seq->enddisp-seq->startdisp < 10 ) { - seq->handsize= (float)(0.5*(seq->enddisp-seq->startdisp)); - } - else if(seq->enddisp-seq->startdisp > 250) { - seq->handsize= (float)((seq->enddisp-seq->startdisp)/25); - } - - seq_update_sound_bounds(scene, seq); -} - static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) { Sequence *seq; /* for sound we go over full meta tree to update bounds of the sound strips, - since sound is played outside of evaluating the imbufs, */ + * since sound is played outside of evaluating the imbufs, */ for(seq=metaseq->seqbase.first; seq; seq=seq->next) { if(seq->type == SEQ_META) { seq_update_sound_bounds_recursive(scene, seq); @@ -567,6 +548,29 @@ static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) } } +void calc_sequence_disp(Scene *scene, Sequence *seq) +{ + if(seq->startofs && seq->startstill) seq->startstill= 0; + if(seq->endofs && seq->endstill) seq->endstill= 0; + + seq->startdisp= seq->start + seq->startofs - seq->startstill; + seq->enddisp= seq->start+seq->len - seq->endofs + seq->endstill; + + seq->handsize= 10.0; /* 10 frames */ + if( seq->enddisp-seq->startdisp < 10 ) { + seq->handsize= (float)(0.5*(seq->enddisp-seq->startdisp)); + } + else if(seq->enddisp-seq->startdisp > 250) { + seq->handsize= (float)((seq->enddisp-seq->startdisp)/25); + } + + if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { + seq_update_sound_bounds(scene, seq); + } + else if(seq->type == SEQ_META) + seq_update_sound_bounds_recursive(scene, seq); +} + void calc_sequence(Scene *scene, Sequence *seq) { Sequence *seqm; @@ -1188,11 +1192,10 @@ static void seq_open_anim_file(Sequence * seq) } -static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra, char * name) +static int seq_proxy_get_fname(Sequence * seq, int cfra, int render_size, char * name) { int frameno; char dir[PROXY_MAXFILE]; - int render_size = context.preview_render_size; if (!seq->strip->proxy) { return FALSE; @@ -1222,22 +1225,17 @@ static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra, return TRUE; } - /* dirty hack to distinguish 100% render size from PROXY_100 */ - if (render_size == 99) { - render_size = 100; - } - /* generate a separate proxy directory for each preview size */ if (seq->type == SEQ_IMAGE) { BLI_snprintf(name, PROXY_MAXFILE, "%s/images/%d/%s_proxy", dir, - context.preview_render_size, + render_size, give_stripelem(seq, cfra)->name); frameno = 1; } else { frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; BLI_snprintf(name, PROXY_MAXFILE, "%s/proxy_misc/%d/####", dir, - context.preview_render_size); + render_size); } BLI_path_abs(name, G.main->name); @@ -1254,6 +1252,12 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int IMB_Proxy_Size psize = seq_rendersize_to_proxysize( context.preview_render_size); int size_flags; + int render_size = context.preview_render_size; + + /* dirty hack to distinguish 100% render size from PROXY_100 */ + if (render_size == 99) { + render_size = 100; + } if (!(seq->flag & SEQ_USE_PROXY)) { return NULL; @@ -1269,7 +1273,7 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) { int frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; if (seq->strip->proxy->anim == NULL) { - if (seq_proxy_get_fname(context, seq, cfra, name)==0) { + if (seq_proxy_get_fname(seq, cfra, render_size, name)==0) { return NULL; } @@ -1288,7 +1292,7 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int IMB_TC_NONE, IMB_PROXY_NONE); } - if (seq_proxy_get_fname(context, seq, cfra, name) == 0) { + if (seq_proxy_get_fname(seq, cfra, render_size, name) == 0) { return NULL; } @@ -1309,7 +1313,7 @@ static void seq_proxy_build_frame(SeqRenderData context, int ok; struct ImBuf * ibuf; - if (!seq_proxy_get_fname(context, seq, cfra, name)) { + if (!seq_proxy_get_fname(seq, cfra, proxy_render_size, name)) { return; } @@ -2576,8 +2580,8 @@ static void seq_stop_threads() seq_thread_shutdown = TRUE; - pthread_cond_broadcast(&wakeup_cond); - pthread_mutex_unlock(&wakeup_lock); + pthread_cond_broadcast(&wakeup_cond); + pthread_mutex_unlock(&wakeup_lock); for(tslot = running_threads.first; tslot; tslot= tslot->next) { pthread_join(tslot->pthread, NULL); diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 695ea1dc07a..7461e057df5 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -726,6 +726,7 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) { MovieTrackingTrack *track; MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + MovieTrackingTrack *rot_track= tracking->stabilization.rot_track; ListBase tracks= {NULL, NULL}, new_tracks= {NULL, NULL}; ListBase *old_tracks; int a; @@ -747,7 +748,7 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) this is needed to keep names in unique state and it's faster to change names of currently operating tracks (if needed) */ for(a= 0; a<map->num_tracks; a++) { - int replace_sel= 0; + int replace_sel= 0, replace_rot= 0; MovieTrackingTrack *new_track, *old; track= &map->tracks[a]; @@ -766,8 +767,10 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) /* original track was found, re-use flags and remove this track */ if(cur) { - if(act_track) + if(cur==act_track) replace_sel= 1; + if(cur==rot_track) + replace_rot= 1; track->flag= cur->flag; track->pat_flag= cur->pat_flag; @@ -786,6 +789,9 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) if(replace_sel) /* update current selection in clip */ tracking->act_track= new_track; + if(replace_rot) /* update track used for rotation stabilization */ + tracking->stabilization.rot_track= new_track; + BLI_addtail(&tracks, new_track); } @@ -2445,8 +2451,8 @@ static void calculate_stabdata(MovieTracking *tracking, int framenr, float width *scale= (stab->scale-1.0f)*stab->scaleinf+1.0f; *angle= 0.0f; - loc[0]= (firstmedian[0]-median[0])*width*(*scale); - loc[1]= (firstmedian[1]-median[1])*height*(*scale); + loc[0]= (firstmedian[0]-median[0])*width; + loc[1]= (firstmedian[1]-median[1])*height; mul_v2_fl(loc, stab->locinf); @@ -2479,6 +2485,7 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, { float firstmedian[2]; MovieTrackingStabilization *stab= &tracking->stabilization; + float aspect= tracking->camera.pixel_aspect; if(stab->ok) return stab->scale; @@ -2529,7 +2536,7 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, float mat[4][4]; float points[4][2]={{0.0f, 0.0f}, {0.0f, height}, {width, height}, {width, 0.0f}}; - BKE_tracking_stabdata_to_mat4(width, height, loc, scale, angle, mat); + BKE_tracking_stabdata_to_mat4(width, height, aspect, loc, scale, angle, mat); for(i= 0; i<4; i++) { int j; @@ -2644,6 +2651,7 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, MovieTrackingStabilization *stab= &tracking->stabilization; ImBuf *tmpibuf; float width= ibuf->x, height= ibuf->y; + float aspect= tracking->camera.pixel_aspect; if(loc) copy_v2_v2(tloc, loc); if(scale) tscale= *scale; @@ -2680,19 +2688,26 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, IMB_rectcpy(tmpibuf, ibuf, tloc[0]-(tscale-1.0f)*width/2.0f, tloc[1]-(tscale-1.0f)*height/2.0f, 0, 0, ibuf->x, ibuf->y); } else { float mat[4][4]; - int i, j; + int i, j, filter= tracking->stabilization.filter; + void (*interpolation) (struct ImBuf*, struct ImBuf*, float, float, int, int) = NULL; - BKE_tracking_stabdata_to_mat4(ibuf->x, ibuf->y, tloc, tscale, tangle, mat); + BKE_tracking_stabdata_to_mat4(ibuf->x, ibuf->y, aspect, tloc, tscale, tangle, mat); invert_m4(mat); + if(filter == TRACKING_FILTER_NEAREAST) + interpolation = neareast_interpolation; + else if(filter == TRACKING_FILTER_BILINEAR) + interpolation = bilinear_interpolation; + else if(filter == TRACKING_FILTER_BICUBIC) + interpolation = bicubic_interpolation; + for(j=0; j<tmpibuf->y; j++) { for(i=0; i<tmpibuf->x;i++) { float vec[3]= {i, j, 0}; mul_v3_m4v3(vec, mat, vec); - /* TODO: add selector for interpolation method */ - neareast_interpolation(ibuf, tmpibuf, vec[0], vec[1], i, j); + interpolation(ibuf, tmpibuf, vec[0], vec[1], i, j); } } } @@ -2709,15 +2724,20 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, return tmpibuf; } -void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float scale, float angle, float mat[4][4]) +void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect, float loc[2], float scale, float angle, float mat[4][4]) { - float lmat[4][4], rmat[4][4], smat[4][4], cmat[4][4], icmat[4][4]; + float lmat[4][4], rmat[4][4], smat[4][4], cmat[4][4], icmat[4][4], amat[4][4], iamat[4][4]; float svec[3]= {scale, scale, scale}; unit_m4(rmat); unit_m4(lmat); unit_m4(smat); unit_m4(cmat); + unit_m4(amat); + + /* aspect ratio correction matrix */ + amat[0][0] = 1.0f / aspect; + invert_m4_m4(iamat, amat); /* image center as rotation center */ cmat[3][0]= (float)width/2.0f; @@ -2725,11 +2745,11 @@ void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float sc invert_m4_m4(icmat, cmat); size_to_mat4(smat, svec); /* scale matrix */ - add_v2_v2(lmat[3], loc); /* tranlation matrix */ + add_v2_v2(lmat[3], loc); /* translation matrix */ rotate_m4(rmat, 'Z', angle); /* rotation matrix */ /* compose transformation matrix */ - mul_serie_m4(mat, lmat, cmat, rmat, smat, icmat, NULL, NULL, NULL); + mul_serie_m4(mat, amat, lmat, cmat, rmat, smat, icmat, iamat, NULL); } MovieDistortion *BKE_tracking_distortion_create(void) diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index bae4d9c4b4e..e9f7823dfe8 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1244,7 +1244,7 @@ static void ffmpeg_set_expert_options(RenderData *rd) * The other options were taken from the libx264-default.preset * included in the ffmpeg distribution. */ - ffmpeg_property_add_string(rd, "video", "flags:loop"); +// ffmpeg_property_add_string(rd, "video", "flags:loop"); // this breaks compatibility for QT ffmpeg_property_add_string(rd, "video", "cmp:chroma"); ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h index e287606921b..51a7ac7ee62 100644 --- a/source/blender/blenkernel/nla_private.h +++ b/source/blender/blenkernel/nla_private.h @@ -30,8 +30,8 @@ */ -#ifndef NLA_PRIVATE -#define NLA_PRIVATE +#ifndef __NLA_PRIVATE_H__ +#define __NLA_PRIVATE_H__ /* --------------- NLA Evaluation DataTypes ----------------------- */ @@ -85,4 +85,4 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short void nlastrip_evaluate(PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes); void nladata_flush_channels(ListBase *channels); -#endif // NLA_PRIVATE +#endif // __NLA_PRIVATE_H__ |