diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-30 11:50:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-30 11:50:59 +0300 |
commit | d7ddffdcce6db03e63c09c566b57a1252101058f (patch) | |
tree | ae967c1bafeaf6abbe76012772d49ea488076fe6 /source | |
parent | a5180abde0b5b958b331c026d4cd1628b6d2c747 (diff) | |
parent | 59740a6c985efbf5369d27a5919e184036d0287a (diff) |
Merge branch 'master' into gooseberry
Conflicts:
release/scripts/startup/bl_ui/properties_physics_smoke.py
source/blender/editors/include/ED_transform.h
source/blender/editors/space_view3d/view3d_intern.h
Diffstat (limited to 'source')
381 files changed, 1416 insertions, 1261 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index a026cc2e76e..70b08b2ec7b 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -97,7 +97,6 @@ struct ColorBand; struct GPUVertexAttribs; struct GPUDrawObject; struct BMEditMesh; -struct ListBase; struct PBVH; /* number of sub-elements each mesh element has (for interpolation) */ diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index f51e0fe6979..6fd490723ab 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -46,8 +46,6 @@ struct bItasc; struct bPoseChannel; struct Main; struct Object; -struct Scene; -struct ID; /* Kernel prototypes */ #ifdef __cplusplus diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h index 3b839a2fc15..4824c33d244 100644 --- a/source/blender/blenkernel/BKE_anim.h +++ b/source/blender/blenkernel/BKE_anim.h @@ -35,7 +35,6 @@ struct EvaluationContext; struct Path; struct Object; -struct PartEff; struct Scene; struct ListBase; struct bAnimVizSettings; diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 66e204e51e0..de767d39216 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -36,13 +36,10 @@ struct Bone; struct Main; struct bArmature; -struct bPose; struct bPoseChannel; struct bConstraint; struct Scene; struct Object; -struct MDeformVert; -struct Mesh; struct PoseTree; struct ListBase; diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 98672025028..e4d3fe4868b 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -55,7 +55,6 @@ extern "C" { extern char versionstr[]; /* from blender.c */ -struct ListBase; struct MemFile; struct bContext; struct ReportList; diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index 49975fa0276..f8cd51b331d 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -27,14 +27,11 @@ * General operations for brushes. */ -struct ID; struct Brush; struct ImBuf; struct ImagePool; struct Main; -struct rctf; struct Scene; -struct wmOperator; // enum CurveMappingPreset; diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index a7fad85ed42..81621f9d3e7 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -36,15 +36,11 @@ #include "BLI_math_inline.h" struct Object; -struct ListBase; struct Scene; struct MFace; struct DerivedMesh; struct ClothModifierData; struct CollisionModifierData; -struct CollisionTree; -struct VoxelData; -struct PartDeflect; #define DO_INLINE MALWAYS_INLINE diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index b81b8f04817..bdc20324bee 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -43,16 +43,12 @@ #include "BLI_kdopbvh.h" -struct Cloth; -struct ClothModifierData; struct CollisionModifierData; -struct DerivedMesh; struct Group; struct MFace; struct MVert; struct Object; struct Scene; -struct LinkNode; //////////////////////////////////////// // used for collisions in collision.c diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 04990ad7144..205b96c12b0 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -53,7 +53,6 @@ struct StructRNA; struct ToolSettings; struct Image; struct Text; -struct ImBuf; struct EditBone; struct bPoseChannel; struct bGPdata; diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 60cbf8b302e..ec3c0447269 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -33,7 +33,6 @@ * \author nzc */ -struct BevList; struct BezTriple; struct Curve; struct EditNurb; diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 6a0cfefb1c2..ab49270ca64 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -46,7 +46,6 @@ extern "C" { struct BMesh; struct ID; struct CustomData; -struct CustomDataLayer; typedef uint64_t CustomDataMask; /*a data type large enough to hold 1 element from any customdata layer type*/ diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index 08312035e40..a45893b00fa 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -39,7 +39,6 @@ struct Object; struct ListBase; struct bDeformGroup; struct MDeformVert; -struct MVert; struct MEdge; struct MLoop; struct MPoly; diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index 27cf19d7d06..1887a892b2e 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -48,7 +48,6 @@ struct ID; struct Main; struct Object; struct Scene; -struct ListBase; /* Dependency graph evaluation context * diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h index 0afc457f2b5..3b096773d96 100644 --- a/source/blender/blenkernel/BKE_displist.h +++ b/source/blender/blenkernel/BKE_displist.h @@ -53,14 +53,9 @@ /* prototypes */ -struct Base; struct Scene; struct Object; -struct Curve; struct ListBase; -struct Material; -struct Bone; -struct Mesh; struct DerivedMesh; struct EvaluationContext; diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index 1aba72e8cd8..e7384fb1a9c 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -27,8 +27,6 @@ * \ingroup bke */ -struct bContext; -struct wmOperator; struct Scene; /* Actual surface point */ diff --git a/source/blender/blenkernel/BKE_editmesh.h b/source/blender/blenkernel/BKE_editmesh.h index f80e03fda9b..d0b94117b23 100644 --- a/source/blender/blenkernel/BKE_editmesh.h +++ b/source/blender/blenkernel/BKE_editmesh.h @@ -32,7 +32,6 @@ struct BMesh; struct BMLoop; -struct BMFace; struct Mesh; struct Scene; struct DerivedMesh; diff --git a/source/blender/blenkernel/BKE_editmesh_bvh.h b/source/blender/blenkernel/BKE_editmesh_bvh.h index 3ee7dcd94b8..3736efff146 100644 --- a/source/blender/blenkernel/BKE_editmesh_bvh.h +++ b/source/blender/blenkernel/BKE_editmesh_bvh.h @@ -39,7 +39,6 @@ struct BMVert; struct BMLoop; struct BMBVHTree; struct BVHTree; -struct Scene; typedef struct BMBVHTree BMBVHTree; diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index c4c27e1060d..f8fee444d91 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -39,11 +39,8 @@ struct Object; struct Scene; -struct Effect; struct ListBase; -struct Particle; struct Group; -struct RNG; struct ParticleSimulationData; struct ParticleData; struct ParticleKey; diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 83783946d4f..275ab3f1ebb 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -223,12 +223,12 @@ struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, c */ int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, const char *dataName); -/* find an f-curve based on an rna property. */ +/* Find an f-curve based on an rna property. */ struct FCurve *rna_get_fcurve(struct PointerRNA *ptr, struct PropertyRNA *prop, int rnaindex, - struct AnimData **adt, struct bAction **action, bool *r_driven); + struct AnimData **adt, struct bAction **action, bool *r_driven, bool *r_special); /* Same as above, but takes a context data, temp hack needed for complex paths like texture ones. */ struct FCurve *rna_get_fcurve_context_ui(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, - int rnaindex, struct AnimData **adt, struct bAction **action, bool *r_driven); + int rnaindex, struct AnimData **adt, struct bAction **action, bool *r_driven, bool *r_special); /* Binary search algorithm for finding where to 'insert' BezTriple with given frame number. * Returns the index to insert at (data already at that index will be offset if replace is 0) diff --git a/source/blender/blenkernel/BKE_fluidsim.h b/source/blender/blenkernel/BKE_fluidsim.h index 433c10b82f1..6501c968abc 100644 --- a/source/blender/blenkernel/BKE_fluidsim.h +++ b/source/blender/blenkernel/BKE_fluidsim.h @@ -34,9 +34,7 @@ struct Object; struct Scene; -struct FluidsimModifierData; struct FluidsimSettings; -struct DerivedMesh; struct MVert; /* old interface */ diff --git a/source/blender/blenkernel/BKE_font.h b/source/blender/blenkernel/BKE_font.h index e12ce3df476..137670215cc 100644 --- a/source/blender/blenkernel/BKE_font.h +++ b/source/blender/blenkernel/BKE_font.h @@ -40,8 +40,6 @@ extern "C" { struct VFont; struct Object; struct Curve; -struct objfnt; -struct TmpFont; struct CharInfo; struct Main; diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 57003ffc3aa..935a922b3ec 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -45,7 +45,6 @@ extern "C" { /* forwards */ struct Main; -struct Object; typedef struct Global { diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h index 820e1ea1494..d856e90a340 100644 --- a/source/blender/blenkernel/BKE_group.h +++ b/source/blender/blenkernel/BKE_group.h @@ -36,10 +36,8 @@ struct Base; struct EvaluationContext; struct Group; -struct GroupObject; struct Main; struct Object; -struct bAction; struct Scene; void BKE_group_free(struct Group *group); diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 2c9ecef4c2d..3b7ba24d20b 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -39,7 +39,6 @@ extern "C" { struct Image; struct ImBuf; -struct Tex; struct anim; struct Scene; struct Object; diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index 61aac255762..fc7ab6a9da8 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -38,7 +38,6 @@ struct ID; struct ListBase; struct Curve; struct Object; -struct Scene; struct Lattice; struct Mesh; struct ParticleSystem; diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index 2f20505bea3..56393727d28 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -40,8 +40,6 @@ struct Main; struct Material; struct ID; struct Object; -struct Mesh; -struct MTFace; struct Scene; /* materials */ diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h index aa9ba45938e..70f932f3292 100644 --- a/source/blender/blenkernel/BKE_mball.h +++ b/source/blender/blenkernel/BKE_mball.h @@ -32,7 +32,6 @@ * \since March 2001 * \author nzc */ -struct EvaluationContext; struct Main; struct MetaBall; struct Object; diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 003d3ffd677..a5d4abcbf43 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -33,13 +33,11 @@ struct ID; struct BoundBox; -struct DispList; struct EdgeHash; struct ListBase; struct LinkNode; struct BLI_Stack; struct MemArena; -struct BMEditMesh; struct BMesh; struct DupliObjectData; struct Main; @@ -50,18 +48,11 @@ struct MFace; struct MEdge; struct MVert; struct MDeformVert; -struct MCol; struct Object; -struct MTFace; -struct VecNor; struct CustomData; struct DerivedMesh; struct Scene; struct MLoopUV; -struct UvVertMap; -struct UvMapVert; -struct UvElementMap; -struct UvElement; struct ReportList; #ifdef __cplusplus diff --git a/source/blender/blenkernel/BKE_mesh_remap.h b/source/blender/blenkernel/BKE_mesh_remap.h index 752270a8120..c6d8da16565 100644 --- a/source/blender/blenkernel/BKE_mesh_remap.h +++ b/source/blender/blenkernel/BKE_mesh_remap.h @@ -28,7 +28,6 @@ struct CustomData; struct DerivedMesh; struct MVert; -struct MeshElemMap; struct MemArena; /* Generic ways to map some geometry elements from a source mesh to a dest one. */ diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 1ec4e23abca..e9223590e9d 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -39,7 +39,6 @@ struct DagNode; struct Object; struct Scene; struct ListBase; -struct LinkNode; struct bArmature; struct Main; struct ModifierData; diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h index a4aa58e22f1..2cdd2ec88e0 100644 --- a/source/blender/blenkernel/BKE_movieclip.h +++ b/source/blender/blenkernel/BKE_movieclip.h @@ -37,7 +37,6 @@ struct Main; struct MovieClip; struct MovieClipScopes; struct MovieClipUser; -struct MovieTrackingTrack; struct MovieDistortion; void BKE_movieclip_free(struct MovieClip *clip); diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index 11d81a149b1..627b8d6fdbd 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -34,9 +34,7 @@ enum MultiresModifiedFlags; struct DerivedMesh; -struct GridHidden; struct MDisps; -struct MFace; struct Mesh; struct ModifierData; struct Multires; diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 44ac3b7bb38..ee63771406e 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -62,24 +62,20 @@ struct bNodeTreeExec; struct bNodeExecContext; struct bNodeExecData; struct GPUMaterial; -struct GPUNode; struct GPUNodeStack; struct ID; struct ImBuf; struct ImageFormatData; struct ListBase; struct Main; -struct uiBlock; struct uiLayout; struct MTex; struct PointerRNA; -struct rctf; struct RenderData; struct Scene; struct Tex; struct SpaceNode; struct ARegion; -struct Object; struct ColorManagedViewSettings; struct ColorManagedDisplaySettings; struct bNodeInstanceHash; @@ -978,7 +974,6 @@ void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMateria #define CMP_TRACKPOS_ABSOLUTE_FRAME 3 /* API */ -struct CompBuf; void ntreeCompositExecTree(struct Scene *scene, struct bNodeTree *ntree, struct RenderData *rd, int rendering, int do_previews, const struct ColorManagedViewSettings *view_settings, const struct ColorManagedDisplaySettings *display_settings); void ntreeCompositTagRender(struct Scene *sce); diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 1c6f7221bec..0ddc9b0b256 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -37,15 +37,10 @@ struct Base; struct EvaluationContext; struct Scene; struct Object; -struct Camera; struct BoundBox; struct View3D; struct SoftBody; struct BulletSoftBody; -struct Group; -struct bAction; -struct RenderData; -struct rctf; struct MovieClip; struct Main; struct RigidBodyWorld; diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 9076eada312..d5cd1fd5d3e 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -37,12 +37,10 @@ struct BMesh; struct BMFace; struct Brush; struct CurveMapping; -struct MDisps; struct MeshElemMap; struct GridPaintMask; struct Main; struct MFace; -struct MultireModifierData; struct MVert; struct Object; struct Paint; @@ -57,7 +55,6 @@ struct StrokeCache; struct Tex; struct ImagePool; struct UnifiedPaintSettings; -struct wmOperator; enum OverlayFlags; diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index d2ee0b13d9c..b1a3de278a4 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -45,10 +45,8 @@ struct ParticleSystemModifierData; struct ParticleSystem; struct ParticleKey; struct ParticleSettings; -struct HairKey; struct Main; -struct Group; struct Object; struct Scene; struct DerivedMesh; @@ -57,12 +55,10 @@ struct MTFace; struct MCol; struct MFace; struct MVert; -struct IpoCurve; struct LatticeDeformData; struct LinkNode; struct KDTree; struct RNG; -struct SurfaceModifierData; struct BVHTreeRay; struct BVHTreeRayHit; struct EdgeHash; diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index c8c693fc342..9276a6e14e9 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -35,7 +35,6 @@ struct CCGKey; struct CustomData; struct DMFlagMat; struct DMGridAdjacency; -struct GHash; struct MFace; struct MVert; struct PBVH; diff --git a/source/blender/blenkernel/BKE_rigidbody.h b/source/blender/blenkernel/BKE_rigidbody.h index c946f3ac9e8..0ae240e1f6b 100644 --- a/source/blender/blenkernel/BKE_rigidbody.h +++ b/source/blender/blenkernel/BKE_rigidbody.h @@ -39,7 +39,6 @@ struct RigidBodyOb; struct Scene; struct Object; -struct Group; /* -------------- */ /* Memory Management */ diff --git a/source/blender/blenkernel/BKE_sca.h b/source/blender/blenkernel/BKE_sca.h index d598a26fdf9..ebdd159b40c 100644 --- a/source/blender/blenkernel/BKE_sca.h +++ b/source/blender/blenkernel/BKE_sca.h @@ -31,7 +31,6 @@ * \ingroup bke */ -struct Text; struct bSensor; struct Object; struct bController; diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index c191f3805a6..27c89dd3a09 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -39,16 +39,13 @@ extern "C" { struct AviCodecData; struct Base; -struct DisplaySafeAreas; struct EvaluationContext; -struct bglMats; struct Main; struct Object; struct QuicktimeCodecData; struct RenderData; struct SceneRenderLayer; struct Scene; -struct Text; struct UnitSettings; struct Main; diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index efe2c52e99c..be6d39b5901 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -47,7 +47,6 @@ struct bContextDataResult; struct bScreen; struct uiLayout; struct uiList; -struct uiMenuItem; struct wmKeyConfig; struct wmNotifier; struct wmWindow; diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index ad50abe1d9d..4fbd40af237 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -38,11 +38,9 @@ struct GSet; struct ImBuf; struct Main; struct Mask; -struct MovieClip; struct Scene; struct Sequence; struct SequenceModifierData; -struct Strip; struct StripElem; struct bSound; diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h index 070cd4a9cf0..070f5c762db 100644 --- a/source/blender/blenkernel/BKE_shrinkwrap.h +++ b/source/blender/blenkernel/BKE_shrinkwrap.h @@ -47,7 +47,6 @@ */ struct Object; -struct Scene; struct DerivedMesh; struct MVert; struct MDeformVert; diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index d3919a3a6c0..819b49da8e9 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -35,9 +35,7 @@ #define SOUND_WAVE_SAMPLES_PER_SECOND 250 -struct PackedFile; struct bSound; -struct ListBase; struct Main; struct Sequence; diff --git a/source/blender/blenkernel/BKE_subsurf.h b/source/blender/blenkernel/BKE_subsurf.h index 3dae4087866..5190d254306 100644 --- a/source/blender/blenkernel/BKE_subsurf.h +++ b/source/blender/blenkernel/BKE_subsurf.h @@ -41,13 +41,11 @@ struct DerivedMesh; struct MeshElemMap; struct Mesh; struct MPoly; -struct MultiresSubsurf; struct Object; struct PBVH; struct SubsurfModifierData; struct CCGEdge; struct CCGFace; -struct CCGSubsurf; struct CCGVert; struct EdgeHash; struct PBVH; diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index 96e88f80464..c5f47ad6cbf 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -40,7 +40,6 @@ extern "C" { struct Main; struct Text; struct TextLine; -struct SpaceText; void BKE_text_free (struct Text *text); void txt_set_undostate (int u); diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h index 03ddbb706d7..4e5214bc364 100644 --- a/source/blender/blenkernel/BKE_texture.h +++ b/source/blender/blenkernel/BKE_texture.h @@ -42,9 +42,7 @@ struct Brush; struct ColorBand; struct EnvMap; struct FreestyleLineStyle; -struct HaloRen; struct Lamp; -struct LampRen; struct Main; struct Material; struct MTex; @@ -61,8 +59,6 @@ struct World; #define MAXCOLORBAND 32 -void BKE_texture_free(struct Tex *t); - void init_colorband(struct ColorBand *coba, bool rangetype); struct ColorBand *add_colorband(bool rangetype); bool do_colorband(const struct ColorBand *coba, float in, float out[4]); @@ -71,15 +67,17 @@ struct CBData *colorband_element_add(struct ColorBand *coba, float position); int colorband_element_remove(struct ColorBand *coba, int index); void colorband_update_sort(struct ColorBand *coba); -void default_tex(struct Tex *tex); -struct Tex *add_texture(struct Main *bmain, const char *name); -void tex_set_type(struct Tex *tex, int type); -void default_mtex(struct MTex *mtex); -struct MTex *add_mtex(void); -struct MTex *add_mtex_id(struct ID *id, int slot); -struct Tex *BKE_texture_copy(struct Tex *tex); -struct Tex *localize_texture(struct Tex *tex); -void BKE_texture_make_local(struct Tex *tex); +void BKE_texture_free(struct Tex *tex); +void BKE_texture_default(struct Tex *tex); +struct Tex *BKE_texture_copy(struct Tex *tex); +struct Tex *BKE_texture_add(struct Main *bmain, const char *name); +struct Tex *BKE_texture_localize(struct Tex *tex); +void BKE_texture_make_local(struct Tex *tex); +void BKE_texture_type_set(struct Tex *tex, int type); + +void BKE_texture_mtex_default(struct MTex *mtex); +struct MTex *BKE_texture_mtex_add(void); +struct MTex *BKE_texture_mtex_add_id(struct ID *id, int slot); /* UNUSED */ // void autotexname(struct Tex *tex); @@ -105,32 +103,32 @@ void set_current_particle_texture(struct ParticleSettings *part, struct Tex *tex bool has_current_material_texture(struct Material *ma); -struct TexMapping *add_tex_mapping(int type); -void default_tex_mapping(struct TexMapping *texmap, int type); -void init_tex_mapping(struct TexMapping *texmap); +struct TexMapping *BKE_texture_mapping_add(int type); +void BKE_texture_mapping_default(struct TexMapping *texmap, int type); +void BKE_texture_mapping_init(struct TexMapping *texmap); + +struct ColorMapping *BKE_texture_colormapping_add(void); +void BKE_texture_colormapping_default(struct ColorMapping *colormap); -struct ColorMapping *add_color_mapping(void); -void default_color_mapping(struct ColorMapping *colormap); +void BKE_texture_envmap_free_data(struct EnvMap *env); +void BKE_texture_envmap_free(struct EnvMap *env); +struct EnvMap *BKE_texture_envmap_add(void); +struct EnvMap *BKE_texture_envmap_copy(struct EnvMap *env); -void BKE_free_envmapdata(struct EnvMap *env); -void BKE_free_envmap(struct EnvMap *env); -struct EnvMap *BKE_add_envmap(void); -struct EnvMap *BKE_copy_envmap(struct EnvMap *env); +void BKE_texture_pointdensity_free_data(struct PointDensity *pd); +void BKE_texture_pointdensity_free(struct PointDensity *pd); +struct PointDensity *BKE_texture_pointdensity_add(void); +struct PointDensity *BKE_texture_pointdensity_copy(struct PointDensity *pd); -void BKE_free_pointdensitydata(struct PointDensity *pd); -void BKE_free_pointdensity(struct PointDensity *pd); -struct PointDensity *BKE_add_pointdensity(void); -struct PointDensity *BKE_copy_pointdensity(struct PointDensity *pd); +void BKE_texture_voxeldata_free_data(struct VoxelData *vd); +void BKE_texture_voxeldata_free(struct VoxelData *vd); +struct VoxelData *BKE_texture_voxeldata_add(void); +struct VoxelData *BKE_texture_voxeldata_copy(struct VoxelData *vd); -void BKE_free_voxeldatadata(struct VoxelData *vd); -void BKE_free_voxeldata(struct VoxelData *vd); -struct VoxelData *BKE_add_voxeldata(void); -struct VoxelData *BKE_copy_voxeldata(struct VoxelData *vd); +void BKE_texture_ocean_free(struct OceanTex *ot); +struct OceanTex *BKE_texture_ocean_add(void); +struct OceanTex *BKE_texture_ocean_copy(struct OceanTex *ot); -void BKE_free_oceantex(struct OceanTex *ot); -struct OceanTex *BKE_add_oceantex(void); -struct OceanTex *BKE_copy_oceantex(struct OceanTex *ot); - bool BKE_texture_dependsOnTime(const struct Tex *texture); bool BKE_texture_is_image_user(const struct Tex *tex); diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h index e5fb60cf1b5..ef997446c6c 100644 --- a/source/blender/blenkernel/BKE_tracking.h +++ b/source/blender/blenkernel/BKE_tracking.h @@ -41,7 +41,6 @@ struct MovieTrackingMarker; struct MovieTrackingPlaneTrack; struct MovieTrackingPlaneMarker; struct MovieTracking; -struct MovieTrackingContext; struct MovieTrackingObject; struct MovieClipUser; struct MovieDistortion; diff --git a/source/blender/blenkernel/BKE_treehash.h b/source/blender/blenkernel/BKE_treehash.h index 54deef1ce2f..16ab02c0965 100644 --- a/source/blender/blenkernel/BKE_treehash.h +++ b/source/blender/blenkernel/BKE_treehash.h @@ -27,7 +27,6 @@ */ struct ID; -struct GHash; struct BLI_mempool; struct TreeStoreElem; diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h index ba6360964d6..951fa501f9c 100644 --- a/source/blender/blenkernel/BKE_writeffmpeg.h +++ b/source/blender/blenkernel/BKE_writeffmpeg.h @@ -64,7 +64,6 @@ enum { FFMPEG_PRESET_XVID = 7, }; -struct IDProperty; struct RenderData; struct ReportList; struct Scene; diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index effe32a8079..b4c396d38d2 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -1496,8 +1496,11 @@ static bool animsys_write_rna_setting(PointerRNA *ptr, char *path, int array_ind /* get property to write to */ if (RNA_path_resolve_property(ptr, path, &new_ptr, &prop)) { - /* set value - only for animatable numerical values */ - if (RNA_property_animateable(&new_ptr, prop)) { + /* set value for animatable numerical values only + * HACK: some local F-Curves (e.g. those on NLA Strips) are evaluated + * without an ID provided, which causes the animateable test to fail! + */ + if (RNA_property_animateable(&new_ptr, prop) || (ptr->id.data == NULL)) { int array_len = RNA_property_array_length(&new_ptr, prop); bool written = false; @@ -1797,12 +1800,6 @@ static float nlastrip_get_influence(NlaStrip *strip, float cframe) /* evaluate the evaluation time and influence for the strip, storing the results in the strip */ static void nlastrip_evaluate_controls(NlaStrip *strip, float ctime) { - /* firstly, analytically generate values for influence and time (if applicable) */ - if ((strip->flag & NLASTRIP_FLAG_USR_TIME) == 0) - strip->strip_time = nlastrip_get_frame(strip, ctime, NLATIME_CONVERT_EVAL); - if ((strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) == 0) - strip->influence = nlastrip_get_influence(strip, ctime); - /* now strip's evaluate F-Curves for these settings (if applicable) */ if (strip->fcurves.first) { PointerRNA strip_ptr; @@ -1813,6 +1810,15 @@ static void nlastrip_evaluate_controls(NlaStrip *strip, float ctime) /* execute these settings as per normal */ animsys_evaluate_fcurves(&strip_ptr, &strip->fcurves, NULL, ctime); } + + /* analytically generate values for influence and time (if applicable) + * - we do this after the F-Curves have been evaluated to override the effects of those + * in case the override has been turned off. + */ + if ((strip->flag & NLASTRIP_FLAG_USR_TIME) == 0) + strip->strip_time = nlastrip_get_frame(strip, ctime, NLATIME_CONVERT_EVAL); + if ((strip->flag & NLASTRIP_FLAG_USR_INFLUENCE) == 0) + strip->influence = nlastrip_get_influence(strip, ctime); /* if user can control the evaluation time (using F-Curves), consider the option which allows this time to be clamped * to lie within extents of the action-clip, so that a steady changing rate of progress through several cycles of the clip diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 10d77921515..661bf6e7d76 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -103,8 +103,8 @@ static void brush_defaults(Brush *brush) brush->jitter = 0.0f; /* BRUSH TEXTURE SETTINGS */ - default_mtex(&brush->mtex); - default_mtex(&brush->mask_mtex); + BKE_texture_mtex_default(&brush->mtex); + BKE_texture_mtex_default(&brush->mask_mtex); brush->texture_sample_bias = 0; /* value to added to texture samples */ brush->texture_overlay_alpha = 33; @@ -469,7 +469,7 @@ int BKE_brush_texture_set_nr(Brush *brush, int nr) idtest = (ID *)BLI_findlink(&G.main->tex, nr - 1); if (idtest == NULL) { /* new tex */ if (id) idtest = (ID *)BKE_texture_copy((Tex *)id); - else idtest = (ID *)add_texture(G.main, "Tex"); + else idtest = (ID *)BKE_texture_add(G.main, "Tex"); idtest->us--; } if (idtest != id) { diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 81321b9dbc2..86454576b98 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -309,19 +309,23 @@ int list_find_data_fcurves(ListBase *dst, ListBase *src, const char *dataPrefix, return matches; } -FCurve *rna_get_fcurve(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **adt, bAction **action, bool *r_driven) +FCurve *rna_get_fcurve(PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **adt, + bAction **action, bool *r_driven, bool *r_special) { - return rna_get_fcurve_context_ui(NULL, ptr, prop, rnaindex, adt, action, r_driven); + return rna_get_fcurve_context_ui(NULL, ptr, prop, rnaindex, adt, action, r_driven, r_special); } -FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, - AnimData **animdata, bAction **action, bool *r_driven) +FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *prop, int rnaindex, AnimData **animdata, + bAction **action, bool *r_driven, bool *r_special) { FCurve *fcu = NULL; PointerRNA tptr = *ptr; if (animdata) *animdata = NULL; *r_driven = false; + *r_special = false; + + if (action) *action = NULL; /* there must be some RNA-pointer + property combon */ if (prop && tptr.id.data && RNA_property_animateable(&tptr, prop)) { @@ -342,10 +346,15 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro path = RNA_path_from_ID_to_property(&tptr, prop); } + // XXX: the logic here is duplicated with a function up above if (path) { /* animation takes priority over drivers */ - if (adt->action && adt->action->curves.first) + if (adt->action && adt->action->curves.first) { fcu = list_find_fcurve(&adt->action->curves, path, rnaindex); + + if (fcu && action) + *action = adt->action; + } /* if not animated, check if driven */ if (!fcu && (adt->drivers.first)) { @@ -375,6 +384,32 @@ FCurve *rna_get_fcurve_context_ui(bContext *C, PointerRNA *ptr, PropertyRNA *pro } } } + + /* if we still haven't found anything, check whether it's a "special" property */ + if ((fcu == NULL) && (adt && adt->nla_tracks.first)) { + NlaTrack *nlt; + const char *propname = RNA_property_identifier(prop); + + for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { + NlaStrip *strip; + + if (fcu) + break; + + /* FIXME: need to do recursive search here for correctness, + * but this will do for most use cases (i.e. interactive editing), + * where nested strips can't be easily edited + */ + for (strip = nlt->strips.first; strip; strip = strip->next) { + fcu = list_find_fcurve(&strip->fcurves, propname, rnaindex); + + if (fcu) { + *r_special = true; + break; + } + } + } + } } MEM_SAFE_FREE(path); } diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index c7010e42aac..ac79e13ac83 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1418,7 +1418,7 @@ static void node_preview_sync(bNodePreview *to, bNodePreview *from) if (to->rect && from->rect) { int xsize = to->xsize; int ysize = to->ysize; - memcpy(to->rect, from->rect, 4 * xsize + xsize * ysize * sizeof(char) * 4); + memcpy(to->rect, from->rect, xsize * ysize * sizeof(char) * 4); } } diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 07b1e9e30ac..7e7bcace30d 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -73,16 +73,16 @@ /* ****************** Mapping ******************* */ -TexMapping *add_tex_mapping(int type) +TexMapping *BKE_texture_mapping_add(int type) { TexMapping *texmap = MEM_callocN(sizeof(TexMapping), "TexMapping"); - default_tex_mapping(texmap, type); + BKE_texture_mapping_default(texmap, type); return texmap; } -void default_tex_mapping(TexMapping *texmap, int type) +void BKE_texture_mapping_default(TexMapping *texmap, int type) { memset(texmap, 0, sizeof(TexMapping)); @@ -97,7 +97,7 @@ void default_tex_mapping(TexMapping *texmap, int type) texmap->type = type; } -void init_tex_mapping(TexMapping *texmap) +void BKE_texture_mapping_init(TexMapping *texmap) { float smat[4][4], rmat[4][4], tmat[4][4], proj[4][4], size[3]; @@ -170,16 +170,16 @@ void init_tex_mapping(TexMapping *texmap) } } -ColorMapping *add_color_mapping(void) +ColorMapping *BKE_texture_colormapping_add(void) { ColorMapping *colormap = MEM_callocN(sizeof(ColorMapping), "ColorMapping"); - default_color_mapping(colormap); + BKE_texture_colormapping_default(colormap); return colormap; } -void default_color_mapping(ColorMapping *colormap) +void BKE_texture_colormapping_default(ColorMapping *colormap) { memset(colormap, 0, sizeof(ColorMapping)); @@ -560,10 +560,10 @@ int colorband_element_remove(struct ColorBand *coba, int index) void BKE_texture_free(Tex *tex) { if (tex->coba) MEM_freeN(tex->coba); - if (tex->env) BKE_free_envmap(tex->env); - if (tex->pd) BKE_free_pointdensity(tex->pd); - if (tex->vd) BKE_free_voxeldata(tex->vd); - if (tex->ot) BKE_free_oceantex(tex->ot); + if (tex->env) BKE_texture_envmap_free(tex->env); + if (tex->pd) BKE_texture_pointdensity_free(tex->pd); + if (tex->vd) BKE_texture_voxeldata_free(tex->vd); + if (tex->ot) BKE_texture_ocean_free(tex->ot); BKE_free_animdata((struct ID *)tex); BKE_previewimg_free(&tex->preview); @@ -578,7 +578,7 @@ void BKE_texture_free(Tex *tex) /* ------------------------------------------------------------------------- */ -void default_tex(Tex *tex) +void BKE_texture_default(Tex *tex) { tex->type = TEX_IMAGE; tex->ima = NULL; @@ -657,25 +657,25 @@ void default_tex(Tex *tex) tex->preview = NULL; } -void tex_set_type(Tex *tex, int type) +void BKE_texture_type_set(Tex *tex, int type) { switch (type) { case TEX_VOXELDATA: if (tex->vd == NULL) - tex->vd = BKE_add_voxeldata(); + tex->vd = BKE_texture_voxeldata_add(); break; case TEX_POINTDENSITY: if (tex->pd == NULL) - tex->pd = BKE_add_pointdensity(); + tex->pd = BKE_texture_pointdensity_add(); break; case TEX_ENVMAP: if (tex->env == NULL) - tex->env = BKE_add_envmap(); + tex->env = BKE_texture_envmap_add(); break; case TEX_OCEAN: if (tex->ot == NULL) - tex->ot = BKE_add_oceantex(); + tex->ot = BKE_texture_ocean_add(); break; } @@ -684,20 +684,20 @@ void tex_set_type(Tex *tex, int type) /* ------------------------------------------------------------------------- */ -Tex *add_texture(Main *bmain, const char *name) +Tex *BKE_texture_add(Main *bmain, const char *name) { Tex *tex; tex = BKE_libblock_alloc(bmain, ID_TE, name); - default_tex(tex); + BKE_texture_default(tex); return tex; } /* ------------------------------------------------------------------------- */ -void default_mtex(MTex *mtex) +void BKE_texture_mtex_default(MTex *mtex) { mtex->texco = TEXCO_UV; mtex->mapto = MAP_COL; @@ -767,19 +767,19 @@ void default_mtex(MTex *mtex) /* ------------------------------------------------------------------------- */ -MTex *add_mtex(void) +MTex *BKE_texture_mtex_add(void) { MTex *mtex; - mtex = MEM_callocN(sizeof(MTex), "add_mtex"); + mtex = MEM_callocN(sizeof(MTex), "BKE_texture_mtex_add"); - default_mtex(mtex); + BKE_texture_mtex_default(mtex); return mtex; } /* slot -1 for first free ID */ -MTex *add_mtex_id(ID *id, int slot) +MTex *BKE_texture_mtex_add_id(ID *id, int slot) { MTex **mtex_ar; short act; @@ -820,7 +820,7 @@ MTex *add_mtex_id(ID *id, int slot) ((Material *)id)->septex &= ~(1 << slot); } - mtex_ar[slot] = add_mtex(); + mtex_ar[slot] = BKE_texture_mtex_add(); return mtex_ar[slot]; } @@ -840,10 +840,10 @@ Tex *BKE_texture_copy(Tex *tex) } if (texn->coba) texn->coba = MEM_dupallocN(texn->coba); - if (texn->env) texn->env = BKE_copy_envmap(texn->env); - if (texn->pd) texn->pd = BKE_copy_pointdensity(texn->pd); + if (texn->env) texn->env = BKE_texture_envmap_copy(texn->env); + if (texn->pd) texn->pd = BKE_texture_pointdensity_copy(texn->pd); if (texn->vd) texn->vd = MEM_dupallocN(texn->vd); - if (texn->ot) texn->ot = BKE_copy_oceantex(texn->ot); + if (texn->ot) texn->ot = BKE_texture_ocean_copy(texn->ot); if (tex->preview) texn->preview = BKE_previewimg_copy(tex->preview); if (tex->nodetree) { @@ -861,7 +861,7 @@ Tex *BKE_texture_copy(Tex *tex) } /* texture copy without adding to main dbase */ -Tex *localize_texture(Tex *tex) +Tex *BKE_texture_localize(Tex *tex) { Tex *texn; @@ -871,17 +871,17 @@ Tex *localize_texture(Tex *tex) if (texn->coba) texn->coba = MEM_dupallocN(texn->coba); if (texn->env) { - texn->env = BKE_copy_envmap(texn->env); + texn->env = BKE_texture_envmap_copy(texn->env); id_us_min(&texn->env->ima->id); } - if (texn->pd) texn->pd = BKE_copy_pointdensity(texn->pd); + if (texn->pd) texn->pd = BKE_texture_pointdensity_copy(texn->pd); if (texn->vd) { texn->vd = MEM_dupallocN(texn->vd); if (texn->vd->dataset) texn->vd->dataset = MEM_dupallocN(texn->vd->dataset); } if (texn->ot) { - texn->ot = BKE_copy_oceantex(tex->ot); + texn->ot = BKE_texture_ocean_copy(tex->ot); } texn->preview = NULL; @@ -1132,7 +1132,7 @@ void set_current_lamp_texture(Lamp *la, Tex *newtex) if (newtex) { if (!la->mtex[act]) { - la->mtex[act] = add_mtex(); + la->mtex[act] = BKE_texture_mtex_add(); la->mtex[act]->texco = TEXCO_GLOB; } @@ -1167,7 +1167,7 @@ void set_current_linestyle_texture(FreestyleLineStyle *linestyle, Tex *newtex) if (newtex) { if (!linestyle->mtex[act]) { - linestyle->mtex[act] = add_mtex(); + linestyle->mtex[act] = BKE_texture_mtex_add(); linestyle->mtex[act]->texco = TEXCO_STROKE; } @@ -1296,7 +1296,7 @@ void set_current_material_texture(Material *ma, Tex *newtex) if (newtex) { if (!ma->mtex[act]) { - ma->mtex[act] = add_mtex(); + ma->mtex[act] = BKE_texture_mtex_add(); /* Reset this slot's ON/OFF toggle, for materials, when slot was empty. */ ma->septex &= ~(1 << act); } @@ -1347,7 +1347,7 @@ void set_current_world_texture(World *wo, Tex *newtex) if (newtex) { if (!wo->mtex[act]) { - wo->mtex[act] = add_mtex(); + wo->mtex[act] = BKE_texture_mtex_add(); wo->mtex[act]->texco = TEXCO_VIEW; } @@ -1398,7 +1398,7 @@ void set_current_particle_texture(ParticleSettings *part, Tex *newtex) if (newtex) { if (!part->mtex[act]) { - part->mtex[act] = add_mtex(); + part->mtex[act] = BKE_texture_mtex_add(); part->mtex[act]->texco = TEXCO_ORCO; part->mtex[act]->blendtype = MTEX_MUL; } @@ -1414,7 +1414,7 @@ void set_current_particle_texture(ParticleSettings *part, Tex *newtex) /* ------------------------------------------------------------------------- */ -EnvMap *BKE_add_envmap(void) +EnvMap *BKE_texture_envmap_add(void) { EnvMap *env; @@ -1431,7 +1431,7 @@ EnvMap *BKE_add_envmap(void) /* ------------------------------------------------------------------------- */ -EnvMap *BKE_copy_envmap(EnvMap *env) +EnvMap *BKE_texture_envmap_copy(EnvMap *env) { EnvMap *envn; int a; @@ -1446,7 +1446,7 @@ EnvMap *BKE_copy_envmap(EnvMap *env) /* ------------------------------------------------------------------------- */ -void BKE_free_envmapdata(EnvMap *env) +void BKE_texture_envmap_free_data(EnvMap *env) { unsigned int part; @@ -1460,17 +1460,17 @@ void BKE_free_envmapdata(EnvMap *env) /* ------------------------------------------------------------------------- */ -void BKE_free_envmap(EnvMap *env) +void BKE_texture_envmap_free(EnvMap *env) { - BKE_free_envmapdata(env); + BKE_texture_envmap_free_data(env); MEM_freeN(env); } /* ------------------------------------------------------------------------- */ -PointDensity *BKE_add_pointdensity(void) +PointDensity *BKE_texture_pointdensity_add(void) { PointDensity *pd; @@ -1502,7 +1502,7 @@ PointDensity *BKE_add_pointdensity(void) return pd; } -PointDensity *BKE_copy_pointdensity(PointDensity *pd) +PointDensity *BKE_texture_pointdensity_copy(PointDensity *pd) { PointDensity *pdn; @@ -1514,7 +1514,7 @@ PointDensity *BKE_copy_pointdensity(PointDensity *pd) return pdn; } -void BKE_free_pointdensitydata(PointDensity *pd) +void BKE_texture_pointdensity_free_data(PointDensity *pd) { if (pd->point_tree) { BLI_bvhtree_free(pd->point_tree); @@ -1532,15 +1532,15 @@ void BKE_free_pointdensitydata(PointDensity *pd) curvemapping_free(pd->falloff_curve); /* can be NULL */ } -void BKE_free_pointdensity(PointDensity *pd) +void BKE_texture_pointdensity_free(PointDensity *pd) { - BKE_free_pointdensitydata(pd); + BKE_texture_pointdensity_free_data(pd); MEM_freeN(pd); } /* ------------------------------------------------------------------------- */ -void BKE_free_voxeldatadata(VoxelData *vd) +void BKE_texture_voxeldata_free_data(VoxelData *vd) { if (vd->dataset) { MEM_freeN(vd->dataset); @@ -1549,13 +1549,13 @@ void BKE_free_voxeldatadata(VoxelData *vd) } -void BKE_free_voxeldata(VoxelData *vd) +void BKE_texture_voxeldata_free(VoxelData *vd) { - BKE_free_voxeldatadata(vd); + BKE_texture_voxeldata_free_data(vd); MEM_freeN(vd); } -VoxelData *BKE_add_voxeldata(void) +VoxelData *BKE_texture_voxeldata_add(void) { VoxelData *vd; @@ -1573,7 +1573,7 @@ VoxelData *BKE_add_voxeldata(void) return vd; } -VoxelData *BKE_copy_voxeldata(VoxelData *vd) +VoxelData *BKE_texture_voxeldata_copy(VoxelData *vd) { VoxelData *vdn; @@ -1585,7 +1585,7 @@ VoxelData *BKE_copy_voxeldata(VoxelData *vd) /* ------------------------------------------------------------------------- */ -OceanTex *BKE_add_oceantex(void) +OceanTex *BKE_texture_ocean_add(void) { OceanTex *ot; @@ -1596,14 +1596,14 @@ OceanTex *BKE_add_oceantex(void) return ot; } -OceanTex *BKE_copy_oceantex(struct OceanTex *ot) +OceanTex *BKE_texture_ocean_copy(struct OceanTex *ot) { OceanTex *otn = MEM_dupallocN(ot); return otn; } -void BKE_free_oceantex(struct OceanTex *ot) +void BKE_texture_ocean_free(struct OceanTex *ot) { MEM_freeN(ot); } diff --git a/source/blender/blenkernel/intern/tracking_util.c b/source/blender/blenkernel/intern/tracking_util.c index 882a6fabef1..56119b732fc 100644 --- a/source/blender/blenkernel/intern/tracking_util.c +++ b/source/blender/blenkernel/intern/tracking_util.c @@ -423,6 +423,7 @@ void tracking_cameraIntrinscisOptionsFromTracking(MovieTracking *tracking, break; default: BLI_assert(!"Unknown distortion model"); + break; } camera_intrinsics_options->image_width = calibration_width; @@ -454,6 +455,7 @@ void tracking_trackingCameraFromIntrinscisOptions(MovieTracking *tracking, break; default: BLI_assert(!"Unknown distortion model"); + break; } } diff --git a/source/blender/blenlib/BLI_blenlib.h b/source/blender/blenlib/BLI_blenlib.h index 03b75975af4..06bbf29a223 100644 --- a/source/blender/blenlib/BLI_blenlib.h +++ b/source/blender/blenlib/BLI_blenlib.h @@ -58,7 +58,6 @@ #ifndef __BLI_BLENLIB_H__ #define __BLI_BLENLIB_H__ -struct ListBase; #include <stdlib.h> diff --git a/source/blender/blenlib/BLI_callbacks.h b/source/blender/blenlib/BLI_callbacks.h index 7cf524749c2..fdffbeb4c8d 100644 --- a/source/blender/blenlib/BLI_callbacks.h +++ b/source/blender/blenlib/BLI_callbacks.h @@ -25,7 +25,6 @@ #ifndef __BLI_CALLBACKS_H__ #define __BLI_CALLBACKS_H__ -struct bContext; struct Main; struct ID; diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h index 7898a54002f..01aa5d39b96 100644 --- a/source/blender/blenlib/BLI_fileops.h +++ b/source/blender/blenlib/BLI_fileops.h @@ -51,7 +51,6 @@ extern "C" { # define PATH_MAX 4096 #endif -struct gzFile; /* Common */ diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h index d99df24aaf7..c35b01e7f55 100644 --- a/source/blender/blenlib/BLI_path_util.h +++ b/source/blender/blenlib/BLI_path_util.h @@ -38,7 +38,6 @@ extern "C" { #include "BLI_compiler_attrs.h" struct ListBase; -struct direntry; #ifdef WIN32 #define SEP '\\' diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 419d8c0f137..52a6597c79f 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -42,7 +42,6 @@ struct Main; struct MemFile; struct ReportList; struct Scene; -struct SpaceFile; struct UserDef; struct bContext; struct BHead; diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index 51a68926455..ed22daef9ec 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -38,12 +38,10 @@ struct OldNewMap; struct MemFile; -struct bheadsort; struct ReportList; struct Object; struct PartEff; struct View3D; -struct bNodeTree; struct Key; typedef struct FileData { diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 2094aeb1485..274fc474ade 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -1652,8 +1652,8 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) /* brush texture changes */ for (brush = main->brush.first; brush; brush = brush->id.next) { - default_mtex(&brush->mtex); - default_mtex(&brush->mask_mtex); + BKE_texture_mtex_default(&brush->mtex); + BKE_texture_mtex_default(&brush->mask_mtex); } for (ma = main->mat.first; ma; ma = ma->id.next) { diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 105cf770a0e..0dd2c9e8a18 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -2096,7 +2096,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) if (!MAIN_VERSION_ATLEAST(main, 266, 4)) { Brush *brush; for (brush = main->brush.first; brush; brush = brush->id.next) { - default_mtex(&brush->mask_mtex); + BKE_texture_mtex_default(&brush->mask_mtex); if (brush->ob_mode & OB_MODE_TEXTURE_PAINT) { brush->spacing /= 2; diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 462b7b6f200..0aff5147060 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -771,9 +771,9 @@ MTex *DocumentImporter::create_texture(COLLADAFW::EffectCommon *ef, COLLADAFW::T return NULL; } - ma->mtex[i] = add_mtex(); + ma->mtex[i] = BKE_texture_mtex_add(); ma->mtex[i]->texco = TEXCO_UV; - ma->mtex[i]->tex = add_texture(G.main, "Texture"); + ma->mtex[i]->tex = BKE_texture_add(G.main, "Texture"); ma->mtex[i]->tex->type = TEX_IMAGE; ma->mtex[i]->tex->ima = uid_image_map[ima_uid]; diff --git a/source/blender/collada/DocumentImporter.h b/source/blender/collada/DocumentImporter.h index 5a7df9a41cf..62f76dbc022 100644 --- a/source/blender/collada/DocumentImporter.h +++ b/source/blender/collada/DocumentImporter.h @@ -51,7 +51,6 @@ -struct Main; struct bContext; /** Importer class. */ diff --git a/source/blender/compositor/intern/COM_Debug.cpp b/source/blender/compositor/intern/COM_Debug.cpp index 3b3ab5082c5..a7b464cde29 100644 --- a/source/blender/compositor/intern/COM_Debug.cpp +++ b/source/blender/compositor/intern/COM_Debug.cpp @@ -213,7 +213,7 @@ int DebugInfo::graphviz_legend_color(const char *name, const char *color, char * return len; } -int DebugInfo::graphviz_legend_line(const char *name, const char *color, const char *style, char *str, int maxlen) +int DebugInfo::graphviz_legend_line(const char * /*name*/, const char * /*color*/, const char * /*style*/, char *str, int maxlen) { /* XXX TODO */ int len = 0; @@ -221,7 +221,7 @@ int DebugInfo::graphviz_legend_line(const char *name, const char *color, const c return len; } -int DebugInfo::graphviz_legend_group(const char *name, const char *color, const char *style, char *str, int maxlen) +int DebugInfo::graphviz_legend_group(const char *name, const char *color, const char * /*style*/, char *str, int maxlen) { int len = 0; len += snprintf(str + len, maxlen > len ? maxlen - len : 0, "<TR><TD>%s</TD><TD CELLPADDING=\"4\"><TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\"><TR><TD BGCOLOR=\"%s\"></TD></TR></TABLE></TD></TR>\r\n", name, color); diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 4676f6867c8..ca4f5c38f36 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -433,7 +433,8 @@ void ExecutionGroup::determineChunkRect(rcti *rect, const unsigned int chunkNumb determineChunkRect(rect, xChunk, yChunk); } -MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int chunkNumber, rcti *rect) +MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int /*chunkNumber*/, + rcti *rect) { // we asume that this method is only called from complex execution groups. NodeOperation *operation = this->getOutputOperation(); diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.cpp b/source/blender/compositor/intern/COM_ExecutionSystem.cpp index 1f8b7654786..0466fbedb0a 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.cpp +++ b/source/blender/compositor/intern/COM_ExecutionSystem.cpp @@ -76,7 +76,7 @@ ExecutionSystem::ExecutionSystem(RenderData *rd, Scene *scene, bNodeTree *editin viewer_border->xmin < viewer_border->xmax && viewer_border->ymin < viewer_border->ymax; - editingtree->stats_draw(editingtree->sdh, (char*)"Compositing | Determining resolution"); + editingtree->stats_draw(editingtree->sdh, "Compositing | Determining resolution"); for (index = 0; index < this->m_groups.size(); index++) { resolution[0] = 0; diff --git a/source/blender/compositor/intern/COM_NodeOperation.h b/source/blender/compositor/intern/COM_NodeOperation.h index d9c16615fb6..7c87524b4b3 100644 --- a/source/blender/compositor/intern/COM_NodeOperation.h +++ b/source/blender/compositor/intern/COM_NodeOperation.h @@ -161,7 +161,7 @@ public: * * @return bool the result of this method */ - virtual bool isOutputOperation(bool rendering) const { return false; } + virtual bool isOutputOperation(bool /*rendering*/) const { return false; } virtual int isSingleThreaded() { return false; } @@ -175,7 +175,8 @@ public: * @param chunkNumber the chunkNumber to be calculated * @param memoryBuffers all input MemoryBuffer's needed */ - virtual void executeRegion(rcti *rect, unsigned int chunkNumber) {} + virtual void executeRegion(rcti * /*rect*/, + unsigned int /*chunkNumber*/) {} /** * @brief when a chunk is executed by an OpenCLDevice, this method is called @@ -189,8 +190,11 @@ public: * @param memoryBuffers all input MemoryBuffer's needed * @param outputBuffer the outputbuffer to write to */ - virtual void executeOpenCLRegion(OpenCLDevice *device, rcti *rect, - unsigned int chunkNumber, MemoryBuffer **memoryBuffers, MemoryBuffer *outputBuffer) {} + virtual void executeOpenCLRegion(OpenCLDevice * /*device*/, + rcti * /*rect*/, + unsigned int /*chunkNumber*/, + MemoryBuffer ** /*memoryBuffers*/, + MemoryBuffer * /*outputBuffer*/) {} /** * @brief custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevice @@ -204,10 +208,12 @@ public: * @param clMemToCleanUp all created cl_mem references must be added to this list. Framework will clean this after execution * @param clKernelsToCleanUp all created cl_kernel references must be added to this list. Framework will clean this after execution */ - virtual void executeOpenCL(OpenCLDevice *device, - MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, - MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, - list<cl_kernel> *clKernelsToCleanUp) {} + virtual void executeOpenCL(OpenCLDevice * /*device*/, + MemoryBuffer * /*outputMemoryBuffer*/, + cl_mem /*clOutputBuffer*/, + MemoryBuffer ** /*inputMemoryBuffers*/, + list<cl_mem> * /*clMemToCleanUp*/, + list<cl_kernel> * /*clKernelsToCleanUp*/) {} virtual void deinitExecution(); bool isResolutionSet() { diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp index 45105bade08..e899b7b14fd 100644 --- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp +++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp @@ -101,12 +101,12 @@ void NodeOperationBuilder::convertToOperations(ExecutionSystem *system) } } + add_operation_input_constants(); + resolve_proxies(); add_datatype_conversions(); - add_operation_input_constants(); - determineResolutions(); /* surround complex ops with read/write buffer */ @@ -459,7 +459,8 @@ WriteBufferOperation *NodeOperationBuilder::find_attached_write_buffer_operation return NULL; } -void NodeOperationBuilder::add_input_buffers(NodeOperation *operation, NodeOperationInput *input) +void NodeOperationBuilder::add_input_buffers(NodeOperation * /*operation*/, + NodeOperationInput *input) { if (!input->isConnected()) return; diff --git a/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp b/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp index c300a85bfa3..b17f5d6b429 100644 --- a/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp +++ b/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp @@ -33,7 +33,7 @@ void SingleThreadedOperation::initExecution() initMutex(); } -void SingleThreadedOperation::executePixel(float output[4], int x, int y, void *data) +void SingleThreadedOperation::executePixel(float output[4], int x, int y, void * /*data*/) { this->m_cachedInstance->readNoCheck(output, x, y); } diff --git a/source/blender/compositor/intern/COM_SocketReader.h b/source/blender/compositor/intern/COM_SocketReader.h index c996ef5bbeb..7ba208ebbf6 100644 --- a/source/blender/compositor/intern/COM_SocketReader.h +++ b/source/blender/compositor/intern/COM_SocketReader.h @@ -63,7 +63,10 @@ protected: * @param y the y-coordinate of the pixel to calculate in image space * @param inputBuffers chunks that can be read by their ReadBufferOperation. */ - virtual void executePixelSampled(float output[4], float x, float y, PixelSampler sampler) {} + virtual void executePixelSampled(float /*output*/[4], + float /*x*/, + float /*y*/, + PixelSampler /*sampler*/) { } /** * @brief calculate a single pixel @@ -74,7 +77,7 @@ protected: * @param inputBuffers chunks that can be read by their ReadBufferOperation. * @param chunkData chunk specific data a during execution time. */ - virtual void executePixel(float output[4], int x, int y, void *chunkData) { + virtual void executePixel(float output[4], int x, int y, void * /*chunkData*/) { executePixelSampled(output, x, y, COM_PS_NEAREST); } @@ -88,7 +91,10 @@ protected: * @param dy * @param inputBuffers chunks that can be read by their ReadBufferOperation. */ - virtual void executePixelFiltered(float output[4], float x, float y, float dx[2], float dy[2], PixelSampler sampler) {} + virtual void executePixelFiltered(float /*output*/[4], + float /*x*/, float /*y*/, + float /*dx*/[2], float /*dy*/[2], + PixelSampler /*sampler*/) {} public: inline void readSampled(float result[4], float x, float y, PixelSampler sampler) { @@ -101,12 +107,12 @@ public: executePixelFiltered(result, x, y, dx, dy, sampler); } - virtual void *initializeTileData(rcti *rect) { return 0; } - virtual void deinitializeTileData(rcti *rect, void *data) {} + virtual void *initializeTileData(rcti * /*rect*/) { return 0; } + virtual void deinitializeTileData(rcti * /*rect*/, void * /*data*/) {} virtual ~SocketReader() {} - virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer **memoryBuffers) { return 0; } + virtual MemoryBuffer *getInputMemoryBuffer(MemoryBuffer ** /*memoryBuffers*/) { return 0; } inline const unsigned int getWidth() const { return this->m_width; } inline const unsigned int getHeight() const { return this->m_height; } diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp index 673920ef84a..fc6ea1299cf 100644 --- a/source/blender/compositor/intern/COM_WorkScheduler.cpp +++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp @@ -276,7 +276,10 @@ bool WorkScheduler::hasGPUDevices() #endif } -static void CL_CALLBACK clContextError(const char *errinfo, const void *private_info, size_t cb, void *user_data) +static void CL_CALLBACK clContextError(const char *errinfo, + const void * /*private_info*/, + size_t /*cb*/, + void * /*user_data*/) { printf("OPENCL error: %s\n", errinfo); } diff --git a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp index 0306d636c8b..e9b99b6aaf1 100644 --- a/source/blender/compositor/nodes/COM_AlphaOverNode.cpp +++ b/source/blender/compositor/nodes/COM_AlphaOverNode.cpp @@ -30,7 +30,7 @@ #include "COM_SetValueOperation.h" #include "DNA_material_types.h" // the ramp types -void AlphaOverNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void AlphaOverNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *color1Socket = this->getInputSocket(1); NodeInput *color2Socket = this->getInputSocket(2); diff --git a/source/blender/compositor/nodes/COM_BokehImageNode.cpp b/source/blender/compositor/nodes/COM_BokehImageNode.cpp index c75e9b16336..7b7cfc812aa 100644 --- a/source/blender/compositor/nodes/COM_BokehImageNode.cpp +++ b/source/blender/compositor/nodes/COM_BokehImageNode.cpp @@ -29,7 +29,7 @@ BokehImageNode::BokehImageNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void BokehImageNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void BokehImageNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { BokehImageOperation *operation = new BokehImageOperation(); operation->setData((NodeBokehImage *)this->getbNode()->storage); diff --git a/source/blender/compositor/nodes/COM_BrightnessNode.cpp b/source/blender/compositor/nodes/COM_BrightnessNode.cpp index e684b569945..053f286c66e 100644 --- a/source/blender/compositor/nodes/COM_BrightnessNode.cpp +++ b/source/blender/compositor/nodes/COM_BrightnessNode.cpp @@ -29,7 +29,7 @@ BrightnessNode::BrightnessNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void BrightnessNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void BrightnessNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { BrightnessOperation *operation = new BrightnessOperation(); converter.addOperation(operation); diff --git a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp index f356c74cd49..b04f86dea08 100644 --- a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp +++ b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp @@ -30,7 +30,7 @@ ChannelMatteNode::ChannelMatteNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ChannelMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ChannelMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *node = this->getbNode(); diff --git a/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp b/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp index 90de9358587..6324ca9a3ca 100644 --- a/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp +++ b/source/blender/compositor/nodes/COM_ChromaMatteNode.cpp @@ -30,7 +30,7 @@ ChromaMatteNode::ChromaMatteNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ChromaMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ChromaMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorsnode = getbNode(); diff --git a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp index fc0df046e86..a531493d486 100644 --- a/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorBalanceNode.cpp @@ -32,7 +32,7 @@ ColorBalanceNode::ColorBalanceNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ColorBalanceNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ColorBalanceNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *node = this->getbNode(); NodeColorBalance *n = (NodeColorBalance *)node->storage; diff --git a/source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp b/source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp index 728b51b8dc1..e926d131c1a 100644 --- a/source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp @@ -29,7 +29,7 @@ ColorCorrectionNode::ColorCorrectionNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ColorCorrectionNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ColorCorrectionNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorNode = getbNode(); diff --git a/source/blender/compositor/nodes/COM_ColorCurveNode.cpp b/source/blender/compositor/nodes/COM_ColorCurveNode.cpp index 6dc936302f4..5a4dc79e6b2 100644 --- a/source/blender/compositor/nodes/COM_ColorCurveNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorCurveNode.cpp @@ -29,7 +29,7 @@ ColorCurveNode::ColorCurveNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ColorCurveNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ColorCurveNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { if (this->getInputSocket(2)->isLinked() || this->getInputSocket(3)->isLinked()) { ColorCurveOperation *operation = new ColorCurveOperation(); diff --git a/source/blender/compositor/nodes/COM_ColorMatteNode.cpp b/source/blender/compositor/nodes/COM_ColorMatteNode.cpp index def3b18e0fe..f7c20894087 100644 --- a/source/blender/compositor/nodes/COM_ColorMatteNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorMatteNode.cpp @@ -30,7 +30,7 @@ ColorMatteNode::ColorMatteNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ColorMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ColorMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorsnode = getbNode(); diff --git a/source/blender/compositor/nodes/COM_ColorNode.cpp b/source/blender/compositor/nodes/COM_ColorNode.cpp index 4106cb64798..c3770e79dea 100644 --- a/source/blender/compositor/nodes/COM_ColorNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorNode.cpp @@ -29,7 +29,7 @@ ColorNode::ColorNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ColorNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ColorNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { SetColorOperation *operation = new SetColorOperation(); NodeOutput *output = this->getOutputSocket(0); diff --git a/source/blender/compositor/nodes/COM_ColorRampNode.cpp b/source/blender/compositor/nodes/COM_ColorRampNode.cpp index a61ddffbf35..1feaa88bebb 100644 --- a/source/blender/compositor/nodes/COM_ColorRampNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorRampNode.cpp @@ -32,7 +32,7 @@ ColorRampNode::ColorRampNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ColorRampNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ColorRampNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *inputSocket = this->getInputSocket(0); NodeOutput *outputSocket = this->getOutputSocket(0); diff --git a/source/blender/compositor/nodes/COM_ColorSpillNode.cpp b/source/blender/compositor/nodes/COM_ColorSpillNode.cpp index 82454ba7979..c3a911e830b 100644 --- a/source/blender/compositor/nodes/COM_ColorSpillNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorSpillNode.cpp @@ -29,7 +29,7 @@ ColorSpillNode::ColorSpillNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ColorSpillNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ColorSpillNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorsnode = getbNode(); diff --git a/source/blender/compositor/nodes/COM_ColorToBWNode.cpp b/source/blender/compositor/nodes/COM_ColorToBWNode.cpp index a1616a61b4b..f09c6bac3ee 100644 --- a/source/blender/compositor/nodes/COM_ColorToBWNode.cpp +++ b/source/blender/compositor/nodes/COM_ColorToBWNode.cpp @@ -30,7 +30,7 @@ ColorToBWNode::ColorToBWNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ColorToBWNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ColorToBWNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *colorSocket = this->getInputSocket(0); NodeOutput *valueSocket = this->getOutputSocket(0); diff --git a/source/blender/compositor/nodes/COM_CombineColorNode.cpp b/source/blender/compositor/nodes/COM_CombineColorNode.cpp index c7a3baf809d..a39e946fe5f 100644 --- a/source/blender/compositor/nodes/COM_CombineColorNode.cpp +++ b/source/blender/compositor/nodes/COM_CombineColorNode.cpp @@ -72,17 +72,17 @@ void CombineColorNode::convertToOperations(NodeConverter &converter, const Compo } -NodeOperation *CombineRGBANode::getColorConverter(const CompositorContext &context) const +NodeOperation *CombineRGBANode::getColorConverter(const CompositorContext &/*context*/) const { return NULL; /* no conversion needed */ } -NodeOperation *CombineHSVANode::getColorConverter(const CompositorContext &context) const +NodeOperation *CombineHSVANode::getColorConverter(const CompositorContext &/*context*/) const { return new ConvertHSVToRGBOperation(); } -NodeOperation *CombineYCCANode::getColorConverter(const CompositorContext &context) const +NodeOperation *CombineYCCANode::getColorConverter(const CompositorContext &/*context*/) const { ConvertYCCToRGBOperation *operation = new ConvertYCCToRGBOperation(); bNode *editorNode = this->getbNode(); @@ -90,7 +90,7 @@ NodeOperation *CombineYCCANode::getColorConverter(const CompositorContext &conte return operation; } -NodeOperation *CombineYUVANode::getColorConverter(const CompositorContext &context) const +NodeOperation *CombineYUVANode::getColorConverter(const CompositorContext &/*context*/) const { return new ConvertYUVToRGBOperation(); } diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp index ba31ed6e89c..fbf5dbb6253 100644 --- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp +++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp @@ -23,7 +23,7 @@ #include "COM_ConvertOperation.h" #include "COM_ExecutionSystem.h" -void ConvertAlphaNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ConvertAlphaNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeOperation *operation = NULL; bNode *node = this->getbNode(); diff --git a/source/blender/compositor/nodes/COM_CornerPinNode.cpp b/source/blender/compositor/nodes/COM_CornerPinNode.cpp index ea9f22f2840..5e4e463595a 100644 --- a/source/blender/compositor/nodes/COM_CornerPinNode.cpp +++ b/source/blender/compositor/nodes/COM_CornerPinNode.cpp @@ -28,7 +28,7 @@ CornerPinNode::CornerPinNode(bNode *editorNode) : Node(editorNode) { } -void CornerPinNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void CornerPinNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *input_image = this->getInputSocket(0); /* note: socket order differs between UI node and operations: diff --git a/source/blender/compositor/nodes/COM_CropNode.cpp b/source/blender/compositor/nodes/COM_CropNode.cpp index 6c3dc93481b..ee148f41c68 100644 --- a/source/blender/compositor/nodes/COM_CropNode.cpp +++ b/source/blender/compositor/nodes/COM_CropNode.cpp @@ -29,7 +29,7 @@ CropNode::CropNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void CropNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void CropNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *node = getbNode(); NodeTwoXYs *cropSettings = (NodeTwoXYs *)node->storage; diff --git a/source/blender/compositor/nodes/COM_DespeckleNode.cpp b/source/blender/compositor/nodes/COM_DespeckleNode.cpp index bac6337374f..a21885bf42d 100644 --- a/source/blender/compositor/nodes/COM_DespeckleNode.cpp +++ b/source/blender/compositor/nodes/COM_DespeckleNode.cpp @@ -29,7 +29,7 @@ DespeckleNode::DespeckleNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void DespeckleNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void DespeckleNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorNode = this->getbNode(); NodeInput *inputSocket = this->getInputSocket(0); diff --git a/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp b/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp index 8870badab09..2cb0e2301ac 100644 --- a/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp +++ b/source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp @@ -30,7 +30,7 @@ DifferenceMatteNode::DifferenceMatteNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void DifferenceMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void DifferenceMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *inputSocket = this->getInputSocket(0); NodeInput *inputSocket2 = this->getInputSocket(1); diff --git a/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp b/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp index 704c704c500..5f3feda5de7 100644 --- a/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp +++ b/source/blender/compositor/nodes/COM_DistanceMatteNode.cpp @@ -31,7 +31,7 @@ DistanceMatteNode::DistanceMatteNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void DistanceMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void DistanceMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorsnode = getbNode(); NodeChroma *storage = (NodeChroma *)editorsnode->storage; diff --git a/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp b/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp index 1f80eeadf83..c67abb1ab99 100644 --- a/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp +++ b/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp @@ -29,7 +29,7 @@ DoubleEdgeMaskNode::DoubleEdgeMaskNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void DoubleEdgeMaskNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void DoubleEdgeMaskNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { DoubleEdgeMaskOperation *operation; bNode *bnode = this->getbNode(); diff --git a/source/blender/compositor/nodes/COM_FilterNode.cpp b/source/blender/compositor/nodes/COM_FilterNode.cpp index 9f3a7ae795c..7493f24ba6b 100644 --- a/source/blender/compositor/nodes/COM_FilterNode.cpp +++ b/source/blender/compositor/nodes/COM_FilterNode.cpp @@ -32,7 +32,7 @@ FilterNode::FilterNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void FilterNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void FilterNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *inputSocket = this->getInputSocket(0); NodeInput *inputImageSocket = this->getInputSocket(1); diff --git a/source/blender/compositor/nodes/COM_FlipNode.cpp b/source/blender/compositor/nodes/COM_FlipNode.cpp index 1dbcc97143e..0177dc7017a 100644 --- a/source/blender/compositor/nodes/COM_FlipNode.cpp +++ b/source/blender/compositor/nodes/COM_FlipNode.cpp @@ -30,7 +30,7 @@ FlipNode::FlipNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void FlipNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void FlipNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *inputSocket = this->getInputSocket(0); NodeOutput *outputSocket = this->getOutputSocket(0); diff --git a/source/blender/compositor/nodes/COM_GammaNode.cpp b/source/blender/compositor/nodes/COM_GammaNode.cpp index 046cd9e9a0d..bf24bee55d3 100644 --- a/source/blender/compositor/nodes/COM_GammaNode.cpp +++ b/source/blender/compositor/nodes/COM_GammaNode.cpp @@ -29,7 +29,7 @@ GammaNode::GammaNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void GammaNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void GammaNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { GammaOperation *operation = new GammaOperation(); converter.addOperation(operation); diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp index 0429a1a80cf..7afe1510ae4 100644 --- a/source/blender/compositor/nodes/COM_GlareNode.cpp +++ b/source/blender/compositor/nodes/COM_GlareNode.cpp @@ -36,7 +36,7 @@ GlareNode::GlareNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void GlareNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void GlareNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *node = this->getbNode(); NodeGlare *glare = (NodeGlare *)node->storage; diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp index 003bc91edd3..e159886bb46 100644 --- a/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp +++ b/source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp @@ -36,7 +36,7 @@ HueSaturationValueCorrectNode::HueSaturationValueCorrectNode(bNode *editorNode) /* pass */ } -void HueSaturationValueCorrectNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void HueSaturationValueCorrectNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *valueSocket = this->getInputSocket(0); NodeInput *colorSocket = this->getInputSocket(1); diff --git a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp index cdec1250c6e..29c296a896d 100644 --- a/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp +++ b/source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp @@ -35,7 +35,7 @@ HueSaturationValueNode::HueSaturationValueNode(bNode *editorNode) : Node(editorN /* pass */ } -void HueSaturationValueNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void HueSaturationValueNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *valueSocket = this->getInputSocket(0); NodeInput *colorSocket = this->getInputSocket(1); diff --git a/source/blender/compositor/nodes/COM_InpaintNode.cpp b/source/blender/compositor/nodes/COM_InpaintNode.cpp index 1371cdb5f1d..9e78625684d 100644 --- a/source/blender/compositor/nodes/COM_InpaintNode.cpp +++ b/source/blender/compositor/nodes/COM_InpaintNode.cpp @@ -31,7 +31,7 @@ InpaintNode::InpaintNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void InpaintNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void InpaintNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorNode = this->getbNode(); diff --git a/source/blender/compositor/nodes/COM_InvertNode.cpp b/source/blender/compositor/nodes/COM_InvertNode.cpp index ed4a21132ca..da499d66c2c 100644 --- a/source/blender/compositor/nodes/COM_InvertNode.cpp +++ b/source/blender/compositor/nodes/COM_InvertNode.cpp @@ -30,7 +30,7 @@ InvertNode::InvertNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void InvertNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void InvertNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { InvertOperation *operation = new InvertOperation(); bNode *node = this->getbNode(); diff --git a/source/blender/compositor/nodes/COM_LensDistortionNode.cpp b/source/blender/compositor/nodes/COM_LensDistortionNode.cpp index 32db452e6c2..3d3cc841715 100644 --- a/source/blender/compositor/nodes/COM_LensDistortionNode.cpp +++ b/source/blender/compositor/nodes/COM_LensDistortionNode.cpp @@ -30,7 +30,7 @@ LensDistortionNode::LensDistortionNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void LensDistortionNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void LensDistortionNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorNode = this->getbNode(); NodeLensDist *data = (NodeLensDist *)editorNode->storage; diff --git a/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp b/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp index e23ec243ff4..382296a7f3a 100644 --- a/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp +++ b/source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp @@ -30,7 +30,7 @@ LuminanceMatteNode::LuminanceMatteNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void LuminanceMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void LuminanceMatteNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *editorsnode = getbNode(); NodeInput *inputSocket = this->getInputSocket(0); diff --git a/source/blender/compositor/nodes/COM_MapRangeNode.cpp b/source/blender/compositor/nodes/COM_MapRangeNode.cpp index 2c164cfad32..148ca00205c 100644 --- a/source/blender/compositor/nodes/COM_MapRangeNode.cpp +++ b/source/blender/compositor/nodes/COM_MapRangeNode.cpp @@ -30,7 +30,7 @@ MapRangeNode::MapRangeNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void MapRangeNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void MapRangeNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *valueSocket = this->getInputSocket(0); NodeInput *sourceMinSocket = this->getInputSocket(1); diff --git a/source/blender/compositor/nodes/COM_MapUVNode.cpp b/source/blender/compositor/nodes/COM_MapUVNode.cpp index 25ca7b8b8c6..ec38e23ec07 100644 --- a/source/blender/compositor/nodes/COM_MapUVNode.cpp +++ b/source/blender/compositor/nodes/COM_MapUVNode.cpp @@ -28,7 +28,7 @@ MapUVNode::MapUVNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void MapUVNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void MapUVNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bNode *node = this->getbNode(); diff --git a/source/blender/compositor/nodes/COM_MapValueNode.cpp b/source/blender/compositor/nodes/COM_MapValueNode.cpp index d7ee4e6a38b..f04c6a2d316 100644 --- a/source/blender/compositor/nodes/COM_MapValueNode.cpp +++ b/source/blender/compositor/nodes/COM_MapValueNode.cpp @@ -30,7 +30,7 @@ MapValueNode::MapValueNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void MapValueNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void MapValueNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { TexMapping *storage = (TexMapping *)this->getbNode()->storage; diff --git a/source/blender/compositor/nodes/COM_MathNode.cpp b/source/blender/compositor/nodes/COM_MathNode.cpp index 4cd6964ed3b..eb6bb2caf56 100644 --- a/source/blender/compositor/nodes/COM_MathNode.cpp +++ b/source/blender/compositor/nodes/COM_MathNode.cpp @@ -24,7 +24,7 @@ #include "COM_MathBaseOperation.h" #include "COM_ExecutionSystem.h" -void MathNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void MathNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { MathBaseOperation *operation = NULL; diff --git a/source/blender/compositor/nodes/COM_MixNode.cpp b/source/blender/compositor/nodes/COM_MixNode.cpp index 89010d0e861..0607d6d6705 100644 --- a/source/blender/compositor/nodes/COM_MixNode.cpp +++ b/source/blender/compositor/nodes/COM_MixNode.cpp @@ -34,7 +34,7 @@ MixNode::MixNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void MixNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void MixNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *valueSocket = this->getInputSocket(0); NodeInput *color1Socket = this->getInputSocket(1); diff --git a/source/blender/compositor/nodes/COM_NormalNode.cpp b/source/blender/compositor/nodes/COM_NormalNode.cpp index d7c3fd11844..26da61cb9e7 100644 --- a/source/blender/compositor/nodes/COM_NormalNode.cpp +++ b/source/blender/compositor/nodes/COM_NormalNode.cpp @@ -31,7 +31,7 @@ NormalNode::NormalNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void NormalNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void NormalNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *inputSocket = this->getInputSocket(0); NodeOutput *outputSocket = this->getOutputSocket(0); diff --git a/source/blender/compositor/nodes/COM_NormalizeNode.cpp b/source/blender/compositor/nodes/COM_NormalizeNode.cpp index f6e919c168f..a13fcd2a301 100644 --- a/source/blender/compositor/nodes/COM_NormalizeNode.cpp +++ b/source/blender/compositor/nodes/COM_NormalizeNode.cpp @@ -28,7 +28,7 @@ NormalizeNode::NormalizeNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void NormalizeNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void NormalizeNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NormalizeOperation *operation = new NormalizeOperation(); converter.addOperation(operation); diff --git a/source/blender/compositor/nodes/COM_PixelateNode.cpp b/source/blender/compositor/nodes/COM_PixelateNode.cpp index da3cd74e771..fe806dbf307 100644 --- a/source/blender/compositor/nodes/COM_PixelateNode.cpp +++ b/source/blender/compositor/nodes/COM_PixelateNode.cpp @@ -30,7 +30,7 @@ PixelateNode::PixelateNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void PixelateNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void PixelateNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *inputSocket = this->getInputSocket(0); NodeOutput *outputSocket = this->getOutputSocket(0); diff --git a/source/blender/compositor/nodes/COM_RotateNode.cpp b/source/blender/compositor/nodes/COM_RotateNode.cpp index c5fe88b3636..6fd7e357775 100644 --- a/source/blender/compositor/nodes/COM_RotateNode.cpp +++ b/source/blender/compositor/nodes/COM_RotateNode.cpp @@ -31,7 +31,7 @@ RotateNode::RotateNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void RotateNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void RotateNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *inputSocket = this->getInputSocket(0); NodeInput *inputDegreeSocket = this->getInputSocket(1); diff --git a/source/blender/compositor/nodes/COM_SeparateColorNode.cpp b/source/blender/compositor/nodes/COM_SeparateColorNode.cpp index a6fa9065364..780ce73d340 100644 --- a/source/blender/compositor/nodes/COM_SeparateColorNode.cpp +++ b/source/blender/compositor/nodes/COM_SeparateColorNode.cpp @@ -96,17 +96,17 @@ void SeparateColorNode::convertToOperations(NodeConverter &converter, const Comp } -NodeOperation *SeparateRGBANode::getColorConverter(const CompositorContext &context) const +NodeOperation *SeparateRGBANode::getColorConverter(const CompositorContext &/*context*/) const { return NULL; /* no conversion needed */ } -NodeOperation *SeparateHSVANode::getColorConverter(const CompositorContext &context) const +NodeOperation *SeparateHSVANode::getColorConverter(const CompositorContext &/*context*/) const { return new ConvertRGBToHSVOperation(); } -NodeOperation *SeparateYCCANode::getColorConverter(const CompositorContext &context) const +NodeOperation *SeparateYCCANode::getColorConverter(const CompositorContext &/*context*/) const { ConvertRGBToYCCOperation *operation = new ConvertRGBToYCCOperation(); bNode *editorNode = this->getbNode(); @@ -114,7 +114,7 @@ NodeOperation *SeparateYCCANode::getColorConverter(const CompositorContext &cont return operation; } -NodeOperation *SeparateYUVANode::getColorConverter(const CompositorContext &context) const +NodeOperation *SeparateYUVANode::getColorConverter(const CompositorContext &/*context*/) const { return new ConvertRGBToYUVOperation(); } diff --git a/source/blender/compositor/nodes/COM_SetAlphaNode.cpp b/source/blender/compositor/nodes/COM_SetAlphaNode.cpp index 22ddd5bb157..32c03c695be 100644 --- a/source/blender/compositor/nodes/COM_SetAlphaNode.cpp +++ b/source/blender/compositor/nodes/COM_SetAlphaNode.cpp @@ -24,7 +24,7 @@ #include "COM_SetAlphaOperation.h" #include "COM_ExecutionSystem.h" -void SetAlphaNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void SetAlphaNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { SetAlphaOperation *operation = new SetAlphaOperation(); diff --git a/source/blender/compositor/nodes/COM_SocketProxyNode.cpp b/source/blender/compositor/nodes/COM_SocketProxyNode.cpp index 17b00af16d8..465a94e8335 100644 --- a/source/blender/compositor/nodes/COM_SocketProxyNode.cpp +++ b/source/blender/compositor/nodes/COM_SocketProxyNode.cpp @@ -46,7 +46,7 @@ SocketProxyNode::SocketProxyNode(bNode *editorNode, bNodeSocket *editorInput, bN this->addOutputSocket(dt, editorOutput); } -void SocketProxyNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void SocketProxyNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeOperationOutput *proxy_output = converter.addInputProxy(getInputSocket(0), m_use_conversion); converter.mapOutputSocket(getOutputSocket(), proxy_output); @@ -68,7 +68,7 @@ SocketBufferNode::SocketBufferNode(bNode *editorNode, bNodeSocket *editorInput, this->addOutputSocket(dt, editorOutput); } -void SocketBufferNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void SocketBufferNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeOutput *output = this->getOutputSocket(0); NodeInput *input = this->getInputSocket(0); diff --git a/source/blender/compositor/nodes/COM_SunBeamsNode.cpp b/source/blender/compositor/nodes/COM_SunBeamsNode.cpp index ed14acabf36..7cf3c90c786 100644 --- a/source/blender/compositor/nodes/COM_SunBeamsNode.cpp +++ b/source/blender/compositor/nodes/COM_SunBeamsNode.cpp @@ -27,7 +27,7 @@ SunBeamsNode::SunBeamsNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void SunBeamsNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void SunBeamsNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *inputSocket = this->getInputSocket(0); NodeOutput *outputSocket = this->getOutputSocket(0); diff --git a/source/blender/compositor/nodes/COM_SwitchNode.cpp b/source/blender/compositor/nodes/COM_SwitchNode.cpp index 10f0ee3821d..eb854983d4c 100644 --- a/source/blender/compositor/nodes/COM_SwitchNode.cpp +++ b/source/blender/compositor/nodes/COM_SwitchNode.cpp @@ -27,7 +27,7 @@ SwitchNode::SwitchNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void SwitchNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void SwitchNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { bool condition = this->getbNode()->custom1; diff --git a/source/blender/compositor/nodes/COM_TonemapNode.cpp b/source/blender/compositor/nodes/COM_TonemapNode.cpp index 5ac73b9f9c2..961139d4855 100644 --- a/source/blender/compositor/nodes/COM_TonemapNode.cpp +++ b/source/blender/compositor/nodes/COM_TonemapNode.cpp @@ -29,7 +29,7 @@ TonemapNode::TonemapNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void TonemapNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void TonemapNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeTonemap *data = (NodeTonemap *)this->getbNode()->storage; diff --git a/source/blender/compositor/nodes/COM_TransformNode.cpp b/source/blender/compositor/nodes/COM_TransformNode.cpp index f1d5771bab3..148409a6427 100644 --- a/source/blender/compositor/nodes/COM_TransformNode.cpp +++ b/source/blender/compositor/nodes/COM_TransformNode.cpp @@ -33,7 +33,7 @@ TransformNode::TransformNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void TransformNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void TransformNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *imageInput = this->getInputSocket(0); NodeInput *xInput = this->getInputSocket(1); diff --git a/source/blender/compositor/nodes/COM_ValueNode.cpp b/source/blender/compositor/nodes/COM_ValueNode.cpp index 62a312da67c..c75d9296807 100644 --- a/source/blender/compositor/nodes/COM_ValueNode.cpp +++ b/source/blender/compositor/nodes/COM_ValueNode.cpp @@ -29,7 +29,7 @@ ValueNode::ValueNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ValueNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ValueNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { SetValueOperation *operation = new SetValueOperation(); NodeOutput *output = this->getOutputSocket(0); diff --git a/source/blender/compositor/nodes/COM_VectorCurveNode.cpp b/source/blender/compositor/nodes/COM_VectorCurveNode.cpp index 197b2c8bd0c..7222a018fa0 100644 --- a/source/blender/compositor/nodes/COM_VectorCurveNode.cpp +++ b/source/blender/compositor/nodes/COM_VectorCurveNode.cpp @@ -29,7 +29,7 @@ VectorCurveNode::VectorCurveNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void VectorCurveNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void VectorCurveNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { VectorCurveOperation *operation = new VectorCurveOperation(); operation->setCurveMapping((CurveMapping *)this->getbNode()->storage); diff --git a/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp b/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp index 30f51794e8d..06f12ccc559 100644 --- a/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp +++ b/source/blender/compositor/nodes/COM_ViewLevelsNode.cpp @@ -31,7 +31,7 @@ ViewLevelsNode::ViewLevelsNode(bNode *editorNode) : Node(editorNode) /* pass */ } -void ViewLevelsNode::convertToOperations(NodeConverter &converter, const CompositorContext &context) const +void ViewLevelsNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const { NodeInput *input = this->getInputSocket(0); if (input->isLinked()) { diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp index b25e2281467..2e60c2d3e42 100644 --- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp +++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp @@ -45,7 +45,7 @@ void AntiAliasOperation::initExecution() NodeOperation::initMutex(); } -void AntiAliasOperation::executePixel(float output[4], int x, int y, void *data) +void AntiAliasOperation::executePixel(float output[4], int x, int y, void * /*data*/) { if (y < 0 || (unsigned int)y >= this->m_height || x < 0 || (unsigned int)x >= this->m_width) { output[0] = 0.0f; @@ -66,7 +66,7 @@ void AntiAliasOperation::deinitExecution() NodeOperation::deinitMutex(); } -bool AntiAliasOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool AntiAliasOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { rcti imageInput; if (this->m_buffer) { diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp index d5aafc7c2ae..cbf9bb211c1 100644 --- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp @@ -92,7 +92,7 @@ float *BlurBaseOperation::make_gausstab(float rad, int size) } #ifdef __SSE2__ -__m128 *BlurBaseOperation::convert_gausstab_sse(const float *gausstab, float rad, int size) +__m128 *BlurBaseOperation::convert_gausstab_sse(const float *gausstab, int size) { int n = 2 * size + 1; __m128 *gausstab_sse = (__m128 *) MEM_mallocN_aligned(sizeof(__m128) * n, 16, "gausstab sse"); diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.h b/source/blender/compositor/operations/COM_BlurBaseOperation.h index e97dd4d766d..f9f37479c56 100644 --- a/source/blender/compositor/operations/COM_BlurBaseOperation.h +++ b/source/blender/compositor/operations/COM_BlurBaseOperation.h @@ -39,7 +39,7 @@ protected: BlurBaseOperation(DataType data_type); float *make_gausstab(float rad, int size); #ifdef __SSE2__ - __m128 *convert_gausstab_sse(const float *gaustab, float rad, int size); + __m128 *convert_gausstab_sse(const float *gaustab, int size); #endif float *make_dist_fac_inverse(float rad, int size, int falloff); diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp index 22f6fc33a0d..189483708b5 100644 --- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp @@ -45,7 +45,7 @@ BokehBlurOperation::BokehBlurOperation() : NodeOperation() this->m_inputBoundingBoxReader = NULL; } -void *BokehBlurOperation::initializeTileData(rcti *rect) +void *BokehBlurOperation::initializeTileData(rcti * /*rect*/) { lockMutex(); if (!this->m_sizeavailable) { @@ -194,7 +194,7 @@ bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe void BokehBlurOperation::executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, - list<cl_kernel> *clKernelsToCleanUp) + list<cl_kernel> * /*clKernelsToCleanUp*/) { cl_kernel kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL); if (!this->m_sizeavailable) { diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp index 6617fc62ab8..18846f2a2c5 100644 --- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp +++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp @@ -85,7 +85,7 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y) } return insideBokeh; } -void BokehImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void BokehImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { float shift = this->m_data->lensshift; float shift2 = shift / 2.0f; @@ -116,7 +116,7 @@ void BokehImageOperation::deinitExecution() } } -void BokehImageOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +void BokehImageOperation::determineResolution(unsigned int resolution[2], unsigned int /*preferredResolution*/[2]) { resolution[0] = COM_BLUR_BOKEH_PIXELS; resolution[1] = COM_BLUR_BOKEH_PIXELS; diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp index 54b0e37c791..32395f44ef1 100644 --- a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp +++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp @@ -44,7 +44,9 @@ void CalculateMeanOperation::initExecution() NodeOperation::initMutex(); } -void CalculateMeanOperation::executePixel(float output[4], int x, int y, void *data) +void CalculateMeanOperation::executePixel(float output[4], + int /*x*/, int /*y*/, + void */*data*/) { output[0] = this->m_result; } @@ -55,7 +57,7 @@ void CalculateMeanOperation::deinitExecution() NodeOperation::deinitMutex(); } -bool CalculateMeanOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool CalculateMeanOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { rcti imageInput; if (this->m_iscalculated) { diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp index 32c5fc1adc7..6b238e53d7b 100644 --- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp +++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp @@ -33,7 +33,9 @@ CalculateStandardDeviationOperation::CalculateStandardDeviationOperation() : Cal /* pass */ } -void CalculateStandardDeviationOperation::executePixel(float output[4], int x, int y, void *data) +void CalculateStandardDeviationOperation::executePixel(float output[4], + int /*x*/, int /*y*/, + void * /*data*/) { output[0] = this->m_standardDeviation; } diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp index e3438bcbd15..ffef81d0323 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.cpp +++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp @@ -125,7 +125,7 @@ void CompositorOperation::deinitExecution() } -void CompositorOperation::executeRegion(rcti *rect, unsigned int tileNumber) +void CompositorOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) { float color[8]; // 7 is enough float *buffer = this->m_outputBuffer; diff --git a/source/blender/compositor/operations/COM_CompositorOperation.h b/source/blender/compositor/operations/COM_CompositorOperation.h index 771c32ffd12..447d74131b3 100644 --- a/source/blender/compositor/operations/COM_CompositorOperation.h +++ b/source/blender/compositor/operations/COM_CompositorOperation.h @@ -81,7 +81,7 @@ public: void executeRegion(rcti *rect, unsigned int tileNumber); void setSceneName(const char *sceneName) { BLI_strncpy(this->m_sceneName, sceneName, sizeof(this->m_sceneName)); } void setRenderData(const RenderData *rd) { this->m_rd = rd; } - bool isOutputOperation(bool rendering) const { return this->isActiveCompositorOutput(); } + bool isOutputOperation(bool /*rendering*/) const { return this->isActiveCompositorOutput(); } void initExecution(); void deinitExecution(); const CompositorPriority getRenderPriority() const { return COM_PRIORITY_MEDIUM; } diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp index 657126d458c..e1ada9a8c39 100644 --- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp @@ -28,7 +28,7 @@ ConvolutionEdgeFilterOperation::ConvolutionEdgeFilterOperation() : ConvolutionFi /* pass */ } -void ConvolutionEdgeFilterOperation::executePixel(float output[4], int x, int y, void *data) +void ConvolutionEdgeFilterOperation::executePixel(float output[4], int x, int y, void * /*data*/) { float in1[4], in2[4], res1[4] = {0.0}, res2[4] = {0.0}; diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp index 553a9827ffa..699db11d56e 100644 --- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp @@ -69,7 +69,7 @@ void ConvolutionFilterOperation::deinitExecution() } -void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, void *data) +void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, void * /*data*/) { float in1[4]; float in2[4]; diff --git a/source/blender/compositor/operations/COM_DespeckleOperation.cpp b/source/blender/compositor/operations/COM_DespeckleOperation.cpp index 186c17845f3..1a827aae67e 100644 --- a/source/blender/compositor/operations/COM_DespeckleOperation.cpp +++ b/source/blender/compositor/operations/COM_DespeckleOperation.cpp @@ -52,7 +52,7 @@ BLI_INLINE int color_diff(const float a[3], const float b[3], const float thresh (fabsf(a[2] - b[2]) > threshold)); } -void DespeckleOperation::executePixel(float output[4], int x, int y, void *data) +void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*data*/) { float w = 0.0f; float color_org[4]; diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp index 6d15ef3395b..fc3ec7dd11a 100644 --- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp +++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp @@ -56,7 +56,7 @@ void DilateErodeThresholdOperation::initExecution() } } -void *DilateErodeThresholdOperation::initializeTileData(rcti *rect) +void *DilateErodeThresholdOperation::initializeTileData(rcti * /*rect*/) { void *buffer = this->m_inputProgram->initializeTileData(NULL); return buffer; @@ -180,7 +180,7 @@ void DilateDistanceOperation::initExecution() } } -void *DilateDistanceOperation::initializeTileData(rcti *rect) +void *DilateDistanceOperation::initializeTileData(rcti * /*rect*/) { void *buffer = this->m_inputProgram->initializeTileData(NULL); return buffer; @@ -238,7 +238,7 @@ bool DilateDistanceOperation::determineDependingAreaOfInterest(rcti *input, Read void DilateDistanceOperation::executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, - list<cl_kernel> *clKernelsToCleanUp) + list<cl_kernel> * /*clKernelsToCleanUp*/) { cl_kernel dilateKernel = device->COM_clCreateKernel("dilateKernel", NULL); @@ -295,7 +295,7 @@ void ErodeDistanceOperation::executePixel(float output[4], int x, int y, void *d void ErodeDistanceOperation::executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, - list<cl_kernel> *clKernelsToCleanUp) + list<cl_kernel> * /*clKernelsToCleanUp*/) { cl_kernel erodeKernel = device->COM_clCreateKernel("erodeKernel", NULL); @@ -446,7 +446,7 @@ void DilateStepOperation::deinitExecution() this->m_inputProgram = NULL; } -void DilateStepOperation::deinitializeTileData(rcti *rect, void *data) +void DilateStepOperation::deinitializeTileData(rcti * /*rect*/, void *data) { tile_info *tile = (tile_info *)data; MEM_freeN(tile->buffer); diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp index 962a95ebd05..732e731fadf 100644 --- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp @@ -66,7 +66,7 @@ void DirectionalBlurOperation::initExecution() } -void DirectionalBlurOperation::executePixel(float output[4], int x, int y, void *data) +void DirectionalBlurOperation::executePixel(float output[4], int x, int y, void * /*data*/) { const int iterations = pow(2.0f, this->m_data->iter); float col[4] = {0.0f, 0.0f, 0.0f, 0.0f}; @@ -104,7 +104,7 @@ void DirectionalBlurOperation::executePixel(float output[4], int x, int y, void void DirectionalBlurOperation::executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, - list<cl_kernel> *clKernelsToCleanUp) + list<cl_kernel> * /*clKernelsToCleanUp*/) { cl_kernel directionalBlurKernel = device->COM_clCreateKernel("directionalBlurKernel", NULL); @@ -132,7 +132,7 @@ void DirectionalBlurOperation::deinitExecution() this->m_inputProgram = NULL; } -bool DirectionalBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool DirectionalBlurOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { rcti newInput; diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp index 7dacc3239c5..643ecf9708c 100644 --- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp +++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp @@ -49,7 +49,7 @@ void DisplaceOperation::initExecution() this->m_height_x4 = this->getHeight() * 4; } -void DisplaceOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void DisplaceOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { float xy[2] = { x, y }; float uv[2], deriv[2][2]; diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp index 234a61a4c41..76afedf4b2a 100644 --- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp +++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp @@ -1237,7 +1237,7 @@ DoubleEdgeMaskOperation::DoubleEdgeMaskOperation() : NodeOperation() this->setComplex(true); } -bool DoubleEdgeMaskOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool DoubleEdgeMaskOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { if (this->m_cachedInstance == NULL) { rcti newInput; diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp index 08f520e4271..968319b3f46 100644 --- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp @@ -37,7 +37,7 @@ void FastGaussianBlurOperation::executePixel(float output[4], int x, int y, void newData->read(output, x, y); } -bool FastGaussianBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool FastGaussianBlurOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { rcti newInput; rcti sizeInput; @@ -257,7 +257,7 @@ void FastGaussianBlurValueOperation::executePixel(float output[4], int x, int y, newData->read(output, x, y); } -bool FastGaussianBlurValueOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool FastGaussianBlurValueOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { rcti newInput; diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp index dde57ab640f..cbe41076b2a 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp @@ -36,7 +36,7 @@ GaussianAlphaXBlurOperation::GaussianAlphaXBlurOperation() : BlurBaseOperation(C this->m_falloff = -1; /* intentionally invalid, so we can detect uninitialized values */ } -void *GaussianAlphaXBlurOperation::initializeTileData(rcti *rect) +void *GaussianAlphaXBlurOperation::initializeTileData(rcti * /*rect*/) { lockMutex(); if (!this->m_sizeavailable) { diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp index bb5b3c044af..30563e8cc45 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp @@ -36,7 +36,7 @@ GaussianAlphaYBlurOperation::GaussianAlphaYBlurOperation() : BlurBaseOperation(C this->m_falloff = -1; /* intentionally invalid, so we can detect uninitialized values */ } -void *GaussianAlphaYBlurOperation::initializeTileData(rcti *rect) +void *GaussianAlphaYBlurOperation::initializeTileData(rcti * /*rect*/) { lockMutex(); if (!this->m_sizeavailable) { diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp index dbad51c4329..37d59229e50 100644 --- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp @@ -32,7 +32,7 @@ GaussianBokehBlurOperation::GaussianBokehBlurOperation() : BlurBaseOperation(COM this->m_gausstab = NULL; } -void *GaussianBokehBlurOperation::initializeTileData(rcti *rect) +void *GaussianBokehBlurOperation::initializeTileData(rcti * /*rect*/) { lockMutex(); if (!this->m_sizeavailable) { @@ -205,7 +205,7 @@ GaussianBlurReferenceOperation::GaussianBlurReferenceOperation() : BlurBaseOpera this->m_maintabs = NULL; } -void *GaussianBlurReferenceOperation::initializeTileData(rcti *rect) +void *GaussianBlurReferenceOperation::initializeTileData(rcti * /*rect*/) { void *buffer = getInputOperation(0)->initializeTileData(NULL); return buffer; diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp index 0838d281de7..29ed4334412 100644 --- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp @@ -38,7 +38,7 @@ GaussianXBlurOperation::GaussianXBlurOperation() : BlurBaseOperation(COM_DT_COLO this->m_filtersize = 0; } -void *GaussianXBlurOperation::initializeTileData(rcti *rect) +void *GaussianXBlurOperation::initializeTileData(rcti * /*rect*/) { lockMutex(); if (!this->m_sizeavailable) { @@ -63,7 +63,6 @@ void GaussianXBlurOperation::initExecution() this->m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize); #ifdef __SSE2__ this->m_gausstab_sse = BlurBaseOperation::convert_gausstab_sse(this->m_gausstab, - rad, m_filtersize); #endif } @@ -79,7 +78,6 @@ void GaussianXBlurOperation::updateGauss() this->m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize); #ifdef __SSE2__ this->m_gausstab_sse = BlurBaseOperation::convert_gausstab_sse(this->m_gausstab, - rad, m_filtersize); #endif } @@ -128,7 +126,7 @@ void GaussianXBlurOperation::executePixel(float output[4], int x, int y, void *d void GaussianXBlurOperation::executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, - list<cl_kernel> *clKernelsToCleanUp) + list<cl_kernel> * /*clKernelsToCleanUp*/) { cl_kernel gaussianXBlurOperationKernel = device->COM_clCreateKernel("gaussianXBlurOperationKernel", NULL); cl_int filter_size = this->m_filtersize; diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp index 6172f954087..4b55333c08c 100644 --- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp @@ -38,7 +38,7 @@ GaussianYBlurOperation::GaussianYBlurOperation() : BlurBaseOperation(COM_DT_COLO this->m_filtersize = 0; } -void *GaussianYBlurOperation::initializeTileData(rcti *rect) +void *GaussianYBlurOperation::initializeTileData(rcti * /*rect*/) { lockMutex(); if (!this->m_sizeavailable) { @@ -62,7 +62,6 @@ void GaussianYBlurOperation::initExecution() this->m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize); #ifdef __SSE2__ this->m_gausstab_sse = BlurBaseOperation::convert_gausstab_sse(this->m_gausstab, - rad, m_filtersize); #endif } @@ -78,7 +77,6 @@ void GaussianYBlurOperation::updateGauss() this->m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize); #ifdef __SSE2__ this->m_gausstab_sse = BlurBaseOperation::convert_gausstab_sse(this->m_gausstab, - rad, m_filtersize); #endif } @@ -130,7 +128,7 @@ void GaussianYBlurOperation::executePixel(float output[4], int x, int y, void *d void GaussianYBlurOperation::executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, - list<cl_kernel> *clKernelsToCleanUp) + list<cl_kernel> * /*clKernelsToCleanUp*/) { cl_kernel gaussianYBlurOperationKernel = device->COM_clCreateKernel("gaussianYBlurOperationKernel", NULL); cl_int filter_size = this->m_filtersize; diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp index 98919f1b161..1acbd2ae090 100644 --- a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp @@ -55,7 +55,7 @@ MemoryBuffer *GlareBaseOperation::createMemoryBuffer(rcti *rect2) return result; } -bool GlareBaseOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool GlareBaseOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { if (isCached()) { return false; diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp index 2733c483146..624fdf8b626 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.cpp +++ b/source/blender/compositor/operations/COM_ImageOperation.cpp @@ -96,7 +96,7 @@ void BaseImageOperation::deinitExecution() BKE_image_release_ibuf(this->m_image, this->m_buffer, NULL); } -void BaseImageOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +void BaseImageOperation::determineResolution(unsigned int resolution[2], unsigned int /*preferredResolution*/[2]) { ImBuf *stackbuf = getImBuf(); @@ -170,7 +170,7 @@ void ImageAlphaOperation::executePixelSampled(float output[4], float x, float y, } } -void ImageDepthOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void ImageDepthOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { if (this->m_depthBuffer == NULL) { output[0] = 0.0f; diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp index 18611c051d3..43b7b30319d 100644 --- a/source/blender/compositor/operations/COM_InpaintOperation.cpp +++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp @@ -241,7 +241,7 @@ void *InpaintSimpleOperation::initializeTileData(rcti *rect) return this->m_cached_buffer; } -void InpaintSimpleOperation::executePixel(float output[4], int x, int y, void *data) +void InpaintSimpleOperation::executePixel(float output[4], int x, int y, void * /*data*/) { this->clamp_xy(x, y); copy_v4_v4(output, this->get_pixel(x, y)); @@ -268,7 +268,7 @@ void InpaintSimpleOperation::deinitExecution() this->m_cached_buffer_ready = false; } -bool InpaintSimpleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool InpaintSimpleOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { if (this->m_cached_buffer_ready) { return false; diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp index 1633d2a2f1d..dd87578ea78 100644 --- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp @@ -267,7 +267,7 @@ void *KeyingScreenOperation::initializeTileData(rcti *rect) return tile_data; } -void KeyingScreenOperation::deinitializeTileData(rcti *rect, void *data) +void KeyingScreenOperation::deinitializeTileData(rcti * /*rect*/, void *data) { TileData *tile_data = (TileData *) data; @@ -278,7 +278,7 @@ void KeyingScreenOperation::deinitializeTileData(rcti *rect, void *data) MEM_freeN(tile_data); } -void KeyingScreenOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +void KeyingScreenOperation::determineResolution(unsigned int resolution[2], unsigned int /*preferredResolution*/[2]) { resolution[0] = 0; resolution[1] = 0; diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp index bb8fe825c68..ffa48ce3956 100644 --- a/source/blender/compositor/operations/COM_MapUVOperation.cpp +++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp @@ -41,7 +41,7 @@ void MapUVOperation::initExecution() this->m_inputUVProgram = this->getInputSocketReader(1); } -void MapUVOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void MapUVOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { float xy[2] = { x, y }; float uv[2], deriv[2][2], alpha; diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp index 8c8ba93327d..220b4e908a6 100644 --- a/source/blender/compositor/operations/COM_MaskOperation.cpp +++ b/source/blender/compositor/operations/COM_MaskOperation.cpp @@ -1,4 +1,5 @@ /* + * Copyright 2012, Blender Foundation. * * This program is free software; you can redistribute it and/or @@ -127,7 +128,7 @@ void MaskOperation::determineResolution(unsigned int resolution[2], unsigned int } } -void MaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void MaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { const float xy[2] = { (x * this->m_maskWidthInv) + this->m_mask_px_ofs[0], diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp index 447ca1bb4f6..040a0315d69 100644 --- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp @@ -33,7 +33,9 @@ MovieClipAttributeOperation::MovieClipAttributeOperation() : NodeOperation() this->m_attribute = MCA_X; } -void MovieClipAttributeOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void MovieClipAttributeOperation::executePixelSampled(float output[4], + float /*x*/, float /*y*/, + PixelSampler /*sampler*/) { if (!this->m_valueSet) { float loc[2], scale, angle; diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp index 133b6d520eb..1e4821f0cd3 100644 --- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp @@ -71,7 +71,7 @@ void MovieClipBaseOperation::deinitExecution() } } -void MovieClipBaseOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +void MovieClipBaseOperation::determineResolution(unsigned int resolution[2], unsigned int /*preferredResolution*/[2]) { resolution[0] = 0; resolution[1] = 0; diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp index 50fabb09dbb..4f34d7fb150 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp @@ -121,7 +121,7 @@ void MovieDistortionOperation::deinitExecution() } -void MovieDistortionOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void MovieDistortionOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { if (this->m_cache != NULL) { diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp index 23fba5a7999..513140e2f62 100644 --- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp +++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp @@ -74,7 +74,7 @@ void MultilayerColorOperation::executePixelSampled(float output[4], float x, flo } } -void MultilayerValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void MultilayerValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { if (this->m_imageFloatBuffer == NULL) { output[0] = 0.0f; @@ -91,7 +91,7 @@ void MultilayerValueOperation::executePixelSampled(float output[4], float x, flo } } -void MultilayerVectorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void MultilayerVectorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { if (this->m_imageFloatBuffer == NULL) { output[0] = 0.0f; diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.cpp b/source/blender/compositor/operations/COM_NormalizeOperation.cpp index e0b5893ffbb..504470f1a7e 100644 --- a/source/blender/compositor/operations/COM_NormalizeOperation.cpp +++ b/source/blender/compositor/operations/COM_NormalizeOperation.cpp @@ -60,7 +60,7 @@ void NormalizeOperation::deinitExecution() NodeOperation::deinitMutex(); } -bool NormalizeOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool NormalizeOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { rcti imageInput; if (this->m_cachedInstance) return false; @@ -118,7 +118,7 @@ void *NormalizeOperation::initializeTileData(rcti *rect) return this->m_cachedInstance; } -void NormalizeOperation::deinitializeTileData(rcti *rect, void *data) +void NormalizeOperation::deinitializeTileData(rcti * /*rect*/, void * /*data*/) { /* pass */ } diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp index 2f92351c00d..b1c90a6355f 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp +++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp @@ -118,7 +118,7 @@ void OutputSingleLayerOperation::initExecution() this->m_outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->m_datatype); } -void OutputSingleLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber) +void OutputSingleLayerOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) { write_buffer_rect(rect, this->m_tree, this->m_imageInput, this->m_outputBuffer, this->getWidth(), this->m_datatype); } @@ -194,7 +194,7 @@ void OutputOpenExrMultiLayerOperation::initExecution() } } -void OutputOpenExrMultiLayerOperation::executeRegion(rcti *rect, unsigned int tileNumber) +void OutputOpenExrMultiLayerOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) { for (unsigned int i = 0; i < this->m_layers.size(); ++i) { OutputOpenExrLayer &layer = this->m_layers[i]; diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.h b/source/blender/compositor/operations/COM_OutputFileOperation.h index 03278c5b149..af16f186d9d 100644 --- a/source/blender/compositor/operations/COM_OutputFileOperation.h +++ b/source/blender/compositor/operations/COM_OutputFileOperation.h @@ -52,7 +52,7 @@ public: const ColorManagedViewSettings *viewSettings, const ColorManagedDisplaySettings *displaySettings); void executeRegion(rcti *rect, unsigned int tileNumber); - bool isOutputOperation(bool rendering) const { return true; } + bool isOutputOperation(bool /*rendering*/) const { return true; } void initExecution(); void deinitExecution(); const CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; } @@ -91,7 +91,7 @@ public: void add_layer(const char *name, DataType datatype, bool use_layer); void executeRegion(rcti *rect, unsigned int tileNumber); - bool isOutputOperation(bool rendering) const { return true; } + bool isOutputOperation(bool /*rendering*/) const { return true; } void initExecution(); void deinitExecution(); const CompositorPriority getRenderPriority() const { return COM_PRIORITY_LOW; } diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp index 8133f392ac6..d7d1c9c0c93 100644 --- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp @@ -100,7 +100,7 @@ void PlaneDistortWarpImageOperation::deinitExecution() this->m_pixelReader = NULL; } -void PlaneDistortWarpImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void PlaneDistortWarpImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { float uv[2]; float deriv[2][2]; @@ -194,7 +194,7 @@ void PlaneDistortMaskOperation::initExecution() BLI_jitter_init(m_jitter, m_osa); } -void PlaneDistortMaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void PlaneDistortMaskOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { float point[2]; int inside_counter = 0; diff --git a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp index 03205130a74..a56aa0cbaa6 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp @@ -71,7 +71,7 @@ void PlaneTrackCommon::readCornersFromTrack(float corners[4][2], float frame) } } -void PlaneTrackCommon::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +void PlaneTrackCommon::determineResolution(unsigned int resolution[2], unsigned int /*preferredResolution*/[2]) { resolution[0] = 0; resolution[1] = 0; diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp index 69290cd7c3c..aa667884de6 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.cpp +++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp @@ -85,7 +85,7 @@ void PreviewOperation::deinitExecution() this->m_input = NULL; } -void PreviewOperation::executeRegion(rcti *rect, unsigned int tileNumber) +void PreviewOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) { int offset; float color[4]; diff --git a/source/blender/compositor/operations/COM_PreviewOperation.h b/source/blender/compositor/operations/COM_PreviewOperation.h index 3e97acec7bb..5da7a25ac5d 100644 --- a/source/blender/compositor/operations/COM_PreviewOperation.h +++ b/source/blender/compositor/operations/COM_PreviewOperation.h @@ -45,7 +45,7 @@ public: PreviewOperation(const ColorManagedViewSettings *viewSettings, const ColorManagedDisplaySettings *displaySettings); void verifyPreview(bNodeInstanceHash *previews, bNodeInstanceKey key); - bool isOutputOperation(bool rendering) const { return !G.background; } + bool isOutputOperation(bool /*rendering*/) const { return !G.background; } void initExecution(); void deinitExecution(); const CompositorPriority getRenderPriority() const; diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp index 7f6079c55aa..02d1809efbb 100644 --- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp @@ -40,7 +40,7 @@ void ProjectorLensDistortionOperation::initExecution() this->m_inputProgram = this->getInputSocketReader(0); } -void *ProjectorLensDistortionOperation::initializeTileData(rcti *rect) +void *ProjectorLensDistortionOperation::initializeTileData(rcti * /*rect*/) { updateDispersion(); void *buffer = this->m_inputProgram->initializeTileData(NULL); diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp index ad4084a7092..bf0f24e06be 100644 --- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp @@ -32,7 +32,7 @@ ReadBufferOperation::ReadBufferOperation(DataType datatype) : NodeOperation() this->m_buffer = NULL; } -void *ReadBufferOperation::initializeTileData(rcti *rect) +void *ReadBufferOperation::initializeTileData(rcti * /*rect*/) { return m_buffer; } diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index 409fa68bacf..defbc2ab57f 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -179,7 +179,7 @@ void RenderLayersBaseProg::deinitExecution() this->m_inputBuffer = NULL; } -void RenderLayersBaseProg::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +void RenderLayersBaseProg::determineResolution(unsigned int resolution[2], unsigned int /*preferredResolution*/[2]) { Scene *sce = this->getScene(); Render *re = (sce) ? RE_GetRender(sce->id.name) : NULL; @@ -269,7 +269,7 @@ RenderLayersDepthProg::RenderLayersDepthProg() : RenderLayersBaseProg(SCE_PASS_Z this->addOutputSocket(COM_DT_VALUE); } -void RenderLayersDepthProg::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void RenderLayersDepthProg::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { int ix = x; int iy = y; diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp index 23e8ce86fd9..117ae743ee7 100644 --- a/source/blender/compositor/operations/COM_ScaleOperation.cpp +++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp @@ -279,7 +279,7 @@ bool ScaleFixedSizeOperation::determineDependingAreaOfInterest(rcti *input, Read return BaseScaleOperation::determineDependingAreaOfInterest(&newInput, readOperation, output); } -void ScaleFixedSizeOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) +void ScaleFixedSizeOperation::determineResolution(unsigned int resolution[2], unsigned int /*preferredResolution*/[2]) { unsigned int nr[2]; nr[0] = this->m_newWidth; diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp index ad9b761da45..acd76fa79a8 100644 --- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp @@ -70,7 +70,7 @@ void ScreenLensDistortionOperation::initExecution() } } -void *ScreenLensDistortionOperation::initializeTileData(rcti *rect) +void *ScreenLensDistortionOperation::initializeTileData(rcti * /*rect*/) { void *buffer = this->m_inputProgram->initializeTileData(NULL); @@ -208,7 +208,7 @@ void ScreenLensDistortionOperation::determineUV(float result[6], float x, float get_delta(uv_dot, m_k4[2], uv, result + 4); } -bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool ScreenLensDistortionOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { rcti newInputValue; newInputValue.xmin = 0; diff --git a/source/blender/compositor/operations/COM_SetColorOperation.cpp b/source/blender/compositor/operations/COM_SetColorOperation.cpp index 94a863e628b..1a362bc55e2 100644 --- a/source/blender/compositor/operations/COM_SetColorOperation.cpp +++ b/source/blender/compositor/operations/COM_SetColorOperation.cpp @@ -27,7 +27,9 @@ SetColorOperation::SetColorOperation() : NodeOperation() this->addOutputSocket(COM_DT_COLOR); } -void SetColorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void SetColorOperation::executePixelSampled(float output[4], + float /*x*/, float /*y*/, + PixelSampler /*sampler*/) { copy_v4_v4(output, this->m_color); } diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp index be72ffd0336..7057ecb14c1 100644 --- a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp +++ b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp @@ -37,7 +37,7 @@ void SetSamplerOperation::deinitExecution() this->m_reader = NULL; } -void SetSamplerOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void SetSamplerOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { this->m_reader->readSampled(output, x, y, this->m_sampler); } diff --git a/source/blender/compositor/operations/COM_SetValueOperation.cpp b/source/blender/compositor/operations/COM_SetValueOperation.cpp index 51e09a63051..b6cfb760a98 100644 --- a/source/blender/compositor/operations/COM_SetValueOperation.cpp +++ b/source/blender/compositor/operations/COM_SetValueOperation.cpp @@ -27,7 +27,9 @@ SetValueOperation::SetValueOperation() : NodeOperation() this->addOutputSocket(COM_DT_VALUE); } -void SetValueOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void SetValueOperation::executePixelSampled(float output[4], + float /*x*/, float /*y*/, + PixelSampler /*sampler*/) { output[0] = this->m_value; } diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.cpp b/source/blender/compositor/operations/COM_SetVectorOperation.cpp index 769eaf1d2ed..1b0327683a9 100644 --- a/source/blender/compositor/operations/COM_SetVectorOperation.cpp +++ b/source/blender/compositor/operations/COM_SetVectorOperation.cpp @@ -28,7 +28,9 @@ SetVectorOperation::SetVectorOperation() : NodeOperation() this->addOutputSocket(COM_DT_VECTOR); } -void SetVectorOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void SetVectorOperation::executePixelSampled(float output[4], + float /*x*/, float /*y*/, + PixelSampler /*sampler*/) { output[0] = this->m_x; output[1] = this->m_y; diff --git a/source/blender/compositor/operations/COM_SplitOperation.cpp b/source/blender/compositor/operations/COM_SplitOperation.cpp index 367c7eefa25..cd2166591bc 100644 --- a/source/blender/compositor/operations/COM_SplitOperation.cpp +++ b/source/blender/compositor/operations/COM_SplitOperation.cpp @@ -56,7 +56,7 @@ void SplitOperation::deinitExecution() this->m_image2Input = NULL; } -void SplitOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void SplitOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { int perc = this->m_xSplit ? this->m_splitPercentage * this->getWidth() / 100.0f : this->m_splitPercentage * this->getHeight() / 100.0f; bool image1 = this->m_xSplit ? x > perc : y > perc; diff --git a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp index 0ca687ea162..a681583809c 100644 --- a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp +++ b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp @@ -293,7 +293,7 @@ static void accumulate_line(MemoryBuffer *input, float output[4], const float co } } -void *SunBeamsOperation::initializeTileData(rcti *rect) +void *SunBeamsOperation::initializeTileData(rcti * /*rect*/) { void *buffer = getInputOperation(0)->initializeTileData(NULL); return buffer; diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp index 1b0485afb8d..2ff6cc047c6 100644 --- a/source/blender/compositor/operations/COM_TextureOperation.cpp +++ b/source/blender/compositor/operations/COM_TextureOperation.cpp @@ -117,7 +117,7 @@ void TextureBaseOperation::executePixelSampled(float output[4], float x, float y } } -MemoryBuffer *TextureBaseOperation::createMemoryBuffer(rcti *rect2) +MemoryBuffer *TextureBaseOperation::createMemoryBuffer(rcti * /*rect2*/) { int height = getHeight(); int width = getWidth(); diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp index 54ba218b802..c581d115a2f 100644 --- a/source/blender/compositor/operations/COM_TonemapOperation.cpp +++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp @@ -97,7 +97,7 @@ void TonemapOperation::deinitExecution() NodeOperation::deinitMutex(); } -bool TonemapOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool TonemapOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { rcti imageInput; @@ -150,7 +150,7 @@ void *TonemapOperation::initializeTileData(rcti *rect) return this->m_cachedInstance; } -void TonemapOperation::deinitializeTileData(rcti *rect, void *data) +void TonemapOperation::deinitializeTileData(rcti * /*rect*/, void * /*data*/) { /* pass */ } diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp index a76e0866d0d..ca169d03fbc 100644 --- a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp +++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp @@ -102,7 +102,9 @@ void TrackPositionOperation::initExecution() } } -void TrackPositionOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void TrackPositionOperation::executePixelSampled(float output[4], + float /*x*/, float /*y*/, + PixelSampler /*sampler*/) { output[0] = this->m_markerPos[this->m_axis] - this->m_relativePos[this->m_axis]; diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp index 191388a42fb..fcf99a10a73 100644 --- a/source/blender/compositor/operations/COM_TranslateOperation.cpp +++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp @@ -52,7 +52,7 @@ void TranslateOperation::deinitExecution() } -void TranslateOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) +void TranslateOperation::executePixelSampled(float output[4], float x, float y, PixelSampler /*sampler*/) { ensureDelta(); diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp index 6e4caeef613..e4883d91bc3 100644 --- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp @@ -89,7 +89,7 @@ void *VariableSizeBokehBlurOperation::initializeTileData(rcti *rect) return data; } -void VariableSizeBokehBlurOperation::deinitializeTileData(rcti *rect, void *data) +void VariableSizeBokehBlurOperation::deinitializeTileData(rcti * /*rect*/, void *data) { VariableSizeBokehBlurTileData *result = (VariableSizeBokehBlurTileData *)data; delete result; @@ -187,7 +187,7 @@ void VariableSizeBokehBlurOperation::executePixel(float output[4], int x, int y, void VariableSizeBokehBlurOperation::executeOpenCL(OpenCLDevice *device, MemoryBuffer *outputMemoryBuffer, cl_mem clOutputBuffer, MemoryBuffer **inputMemoryBuffers, list<cl_mem> *clMemToCleanUp, - list<cl_kernel> *clKernelsToCleanUp) + list<cl_kernel> * /*clKernelsToCleanUp*/) { cl_kernel defocusKernel = device->COM_clCreateKernel("defocusKernel", NULL); diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp index 8dc06ef07d7..36f06e92436 100644 --- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp @@ -91,7 +91,7 @@ void *VectorBlurOperation::initializeTileData(rcti *rect) return this->m_cachedInstance; } -bool VectorBlurOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) +bool VectorBlurOperation::determineDependingAreaOfInterest(rcti * /*input*/, ReadBufferOperation *readOperation, rcti *output) { if (this->m_cachedInstance == NULL) { rcti newInput; diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp index 53c0acd781a..da2706a2244 100644 --- a/source/blender/compositor/operations/COM_ViewerOperation.cpp +++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp @@ -80,7 +80,7 @@ void ViewerOperation::deinitExecution() this->m_outputBuffer = NULL; } -void ViewerOperation::executeRegion(rcti *rect, unsigned int tileNumber) +void ViewerOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) { float *buffer = this->m_outputBuffer; float *depthbuffer = this->m_depthBuffer; diff --git a/source/blender/compositor/operations/COM_ViewerOperation.h b/source/blender/compositor/operations/COM_ViewerOperation.h index dcc7ffa3730..a17375c2de9 100644 --- a/source/blender/compositor/operations/COM_ViewerOperation.h +++ b/source/blender/compositor/operations/COM_ViewerOperation.h @@ -53,7 +53,7 @@ public: void initExecution(); void deinitExecution(); void executeRegion(rcti *rect, unsigned int tileNumber); - bool isOutputOperation(bool rendering) const { if (G.background) return false; return isActiveViewerOutput(); } + bool isOutputOperation(bool /*rendering*/) const { if (G.background) return false; return isActiveViewerOutput(); } void setImage(Image *image) { this->m_image = image; } void setImageUser(ImageUser *imageUser) { this->m_imageUser = imageUser; } const bool isActiveViewerOutput() const { return this->m_active; } diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp index fccff2a33bf..b3c1c00804e 100644 --- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp +++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp @@ -57,7 +57,7 @@ void WriteBufferOperation::deinitExecution() this->m_memoryProxy->free(); } -void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber) +void WriteBufferOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/) { MemoryBuffer *memoryBuffer = this->m_memoryProxy->getBuffer(); float *buffer = memoryBuffer->getBuffer(); @@ -110,7 +110,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber) memoryBuffer->setCreatedState(); } -void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti *rect, unsigned int chunkNumber, +void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device, rcti * /*rect*/, unsigned int /*chunkNumber*/, MemoryBuffer **inputMemoryBuffers, MemoryBuffer *outputBuffer) { float *outputFloatBuffer = outputBuffer->getBuffer(); diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 37c40052275..7eb32d4dc45 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -1017,6 +1017,149 @@ static bAnimChannelType ACF_FCURVE = acf_fcurve_setting_ptr /* pointer for setting */ }; +/* NLA Control FCurves Expander ----------------------- */ + +/* get backdrop color for nla controls widget */ +static void acf_nla_controls_color(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), float r_color[3]) +{ + // TODO: give this its own theme setting? + UI_GetThemeColorShade3fv(TH_GROUP, 55, r_color); +} + +/* backdrop for nla controls expander widget */ +static void acf_nla_controls_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc) +{ + bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale); + View2D *v2d = &ac->ar->v2d; + short expanded = ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_EXPAND) != 0; + short offset = (acf->get_offset) ? acf->get_offset(ac, ale) : 0; + float color[3]; + + /* set backdrop drawing color */ + acf->get_backdrop_color(ac, ale, color); + glColor3fv(color); + + /* rounded corners on LHS only - top only when expanded, but bottom too when collapsed */ + UI_draw_roundbox_corner_set(expanded ? UI_CNR_TOP_LEFT : (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT)); + UI_draw_roundbox_gl_mode(GL_POLYGON, offset, yminc, v2d->cur.xmax + EXTRA_SCROLL_PAD, ymaxc, 5); +} + +/* name for nla controls expander entries */ +static void acf_nla_controls_name(bAnimListElem *UNUSED(ale), char *name) +{ + BLI_strncpy(name, IFACE_("NLA Strip Controls"), ANIM_CHAN_NAME_SIZE); +} + +/* check if some setting exists for this channel */ +static bool acf_nla_controls_setting_valid(bAnimContext *UNUSED(ac), bAnimListElem *UNUSED(ale), eAnimChannel_Settings setting) +{ + /* for now, all settings are supported, though some are only conditionally */ + switch (setting) { + /* supported */ + case ACHANNEL_SETTING_EXPAND: + return true; + + // TOOD: selected? + + default: /* unsupported */ + return false; + } +} + +/* get the appropriate flag(s) for the setting when it is valid */ +static int acf_nla_controls_setting_flag(bAnimContext *UNUSED(ac), eAnimChannel_Settings setting, bool *neg) +{ + /* clear extra return data first */ + *neg = false; + + switch (setting) { + case ACHANNEL_SETTING_EXPAND: /* expanded */ + *neg = true; + return ADT_NLA_SKEYS_COLLAPSED; + + default: + /* this shouldn't happen */ + return 0; + } +} + +/* get pointer to the setting */ +static void *acf_nla_controls_setting_ptr(bAnimListElem *ale, eAnimChannel_Settings UNUSED(setting), short *type) +{ + AnimData *adt = (AnimData *)ale->data; + + /* all flags are just in adt->flag for now... */ + return GET_ACF_FLAG_PTR(adt->flag, type); +} + +static int acf_nla_controls_icon(bAnimListElem *UNUSED(ale)) +{ + return ICON_NLA; +} + +/* NLA Control FCurves Expander type define */ +static bAnimChannelType ACF_NLACONTROLS = +{ + "NLA Controls Expander", /* type name */ + ACHANNEL_ROLE_EXPANDER, /* role */ + + acf_nla_controls_color, /* backdrop color */ + acf_nla_controls_backdrop, /* backdrop */ + acf_generic_indention_0, /* indent level */ + acf_generic_group_offset, /* offset */ + + acf_nla_controls_name, /* name */ + NULL, /* name prop */ + acf_nla_controls_icon, /* icon */ + + acf_nla_controls_setting_valid, /* has setting */ + acf_nla_controls_setting_flag, /* flag for setting */ + acf_nla_controls_setting_ptr /* pointer for setting */ +}; + + +/* NLA Control F-Curve -------------------------------- */ + +/* name for nla control fcurve entries */ +static void acf_nla_curve_name(bAnimListElem *ale, char *name) +{ + NlaStrip *strip = ale->owner; + FCurve *fcu = ale->data; + PropertyRNA *prop; + + /* try to get RNA property that this shortened path (relative to the strip) refers to */ + prop = RNA_struct_type_find_property(&RNA_NlaStrip, fcu->rna_path); + if (prop) { + /* "name" of this strip displays the UI identifier + the name of the NlaStrip */ + BLI_snprintf(name, 256, "%s (%s)", RNA_property_ui_name(prop), strip->name); + } + else { + /* unknown property... */ + BLI_snprintf(name, 256, "%s[%d]", fcu->rna_path, fcu->array_index); + } +} + + +/* NLA Control F-Curve type define */ +static bAnimChannelType ACF_NLACURVE = +{ + "NLA Control F-Curve", /* type name */ + ACHANNEL_ROLE_CHANNEL, /* role */ + + acf_generic_channel_color, /* backdrop color */ + acf_generic_channel_backdrop, /* backdrop */ + acf_generic_indention_1, /* indent level */ + acf_generic_group_offset, /* offset */ + + acf_nla_curve_name, /* name */ + acf_fcurve_name_prop, /* name prop */ + NULL, /* icon */ + + acf_fcurve_setting_valid, /* has setting */ + acf_fcurve_setting_flag, /* flag for setting */ + acf_fcurve_setting_ptr /* pointer for setting */ +}; + /* Object Action Expander ------------------------------------------- */ // TODO: just get this from RNA? @@ -3222,6 +3365,9 @@ static void ANIM_init_channel_typeinfo_data(void) animchannelTypeInfo[type++] = &ACF_GROUP; /* Group */ animchannelTypeInfo[type++] = &ACF_FCURVE; /* F-Curve */ + animchannelTypeInfo[type++] = &ACF_NLACONTROLS; /* NLA Control FCurve Expander */ + animchannelTypeInfo[type++] = &ACF_NLACURVE; /* NLA Control FCurve Channel */ + animchannelTypeInfo[type++] = &ACF_FILLACTD; /* Object Action Expander */ animchannelTypeInfo[type++] = &ACF_FILLDRIVERS; /* Drivers Expander */ @@ -3491,7 +3637,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float if (ac->sl) { if ((ac->spacetype == SPACE_IPO) && acf->has_setting(ac, ale, ACHANNEL_SETTING_VISIBLE)) { /* for F-Curves, draw color-preview of curve behind checkbox */ - if (ale->type == ANIMTYPE_FCURVE) { + if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) { FCurve *fcu = (FCurve *)ale->data; /* F-Curve channels need to have a special 'color code' box drawn, which is colored with whatever @@ -3537,7 +3683,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float UI_fontstyle_draw_simple(fstyle, offset, ytext, name); /* draw red underline if channel is disabled */ - if ((ale->type == ANIMTYPE_FCURVE) && (ale->flag & FCURVE_DISABLED)) { + if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE) && (ale->flag & FCURVE_DISABLED)) { /* FIXME: replace hardcoded color here, and check on extents! */ glColor3f(1.0f, 0.0f, 0.0f); glLineWidth(2.0); @@ -3604,7 +3750,7 @@ void ANIM_channel_draw(bAnimContext *ac, bAnimListElem *ale, float yminc, float * (only only F-Curves really can support them for now) * - slider should start before the toggles (if they're visible) to keep a clean line down the side */ - if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_SHAPEKEY)) { + if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) { /* adjust offset */ offset += SLIDER_WIDTH; } @@ -3771,6 +3917,44 @@ static void achannel_setting_slider_shapekey_cb(bContext *C, void *key_poin, voi MEM_freeN(rna_path); } +/* callback for NLA Control Curve widget sliders - insert keyframes */ +static void achannel_setting_slider_nla_curve_cb(bContext *C, void *UNUSED(id_poin), void *fcu_poin) +{ + /* ID *id = (ID *)id_poin; */ + FCurve *fcu = (FCurve *)fcu_poin; + + PointerRNA ptr; + PropertyRNA *prop; + int index; + + ReportList *reports = CTX_wm_reports(C); + Scene *scene = CTX_data_scene(C); + short flag = 0; + bool done = false; + float cfra; + + /* get current frame - *no* NLA mapping should be done */ + cfra = (float)CFRA; + + /* get flags for keyframing */ + flag = ANIM_get_keyframing_flags(scene, 1); + + /* get pointer and property from the slider - this should all match up with the NlaStrip required... */ + UI_context_active_but_prop_get(C, &ptr, &prop, &index); + + if (fcu && prop) { + /* set the special 'replace' flag if on a keyframe */ + if (fcurve_frame_has_keyframe(fcu, cfra, 0)) + flag |= INSERTKEY_REPLACE; + + /* insert a keyframe for this F-Curve */ + done = insert_keyframe_direct(reports, ptr, prop, fcu, cfra, flag); + + if (done) + WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); + } +} + /* Draw a widget for some setting */ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChannelType *acf, uiBlock *block, int xpos, int ypos, int setting) @@ -3793,7 +3977,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann //icon = ((enabled) ? ICON_VISIBLE_IPO_ON : ICON_VISIBLE_IPO_OFF); icon = ICON_VISIBLE_IPO_OFF; - if (ale->type == ANIMTYPE_FCURVE) + if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) tooltip = TIP_("F-Curve is visible in Graph Editor for editing"); else tooltip = TIP_("Channels are visible in Graph Editor for editing"); @@ -3828,7 +4012,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann //icon = ((enabled) ? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF); icon = ICON_MUTE_IPO_OFF; - if (ale->type == ANIMTYPE_FCURVE) { + if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) { tooltip = TIP_("Does F-Curve contribute to result"); } else if ((ac) && (ac->spacetype == SPACE_NLA) && (ale->type != ANIMTYPE_NLATRACK)) { @@ -4097,7 +4281,7 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle * and wouldn't be able to auto-keyframe... * - slider should start before the toggles (if they're visible) to keep a clean line down the side */ - if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_SHAPEKEY)) { + if ((draw_sliders) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY)) { /* adjust offset */ // TODO: make slider width dynamic, so that they can be easier to use when the view is wide enough offset += SLIDER_WIDTH; @@ -4105,7 +4289,28 @@ void ANIM_channel_draw_widgets(const bContext *C, bAnimContext *ac, bAnimListEle /* need backdrop behind sliders... */ UI_block_emboss_set(block, UI_EMBOSS); - if (ale->id) { /* Slider using RNA Access -------------------- */ + if (ale->owner) { /* Slider using custom RNA Access ---------- */ + if (ale->type == ANIMTYPE_NLACURVE) { + NlaStrip *strip = (NlaStrip *)ale->owner; + FCurve *fcu = (FCurve *)ale->data; + PointerRNA ptr; + PropertyRNA *prop; + + /* create RNA pointers */ + RNA_pointer_create(ale->id, &RNA_NlaStrip, strip, &ptr); + prop = RNA_struct_find_property(&ptr, fcu->rna_path); + + /* create property slider */ + if (prop) { + uiBut *but; + + /* create the slider button, and assign relevant callback to ensure keyframes are inserted... */ + but = uiDefAutoButR(block, &ptr, prop, fcu->array_index, "", ICON_NONE, (int)v2d->cur.xmax - offset, ymid, SLIDER_WIDTH, (int)ymaxc - yminc); + UI_but_func_set(but, achannel_setting_slider_nla_curve_cb, ale->id, ale->data); + } + } + } + else if (ale->id) { /* Slider using RNA Access --------------- */ PointerRNA id_ptr, ptr; PropertyRNA *prop; char *rna_path = NULL; diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index d8ad6506186..cf2fa9fffe1 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -101,6 +101,7 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat break; } case ANIMTYPE_FCURVE: + case ANIMTYPE_NLACURVE: { FCurve *fcu = (FCurve *)ale->data; @@ -157,6 +158,7 @@ void ANIM_set_active_channel(bAnimContext *ac, void *data, eAnimCont_Types datat break; } case ANIMTYPE_FCURVE: + case ANIMTYPE_NLACURVE: { FCurve *fcu = (FCurve *)channel_data; fcu->flag |= FCURVE_ACTIVE; @@ -255,6 +257,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d sel = ACHANNEL_SETFLAG_CLEAR; break; case ANIMTYPE_FCURVE: + case ANIMTYPE_NLACURVE: if (ale->flag & FCURVE_SELECTED) sel = ACHANNEL_SETFLAG_CLEAR; break; @@ -339,6 +342,7 @@ void ANIM_deselect_anim_channels(bAnimContext *ac, void *data, eAnimCont_Types d break; } case ANIMTYPE_FCURVE: + case ANIMTYPE_NLACURVE: { FCurve *fcu = (FCurve *)ale->data; @@ -847,6 +851,7 @@ static void rearrange_animchannel_add_to_islands(ListBase *islands, ListBase *sr break; } case ANIMTYPE_FCURVE: + case ANIMTYPE_NLACURVE: { FCurve *fcu = (FCurve *)channel; @@ -1191,6 +1196,40 @@ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrange /* ------------------- */ +static void rearrange_nla_control_channels(bAnimContext *ac, AnimData *adt, eRearrangeAnimChan_Mode mode) +{ + ListBase anim_data_visible = {NULL, NULL}; + + NlaTrack *nlt; + NlaStrip *strip; + + /* get rearranging function */ + AnimChanRearrangeFp rearrange_func = rearrange_get_mode_func(mode); + + if (rearrange_func == NULL) + return; + + /* skip if these curves aren't being shown */ + if (adt->flag & ADT_NLA_SKEYS_COLLAPSED) + return; + + /* Filter visible data. */ + rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_NLACURVE); + + /* we cannot rearrange between strips, but within each strip, we can rearrange those curves */ + for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { + for (strip = nlt->strips.first; strip; strip = strip->next) { + rearrange_animchannel_islands(&strip->fcurves, rearrange_func, mode, ANIMTYPE_NLACURVE, + &anim_data_visible); + } + } + + /* free temp data */ + BLI_freelistN(&anim_data_visible); +} + +/* ------------------- */ + static void rearrange_gpencil_channels(bAnimContext *ac, eRearrangeAnimChan_Mode mode) { ListBase anim_data = {NULL, NULL}; @@ -1278,13 +1317,29 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op) rearrange_driver_channels(&ac, adt, mode); break; + case ANIMCONT_ACTION: /* Single Action only... */ case ANIMCONT_SHAPEKEY: // DOUBLE CHECK ME... - default: /* some collection of actions */ + { if (adt->action) rearrange_action_channels(&ac, adt->action, mode); else if (G.debug & G_DEBUG) printf("Animdata has no action\n"); break; + } + + default: /* DopeSheet/Graph Editor - Some Actions + NLA Control Curves */ + { + /* NLA Control Curves */ + if (adt->nla_tracks.first) + rearrange_nla_control_channels(&ac, adt, mode); + + /* Action */ + if (adt->action) + rearrange_action_channels(&ac, adt->action, mode); + else if (G.debug & G_DEBUG) + printf("Animdata has no action\n"); + break; + } } } @@ -1602,6 +1657,27 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op)) ANIM_fcurve_delete_from_animdata(&ac, adt, fcu); break; } + case ANIMTYPE_NLACURVE: + { + /* NLA Control Curve - Deleting it should disable the corresponding setting... */ + NlaStrip *strip = (NlaStrip *)ale->owner; + FCurve *fcu = (FCurve *)ale->data; + + if (STREQ(fcu->rna_path, "strip_time")) { + strip->flag &= ~NLASTRIP_FLAG_USR_TIME; + } + else if (STREQ(fcu->rna_path, "influence")) { + strip->flag &= ~NLASTRIP_FLAG_USR_INFLUENCE; + } + else { + printf("ERROR: Trying to delete NLA Control Curve for unknown property '%s'\n", fcu->rna_path); + } + + /* unlink and free the F-Curve */ + BLI_remlink(&strip->fcurves, fcu); + free_fcurve(fcu); + break; + } case ANIMTYPE_GPLAYER: { /* Grease Pencil layer */ @@ -2727,7 +2803,8 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index, notifierFlags |= (ND_ANIMCHAN | NA_SELECTED); break; } - case ANIMTYPE_FCURVE: + case ANIMTYPE_FCURVE: + case ANIMTYPE_NLACURVE: { FCurve *fcu = (FCurve *)ale->data; @@ -2744,7 +2821,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index, /* if F-Curve is selected now, make F-Curve the 'active' one in the visible list */ if (fcu->flag & FCURVE_SELECTED) - ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE); + ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ale->type); notifierFlags |= (ND_ANIMCHAN | NA_SELECTED); break; @@ -2767,6 +2844,19 @@ static int mouse_anim_channels(bContext *C, bAnimContext *ac, int channel_index, notifierFlags |= (ND_ANIMCHAN | NA_SELECTED); break; } + case ANIMTYPE_NLACONTROLS: + { + AnimData *adt = (AnimData *)ale->data; + + /* toggle expand + * - Although the triangle widget already allows this, since there's nothing else that can be done here now, + * let's just use it for easier expand/collapse for now + */ + adt->flag ^= ADT_NLA_SKEYS_COLLAPSED; + + notifierFlags |= (ND_ANIMCHAN | NA_EDITED); + break; + } case ANIMTYPE_GPDATABLOCK: { bGPdata *gpd = (bGPdata *)ale->data; diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 0e052279796..c0ac42f3a5d 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -173,10 +173,14 @@ AnimData *ANIM_nla_mapping_get(bAnimContext *ac, bAnimListElem *ale) if (G.is_rendering) return NULL; /* handling depends on the type of animation-context we've got */ - if (ale) - return ale->adt; - else - return NULL; + if (ale) { + /* NLA Control Curves occur on NLA strips, and shouldn't be subjected to this kind of mapping */ + if (ale->type != ANIMTYPE_NLACURVE) + return ale->adt; + } + + /* cannot handle... */ + return NULL; } /* ------------------- */ diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index 09c8af8c1b4..2f8d002fa48 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -424,6 +424,7 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) * - adtOk: line or block of code to execute for AnimData-blocks case (usually ANIMDATA_ADD_ANIMDATA) * - nlaOk: line or block of code to execute for NLA tracks+strips case * - driversOk: line or block of code to execute for Drivers case + * - nlaKeysOk: line or block of code for NLA Strip Keyframes case * - keysOk: line or block of code for Keyframes case * * The checks for the various cases are as follows: @@ -434,9 +435,10 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) * converted to a new NLA strip, and the filtering options allow this * 2C) allow non-animated datablocks to be included so that datablocks can be added * 3) drivers: include drivers from animdata block (for Drivers mode in Graph Editor) - * 4) normal keyframes: only when there is an active action + * 4A) nla strip keyframes: these are the per-strip controls for time and influence + * 4B) normal keyframes: only when there is an active action */ -#define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, keysOk) \ +#define ANIMDATA_FILTER_CASES(id, adtOk, nlaOk, driversOk, nlaKeysOk, keysOk) \ { \ if ((id)->adt) { \ if (!(filter_mode & ANIMFILTER_CURVE_VISIBLE) || !((id)->adt->flag & ADT_CURVES_NOT_VISIBLE)) { \ @@ -457,6 +459,9 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac) } \ } \ else { \ + if (ANIMDATA_HAS_NLA(id)) { \ + nlaKeysOk \ + } \ if (ANIMDATA_HAS_KEYS(id)) { \ keysOk \ } \ @@ -787,6 +792,16 @@ static bAnimListElem *make_new_animlistelem(void *data, short datatype, ID *owne ale->adt = BKE_animdata_from_id(data); break; } + case ANIMTYPE_NLACONTROLS: + { + AnimData *adt = (AnimData *)data; + + ale->flag = adt->flag; + + ale->key_data = NULL; + ale->datatype = ALE_NONE; + break; + } case ANIMTYPE_GROUP: { bActionGroup *agrp = (bActionGroup *)data; @@ -1306,6 +1321,80 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac), ListBase *anim_data, bDop return items; } +/* Include the control FCurves per NLA Strip in the channel list + * NOTE: This is includes the expander too... + */ +static size_t animfilter_nla_controls(ListBase *anim_data, bDopeSheet *ads, AnimData *adt, int filter_mode, ID *owner_id) +{ + ListBase tmp_data = {NULL, NULL}; + size_t tmp_items = 0; + size_t items = 0; + + /* add control curves from each NLA strip... */ + /* NOTE: ANIMTYPE_FCURVES are created here, to avoid duplicating the code needed */ + BEGIN_ANIMFILTER_SUBCHANNELS(((adt->flag & ADT_NLA_SKEYS_COLLAPSED) == 0)) + { + NlaTrack *nlt; + NlaStrip *strip; + + /* for now, we only go one level deep - so controls on grouped FCurves are not handled */ + for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next) { + for (strip = nlt->strips.first; strip; strip = strip->next) { + ListBase strip_curves = {NULL, NULL}; + size_t strip_items = 0; + + /* create the raw items */ + strip_items += animfilter_fcurves(&strip_curves, ads, strip->fcurves.first, NULL, filter_mode, owner_id); + + /* change their types and add extra data + * - There is no point making a separate copy of animfilter_fcurves for this now/yet, + * unless we later get per-element control curves for other stuff too + */ + if (strip_items) { + bAnimListElem *ale, *ale_n = NULL; + + for (ale = strip_curves.first; ale; ale = ale_n) { + ale_n = ale->next; + + /* change the type to being a FCurve for editing NLA strip controls */ + BLI_assert(ale->type == ANIMTYPE_FCURVE); + + ale->type = ANIMTYPE_NLACURVE; + ale->owner = strip; + + ale->adt = NULL; /* XXX: This way, there are no problems with time mapping errors */ + } + } + + /* add strip curves to the set of channels inside the group being collected */ + BLI_movelisttolist(&tmp_data, &strip_curves); + BLI_assert(BLI_listbase_is_empty(&strip_curves)); + tmp_items += strip_items; + } + } + } + END_ANIMFILTER_SUBCHANNELS; + + /* did we find anything? */ + if (tmp_items) { + /* add the expander as a channel first */ + if (filter_mode & ANIMFILTER_LIST_CHANNELS) { + /* currently these channels cannot be selected, so they should be skipped */ + if ((filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) == 0) { + ANIMCHANNEL_NEW_CHANNEL(adt, ANIMTYPE_NLACONTROLS, owner_id); + } + } + + /* now add the list of collected channels */ + BLI_movelisttolist(anim_data, &tmp_data); + BLI_assert(BLI_listbase_is_empty(&tmp_data)); + items += tmp_items; + } + + /* return the numebr of items added ot the list */ + return items; +} + /* determine what animation data from AnimData block should get displayed */ static size_t animfilter_block_data(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, ID *id, int filter_mode) { @@ -1333,6 +1422,9 @@ static size_t animfilter_block_data(bAnimContext *ac, ListBase *anim_data, bDope { /* Drivers */ items += animfilter_fcurves(anim_data, ads, adt->drivers.first, NULL, filter_mode, id); }, + { /* NLA Control Keyframes */ + items += animfilter_nla_controls(anim_data, ads, adt, filter_mode, id); + }, { /* Keyframes */ items += animfilter_action(ac, anim_data, ads, adt->action, filter_mode, id); } @@ -2215,6 +2307,7 @@ static size_t animdata_filter_ds_obanim(bAnimContext *ac, ListBase *anim_data, b cdata = adt; expanded = EXPANDED_DRVD(adt); }, + { /* NLA Strip Controls - no dedicated channel for now (XXX) */ }, { /* Keyframes */ type = ANIMTYPE_FILLACTD; cdata = adt->action; @@ -2392,6 +2485,7 @@ static size_t animdata_filter_ds_scene(bAnimContext *ac, ListBase *anim_data, bD cdata = adt; expanded = EXPANDED_DRVD(adt); }, + { /* NLA Strip Controls - no dedicated channel for now (XXX) */ }, { /* Keyframes */ type = ANIMTYPE_FILLACTD; cdata = adt->action; diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 7e2ce4cd3f1..68ef704272d 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1707,33 +1707,39 @@ static int insert_key_button_exec(bContext *C, wmOperator *op) UI_context_active_but_prop_get(C, &ptr, &prop, &index); if ((ptr.id.data && ptr.data && prop) && RNA_property_animateable(&ptr, prop)) { - path = RNA_path_from_ID_to_property(&ptr, prop); - - if (path) { - if (all) { - length = RNA_property_array_length(&ptr, prop); - - if (length) index = 0; - else length = 1; - } - else - length = 1; - - for (a = 0; a < length; a++) - success += insert_keyframe(op->reports, ptr.id.data, NULL, NULL, path, index + a, cfra, flag); - - MEM_freeN(path); - } - else if (ptr.type == &RNA_NlaStrip) { - /* handle special vars for NLA-strips */ + if (ptr.type == &RNA_NlaStrip) { + /* Handle special properties for NLA Strips, whose F-Curves are stored on the + * strips themselves. These are stored separately or else the properties will + * not have any effect. + */ NlaStrip *strip = (NlaStrip *)ptr.data; FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), flag); success += insert_keyframe_direct(op->reports, ptr, prop, fcu, cfra, 0); } else { - BKE_report(op->reports, RPT_WARNING, - "Failed to resolve path to property, try manually specifying this using a Keying Set instead"); + /* standard properties */ + path = RNA_path_from_ID_to_property(&ptr, prop); + + if (path) { + if (all) { + length = RNA_property_array_length(&ptr, prop); + + if (length) index = 0; + else length = 1; + } + else + length = 1; + + for (a = 0; a < length; a++) + success += insert_keyframe(op->reports, ptr.id.data, NULL, NULL, path, index + a, cfra, flag); + + MEM_freeN(path); + } + else { + BKE_report(op->reports, RPT_WARNING, + "Failed to resolve path to property, try manually specifying this using a Keying Set instead"); + } } } else { diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h index 21e85b6fe89..aa56f847f00 100644 --- a/source/blender/editors/armature/BIF_retarget.h +++ b/source/blender/editors/armature/BIF_retarget.h @@ -40,7 +40,6 @@ struct bContext; struct EditBone; -struct RigJoint; struct RigGraph; struct RigNode; struct RigArc; diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 8074182c395..fb94c55f3da 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -283,12 +283,8 @@ static EditBone *get_named_editbone(ListBase *edbo, const char *name) * */ void preEditBoneDuplicate(ListBase *editbones) { - EditBone *eBone; - /* clear temp */ - for (eBone = editbones->first; eBone; eBone = eBone->next) { - eBone->temp = NULL; - } + ED_armature_ebone_listbase_temp_clear(editbones); } /* @@ -328,8 +324,8 @@ void updateDuplicateSubtargetObjects(EditBone *dupBone, ListBase *editbones, Obj * so, update the constraint to point at the * duplicate of the old subtarget. */ - if (oldtarget->temp) { - newtarget = (EditBone *) oldtarget->temp; + if (oldtarget->temp.ebone) { + newtarget = oldtarget->temp.ebone; BLI_strncpy(ct->subtarget, newtarget->name, sizeof(ct->subtarget)); } } @@ -358,8 +354,8 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase /* Copy data from old bone to new bone */ memcpy(eBone, curBone, sizeof(EditBone)); - curBone->temp = eBone; - eBone->temp = curBone; + curBone->temp.ebone = eBone; + eBone->temp.ebone = curBone; if (name != NULL) { BLI_strncpy(eBone->name, name, sizeof(eBone->name)); @@ -453,7 +449,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op)) if (EBONE_VISIBLE(arm, ebone_iter) && (ebone_iter->flag & BONE_SELECTED)) { - EditBone *ebone = ebone_iter->temp; + EditBone *ebone = ebone_iter->temp.ebone; if (!ebone_iter->parent) { /* If this bone has no parent, @@ -461,11 +457,11 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op)) */ ebone->parent = NULL; } - else if (ebone_iter->parent->temp) { + else if (ebone_iter->parent->temp.ebone) { /* If this bone has a parent that was duplicated, * Set the duplicate->parent to the curBone->parent->temp */ - ebone->parent = (EditBone *)ebone_iter->parent->temp; + ebone->parent = ebone_iter->parent->temp.ebone; } else { /* If this bone has a parent that IS not selected, @@ -483,8 +479,8 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *UNUSED(op)) } /* correct the active bone */ - if (arm->act_edbone && arm->act_edbone->temp) { - arm->act_edbone = arm->act_edbone->temp; + if (arm->act_edbone && arm->act_edbone->temp.ebone) { + arm->act_edbone = arm->act_edbone->temp.ebone; } /* Deselect the old bones and select the new ones */ @@ -560,7 +556,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) if (ebone) { if ((ebone->flag & BONE_SELECTED) == 0) { /* simple case, we're selected, the other bone isn't! */ - ebone_iter->temp = ebone; + ebone_iter->temp.ebone = ebone; } else { /* complicated - choose which direction to copy */ @@ -590,7 +586,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) ebone_dst = ebone; } - ebone_src->temp = ebone_dst; + ebone_src->temp.ebone = ebone_dst; ebone_dst->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } } @@ -604,7 +600,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) if (EBONE_VISIBLE(arm, ebone_iter) && (ebone_iter->flag & BONE_SELECTED) && /* will be set if the mirror bone already exists (no need to make a new one) */ - (ebone_iter->temp == NULL)) + (ebone_iter->temp.ebone == NULL)) { char name_flip[MAX_VGROUP_NAME]; @@ -625,11 +621,11 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) /* Run though the list and fix the pointers */ for (ebone_iter = arm->edbo->first; ebone_iter && ebone_iter != ebone_first_dupe; ebone_iter = ebone_iter->next) { - if (ebone_iter->temp) { + if (ebone_iter->temp.ebone) { /* copy all flags except for ... */ const int flag_copy = ((int)~0) & ~(BONE_SELECTED | BONE_ROOTSEL | BONE_TIPSEL); - EditBone *ebone = ebone_iter->temp; + EditBone *ebone = ebone_iter->temp.ebone; /* copy flags incase bone is pre-existing data */ ebone->flag = (ebone->flag & ~flag_copy) | (ebone_iter->flag & flag_copy); @@ -644,8 +640,8 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) else { /* the parent may have been duplicated, if not lookup the mirror parent */ EditBone *ebone_parent = - (ebone_iter->parent->temp ? - ebone_iter->parent->temp : ED_armature_bone_get_mirrored(arm->edbo, ebone_iter->parent)); + (ebone_iter->parent->temp.ebone ? + ebone_iter->parent->temp.ebone : ED_armature_bone_get_mirrored(arm->edbo, ebone_iter->parent)); if (ebone_parent == NULL) { /* If the mirror lookup failed, (but the current bone has a parent) @@ -680,15 +676,15 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) /* New bones will be selected, but some of the bones may already exist */ for (ebone_iter = arm->edbo->first; ebone_iter && ebone_iter != ebone_first_dupe; ebone_iter = ebone_iter->next) { - EditBone *ebone = ebone_iter->temp; + EditBone *ebone = ebone_iter->temp.ebone; if (ebone && EBONE_SELECTABLE(arm, ebone)) { ED_armature_ebone_select_set(ebone, true); } } /* correct the active bone */ - if (arm->act_edbone && arm->act_edbone->temp) { - arm->act_edbone = arm->act_edbone->temp; + if (arm->act_edbone && arm->act_edbone->temp.ebone) { + arm->act_edbone = arm->act_edbone->temp.ebone; } ED_armature_validate_active(arm); diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 53989dd783c..4eb2159aee1 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -548,7 +548,7 @@ static void separate_armature_bones(Object *ob, short sel) for (ebo = arm->edbo->first; ebo; ebo = ebo->next) { if (ebo->parent == curbone) { ebo->parent = NULL; - ebo->temp = NULL; /* this is needed to prevent random crashes with in ED_armature_from_edit */ + ebo->temp.p = NULL; /* this is needed to prevent random crashes with in ED_armature_from_edit */ ebo->flag &= ~BONE_CONNECTED; } } diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index 720b9b7821a..c89c68ff46d 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -55,8 +55,8 @@ #include "armature_intern.h" /* utility macros fro storing a temp int in the bone (selection flag) */ -#define EBONE_PREV_FLAG_GET(ebone) ((void)0, (GET_INT_FROM_POINTER((ebone)->temp))) -#define EBONE_PREV_FLAG_SET(ebone, val) ((ebone)->temp = SET_INT_IN_POINTER(val)) +#define EBONE_PREV_FLAG_GET(ebone) ((void)0, (ebone)->temp.i) +#define EBONE_PREV_FLAG_SET(ebone, val) ((ebone)->temp.i = val) /* **************** PoseMode & EditMode Selection Buffer Queries *************************** */ @@ -685,7 +685,7 @@ static void armature_select_more_less(Object *ob, bool more) } } } - ebone->temp = NULL; + ebone->temp.p = NULL; } ED_armature_sync_selection(arm->edbo); diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 97f69d86aee..18351950462 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -488,7 +488,7 @@ static void fix_bonelist_roll(ListBase *bonelist, ListBase *editbonelist) /* Find the associated editbone */ for (ebone = editbonelist->first; ebone; ebone = ebone->next) - if ((Bone *)ebone->temp == curBone) + if (ebone->temp.bone == curBone) break; if (ebone) { @@ -548,7 +548,7 @@ void ED_armature_from_edit(bArmature *arm) /* Copy the bones from the editData into the armature */ for (eBone = arm->edbo->first; eBone; eBone = eBone->next) { newBone = MEM_callocN(sizeof(Bone), "bone"); - eBone->temp = newBone; /* Associate the real Bones with the EditBones */ + eBone->temp.bone = newBone; /* Associate the real Bones with the EditBones */ BLI_strncpy(newBone->name, eBone->name, sizeof(newBone->name)); copy_v3_v3(newBone->arm_head, eBone->head); @@ -584,9 +584,9 @@ void ED_armature_from_edit(bArmature *arm) /* Fix parenting in a separate pass to ensure ebone->bone connections * are valid at this point */ for (eBone = arm->edbo->first; eBone; eBone = eBone->next) { - newBone = (Bone *)eBone->temp; + newBone = eBone->temp.bone; if (eBone->parent) { - newBone->parent = (Bone *)eBone->parent->temp; + newBone->parent = eBone->parent->temp.bone; BLI_addtail(&newBone->parent->childbase, newBone); { @@ -695,24 +695,24 @@ static void ED_armature_ebone_listbase_copy(ListBase *lb_dst, ListBase *lb_src) if (ebone_dst->prop) { ebone_dst->prop = IDP_CopyProperty(ebone_dst->prop); } - ebone_src->temp = ebone_dst; + ebone_src->temp.ebone = ebone_dst; BLI_addtail(lb_dst, ebone_dst); } /* set pointers */ for (ebone_dst = lb_dst->first; ebone_dst; ebone_dst = ebone_dst->next) { if (ebone_dst->parent) { - ebone_dst->parent = ebone_dst->parent->temp; + ebone_dst->parent = ebone_dst->parent->temp.ebone; } } } -static void ED_armature_ebone_listbase_temp_clear(ListBase *lb) +void ED_armature_ebone_listbase_temp_clear(ListBase *lb) { EditBone *ebone; /* be sure they don't hang ever */ for (ebone = lb->first; ebone; ebone = ebone->next) { - ebone->temp = NULL; + ebone->temp.p = NULL; } } @@ -733,7 +733,7 @@ static void undoBones_to_editBones(void *uarmv, void *armv, void *UNUSED(data)) /* active bone */ if (uarm->act_edbone) { ebone = uarm->act_edbone; - arm->act_edbone = ebone->temp; + arm->act_edbone = ebone->temp.ebone; } else { arm->act_edbone = NULL; @@ -755,7 +755,7 @@ static void *editBones_to_undoBones(void *armv, void *UNUSED(obdata)) /* active bone */ if (arm->act_edbone) { ebone = arm->act_edbone; - uarm->act_edbone = ebone->temp; + uarm->act_edbone = ebone->temp.ebone; } ED_armature_ebone_listbase_temp_clear(&uarm->lb); diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h index 820aedc5467..1412136c1a8 100644 --- a/source/blender/editors/armature/meshlaplacian.h +++ b/source/blender/editors/armature/meshlaplacian.h @@ -29,11 +29,9 @@ //#define RIGID_DEFORM -struct Scene; struct Object; struct Mesh; struct bDeformGroup; -struct MeshDeformModifierData; #ifdef RIGID_DEFORM struct EditMesh; diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 55224b87c59..c2072d30310 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -61,8 +61,6 @@ #include "UI_resources.h" -#include "gpencil_intern.h" - /* ************************************************** */ /* GREASE PENCIL DRAWING */ diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index 3fae208a2e2..5970a9497a0 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -34,8 +34,6 @@ #include "BLI_sys_types.h" -#include "BLI_blenlib.h" - #include "BKE_context.h" #include "DNA_gpencil_types.h" diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 9ba77a4244e..98bce3030a5 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -35,28 +35,17 @@ #include "MEM_guardedalloc.h" -#include "BLI_math.h" #include "BLI_blenlib.h" #include "BLI_lasso.h" #include "BLI_utildefines.h" #include "DNA_gpencil_types.h" -#include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" -#include "DNA_space_types.h" -#include "DNA_view3d_types.h" #include "BKE_context.h" -#include "BKE_curve.h" -#include "BKE_depsgraph.h" -#include "BKE_global.h" #include "BKE_gpencil.h" -#include "BKE_library.h" -#include "BKE_object.h" #include "BKE_report.h" -#include "BKE_scene.h" -#include "BKE_screen.h" #include "UI_interface.h" @@ -69,8 +58,6 @@ #include "UI_view2d.h" #include "ED_gpencil.h" -#include "ED_view3d.h" -#include "ED_keyframing.h" #include "gpencil_intern.h" diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 289cbc568d2..425983397e0 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -32,35 +32,19 @@ #include <stddef.h> #include <math.h> -#include "MEM_guardedalloc.h" - #include "BLI_math.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" #include "DNA_gpencil_types.h" -#include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_space_types.h" #include "DNA_view3d_types.h" #include "BKE_context.h" -#include "BKE_global.h" -#include "BKE_gpencil.h" -#include "BKE_library.h" -#include "BKE_object.h" -#include "BKE_report.h" -#include "BKE_scene.h" -#include "BKE_screen.h" - -#include "UI_interface.h" #include "WM_api.h" -#include "WM_types.h" - -#include "RNA_access.h" -#include "RNA_define.h" #include "UI_view2d.h" diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 50581429700..1ce285f8190 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -49,7 +49,6 @@ struct Object; struct bDopeSheet; struct bAction; -struct bActionGroup; struct FCurve; struct FModifier; @@ -116,12 +115,15 @@ typedef struct bAnimListElem { int index; /* for un-named data, the index of the data in its collection */ short update; /* (eAnim_Update_Flags) tag the element for updating */ + short datatype; /* (eAnim_KeyType) type of motion data to expect */ void *key_data; /* motion data - mostly F-Curves, but can be other types too */ struct ID *id; /* ID block that channel is attached to */ struct AnimData *adt; /* source of the animation data attached to ID block (for convenience) */ + + void *owner; /* for per-element F-Curves (e.g. NLA Control Curves), the element that this represents (e.g. NlaStrip) */ } bAnimListElem; @@ -141,6 +143,9 @@ typedef enum eAnim_ChannelType { ANIMTYPE_GROUP, ANIMTYPE_FCURVE, + ANIMTYPE_NLACONTROLS, + ANIMTYPE_NLACURVE, + ANIMTYPE_FILLACTD, ANIMTYPE_FILLDRIVERS, diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h index da756422bdb..35bb12ddaad 100644 --- a/source/blender/editors/include/ED_armature.h +++ b/source/blender/editors/include/ED_armature.h @@ -39,16 +39,12 @@ struct Base; struct bContext; struct Bone; struct bPoseChannel; -struct DerivedMesh; struct IDProperty; struct ListBase; struct MeshDeformModifierData; struct Object; -struct RegionView3D; struct ReportList; struct Scene; -struct SK_Sketch; -struct View3D; struct ViewContext; struct wmKeyConfig; struct wmOperator; @@ -59,8 +55,6 @@ typedef struct EditBone { struct EditBone *parent; /* Editbones have a one-way link (i.e. children refer * to parents. This is converted to a two-way link for * normal bones when leaving editmode. */ - void *temp; /* Used to store temporary data */ - char name[64]; /* MAXBONENAME */ float roll; /* Roll along axis. We'll ultimately use the axis/angle method * for determining the transformation matrix of the bone. The axis @@ -83,6 +77,14 @@ typedef struct EditBone { float oldlength; /* for envelope scaling */ short segments; + + /* Used to store temporary data */ + union { + struct EditBone *ebone; + struct Bone *bone; + void *p; + int i; + } temp; } EditBone; #define BONESEL_ROOT (1 << 28) @@ -119,10 +121,12 @@ void ED_keymap_armature(struct wmKeyConfig *keyconf); void ED_armature_from_edit(struct bArmature *arm); void ED_armature_to_edit(struct bArmature *arm); void ED_armature_edit_free(struct bArmature *arm); +void ED_armature_ebone_listbase_temp_clear(struct ListBase *lb); + void ED_armature_deselect_all(struct Object *obedit); void ED_armature_deselect_all_visible(struct Object *obedit); -int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, +int ED_do_pose_selectbuffer(struct Scene *scene, struct Base *base, unsigned int *buffer, short hits, bool extend, bool deselect, bool toggle, bool do_nearest); bool mouse_armature(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle); int join_armature_exec(struct bContext *C, struct wmOperator *op); diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h index 982e17cfce4..fee3d44b8eb 100644 --- a/source/blender/editors/include/ED_curve.h +++ b/source/blender/editors/include/ED_curve.h @@ -31,13 +31,10 @@ #ifndef __ED_CURVE_H__ #define __ED_CURVE_H__ -struct Base; struct bContext; struct Nurb; struct Object; -struct Scene; struct Text; -struct View3D; struct wmOperator; struct wmKeyConfig; struct Curve; diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index c4f08ca4775..448f2c83aad 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -33,19 +33,15 @@ struct ID; struct ListBase; struct bContext; -struct bScreen; struct ScrArea; struct ARegion; struct View3D; -struct SpaceNode; -struct SpaceSeq; struct Object; struct bGPdata; struct bGPDlayer; struct bGPDframe; struct bGPDstroke; struct PointerRNA; -struct ImBuf; struct wmKeyConfig; diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 704876e1261..fc42d2b5495 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -31,13 +31,11 @@ #define __ED_IMAGE_H__ struct SpaceImage; -struct Main; struct bContext; struct Image; struct ImageUser; struct ImBuf; struct ToolSettings; -struct uiBlock; struct wmWindowManager; struct ARegion; struct Scene; diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h index 0359153317b..7d163da0db0 100644 --- a/source/blender/editors/include/ED_keyframes_draw.h +++ b/source/blender/editors/include/ED_keyframes_draw.h @@ -34,7 +34,6 @@ struct bAnimContext; struct AnimData; -struct BezTriple; struct FCurve; struct bDopeSheet; struct bAction; diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h index e5b5e79875d..5d76c9e0f6f 100644 --- a/source/blender/editors/include/ED_keyframing.h +++ b/source/blender/editors/include/ED_keyframing.h @@ -46,10 +46,8 @@ struct FCurve; struct BezTriple; struct bPoseChannel; -struct bConstraint; struct bContext; -struct wmOperatorType; struct ReportList; struct PointerRNA; diff --git a/source/blender/editors/include/ED_lattice.h b/source/blender/editors/include/ED_lattice.h index 6636319dc9b..6fe1524cb6d 100644 --- a/source/blender/editors/include/ED_lattice.h +++ b/source/blender/editors/include/ED_lattice.h @@ -32,7 +32,6 @@ #define __ED_LATTICE_H__ struct Object; -struct Lattice; void free_editLatt(struct Object *ob); void make_editLatt(struct Object *obedit); diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h index 97fd553ea19..1611276ca70 100644 --- a/source/blender/editors/include/ED_mask.h +++ b/source/blender/editors/include/ED_mask.h @@ -34,7 +34,6 @@ struct wmKeyConfig; struct MaskLayer; struct MaskLayerShape; -struct wmEvent; /* mask_edit.c */ void ED_mask_get_size(struct ScrArea *sa, int *width, int *height); diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h index 5e774c63841..05a4ccabd1b 100644 --- a/source/blender/editors/include/ED_mball.h +++ b/source/blender/editors/include/ED_mball.h @@ -32,7 +32,6 @@ #define __ED_MBALL_H__ struct bContext; -struct MetaBall; struct Object; struct wmKeyConfig; diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index b144fd27902..c5704323511 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -41,39 +41,27 @@ struct ARegion; struct bContext; struct bFaceMap; struct wmOperator; -struct wmWindowManager; struct wmKeyConfig; struct ReportList; -struct EditSelection; struct ViewContext; struct bDeformGroup; -struct MDeformWeight; struct MDeformVert; struct Scene; struct Mesh; -struct MFace; -struct MEdge; -struct MVert; -struct MCol; struct UvVertMap; struct UvMapVert; -struct CustomData; struct BMEditMesh; -struct BMEditSelection; struct BMesh; struct BMVert; struct BMLoop; struct BMBVHTree; -struct MLoopCol; struct BMEdge; struct BMFace; struct UvVertMap; struct UvMapVert; struct ToolSettings; -struct Material; struct Object; struct rcti; -struct MeshStatVis; /* editmesh_utils.c */ void EDBM_verts_mirror_cache_begin_ex(struct BMEditMesh *em, const int axis, diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 824c82a0069..b02ebeb650b 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -33,7 +33,6 @@ struct ID; struct Main; -struct Material; struct Scene; struct Tex; struct bContext; diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 3d791839a3c..3b7157bd465 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -35,33 +35,17 @@ extern "C" { #endif -struct BMEdge; -struct BMFace; -struct BMVert; -struct BPoint; struct Base; -struct BezTriple; -struct Curve; -struct EditBone; struct EnumPropertyItem; struct ID; -struct KeyBlock; -struct Lattice; struct Main; -struct Mesh; -struct MetaElem; struct ModifierData; -struct HookModifierData; -struct Nurb; struct Object; struct ReportList; struct Scene; -struct View3D; -struct ViewContext; struct bConstraint; struct bContext; struct bPoseChannel; -struct wmEvent; struct wmKeyConfig; struct wmKeyMap; struct wmOperator; diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h index decd79fcc7b..c3a411a2b97 100644 --- a/source/blender/editors/include/ED_paint.h +++ b/source/blender/editors/include/ED_paint.h @@ -26,7 +26,6 @@ #define __ED_PAINT_H__ struct bContext; -struct RegionView3D; struct wmKeyConfig; struct wmOperator; diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h index 7c8a2b7b143..b08e9f8ca66 100644 --- a/source/blender/editors/include/ED_particle.h +++ b/source/blender/editors/include/ED_particle.h @@ -35,10 +35,7 @@ struct bContext; struct Object; struct ParticleEditSettings; -struct ParticleSystem; -struct RadialControl; struct rcti; -struct wmKeyConfig; struct PTCacheEdit; struct Scene; diff --git a/source/blender/editors/include/ED_render.h b/source/blender/editors/include/ED_render.h index 1b1d8d723ee..2bc0566f4a6 100644 --- a/source/blender/editors/include/ED_render.h +++ b/source/blender/editors/include/ED_render.h @@ -37,9 +37,6 @@ struct MTex; struct Render; struct Scene; struct ScrArea; -struct RegionView3D; -struct RenderEngine; -struct View3D; struct wmWindowManager; /* render_ops.c */ diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 8c33395cc49..b4f7d806079 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -42,7 +42,6 @@ struct wmNotifier; struct wmEvent; struct wmKeyConfig; struct bContext; -struct SpaceType; struct Scene; struct bScreen; struct ARegion; diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h index d3b1a824104..6daaac5bb42 100644 --- a/source/blender/editors/include/ED_sculpt.h +++ b/source/blender/editors/include/ED_sculpt.h @@ -34,7 +34,6 @@ struct ARegion; struct bContext; struct Object; struct RegionView3D; -struct Scene; struct ViewContext; struct rcti; diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h index 8382428ffa6..36d9417d002 100644 --- a/source/blender/editors/include/ED_transform.h +++ b/source/blender/editors/include/ED_transform.h @@ -35,18 +35,15 @@ /* ******************* Registration Function ********************** */ struct ARegion; -struct EnumPropertyItem; struct ListBase; struct Object; struct View3D; struct bContext; -struct uiLayout; struct wmEvent; struct wmKeyConfig; struct wmKeyMap; struct wmOperatorType; -struct wmWindowManager; -struct PointerRNA; +/*struct PointerRNA;*/ /* view3d manipulators */ void transform_keymap_for_space(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int spaceid); void transform_operatortypes(void); @@ -110,7 +107,6 @@ enum TfmMode { bool calculateTransformCenter(struct bContext *C, int centerMode, float cent3d[3], float cent2d[2]); struct TransInfo; -struct ScrArea; struct Base; struct Scene; struct Object; diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index e26e03473e0..6fa92e1953d 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -31,15 +31,9 @@ #ifndef __ED_UTIL_H__ #define __ED_UTIL_H__ -struct Scene; -struct Object; struct bContext; -struct ARegion; -struct uiBlock; struct wmOperator; struct wmOperatorType; -struct BMEditMesh; -struct Mesh; /* ed_util.c */ diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 3e8f234e979..535683823bf 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -37,13 +37,11 @@ struct BMFace; struct BMLoop; struct Image; struct ImageUser; -struct MTFace; struct MTexPoly; struct Main; struct Object; struct Scene; struct SpaceImage; -struct bContext; struct bNode; struct wmKeyConfig; diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 5921e5c19ec..d9f09b06349 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -40,14 +40,11 @@ /* Struct Declarations */ struct ID; -struct Main; struct ListBase; struct ARegion; -struct ARegionType; struct ScrArea; struct wmEvent; struct wmWindow; -struct wmWindowManager; struct wmOperator; struct AutoComplete; struct bContext; @@ -58,18 +55,14 @@ struct PointerRNA; struct PropertyRNA; struct ReportList; struct rcti; -struct rctf; struct uiList; struct uiStyle; struct uiFontStyle; struct uiWidgetColors; -struct ColorBand; -struct CurveMapping; struct Image; struct ImageUser; struct wmOperatorType; struct uiWidgetColors; -struct Tex; struct MTex; struct ImBuf; struct bNodeTree; diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h index 74927428363..9d190fa81c7 100644 --- a/source/blender/editors/include/UI_interface_icons.h +++ b/source/blender/editors/include/UI_interface_icons.h @@ -34,12 +34,6 @@ struct bContext; struct ID; -struct Image; -struct ImBuf; -struct World; -struct Tex; -struct Lamp; -struct Material; struct PreviewImage; struct PointerRNA; diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 4a484212a63..3923c5c4432 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -301,7 +301,6 @@ enum { /* specific defines per space should have higher define values */ struct bTheme; -struct PointerRNA; struct bThemeState { struct bTheme *theme; diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 24a30ebe3d8..f6757b35462 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -54,13 +54,13 @@ #include "interface_intern.h" -static FCurve *ui_but_get_fcurve(uiBut *but, AnimData **adt, bAction **action, bool *r_driven) +static FCurve *ui_but_get_fcurve(uiBut *but, AnimData **adt, bAction **action, bool *r_driven, bool *r_special) { /* for entire array buttons we check the first component, it's not perfect * but works well enough in typical cases */ int rnaindex = (but->rnaindex == -1) ? 0 : but->rnaindex; - return rna_get_fcurve_context_ui(but->block->evil_C, &but->rnapoin, but->rnaprop, rnaindex, adt, action, r_driven); + return rna_get_fcurve_context_ui(but->block->evil_C, &but->rnapoin, but->rnaprop, rnaindex, adt, action, r_driven, r_special); } void ui_but_anim_flag(uiBut *but, float cfra) @@ -69,11 +69,16 @@ void ui_but_anim_flag(uiBut *but, float cfra) bAction *act; FCurve *fcu; bool driven; - + bool special; + but->flag &= ~(UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN); - - fcu = ui_but_get_fcurve(but, &adt, &act, &driven); - + + /* NOTE: "special" is reserved for special F-Curves stored on the animation data + * itself (which are used to animate properties of the animation data). + * We count those as "animated" too for now + */ + fcu = ui_but_get_fcurve(but, &adt, &act, &driven, &special); + if (fcu) { if (!driven) { but->flag |= UI_BUT_ANIMATED; @@ -98,10 +103,10 @@ bool ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen) { FCurve *fcu; ChannelDriver *driver; - bool driven; - - fcu = ui_but_get_fcurve(but, NULL, NULL, &driven); - + bool driven, special; + + fcu = ui_but_get_fcurve(but, NULL, NULL, &driven, &special); + if (fcu && driven) { driver = fcu->driver; @@ -118,9 +123,9 @@ bool ui_but_anim_expression_set(uiBut *but, const char *str) { FCurve *fcu; ChannelDriver *driver; - bool driven; + bool driven, special; - fcu = ui_but_get_fcurve(but, NULL, NULL, &driven); + fcu = ui_but_get_fcurve(but, NULL, NULL, &driven, &special); if (fcu && driven) { driver = fcu->driver; @@ -215,8 +220,9 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) bAction *action; FCurve *fcu; bool driven; + bool special; - fcu = ui_but_get_fcurve(but, NULL, &action, &driven); + fcu = ui_but_get_fcurve(but, NULL, &action, &driven, &special); if (fcu && !driven) { id = but->rnapoin.id.data; diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 200d37d636c..65e94c5f5fa 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -40,11 +40,9 @@ struct ARegion; struct bContext; -struct IDProperty; struct uiHandleButtonData; struct wmEvent; struct wmOperatorType; -struct wmWindow; struct wmTimer; struct uiStyle; struct uiWidgetColors; @@ -588,7 +586,6 @@ void ui_popup_block_free(struct bContext *C, uiPopupBlockHandle *handle); int ui_but_menu_step(uiBut *but, int step); -struct AutoComplete; /* interface_panel.c */ extern int ui_handler_panel_region(struct bContext *C, const struct wmEvent *event, struct ARegion *ar); diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c index cb47adbe73e..2dae9561d4e 100644 --- a/source/blender/editors/mask/mask_add.c +++ b/source/blender/editors/mask/mask_add.c @@ -72,7 +72,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C, MaskLayer *masklay, *point_masklay; MaskSpline *point_spline; MaskSplinePoint *point = NULL; - float dist = FLT_MAX, co[2]; + float dist_best_sq = FLT_MAX, co[2]; int width, height; float u; float scalex, scaley; @@ -123,7 +123,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C, } for (j = 0; j < tot_point - 1; j++) { - float cur_dist, a[2], b[2]; + float dist_sq, a[2], b[2]; a[0] = points[2 * j] * scalex; a[1] = points[2 * j + 1] * scaley; @@ -131,16 +131,16 @@ bool ED_mask_find_nearest_diff_point(const bContext *C, b[0] = points[2 * j + 2] * scalex; b[1] = points[2 * j + 3] * scaley; - cur_dist = dist_to_line_segment_v2(co, a, b); + dist_sq = dist_squared_to_line_segment_v2(co, a, b); - if (cur_dist < dist) { + if (dist_sq < dist_best_sq) { if (tangent) sub_v2_v2v2(tangent, &diff_points[2 * j + 2], &diff_points[2 * j]); point_masklay = masklay; point_spline = spline; point = use_deform ? &spline->points[(cur_point - spline->points_deform)] : cur_point; - dist = cur_dist; + dist_best_sq = dist_sq; u = (float)j / tot_point; } } @@ -154,7 +154,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C, } } - if (point && dist < threshold) { + if (point && dist_best_sq < threshold) { if (masklay_r) *masklay_r = point_masklay; @@ -174,7 +174,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C, } if (score_r) { - *score_r = dist; + *score_r = dist_best_sq; } return true; diff --git a/source/blender/editors/mask/mask_intern.h b/source/blender/editors/mask/mask_intern.h index 5cdb224ce21..66a6c75272e 100644 --- a/source/blender/editors/mask/mask_intern.h +++ b/source/blender/editors/mask/mask_intern.h @@ -34,7 +34,6 @@ struct bContext; struct Mask; -struct wmEvent; struct wmOperatorType; /* internal exports only */ diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 8611872a1a0..c7355120a57 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -34,14 +34,9 @@ #ifndef __MESH_INTERN_H__ #define __MESH_INTERN_H__ -struct BMEdge; struct BMEditMesh; -struct BMFace; -struct BMHeader; struct BMOperator; -struct BMesh; struct EnumPropertyItem; -struct ViewContext; struct bContext; struct wmKeyConfig; struct wmKeyMap; diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index 634b0298d88..2ef1f95d8f9 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -32,17 +32,12 @@ #define __OBJECT_INTERN_H__ struct wmOperatorType; -struct KeyBlock; -struct Lattice; -struct Curve; struct Object; -struct Mesh; struct bContext; struct StructRNA; struct wmOperator; struct ModifierData; -struct HookModifierData; /* add hook menu */ enum eObject_Hook_Add_Mode { diff --git a/source/blender/editors/render/render_intern.h b/source/blender/editors/render/render_intern.h index f9377d576bf..ee0046b49dc 100644 --- a/source/blender/editors/render/render_intern.h +++ b/source/blender/editors/render/render_intern.h @@ -32,9 +32,9 @@ #ifndef __RENDER_INTERN_H__ #define __RENDER_INTERN_H__ +struct bContext; +struct RenderEngine; struct wmOperatorType; -struct RenderResult; -struct Scene; struct ScrArea; /* render_shading.c */ diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 99edaff759e..9dbd2e88563 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -423,7 +423,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre Tex *tex = NULL, *origtex = (Tex *)id; if (origtex) { - tex = localize_texture(origtex); + tex = BKE_texture_localize(origtex); sp->texcopy = tex; BLI_addtail(&pr_main->tex, tex); } diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 75b8b8cebde..cf712a653e6 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -450,7 +450,7 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op)) tex = BKE_texture_copy(tex); } else { - tex = add_texture(bmain, DATA_("Texture")); + tex = BKE_texture_add(bmain, DATA_("Texture")); } /* hook into UI */ @@ -1492,7 +1492,7 @@ static int envmap_clear_exec(bContext *C, wmOperator *UNUSED(op)) { Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; - BKE_free_envmapdata(tex->env); + BKE_texture_envmap_free_data(tex->env); WM_event_add_notifier(C, NC_TEXTURE | NA_EDITED, tex); @@ -1535,7 +1535,7 @@ static int envmap_clear_all_exec(bContext *C, wmOperator *UNUSED(op)) for (tex = bmain->tex.first; tex; tex = tex->id.next) if (tex->env) - BKE_free_envmapdata(tex->env); + BKE_texture_envmap_free_data(tex->env); WM_event_add_notifier(C, NC_TEXTURE | NA_EDITED, tex); diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h index 79036d3356f..ccb6d5a6dca 100644 --- a/source/blender/editors/screen/screen_intern.h +++ b/source/blender/editors/screen/screen_intern.h @@ -32,8 +32,6 @@ #define __SCREEN_INTERN_H__ /* internal exports only */ -struct wmWindow; -struct Scene; #define AZONESPOT (0.6f * U.widget_unit) #define AZONEFADEIN (5.0f * U.widget_unit) /* when azone is totally visible */ diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 4779c27f409..e0398722b33 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3413,10 +3413,17 @@ static int match_region_with_redraws(int spacetype, int regiontype, int redraws) return 0; } +//#define PROFILE_AUDIO_SYNCH + static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { bScreen *screen = CTX_wm_screen(C); +#ifdef PROFILE_AUDIO_SYNCH + static int old_frame = 0; + int newfra_int; +#endif + if (screen->animtimer && screen->animtimer == event->customdata) { Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); @@ -3438,11 +3445,24 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), const wmEv finite(time = BKE_sound_sync_scene(scene))) { double newfra = (double)time * FPS; + /* give some space here to avoid jumps */ if (newfra + 0.5 > scene->r.cfra && newfra - 0.5 < scene->r.cfra) scene->r.cfra++; else scene->r.cfra = newfra + 0.5; + +#ifdef PROFILE_AUDIO_SYNCH + newfra_int = scene->r.cfra; + if (newfra_int < old_frame) { + printf("back jump detected, frame %d!\n", newfra_int); + } + else if (newfra_int > old_frame + 1) { + printf("forward jump detected, frame %d!\n", newfra_int); + } + fflush(stdout); + old_frame = newfra_int; +#endif } else { if (sync) { diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 805c271f2d1..f853fd91491 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5487,7 +5487,7 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op) ntreeUpdateTree(CTX_data_main(C), ntree); } else { - MTex *mtex = add_mtex_id(&ma->id, -1); + MTex *mtex = BKE_texture_mtex_add_id(&ma->id, -1); /* successful creation of mtex layer, now create set */ if (mtex) { @@ -5506,7 +5506,7 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op) } } - mtex->tex = add_texture(bmain, DATA_(layer_type_items[type_id].name)); + mtex->tex = BKE_texture_add(bmain, DATA_(layer_type_items[type_id].name)); mtex->mapto = type; if (mtex->tex) { diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index 9e558092f73..77059a22de7 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -34,14 +34,11 @@ struct ARegion; struct bContext; -struct bglMats; struct Brush; struct ImagePool; struct ColorSpace; struct ColorManagedDisplay; struct ListBase; -struct Material; -struct Mesh; struct MTex; struct Object; struct PaintStroke; @@ -55,7 +52,6 @@ struct ViewContext; struct wmEvent; struct wmOperator; struct wmOperatorType; -struct ImagePaintState; struct wmWindowManager; struct DMCoNo; enum PaintMode; diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index a61f571fdf6..8f1a4655c37 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -41,14 +41,8 @@ #include "BKE_pbvh.h" struct bContext; -struct Brush; struct KeyBlock; -struct Mesh; -struct MultiresModifierData; struct Object; -struct Scene; -struct Sculpt; -struct SculptStroke; struct SculptUndoNode; int sculpt_mode_poll(struct bContext *C); diff --git a/source/blender/editors/sound/sound_intern.h b/source/blender/editors/sound/sound_intern.h index e8a8ec55ab5..ace173abdee 100644 --- a/source/blender/editors/sound/sound_intern.h +++ b/source/blender/editors/sound/sound_intern.h @@ -32,7 +32,6 @@ #ifndef __SOUND_INTERN_H__ #define __SOUND_INTERN_H__ -struct wmOperatorType; #endif /* __SOUND_INTERN_H__ */ diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 76c955d8bca..740992a3ad4 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -93,11 +93,15 @@ static AnimData *actedit_animdata_from_context(bContext *C) /* Get AnimData block to use */ if (saction->mode == SACTCONT_ACTION) { /* Currently, "Action Editor" means object-level only... */ - adt = ob->adt; + if (ob) { + adt = ob->adt; + } } else if (saction->mode == SACTCONT_SHAPEKEY) { Key *key = BKE_key_from_object(ob); - adt = key->adt; + if (key) { + adt = key->adt; + } } return adt; @@ -180,9 +184,19 @@ static int action_new_poll(bContext *C) if (!(scene->flag & SCE_NLA_EDIT_ON)) { if (ED_operator_action_active(C)) { SpaceAction *saction = (SpaceAction *)CTX_wm_space_data(C); + Object *ob = CTX_data_active_object(C); /* For now, actions are only for the active object, and on object and shapekey levels... */ - return ELEM(saction->mode, SACTCONT_ACTION, SACTCONT_SHAPEKEY); + if (saction->mode == SACTCONT_ACTION) { + /* XXX: This assumes that actions are assigned to the active object */ + if (ob) + return true; + } + else if (saction->mode == SACTCONT_SHAPEKEY) { + Key *key = BKE_key_from_object(ob); + if (key) + return true; + } } else if (ED_operator_nla_active(C)) { return true; @@ -1068,8 +1082,13 @@ static void insert_action_keys(bAnimContext *ac, short mode) else cfra = (float)CFRA; - /* if there's an id */ - if (ale->id) + /* read value from property the F-Curve represents, or from the curve only? + * - ale->id != NULL: Typically, this means that we have enough info to try resolving the path + * - ale->owner != NULL: If this is set, then the path may not be resolvable from the ID alone, + * so it's easier for now to just read the F-Curve directly. + * (TODO: add the full-blown PointerRNA relative parsing case here...) + */ + if (ale->id && !ale->owner) insert_keyframe(reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag); else insert_vert_fcurve(fcu, cfra, fcu->curval, 0); @@ -1142,7 +1161,7 @@ static void duplicate_action_keys(bAnimContext *ac) /* loop through filtered data and delete selected keys */ for (ale = anim_data.first; ale; ale = ale->next) { - if (ale->type == ANIMTYPE_FCURVE) + if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) duplicate_fcurve_keys((FCurve *)ale->key_data); else if (ale->type == ANIMTYPE_GPLAYER) ED_gplayer_frames_duplicate((bGPDlayer *)ale->data); diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h index 61d4249ae20..9a19e4a926b 100644 --- a/source/blender/editors/space_action/action_intern.h +++ b/source/blender/editors/space_action/action_intern.h @@ -35,10 +35,7 @@ struct bContext; struct bAnimContext; struct SpaceAction; struct ARegion; -struct wmWindowManager; struct wmOperatorType; -struct ActKeysInc; -struct bAnimListElem; /* internal exports only */ diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index ddfca98a119..0f94baff082 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -1221,11 +1221,11 @@ static void mouse_action_keys(bAnimContext *ac, const int mval[2], short select_ agrp->flag |= AGRP_SELECTED; ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, agrp, ANIMTYPE_GROUP); } - else if (ale->type == ANIMTYPE_FCURVE) { + else if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) { FCurve *fcu = ale->data; fcu->flag |= FCURVE_SELECTED; - ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE); + ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ale->type); } } } diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index f294729ae97..7fc35a6b1e7 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -34,7 +34,6 @@ #include "DNA_listBase.h" #include "RNA_types.h" -struct ARegion; struct ARegionType; struct ID; struct SpaceButs; diff --git a/source/blender/editors/space_console/console_intern.h b/source/blender/editors/space_console/console_intern.h index a3746e091ce..d8a4a6fd2bb 100644 --- a/source/blender/editors/space_console/console_intern.h +++ b/source/blender/editors/space_console/console_intern.h @@ -31,7 +31,6 @@ struct ConsoleLine; struct wmOperatorType; -struct ReportList; struct bContext; /* console_draw.c */ diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h index e7a6cd62a33..f1fd4e2b683 100644 --- a/source/blender/editors/space_file/file_intern.h +++ b/source/blender/editors/space_file/file_intern.h @@ -59,7 +59,6 @@ bool file_draw_check_exists(SpaceFile *sfile); /* file_ops.h */ struct wmOperatorType; struct wmOperator; -struct wmEvent; void FILE_OT_highlight(struct wmOperatorType *ot); void FILE_OT_select(struct wmOperatorType *ot); void FILE_OT_select_all_toggle(struct wmOperatorType *ot); diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h index 797d54a89b1..44e0a5169fa 100644 --- a/source/blender/editors/space_file/filelist.h +++ b/source/blender/editors/space_file/filelist.h @@ -40,12 +40,7 @@ extern "C" { struct BlendHandle; struct FileList; struct FileSelection; -struct FolderList; -struct Main; -struct ReportList; -struct Scene; struct direntry; -struct rcti; struct wmWindowManager; typedef enum FileSelType { diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index a2b64afdb15..f1e094c31ed 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -165,9 +165,28 @@ static void graph_panel_properties(const bContext *C, Panel *pa) RNA_pointer_create(ale->id, &RNA_FCurve, fcu, &fcu_ptr); /* user-friendly 'name' for F-Curve */ - /* TODO: only show the path if this is invalid? */ col = uiLayoutColumn(layout, false); - icon = getname_anim_fcurve(name, ale->id, fcu); + if (ale->type == ANIMTYPE_FCURVE) { + /* get user-friendly name for F-Curve */ + icon = getname_anim_fcurve(name, ale->id, fcu); + } + else { + /* NLA Control Curve, etc. */ + bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale); + + /* get name */ + if (acf && acf->name) { + acf->name(ale, name); + } + else { + strcpy(name, IFACE_("<invalid>")); + icon = ICON_ERROR; + } + + /* icon */ + if (ale->type == ANIMTYPE_NLACURVE) + icon = ICON_NLA; + } uiItemL(col, name, icon); /* RNA-Path Editing - only really should be enabled when things aren't working */ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 2944901663b..559eec8fe48 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -498,12 +498,17 @@ static void insert_graph_keys(bAnimContext *ac, short mode) else cfra = (float)CFRA; - /* if there's an id */ - if (ale->id) + /* read value from property the F-Curve represents, or from the curve only? + * - ale->id != NULL: Typically, this means that we have enough info to try resolving the path + * - ale->owner != NULL: If this is set, then the path may not be resolvable from the ID alone, + * so it's easier for now to just read the F-Curve directly. + * (TODO: add the full-blown PointerRNA relative parsing case here...) + */ + if (ale->id && !ale->owner) insert_keyframe(reports, ale->id, NULL, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag); else insert_vert_fcurve(fcu, cfra, fcu->curval, 0); - + ale->update |= ANIM_UPDATE_DEFAULT; } @@ -596,12 +601,12 @@ static int graphkeys_click_insert_exec(bContext *C, wmOperator *op) /* insert keyframe on the specified frame + value */ insert_vert_fcurve(fcu, frame, val, 0); - + ale->update |= ANIM_UPDATE_DEPS; - + BLI_listbase_clear(&anim_data); BLI_addtail(&anim_data, ale); - + ANIM_animdata_update(&ac, &anim_data); } else { diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h index 50412952139..e2fab188fc8 100644 --- a/source/blender/editors/space_graph/graph_intern.h +++ b/source/blender/editors/space_graph/graph_intern.h @@ -32,11 +32,8 @@ #define __GRAPH_INTERN_H__ struct bContext; -struct wmWindowManager; struct bAnimContext; struct bAnimListElem; -struct FCurve; -struct FModifier; struct SpaceIpo; struct ScrArea; struct ARegion; diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index eea360ced45..0e56dc817e4 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -210,13 +210,18 @@ int graphop_active_fcurve_poll(bContext *C) if (ale == NULL) return 0; - /* free temp data... */ - has_fcurve = ((ale->data) && (ale->type == ANIMTYPE_FCURVE)); + /* do we have a suitable F-Curves? + * - For most cases, NLA Control Curves are sufficiently similar to NLA curves to serve this role too. + * Under the hood, they are F-Curves too. The only problems which will arise here are if these need to be + * in an Action too (but drivers would then also be affected!) + */ + has_fcurve = ((ale->data) && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)); if (has_fcurve) { FCurve *fcu = (FCurve *)ale->data; has_fcurve = (fcu->flag & FCURVE_VISIBLE) != 0; } + /* free temp data... */ MEM_freeN(ale); /* return success */ diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h index aecc43f4fdf..6eaad302180 100644 --- a/source/blender/editors/space_image/image_intern.h +++ b/source/blender/editors/space_image/image_intern.h @@ -38,11 +38,7 @@ struct ARegion; struct ARegionType; struct ScrArea; struct SpaceImage; -struct Object; -struct Image; -struct ImBuf; struct wmOperatorType; -struct Scene; struct bNodeTree; /* space_image.c */ diff --git a/source/blender/editors/space_logic/logic_intern.h b/source/blender/editors/space_logic/logic_intern.h index 38b122f64b6..13146621d1b 100644 --- a/source/blender/editors/space_logic/logic_intern.h +++ b/source/blender/editors/space_logic/logic_intern.h @@ -35,12 +35,8 @@ /* internal exports only */ struct bContext; struct ARegion; -struct ARegionType; struct ScrArea; -struct SpaceLogic; -struct Object; struct wmOperatorType; -struct Scene; /* space_logic.c */ struct ARegion *logic_has_buttons_region(struct ScrArea *sa); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 0092dc87349..3595b4520ea 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -93,7 +93,6 @@ typedef struct CompoJob { const short *stop; short *do_update; float *progress; - short need_sync; int recalc_flags; } CompoJob; @@ -162,13 +161,12 @@ static int compo_breakjob(void *cjv) ); } -/* called by compo, wmJob sends notifier, old compositor system only */ -static void compo_statsdrawjob(void *cjv, char *UNUSED(str)) +/* called by compo, wmJob sends notifier */ +static void compo_statsdrawjob(void *cjv, const char *UNUSED(str)) { CompoJob *cj = cjv; *(cj->do_update) = true; - cj->need_sync = true; } /* called by compo, wmJob sends notifier */ @@ -202,17 +200,8 @@ static void compo_initjob(void *cjv) } /* called before redraw notifiers, it moves finished previews over */ -static void compo_updatejob(void *cjv) +static void compo_updatejob(void *UNUSED(cjv)) { - CompoJob *cj = cjv; - - if (cj->need_sync) { - /* was used by old compositor system only */ - ntreeLocalSync(cj->localtree, cj->ntree); - - cj->need_sync = false; - } - WM_main_add_notifier(NC_SCENE | ND_COMPO_RESULT, NULL); } diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h index 27c3ab813ae..d49d37c651e 100644 --- a/source/blender/editors/space_node/node_intern.h +++ b/source/blender/editors/space_node/node_intern.h @@ -42,12 +42,9 @@ struct ARegionType; struct View2D; struct bContext; struct wmWindow; -struct wmWindowManager; -struct wmEvent; struct bNode; struct bNodeSocket; struct bNodeLink; -struct Main; struct wmKeyConfig; /* temp data to pass on to modal */ diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index ef2ef9858fe..3cb3ddeab9b 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -198,11 +198,11 @@ static void restrictbutton_recursive_child(bContext *C, Scene *scene, Object *ob ID *id; bAction *action; FCurve *fcu; - bool driven; + bool driven, special; RNA_id_pointer_create(&ob->id, &ptr); prop = RNA_struct_find_property(&ptr, rnapropname); - fcu = rna_get_fcurve_context_ui(C, &ptr, prop, 0, NULL, &action, &driven); + fcu = rna_get_fcurve_context_ui(C, &ptr, prop, 0, NULL, &action, &driven, &special); if (fcu && !driven) { id = ptr.id.data; @@ -290,8 +290,7 @@ static void restrictbutton_modifier_cb(bContext *C, void *UNUSED(poin), void *po Object *ob = (Object *)poin2; DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - - WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); } static void restrictbutton_bone_visibility_cb(bContext *C, void *poin, void *poin2) diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 50fecebb742..b4b73a11a14 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -36,12 +36,10 @@ /* internal exports only */ -struct wmWindowManager; struct wmOperatorType; struct TreeStoreElem; struct bContext; struct Scene; -struct ARegion; struct ID; struct Object; diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 7aac6a7797c..9239d9cb27e 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -769,16 +769,16 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor ten = outliner_add_element(soops, &te->subtree, id, te, TSE_EBONE, a); ten->directdata = ebone; ten->name = ebone->name; - ebone->temp = ten; + ebone->temp.p = ten; } /* make hierarchy */ - ten = arm->edbo->first ? ((EditBone *)arm->edbo->first)->temp : NULL; + ten = arm->edbo->first ? ((EditBone *)arm->edbo->first)->temp.p : NULL; while (ten) { TreeElement *nten = ten->next, *par; ebone = (EditBone *)ten->directdata; if (ebone->parent) { BLI_remlink(&te->subtree, ten); - par = ebone->parent->temp; + par = ebone->parent->temp.p; BLI_addtail(&par->subtree, ten); ten->parent = par; } diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 37b801d0743..63ae52c3207 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -45,7 +45,6 @@ struct ARegion; struct ARegionType; struct Scene; struct Main; -struct SequencePreview; /* space_sequencer.c */ struct ARegion *sequencer_has_buttons_region(struct ScrArea *sa); diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h index f577714c480..7ae2617f375 100644 --- a/source/blender/editors/space_text/text_intern.h +++ b/source/blender/editors/space_text/text_intern.h @@ -34,15 +34,12 @@ /* internal exports only */ struct ARegion; -struct ARegionType; struct bContext; -struct ReportList; struct ScrArea; struct SpaceText; struct Text; struct TextLine; struct wmOperatorType; -struct wmWindowManager; /* text_draw.c */ void draw_text_main(struct SpaceText *st, struct ARegion *ar); diff --git a/source/blender/editors/space_time/time_intern.h b/source/blender/editors/space_time/time_intern.h index ce52cbbd65e..ced36b2ac2d 100644 --- a/source/blender/editors/space_time/time_intern.h +++ b/source/blender/editors/space_time/time_intern.h @@ -34,7 +34,6 @@ /* internal exports only */ -struct wmWindowManager; /* time_ops.c */ void time_operatortypes(void); diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c index d8b18140cde..d753ad68fcc 100644 --- a/source/blender/editors/space_view3d/drawanimviz.c +++ b/source/blender/editors/space_view3d/drawanimviz.c @@ -51,7 +51,6 @@ #include "BIF_gl.h" -#include "ED_armature.h" #include "ED_keyframes_draw.h" diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index ddd58ebfdab..86529bd3fed 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -598,10 +598,10 @@ void drawaxes(float size, char drawtype) } -/* Function to draw an Image on a empty Object */ +/* Function to draw an Image on an empty Object */ static void draw_empty_image(Object *ob, const short dflag, const unsigned char ob_wire_col[4]) { - Image *ima = (Image *)ob->data; + Image *ima = ob->data; ImBuf *ibuf = BKE_image_acquire_ibuf(ima, ob->iuser, NULL); float scale, ofs_x, ofs_y, sca_x, sca_y; @@ -641,16 +641,13 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char sca_y = 1.0f; } - /* Calculate the scale center based on objects origin */ + /* Calculate the scale center based on object's origin */ ofs_x = ob->ima_ofs[0] * ima_x; ofs_y = ob->ima_ofs[1] * ima_y; glMatrixMode(GL_MODELVIEW); glPushMatrix(); - /* Make sure we are drawing at the origin */ - glTranslatef(0.0f, 0.0f, 0.0f); - /* Calculate Image scale */ scale = (ob->empty_drawsize / max_ff((float)ima_x * sca_x, (float)ima_y * sca_y)); @@ -944,7 +941,7 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, bool depth_write, flo /* ******************** primitive drawing ******************* */ -/* draws a cube on given the scaling of the cube, assuming that +/* draws a cube given the scaling of the cube, assuming that * all required matrices have been set (used for drawing empties) */ static void drawcube_size(float size) @@ -1026,8 +1023,6 @@ static void drawshadbuflimits(Lamp *la, float mat[4][4]) glPointSize(1.0); } - - static void spotvolume(float lvec[3], float vvec[3], const float inp) { /* camera is at 0,0,0 */ @@ -1036,8 +1031,8 @@ static void spotvolume(float lvec[3], float vvec[3], const float inp) normalize_v3(lvec); normalize_v3(vvec); /* is this the correct vector ? */ - cross_v3_v3v3(temp, vvec, lvec); /* equation for a plane through vvec en lvec */ - cross_v3_v3v3(plane, lvec, temp); /* a plane perpendicular to this, parrallel with lvec */ + cross_v3_v3v3(temp, vvec, lvec); /* equation for a plane through vvec and lvec */ + cross_v3_v3v3(plane, lvec, temp); /* a plane perpendicular to this, parallel with lvec */ /* vectors are exactly aligned, use the X axis, this is arbitrary */ if (normalize_v3(plane) == 0.0f) @@ -1162,7 +1157,7 @@ static void drawlamp(View3D *v3d, RegionView3D *rv3d, Base *base, unsigned char curcol[4]; unsigned char col[4]; - /* cone can't be drawn for duplicated lamps, because duplilist would be freed to */ + /* cone can't be drawn for duplicated lamps, because duplilist would be freed */ /* the moment of view3d_draw_transp() call */ const bool is_view = (rv3d->persp == RV3D_CAMOB && v3d->camera == base->object); const bool drawcone = ((dt > OB_WIRE) && @@ -1311,7 +1306,7 @@ static void drawlamp(View3D *v3d, RegionView3D *rv3d, Base *base, x *= y; /* draw the circle/square at the end of the cone */ - glTranslatef(0.0, 0.0, x); + glTranslatef(0.0, 0.0, x); if (la->mode & LA_SQUARE) { float tvec[3]; float z_abs = fabsf(z); @@ -1500,10 +1495,10 @@ static void draw_limit_line(float sta, float end, const short dflag, unsigned in static void draw_focus_cross(float dist, float size) { glBegin(GL_LINES); - glVertex3f(-size, 0.f, -dist); - glVertex3f(size, 0.f, -dist); - glVertex3f(0.f, -size, -dist); - glVertex3f(0.f, size, -dist); + glVertex3f(-size, 0.0f, -dist); + glVertex3f(size, 0.0f, -dist); + glVertex3f(0.0f, -size, -dist); + glVertex3f(0.0f, size, -dist); glEnd(); } @@ -1556,8 +1551,7 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D BKE_tracking_get_camera_object_matrix(scene, base->object, mat); /* we're compensating camera size for bundles size, - * to make it so bundles are always displayed with the same size - */ + * to make it so bundles are always displayed with the same size */ copy_v3_v3(camera_size, base->object->size); if ((tracking_object->flag & TRACKING_OBJECT_CAMERA) == 0) mul_v3_fl(camera_size, tracking_object->scale); @@ -1879,8 +1873,6 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base static void drawspeaker(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D *UNUSED(rv3d), Object *UNUSED(ob), int UNUSED(flag)) { - //Speaker *spk = ob->data; - float vec[3]; int i, j; @@ -1991,9 +1983,9 @@ static void ensure_curve_cache(Scene *scene, Object *object) * here, we also need to check whether display list is * empty or not. * - * The trick below tries to optimie calls to displist + * The trick below tries to optimize calls to displist * creation for cases curve is empty. Meaning, if the curve - * is empty (without splies) bevel list would also be empty. + * is empty (without splines) bevel list would also be empty. * And the thing is, render thread always leaves bevel list * in a proper state. So if bevel list is here and display * list is not we need to make display list. @@ -2271,8 +2263,7 @@ static void draw_dm_verts__mapFunc(void *userData, int index, const float co[3], BMVert *eve = BM_vert_at_index(data->bm, index); if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && BM_elem_flag_test(eve, BM_ELEM_SELECT) == data->sel) { - /* skin nodes: draw a red circle around the root - * node(s) */ + /* skin nodes: draw a red circle around the root node(s) */ if (data->cd_vskin_offset != -1) { const MVertSkin *vs = BM_ELEM_CD_GET_VOID_P(eve, data->cd_vskin_offset); if (vs->flag & MVERT_SKIN_ROOT) { @@ -2338,7 +2329,6 @@ static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, const char sel, BMVer static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index) { BMEdge *eed; - //unsigned char **cols = userData, *col; drawDMEdgesSel_userData *data = userData; unsigned char *col; @@ -2355,7 +2345,7 @@ static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index) else { col = data->baseCol; } - /* no alpha, this is used so a transparent color can disable drawing unselected edges in editmode */ + /* no alpha, this is used so a transparent color can disable drawing unselected edges in editmode */ if (col[3] == 0) return DM_DRAW_OPTION_SKIP; @@ -3045,7 +3035,7 @@ static void draw_em_measure_stats(ARegion *ar, View3D *v3d, Object *ob, BMEditMe } BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { - /* draw selected edges, or edges next to selected verts while draging */ + /* draw selected edges, or edges next to selected verts while dragging */ if (BM_elem_flag_test(eed, BM_ELEM_SELECT) || (do_moving && (BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) || BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)))) @@ -3102,17 +3092,15 @@ static void draw_em_measure_stats(ARegion *ar, View3D *v3d, Object *ob, BMEditMe BM_mesh_elem_index_ensure(em->bm, BM_VERT | BM_FACE); } - // invert_m4_m4(ob->imat, ob->obmat); // this is already called - BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) { BMLoop *l_a, *l_b; if (BM_edge_loop_pair(eed, &l_a, &l_b)) { - /* draw selected edges, or edges next to selected verts while draging */ + /* draw selected edges, or edges next to selected verts while dragging */ if (BM_elem_flag_test(eed, BM_ELEM_SELECT) || (do_moving && (BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) || BM_elem_flag_test(eed->v2, BM_ELEM_SELECT) || - /* special case, this is useful to show when vertes connected to this edge via a - * face are being transformed */ + /* special case, this is useful to show when verts connected to + * this edge via a face are being transformed */ BM_elem_flag_test(l_a->next->next->v, BM_ELEM_SELECT) || BM_elem_flag_test(l_a->prev->v, BM_ELEM_SELECT) || BM_elem_flag_test(l_b->next->next->v, BM_ELEM_SELECT) || @@ -3418,7 +3406,7 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d, if (em->bm->selected.last) { BMEditSelection *ese = em->bm->selected.last; - /* face is handeled above */ + /* face is handled above */ #if 0 if (ese->type == BM_FACE) { efa_act = (BMFace *)ese->data; @@ -3533,11 +3521,14 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d, } else if (efa_act) { /* even if draw faces is off it would be nice to draw the stipple face - * Make all other faces zero alpha except for the active - * */ - /* col4 is only used by WITH_FREESTYLE, but keeping it here spares some #ifdef's... */ - unsigned char col1[4], col2[4], col3[4], col4[4]; - col1[3] = col2[3] = col4[3] = 0; /* don't draw */ + * Make all other faces zero alpha except for the active */ + unsigned char col1[4], col2[4], col3[4]; +#ifdef WITH_FREESTYLE + unsigned char col4[4]; + col4[3] = 0; /* don't draw */ +#endif + col1[3] = col2[3] = 0; /* don't draw */ + UI_GetThemeColor4ubv(TH_EDITMESH_ACTIVE, col3); glEnable(GL_BLEND); @@ -3551,7 +3542,6 @@ static void draw_em_fancy(Scene *scene, ARegion *ar, View3D *v3d, glDisable(GL_BLEND); glDepthMask(1); /* restore write in zbuffer */ - } /* here starts all fancy draw-extra over */ @@ -3715,7 +3705,6 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D draw_wire = OBDRAW_WIRE_ON_DEPTH; /* draw wire after solid using zoffset and depth buffer adjusment */ } - /* totvert = dm->getNumVerts(dm); */ /*UNUSED*/ totedge = dm->getNumEdges(dm); totface = dm->getNumTessFaces(dm); @@ -3734,7 +3723,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D glPointSize(1.0); } else if (dt == OB_WIRE || totface == 0) { - draw_wire = OBDRAW_WIRE_ON; /* draw wire only, no depth buffer stuff */ + draw_wire = OBDRAW_WIRE_ON; /* draw wire only, no depth buffer stuff */ } else if (((is_obact && ob->mode & OB_MODE_TEXTURE_PAINT)) || check_object_draw_texture(scene, v3d, dt)) @@ -3776,8 +3765,10 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D else dm->drawFacesGLSL(dm, GPU_enable_material); -// if (BKE_bproperty_object_get(ob, "Text")) -// XXX draw_mesh_text(ob, 1); +#if 0 /* XXX */ + if (BKE_bproperty_object_get(ob, "Text")) + draw_mesh_text(ob, 1); +#endif GPU_disable_material(); glFrontFace(GL_CCW); @@ -3895,7 +3886,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D } if ((draw_wire != OBDRAW_WIRE_OFF) && /* draw extra wire */ - /* when overriding with render only, don't bother */ + /* when overriding with render only, don't bother */ (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_SOLID) == 0)) { /* When using wireframe object draw in particle edit mode @@ -3949,7 +3940,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D dm->release(dm); } -/* returns 1 if nothing was drawn, for detecting to draw an object center */ +/* returns true if nothing was drawn, for detecting to draw an object center */ static bool draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, Base *base, const char dt, const unsigned char ob_wire_col[4], const short dflag) { @@ -4337,7 +4328,7 @@ static bool drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, /** * Only called by #drawDispList - * \return 1 when nothing was drawn + * \return true when nothing was drawn */ static bool drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, const char dt, const short dflag, const unsigned char ob_wire_col[4]) @@ -4981,7 +4972,7 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix copy_v3_v3(pdd->vd, vec2); pdd->vd += 3; vec[2] = 2.0f * pixsize; - vec[0] = vec[1] = 0.0; + vec[0] = vec[1] = 0.0f; mul_qt_v3(state->rot, vec); if (draw_as == PART_DRAW_AXIS) { copy_v3_v3(vec2, state->co); @@ -5065,7 +5056,7 @@ static void draw_particle_data(ParticleSystem *psys, RegionView3D *rv3d, if (psys->parent) mul_m4_v3(psys->parent->obmat, state->co); - /* create actiual particle data */ + /* create actual particle data */ if (draw_as == PART_DRAW_BB) { bb->offset[0] = part->bb_offset[0]; bb->offset[1] = part->bb_offset[1]; @@ -5090,16 +5081,17 @@ static void draw_particle_data(ParticleSystem *psys, RegionView3D *rv3d, draw_particle(state, draw_as, part->draw, pixsize, imat, part->draw_line, bb, pdd); } -/* unified drawing of all new particle systems draw types except dupli ob & group */ -/* mostly tries to use vertex arrays for speed */ - -/* 1. check that everything is ok & updated */ -/* 2. start initializing things */ -/* 3. initialize according to draw type */ -/* 4. allocate drawing data arrays */ -/* 5. start filling the arrays */ -/* 6. draw the arrays */ -/* 7. clean up */ +/* unified drawing of all new particle systems draw types except dupli ob & group + * mostly tries to use vertex arrays for speed + * + * 1. check that everything is ok & updated + * 2. start initializing things + * 3. initialize according to draw type + * 4. allocate drawing data arrays + * 5. start filling the arrays + * 6. draw the arrays + * 7. clean up + */ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, ParticleSystem *psys, const char ob_dt, const short dflag) @@ -5298,7 +5290,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv int create_ndata = 0; if (!pdd) - pdd = psys->pdd = MEM_callocN(sizeof(ParticleDrawData), "ParticlDrawData"); + pdd = psys->pdd = MEM_callocN(sizeof(ParticleDrawData), "ParticleDrawData"); if (part->draw_as == PART_DRAW_REND && part->trail_count > 1) { tot_vec_size *= part->trail_count; @@ -5472,8 +5464,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } if (drawn) { - /* additional things to draw for each particle */ - /* (velocity, size and number) */ + /* additional things to draw for each particle + * (velocity, size and number) */ if ((part->draw & PART_DRAW_VEL) && pdd && pdd->vedata) { copy_v3_v3(pdd->ved, state.co); pdd->ved += 3; @@ -5514,8 +5506,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } if (numstr[0]) { - /* in path drawing state.co is the end point */ - /* use worldspace beause object matrix is already applied */ + /* in path drawing state.co is the end point + * use worldspace because object matrix is already applied */ mul_v3_m4v3(vec_txt, ob->imat, state.co); view3d_cached_text_draw_add(vec_txt, numstr, numstr_len, 10, V3D_CACHE_TEXT_WORLDSPACE | V3D_CACHE_TEXT_ASCII, tcol); @@ -5532,7 +5524,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if (draw_as == PART_DRAW_PATH) { ParticleCacheKey **cache, *path; - float /* *cd2=NULL, */ /* UNUSED */ *cdata2 = NULL; + float *cdata2 = NULL; /* setup gl flags */ if (1) { //ob_dt > OB_WIRE) { @@ -5596,11 +5588,13 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv HairKey *hkey = pa->hair; glVertexPointer(3, GL_FLOAT, sizeof(HairKey), hkey->world_co); - - // XXX use proper theme color here -// UI_ThemeColor(TH_NORMAL); + +#if 0 /* XXX use proper theme color here */ + UI_ThemeColor(TH_NORMAL); +#else glColor3f(0.58f, 0.67f, 1.0f); - +#endif + glDrawArrays(GL_LINE_STRIP, 0, pa->totkey); } } @@ -5745,7 +5739,6 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glDrawArrays(GL_LINE_STRIP, 0, path->segments + 1); } - /* restore & clean up */ if (1) { //ob_dt > OB_WIRE) { if (part->draw_col == PART_DRAW_COL_MAT) @@ -5753,9 +5746,10 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glDisable(GL_COLOR_MATERIAL); } - if (cdata2) + if (cdata2) { MEM_freeN(cdata2); - /* cd2 = */ /* UNUSED */ cdata2 = NULL; + cdata2 = NULL; + } glLineWidth(1.0f); @@ -5765,7 +5759,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv for (a = 0, pa = psys->particles; a < totpart; a++, pa++) { float vec_txt[3]; numstr_len = BLI_snprintf(numstr, sizeof(numstr), "%i", a); - /* use worldspace beause object matrix is already applied */ + /* use worldspace because object matrix is already applied */ mul_v3_m4v3(vec_txt, ob->imat, cache[a]->co); view3d_cached_text_draw_add(vec_txt, numstr, numstr_len, 10, V3D_CACHE_TEXT_WORLDSPACE | V3D_CACHE_TEXT_ASCII, tcol); @@ -6049,9 +6043,9 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) glShadeModel(GL_FLAT); if (v3d->zbuf) glEnable(GL_DEPTH_TEST); glLineWidth(1.0f); - glPointSize(1.0); + glPointSize(1.0f); } -//static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float tw,float th) + static void ob_draw_RE_motion(float com[3], float rotscale[3][3], float itw, float ith, float drw_size) { float tr[3][3]; @@ -6455,7 +6449,7 @@ static void draw_editnurb_splines(Object *ob, Nurb *nurb, const bool sel) Nurb *nu; BPoint *bp, *bp1; int a, b, ofs, index; - Curve *cu = (Curve *)ob->data; + Curve *cu = ob->data; index = 0; nu = nurb; @@ -6815,7 +6809,7 @@ static void draw_empty_sphere(float size) static GLuint displist = 0; if (displist == 0) { - GLUquadricObj *qobj; + GLUquadricObj *qobj; displist = glGenLists(1); glNewList(displist, GL_COMPILE); @@ -6846,16 +6840,13 @@ static void draw_empty_sphere(float size) /* draw a cone for use as an empty drawtype */ static void draw_empty_cone(float size) { - float cent = 0; - float radius; + const float radius = size; + GLUquadricObj *qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); - glPushMatrix(); - radius = size; - glTranslatef(cent, cent, cent); glScalef(radius, size * 2.0f, radius); glRotatef(-90.0, 1.0, 0.0, 0.0); gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1); @@ -6868,7 +6859,7 @@ static void draw_empty_cone(float size) static void drawspiral(const float cent[3], float rad, float tmat[4][4], int start) { float vec[3], vx[3], vy[3]; - const float tot_inv = (1.0f / (float)CIRCLE_RESOL); + const float tot_inv = 1.0f / (float)CIRCLE_RESOL; int a; bool inverse = false; float x, y, fac; @@ -6932,8 +6923,7 @@ static void drawspiral(const float cent[3], float rad, float tmat[4][4], int sta } /* draws a circle on x-z plane given the scaling of the circle, assuming that - * all required matrices have been set (used for drawing empties) - */ + * all required matrices have been set (used for drawing empties) */ static void drawcircle_size(float size) { float x, y; @@ -6941,7 +6931,7 @@ static void drawcircle_size(float size) glBegin(GL_LINE_LOOP); - /* coordinates are: cos(degrees * 11.25) = x, sin(degrees*11.25) = y, 0.0f = z */ + /* coordinates are: cos(degrees * 11.25) = x, sin(degrees * 11.25) = y, 0.0f = z */ for (degrees = 0; degrees < CIRCLE_RESOL; degrees++) { x = cosval[degrees]; y = sinval[degrees]; @@ -7085,31 +7075,23 @@ static void draw_forcefield(Object *ob, RegionView3D *rv3d, PartDeflect *pd = ob->pd; float imat[4][4], tmat[4][4]; float vec[3] = {0.0, 0.0, 0.0}; - float size; - /* scale size of circle etc with the empty drawsize */ - if (ob->type == OB_EMPTY) size = ob->empty_drawsize; - else size = 1.0; + const float size = (ob->type == OB_EMPTY) ? ob->empty_drawsize : 1.0f; /* calculus here, is reused in PFIELD_FORCE */ invert_m4_m4(imat, rv3d->viewmatob); -// normalize_v3(imat[0]); /* we don't do this because field doesnt scale either... apart from wind! */ -// normalize_v3(imat[1]); +#if 0 + normalize_v3(imat[0]); /* we don't do this because field doesnt scale either... apart from wind! */ + normalize_v3(imat[1]); +#endif if (pd->forcefield == PFIELD_WIND) { - float force_val; + float force_val = pd->f_strength; if ((dflag & DRAW_CONSTCOLOR) == 0) { ob_wire_color_blend_theme_id(ob_wire_col, TH_BACK, 0.5f); } - //if (has_ipo_code(ob->ipo, OB_PD_FSTR)) - // force_val = IPO_GetFloatValue(ob->ipo, OB_PD_FSTR, scene->r.cfra); - //else - { - force_val = pd->f_strength; - } - unit_m4(tmat); force_val *= 0.1f; drawcircball(GL_LINE_LOOP, vec, size, tmat); @@ -7123,14 +7105,7 @@ static void draw_forcefield(Object *ob, RegionView3D *rv3d, } else if (pd->forcefield == PFIELD_FORCE) { - float ffall_val; - - //if (has_ipo_code(ob->ipo, OB_PD_FFALL)) - // ffall_val = IPO_GetFloatValue(ob->ipo, OB_PD_FFALL, scene->r.cfra); - //else - { - ffall_val = pd->f_power; - } + float ffall_val = pd->f_power; if ((dflag & DRAW_CONSTCOLOR) == 0) ob_wire_color_blend_theme_id(ob_wire_col, TH_BACK, 0.5f); drawcircball(GL_LINE_LOOP, vec, size, imat); @@ -7140,20 +7115,9 @@ static void draw_forcefield(Object *ob, RegionView3D *rv3d, drawcircball(GL_LINE_LOOP, vec, size * 2.0f, imat); } else if (pd->forcefield == PFIELD_VORTEX) { - float /*ffall_val,*/ force_val; + float force_val = pd->f_strength; unit_m4(tmat); - //if (has_ipo_code(ob->ipo, OB_PD_FFALL)) - // ffall_val = IPO_GetFloatValue(ob->ipo, OB_PD_FFALL, scene->r.cfra); - //else - // ffall_val = pd->f_power; - - //if (has_ipo_code(ob->ipo, OB_PD_FSTR)) - // force_val = IPO_GetFloatValue(ob->ipo, OB_PD_FSTR, scene->r.cfra); - //else - { - force_val = pd->f_strength; - } if ((dflag & DRAW_CONSTCOLOR) == 0) { ob_wire_color_blend_theme_id(ob_wire_col, TH_BACK, 0.7f); @@ -7171,25 +7135,19 @@ static void draw_forcefield(Object *ob, RegionView3D *rv3d, else if (pd->forcefield == PFIELD_GUIDE && ob->type == OB_CURVE) { Curve *cu = ob->data; if ((cu->flag & CU_PATH) && ob->curve_cache->path && ob->curve_cache->path->data) { - float mindist, guidevec1[4], guidevec2[3]; - - //if (has_ipo_code(ob->ipo, OB_PD_FSTR)) - // mindist = IPO_GetFloatValue(ob->ipo, OB_PD_FSTR, scene->r.cfra); - //else - { - mindist = pd->f_strength; - } + float guidevec1[4], guidevec2[3]; + float mindist = pd->f_strength; if ((dflag & DRAW_CONSTCOLOR) == 0) { ob_wire_color_blend_theme_id(ob_wire_col, TH_BACK, 0.5f); } - /*path end*/ + /* path end */ setlinestyle(3); where_on_path(ob, 1.0f, guidevec1, guidevec2, NULL, NULL, NULL); drawcircball(GL_LINE_LOOP, guidevec1, mindist, imat); - /*path beginning*/ + /* path beginning */ setlinestyle(0); where_on_path(ob, 0.0f, guidevec1, guidevec2, NULL, NULL, NULL); drawcircball(GL_LINE_LOOP, guidevec1, mindist, imat); @@ -7597,7 +7555,7 @@ static void draw_object_wire_color(Scene *scene, Base *base, unsigned char r_ob_ else { if (ob->flag & OB_FROMGROUP) { if (base->flag & (SELECT + BA_WAS_SEL)) { - /* uses darker active color for non-active + selected*/ + /* uses darker active color for non-active + selected */ theme_id = TH_GROUP_ACTIVE; if (scene->basact != base) { @@ -7927,10 +7885,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short if (dt >= OB_BOUNDBOX) { dtx = ob->dtx; if (ob->mode & OB_MODE_EDIT) { - // the only 2 extra drawtypes alowed in editmode + /* the only 2 extra drawtypes alowed in editmode */ dtx = dtx & (OB_DRAWWIRE | OB_TEXSPACE); } - } if (!particle_skip_object) { @@ -7988,9 +7945,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short } else if (ED_view3d_boundbox_clip(rv3d, ob->bb)) { empty_object = drawDispList(scene, v3d, rv3d, base, dt, dflag, ob_wire_col); - -//XXX old animsys if (cu->path) -// curve_draw_speed(scene, ob); } break; case OB_MBALL: @@ -8165,9 +8119,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short if ((md = modifiers_findByType(ob, eModifierType_Smoke)) && (modifier_isEnabled(scene, md, eModifierMode_Realtime))) { SmokeModifierData *smd = (SmokeModifierData *)md; - // draw collision objects - if ((smd->type & MOD_SMOKE_TYPE_COLL) && smd->coll) { #if 0 + /* draw collision objects */ + if ((smd->type & MOD_SMOKE_TYPE_COLL) && smd->coll) { SmokeCollSettings *scs = smd->coll; if (scs->points) { size_t i; @@ -8194,10 +8148,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short glDisable(GL_BLEND); glDepthMask(GL_TRUE); if (col) cpack(col); - } -#endif } +#endif /* only draw domains */ if (smd->domain) { @@ -8216,8 +8169,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short BKE_boundbox_init_from_minmax(&bb, p0, p1); draw_box(bb.vec); - /* draw base resolution bounds */ #if 0 + /* draw base resolution bounds */ BKE_boundbox_init_from_minmax(&bb, sds->p0, sds->p1); draw_box(bb.vec); #endif @@ -8226,15 +8179,15 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short /* don't show smoke before simulation starts, this could be made an option in the future */ if (smd->domain->fluid && CFRA >= smd->domain->point_cache[0]->startframe) { - // get view vector + /* get view vector */ copy_v3_v3(viewnormal, rv3d->viewinv[2]); invert_m4_m4(ob->imat, ob->obmat); mul_mat3_m4_v3(ob->imat, viewnormal); normalize_v3(viewnormal); /* set dynamic boundaries to draw the volume - * also scale cube to global space to equalize volume slicing on all axises - * (its scaled back before drawing) */ + * also scale cube to global space to equalize volume slicing on all axes + * (it's scaled back before drawing) */ p0[0] = (sds->p0[0] + sds->cell_size[0] * sds->res_min[0] + sds->obj_shift_f[0]) * fabsf(ob->size[0]); p0[1] = (sds->p0[1] + sds->cell_size[1] * sds->res_min[1] + sds->obj_shift_f[1]) * fabsf(ob->size[1]); p0[2] = (sds->p0[2] + sds->cell_size[2] * sds->res_min[2] + sds->obj_shift_f[2]) * fabsf(ob->size[2]); @@ -8318,7 +8271,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short view3d_cached_text_draw_add(zero, ob->id.name + 2, strlen(ob->id.name + 2), 10, 0, ob_wire_col); } } - /*if (dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/ if ((dtx & OB_DRAWWIRE) && dt >= OB_SOLID) { if ((dflag & DRAW_CONSTCOLOR) == 0) { draw_wire_extra(scene, rv3d, ob, ob_wire_col); @@ -8434,7 +8386,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short if (ELEM(curcon->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_OBJECTSOLVER)) { /* special case for object solver and follow track constraints because they don't fill * constraint targets properly (design limitation -- scene is needed for their target - * but it can't be accessed from get_targets callvack) */ + * but it can't be accessed from get_targets callback) */ Object *camob = NULL; @@ -8691,7 +8643,7 @@ static void bbs_mesh_solid_verts(Scene *scene, Object *ob) static void bbs_mesh_solid_faces(Scene *scene, Object *ob) { DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask); - Mesh *me = (Mesh *)ob->data; + Mesh *me = ob->data; glColor3ub(0, 0, 0); diff --git a/source/blender/editors/space_view3d/drawsimdebug.c b/source/blender/editors/space_view3d/drawsimdebug.c index 6113bfd4143..46320ba6763 100644 --- a/source/blender/editors/space_view3d/drawsimdebug.c +++ b/source/blender/editors/space_view3d/drawsimdebug.c @@ -29,28 +29,21 @@ * \ingroup spview3d */ -#include "MEM_guardedalloc.h" - #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_view3d_types.h" #include "DNA_object_types.h" -#include "BLI_blenlib.h" #include "BLI_math.h" #include "BLI_utildefines.h" #include "BLI_ghash.h" #include "BKE_effect.h" -#include "BKE_global.h" -#include "BKE_modifier.h" #include "view3d_intern.h" #include "BIF_gl.h" -#include "BIF_glutil.h" -#include "UI_resources.h" static void draw_sim_debug_elements(SimDebugData *debug_data, float imat[4][4]) { diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index a220e1e39b0..92883f28836 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -48,8 +48,6 @@ #include "GPU_extensions.h" -#include "ED_mesh.h" - #include "view3d_intern.h" // own include struct GPUTexture; diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 88f43ab340f..87fe29325bc 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -68,7 +68,6 @@ #include "RNA_access.h" #include "ED_armature.h" -#include "ED_gpencil.h" #include "ED_mesh.h" #include "ED_screen.h" diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 0aa901f4bc4..785d0e60c4c 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -28,7 +28,6 @@ * \ingroup spview3d */ - #include <string.h> #include <stdio.h> #include <math.h> @@ -38,7 +37,6 @@ #include "DNA_curve_types.h" #include "DNA_object_types.h" #include "DNA_scene_types.h" -#include "DNA_camera_types.h" #include "MEM_guardedalloc.h" @@ -75,7 +73,6 @@ #include "ED_transform.h" #include "ED_mesh.h" #include "ED_view3d.h" -#include "ED_sculpt.h" #include "UI_resources.h" diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 6e122968f04..b7170bec61a 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -41,12 +41,10 @@ struct BoundBox; struct DerivedMesh; struct Object; struct SmokeDomainSettings; -struct ViewContext; struct bAnimVizSettings; struct bContext; struct bMotionPath; struct bPoseChannel; -struct bScreen; struct Mesh; struct SimDebugData; struct Strands; diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 0608c35129d..8bb84d00c83 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -31,9 +31,7 @@ #include "DNA_armature_types.h" -#include "DNA_curve_types.h" #include "DNA_object_types.h" -#include "DNA_meta_types.h" #include "BLI_blenlib.h" #include "BLI_utildefines.h" @@ -43,11 +41,9 @@ #include "BKE_armature.h" #include "BKE_context.h" #include "BKE_depsgraph.h" -#include "BKE_lattice.h" #include "BKE_main.h" #include "BKE_mball.h" #include "BKE_object.h" -#include "BKE_editmesh.h" #include "BKE_tracking.h" #include "WM_api.h" @@ -60,7 +56,6 @@ #include "ED_transverts.h" #include "ED_keyframing.h" #include "ED_screen.h" -#include "ED_curve.h" #include "view3d_intern.h" diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 20c39c1c6e8..d57d671d253 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -5702,7 +5702,7 @@ static bool createEdgeSlideVerts(TransInfo *t) float projectMat[4][4]; float mval[2] = {(float)t->mval[0], (float)t->mval[1]}; float mval_start[2], mval_end[2]; - float mval_dir[3], maxdist, (*loop_dir)[3], *loop_maxdist; + float mval_dir[3], dist_best_sq, (*loop_dir)[3], *loop_maxdist; int numsel, i, j, loop_nr, l_nr; int use_btree_disp; @@ -6029,7 +6029,7 @@ static bool createEdgeSlideVerts(TransInfo *t) /* find mouse vectors, the global one, and one per loop in case we have * multiple loops selected, in case they are oriented different */ zero_v3(mval_dir); - maxdist = -1.0f; + dist_best_sq = -1.0f; loop_dir = MEM_callocN(sizeof(float) * 3 * loop_nr, "sv loop_dir"); loop_maxdist = MEM_mallocN(sizeof(float) * loop_nr, "sv loop_maxdist"); @@ -6039,7 +6039,7 @@ static bool createEdgeSlideVerts(TransInfo *t) if (BM_elem_flag_test(e, BM_ELEM_SELECT)) { BMIter iter2; BMEdge *e2; - float d; + float dist_sq; /* search cross edges for visible edge to the mouse cursor, * then use the shared vertex to calculate screen vector*/ @@ -6077,19 +6077,19 @@ static bool createEdgeSlideVerts(TransInfo *t) } /* global direction */ - d = dist_to_line_segment_v2(mval, sco_b, sco_a); - if ((maxdist == -1.0f) || + dist_sq = dist_squared_to_line_segment_v2(mval, sco_b, sco_a); + if ((dist_best_sq == -1.0f) || /* intentionally use 2d size on 3d vector */ - (d < maxdist && (len_squared_v2v2(sco_b, sco_a) > 0.1f))) + (dist_sq < dist_best_sq && (len_squared_v2v2(sco_b, sco_a) > 0.1f))) { - maxdist = d; + dist_best_sq = dist_sq; sub_v3_v3v3(mval_dir, sco_b, sco_a); } /* per loop direction */ l_nr = sv_array[j].loop_nr; - if (loop_maxdist[l_nr] == -1.0f || d < loop_maxdist[l_nr]) { - loop_maxdist[l_nr] = d; + if (loop_maxdist[l_nr] == -1.0f || dist_sq < loop_maxdist[l_nr]) { + loop_maxdist[l_nr] = dist_sq; sub_v3_v3v3(loop_dir[l_nr], sco_b, sco_a); } } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 06d906ad18c..3d5664ec611 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3584,7 +3584,7 @@ static void createTransActionData(bContext *C, TransInfo *t) else cfra = (float)CFRA; - if (ale->type == ANIMTYPE_FCURVE) + if (ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE)) count += count_fcurve_keys(ale->key_data, t->frame_side, cfra); else if (ale->type == ANIMTYPE_GPLAYER) count += count_gplayer_frames(ale->data, t->frame_side, cfra); diff --git a/source/blender/editors/uvedit/uvedit_intern.h b/source/blender/editors/uvedit/uvedit_intern.h index d1fd8d969a4..e028c08091c 100644 --- a/source/blender/editors/uvedit/uvedit_intern.h +++ b/source/blender/editors/uvedit/uvedit_intern.h @@ -34,18 +34,13 @@ struct MTexPoly; struct Image; -struct MTFace; struct Object; struct Scene; struct SpaceImage; -struct UvElementMap; struct wmOperatorType; struct BMEditMesh; -struct BMesh; struct BMFace; struct BMLoop; -struct BMEdge; -struct BMVert; /* visibility and selection */ bool uvedit_face_visible_nolocal(struct Scene *scene, struct BMFace *efa); diff --git a/source/blender/freestyle/intern/application/AppView.cpp b/source/blender/freestyle/intern/application/AppView.cpp index ae202412c09..9de426b91ab 100644 --- a/source/blender/freestyle/intern/application/AppView.cpp +++ b/source/blender/freestyle/intern/application/AppView.cpp @@ -58,7 +58,7 @@ extern "C" { namespace Freestyle { -AppView::AppView(const char *iName) +AppView::AppView(const char * /*iName*/) { _Fovy = DEG2RADF(30.0f); _ModelRootNode = new NodeDrawingStyle; diff --git a/source/blender/freestyle/intern/application/AppView.h b/source/blender/freestyle/intern/application/AppView.h index 14101909ca1..6338ace53c0 100644 --- a/source/blender/freestyle/intern/application/AppView.h +++ b/source/blender/freestyle/intern/application/AppView.h @@ -100,12 +100,12 @@ public: _SilhouetteRootNode->AddChild(iSilhouette); } - inline void Add2DSilhouette(NodeGroup *iSilhouette) + inline void Add2DSilhouette(NodeGroup * /*iSilhouette*/) { //_pFENode->AddChild(iSilhouette); } - inline void Add2DVisibleSilhouette(NodeGroup *iVSilhouette) + inline void Add2DVisibleSilhouette(NodeGroup * /*iVSilhouette*/) { //_pVisibleSilhouetteNode->AddChild(iVSilhouette); } diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp index 8d9b1a4fb52..add7420b89a 100644 --- a/source/blender/freestyle/intern/application/Controller.cpp +++ b/source/blender/freestyle/intern/application/Controller.cpp @@ -933,7 +933,7 @@ void Controller::InsertStyleModule(unsigned index, const char *iName, struct Tex _Canvas->InsertStyleModule(index, sm); } -void Controller::AddStyleModule(const char *iFileName) +void Controller::AddStyleModule(const char * /*iFileName*/) { //_pStyleWindow->Add(iFileName); } @@ -1003,7 +1003,7 @@ void Controller::toggleEdgeTesselationNature(Nature::EdgeNature iNature) ComputeViewMap(); } -void Controller::setModelsDir(const string& dir) +void Controller::setModelsDir(const string& /*dir*/) { //_current_dirs->setValue("models/dir", dir); } @@ -1015,7 +1015,7 @@ string Controller::getModelsDir() const return dir; } -void Controller::setModulesDir(const string& dir) +void Controller::setModulesDir(const string& /*dir*/) { //_current_dirs->setValue("modules/dir", dir); } diff --git a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp index dfcc77d3b23..f5f76516d38 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.cpp @@ -256,6 +256,7 @@ void BlenderFileLoader::clipTriangle(int numTris, float triCoords[][3], float v1 } } BLI_assert(k == 2 + numTris); + (void)numTris; /* Ignored in release builds. */ } void BlenderFileLoader::addTriangle(struct LoaderState *ls, float v1[3], float v2[3], float v3[3], diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index f304e8ae9bd..0e8f6222c8c 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -950,7 +950,7 @@ Object *BlenderStrokeRenderer::NewMesh() const return ob; } -Render *BlenderStrokeRenderer::RenderScene(Render *re, bool render) +Render *BlenderStrokeRenderer::RenderScene(Render * /*re*/, bool render) { Camera *camera = (Camera *)freestyle_scene->camera->data; if (camera->clipend < _z) diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h b/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h index 21776396ebc..2bc43798878 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h +++ b/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h @@ -31,7 +31,6 @@ extern "C" { #include "BLI_utildefines.h" // BLI_assert() -struct Scene; struct Text; } diff --git a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp index 32b4c5455a7..d1285cf2c18 100644 --- a/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp +++ b/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp @@ -87,7 +87,7 @@ int freestyle_viewport[4]; // current scene Scene *freestyle_scene; -static void load_post_callback(struct Main *main, struct ID *id, void *arg) +static void load_post_callback(struct Main * /*main*/, struct ID * /*id*/, void * /*arg*/) { lineset_copied = false; } @@ -645,7 +645,7 @@ Render *FRS_do_stroke_rendering(Render *re, SceneRenderLayer *srl, int render) return freestyle_render; } -void FRS_finish_stroke_rendering(Render *re) +void FRS_finish_stroke_rendering(Render * /*re*/) { // clear canvas controller->Clear(); diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.cpp b/source/blender/freestyle/intern/geometry/GeomUtils.cpp index a750cf2f7cf..3eb92c559fe 100644 --- a/source/blender/freestyle/intern/geometry/GeomUtils.cpp +++ b/source/blender/freestyle/intern/geometry/GeomUtils.cpp @@ -495,7 +495,7 @@ bool intersectRayBBox(const Vec3r& orig, const Vec3r& dir, // ray origin an real t0, real t1, real& tmin, // I0 = orig + tmin * dir is the first intersection real& tmax, // I1 = orig + tmax * dir is the second intersection - real epsilon) + real /*epsilon*/) { float tymin, tymax, tzmin, tzmax; Vec3r inv_direction(1.0 / dir[0], 1.0 / dir[1], 1.0 / dir[2]); diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h index c1d04f6b4cc..62c0e58232a 100644 --- a/source/blender/freestyle/intern/geometry/Grid.h +++ b/source/blender/freestyle/intern/geometry/Grid.h @@ -97,11 +97,11 @@ class GridVisitor public: virtual ~GridVisitor() {}; //soc - virtual void discoverCell(Cell *cell) {} + virtual void discoverCell(Cell * /*cell*/) {} - virtual void examineOccluder(Polygon3r *occ) {} + virtual void examineOccluder(Polygon3r * /*occ*/) {} - virtual void finishCell(Cell *cell) {} + virtual void finishCell(Cell * /*cell*/) {} virtual bool stop() { return false; diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp index 251f47bc44c..b81f8303945 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.cpp +++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp @@ -42,7 +42,7 @@ ImagePyramid::ImagePyramid(const GrayImage& level0, unsigned nbLevels) } #endif -ImagePyramid::ImagePyramid(const ImagePyramid& iBrother) +ImagePyramid::ImagePyramid(const ImagePyramid& /*iBrother*/) { if (!_levels.empty()) { for (vector<GrayImage*>::iterator im = _levels.begin(), imend = _levels.end(); im != imend; ++im) { diff --git a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp index ad54a81f156..50d82656819 100644 --- a/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp +++ b/source/blender/freestyle/intern/python/BPy_ContextFunctions.cpp @@ -46,7 +46,7 @@ static char ContextFunctions_get_time_stamp___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_time_stamp(PyObject *self) +ContextFunctions_get_time_stamp(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetTimeStampCF()); } @@ -60,7 +60,7 @@ static char ContextFunctions_get_canvas_width___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_canvas_width(PyObject *self) +ContextFunctions_get_canvas_width(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetCanvasWidthCF()); } @@ -74,7 +74,7 @@ static char ContextFunctions_get_canvas_height___doc__[] = " :rtype: int\n"; static PyObject * -ContextFunctions_get_canvas_height(PyObject *self) +ContextFunctions_get_canvas_height(PyObject * /*self*/) { return PyLong_FromLong(ContextFunctions::GetCanvasHeightCF()); } @@ -88,7 +88,7 @@ static char ContextFunctions_get_border___doc__[] = " :rtype: tuple\n"; static PyObject * -ContextFunctions_get_border(PyObject *self) +ContextFunctions_get_border(PyObject * /*self*/) { BBox<Vec2i> border(ContextFunctions::GetBorderCF()); PyObject *v = PyTuple_New(4); @@ -117,7 +117,7 @@ static char ContextFunctions_load_map___doc__[] = " :type sigma: float\n"; static PyObject * -ContextFunctions_load_map(PyObject *self, PyObject *args, PyObject *kwds) +ContextFunctions_load_map(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"file_name", "map_name", "num_levels", "sigma", NULL}; char *fileName, *mapName; @@ -150,7 +150,7 @@ static char ContextFunctions_read_map_pixel___doc__[] = " :rtype: float\n"; static PyObject * -ContextFunctions_read_map_pixel(PyObject *self, PyObject *args, PyObject *kwds) +ContextFunctions_read_map_pixel(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"map_name", "level", "x", "y", NULL}; char *mapName; @@ -180,7 +180,7 @@ static char ContextFunctions_read_complete_view_map_pixel___doc__[] = " :rtype: float\n"; static PyObject * -ContextFunctions_read_complete_view_map_pixel(PyObject *self, PyObject *args, PyObject *kwds) +ContextFunctions_read_complete_view_map_pixel(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"level", "x", "y", NULL}; int level; @@ -212,7 +212,7 @@ static char ContextFunctions_read_directional_view_map_pixel___doc__[] = " :rtype: float\n"; static PyObject * -ContextFunctions_read_directional_view_map_pixel(PyObject *self, PyObject *args, PyObject *kwds) +ContextFunctions_read_directional_view_map_pixel(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"orientation", "level", "x", "y", NULL}; int orientation, level; @@ -232,7 +232,7 @@ static char ContextFunctions_get_selected_fedge___doc__[] = " :rtype: :class:`FEdge`\n"; static PyObject * -ContextFunctions_get_selected_fedge(PyObject *self) +ContextFunctions_get_selected_fedge(PyObject * /*self*/) { FEdge *fe = ContextFunctions::GetSelectedFEdgeCF(); if (fe) diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 487a473b7bd..d22632040f4 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -72,7 +72,7 @@ static char Freestyle_getCurrentScene___doc__[] = " :return: The current scene.\n" " :rtype: :class:`bpy.types.Scene`\n"; -static PyObject *Freestyle_getCurrentScene(PyObject *self) +static PyObject *Freestyle_getCurrentScene(PyObject * /*self*/) { if (!freestyle_scene) { PyErr_SetString(PyExc_TypeError, "current scene not available"); @@ -126,7 +126,7 @@ static char Freestyle_blendRamp___doc__[] = " :return: Blended color in RGB format.\n" " :rtype: :class:`mathutils.Vector`\n"; -static PyObject *Freestyle_blendRamp(PyObject *self, PyObject *args) +static PyObject *Freestyle_blendRamp(PyObject * /*self*/, PyObject *args) { PyObject *obj1, *obj2; char *s; @@ -170,7 +170,7 @@ static char Freestyle_evaluateColorRamp___doc__[] = " :return: color in RGBA format.\n" " :rtype: :class:`mathutils.Vector`\n"; -static PyObject *Freestyle_evaluateColorRamp(PyObject *self, PyObject *args) +static PyObject *Freestyle_evaluateColorRamp(PyObject * /*self*/, PyObject *args) { BPy_StructRNA *py_srna; ColorBand *coba; @@ -207,7 +207,7 @@ static char Freestyle_evaluateCurveMappingF___doc__[] = " :return: Mapped output value.\n" " :rtype: float\n"; -static PyObject *Freestyle_evaluateCurveMappingF(PyObject *self, PyObject *args) +static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *args) { BPy_StructRNA *py_srna; CurveMapping *cumap; diff --git a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp index 7a3624f248e..0db25753caa 100644 --- a/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp +++ b/source/blender/freestyle/intern/python/BPy_IntegrationType.cpp @@ -63,7 +63,7 @@ PyDoc_STRVAR(Integrator_integrate_doc, " :class:`UnaryFunction0DUnsigned` type.\n" " :rtype: int or float"); -static PyObject * Integrator_integrate(PyObject *self, PyObject *args, PyObject *kwds) +static PyObject * Integrator_integrate(PyObject * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"func", "it", "it_end", "integration_type", NULL}; PyObject *obj1, *obj4 = 0; diff --git a/source/blender/freestyle/intern/python/BPy_Operators.cpp b/source/blender/freestyle/intern/python/BPy_Operators.cpp index 57ec15f4150..a214fc444c7 100644 --- a/source/blender/freestyle/intern/python/BPy_Operators.cpp +++ b/source/blender/freestyle/intern/python/BPy_Operators.cpp @@ -76,7 +76,7 @@ PyDoc_STRVAR(Operators_select_doc, " :arg pred: The predicate expressing this condition.\n" " :type pred: :class:`UnaryPredicate1D`"); -static PyObject *Operators_select(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_select(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", NULL}; PyObject *obj = 0; @@ -135,7 +135,7 @@ PyDoc_STRVAR(Operators_chain_doc, " stopping condition.\n" " :type pred: :class:`UnaryPredicate1D`"); -static PyObject *Operators_chain(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_chain(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", "pred", "modifier", NULL}; PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; @@ -224,7 +224,7 @@ PyDoc_STRVAR(Operators_bidirectional_chain_doc, " contains the chaining rule.\n" " :type it: :class:`ChainingIterator`"); -static PyObject *Operators_bidirectional_chain(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_bidirectional_chain(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"it", "pred", NULL}; PyObject *obj1 = 0, *obj2 = 0; @@ -304,7 +304,7 @@ PyDoc_STRVAR(Operators_sequential_split_doc, " resolution.)\n" " :type sampling: float"); -static PyObject *Operators_sequential_split(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_sequential_split(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"starting_pred", "stopping_pred", "sampling", NULL}; static const char *kwlist_2[] = {"pred", "sampling", NULL}; @@ -411,7 +411,7 @@ PyDoc_STRVAR(Operators_recursive_split_doc, " resolution.)\n" " :type sampling: float"); -static PyObject *Operators_recursive_split(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_recursive_split(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"func", "pred_1d", "sampling", NULL}; static const char *kwlist_2[] = {"func", "pred_0d", "pred_1d", "sampling", NULL}; @@ -486,7 +486,7 @@ PyDoc_STRVAR(Operators_sort_doc, " :arg pred: The binary predicate used for the comparison.\n" " :type pred: :class:`BinaryPredicate1D`"); -static PyObject *Operators_sort(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_sort(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", NULL}; PyObject *obj = 0; @@ -517,7 +517,7 @@ PyDoc_STRVAR(Operators_create_doc, " :arg shaders: The list of shaders used to shade the strokes.\n" " :type shaders: list of :class:`StrokeShader` objects"); -static PyObject *Operators_create(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_create(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pred", "shaders", NULL}; PyObject *obj1 = 0, *obj2 = 0; @@ -558,7 +558,7 @@ PyDoc_STRVAR(Operators_reset_doc, " :arg delete_strokes: Delete the strokes that are currently stored.\n" " :type delete_strokes: bool\n"); -static PyObject *Operators_reset(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_reset(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"delete_strokes", NULL}; PyObject *obj1 = 0; @@ -583,7 +583,7 @@ PyDoc_STRVAR(Operators_get_viewedge_from_index_doc, " :return: The ViewEdge object.\n" " :rtype: :class:`ViewEdge`"); -static PyObject *Operators_get_viewedge_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_viewedge_from_index(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -607,7 +607,7 @@ PyDoc_STRVAR(Operators_get_chain_from_index_doc, " :return: The Chain object.\n" " :rtype: :class:`Chain`"); -static PyObject *Operators_get_chain_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_chain_from_index(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -631,7 +631,7 @@ PyDoc_STRVAR(Operators_get_stroke_from_index_doc, " :return: The Stroke object.\n" " :rtype: :class:`Stroke`"); -static PyObject *Operators_get_stroke_from_index(BPy_Operators *self, PyObject *args, PyObject *kwds) +static PyObject *Operators_get_stroke_from_index(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"i", NULL}; unsigned int i; @@ -653,7 +653,7 @@ PyDoc_STRVAR(Operators_get_view_edges_size_doc, " :return: The number of ViewEdges.\n" " :rtype: int"); -static PyObject *Operators_get_view_edges_size(BPy_Operators *self) +static PyObject *Operators_get_view_edges_size(BPy_Operators * /*self*/) { return PyLong_FromLong(Operators::getViewEdgesSize()); } @@ -666,7 +666,7 @@ PyDoc_STRVAR(Operators_get_chains_size_doc, " :return: The number of Chains.\n" " :rtype: int"); -static PyObject *Operators_get_chains_size(BPy_Operators *self) +static PyObject *Operators_get_chains_size(BPy_Operators * /*self*/) { return PyLong_FromLong(Operators::getChainsSize()); } @@ -679,7 +679,7 @@ PyDoc_STRVAR(Operators_get_strokes_size_doc, " :return: The number of Strokes.\n" " :rtype: int"); -static PyObject *Operators_get_strokes_size(BPy_Operators *self) +static PyObject *Operators_get_strokes_size(BPy_Operators * /*self*/) { return PyLong_FromLong(Operators::getStrokesSize()); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp index be20febba2b..0941efe9df5 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction0D.cpp @@ -93,7 +93,7 @@ static void UnaryFunction0D___dealloc__(BPy_UnaryFunction0D *self) Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject *UnaryFunction0D___repr__(BPy_UnaryFunction0D *self) +static PyObject *UnaryFunction0D___repr__(BPy_UnaryFunction0D * /*self*/) { return PyUnicode_FromString("UnaryFunction0D"); } diff --git a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp index b88d609e48d..1b82c7777c7 100644 --- a/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp +++ b/source/blender/freestyle/intern/python/BPy_UnaryFunction1D.cpp @@ -87,7 +87,7 @@ static void UnaryFunction1D___dealloc__(BPy_UnaryFunction1D *self) Py_TYPE(self)->tp_free((PyObject *)self); } -static PyObject *UnaryFunction1D___repr__(BPy_UnaryFunction1D *self) +static PyObject *UnaryFunction1D___repr__(BPy_UnaryFunction1D * /*self*/) { return PyUnicode_FromString("UnaryFunction1D"); } diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp index 5e2130ac8e7..f8d0b34d6a9 100644 --- a/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp @@ -49,7 +49,7 @@ PyDoc_STRVAR(ViewVertex_doc, "Thus, this class can be specialized into two classes, the\n" ":class:`TVertex` class and the :class:`NonTVertex` class."); -static int ViewVertex_init(BPy_ViewVertex *self, PyObject *args, PyObject *kwds) +static int ViewVertex_init(BPy_ViewVertex * /*self*/, PyObject * /*args*/, PyObject * /*kwds*/) { PyErr_SetString(PyExc_TypeError, "cannot instantiate abstract class"); return -1; @@ -82,7 +82,7 @@ PyDoc_STRVAR(ViewVertex_edges_end_doc, " :return: An orientedViewEdgeIterator pointing after the last ViewEdge.\n" " :rtype: :class:`orientedViewEdgeIterator`"); -static PyObject *ViewVertex_edges_end(BPy_ViewVertex *self) +static PyObject *ViewVertex_edges_end(BPy_ViewVertex * /*self*/) { #if 0 ViewVertexInternal::orientedViewEdgeIterator ove_it(self->vv->edgesEnd()); diff --git a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp index ae4fe0764b6..ba773d4f4cf 100644 --- a/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp +++ b/source/blender/freestyle/intern/python/Interface0D/CurvePoint/BPy_StrokeVertex.cpp @@ -166,7 +166,7 @@ static int StrokeVertex_mathutils_check(BaseMathObject *bmo) return 0; } -static int StrokeVertex_mathutils_get(BaseMathObject *bmo, int subtype) +static int StrokeVertex_mathutils_get(BaseMathObject *bmo, int /*subtype*/) { BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user; bmo->data[0] = (float)self->sv->x(); @@ -174,7 +174,7 @@ static int StrokeVertex_mathutils_get(BaseMathObject *bmo, int subtype) return 0; } -static int StrokeVertex_mathutils_set(BaseMathObject *bmo, int subtype) +static int StrokeVertex_mathutils_set(BaseMathObject *bmo, int /*subtype*/) { BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user; self->sv->setX((real)bmo->data[0]); @@ -182,7 +182,7 @@ static int StrokeVertex_mathutils_set(BaseMathObject *bmo, int subtype) return 0; } -static int StrokeVertex_mathutils_get_index(BaseMathObject *bmo, int subtype, int index) +static int StrokeVertex_mathutils_get_index(BaseMathObject *bmo, int /*subtype*/, int index) { BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user; switch (index) { @@ -194,7 +194,7 @@ static int StrokeVertex_mathutils_get_index(BaseMathObject *bmo, int subtype, in return 0; } -static int StrokeVertex_mathutils_set_index(BaseMathObject *bmo, int subtype, int index) +static int StrokeVertex_mathutils_set_index(BaseMathObject *bmo, int /*subtype*/, int index) { BPy_StrokeVertex *self = (BPy_StrokeVertex *)bmo->cb_user; switch (index) { diff --git a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp index 7592508902b..4c9e0630d40 100644 --- a/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp @@ -100,7 +100,7 @@ static int FEdge_init(BPy_FEdge *self, PyObject *args, PyObject *kwds) /*----------------------FEdge sequence protocol ----------------------------*/ -static Py_ssize_t FEdge_sq_length(BPy_FEdge *self) +static Py_ssize_t FEdge_sq_length(BPy_FEdge * /*self*/) { return 2; } diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp index a2079c7d685..cf893ad9481 100644 --- a/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp +++ b/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp @@ -99,7 +99,7 @@ static int FEdgeSmooth_mathutils_check(BaseMathObject *bmo) return 0; } -static int FEdgeSmooth_mathutils_get(BaseMathObject *bmo, int subtype) +static int FEdgeSmooth_mathutils_get(BaseMathObject *bmo, int /*subtype*/) { BPy_FEdgeSmooth *self = (BPy_FEdgeSmooth *)bmo->cb_user; Vec3r p(self->fes->normal()); @@ -109,7 +109,7 @@ static int FEdgeSmooth_mathutils_get(BaseMathObject *bmo, int subtype) return 0; } -static int FEdgeSmooth_mathutils_set(BaseMathObject *bmo, int subtype) +static int FEdgeSmooth_mathutils_set(BaseMathObject *bmo, int /*subtype*/) { BPy_FEdgeSmooth *self = (BPy_FEdgeSmooth *)bmo->cb_user; Vec3r p(bmo->data[0], bmo->data[1], bmo->data[2]); @@ -117,7 +117,7 @@ static int FEdgeSmooth_mathutils_set(BaseMathObject *bmo, int subtype) return 0; } -static int FEdgeSmooth_mathutils_get_index(BaseMathObject *bmo, int subtype, int index) +static int FEdgeSmooth_mathutils_get_index(BaseMathObject *bmo, int /*subtype*/, int index) { BPy_FEdgeSmooth *self = (BPy_FEdgeSmooth *)bmo->cb_user; Vec3r p(self->fes->normal()); @@ -125,7 +125,7 @@ static int FEdgeSmooth_mathutils_get_index(BaseMathObject *bmo, int subtype, int return 0; } -static int FEdgeSmooth_mathutils_set_index(BaseMathObject *bmo, int subtype, int index) +static int FEdgeSmooth_mathutils_set_index(BaseMathObject *bmo, int /*subtype*/, int index) { BPy_FEdgeSmooth *self = (BPy_FEdgeSmooth *)bmo->cb_user; Vec3r p(self->fes->normal()); diff --git a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.h b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.h index 46294c07b66..c4fead6a4e4 100644 --- a/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.h +++ b/source/blender/freestyle/intern/python/StrokeShader/BPy_BlenderTextureShader.h @@ -31,7 +31,6 @@ extern "C" { #endif -struct MTex; /////////////////////////////////////////////////////////////////////////////////////////// diff --git a/source/blender/freestyle/intern/stroke/Predicates1D.h b/source/blender/freestyle/intern/stroke/Predicates1D.h index 46efeae9f12..05fc043822f 100644 --- a/source/blender/freestyle/intern/stroke/Predicates1D.h +++ b/source/blender/freestyle/intern/stroke/Predicates1D.h @@ -471,7 +471,7 @@ public: } /*! The () operator. */ - int operator()(Interface1D& i1, Interface1D& i2) + int operator()(Interface1D& /*i1*/, Interface1D& /*i2*/) { result = true; return 0; @@ -490,7 +490,7 @@ public: } /*! The () operator. */ - int operator()(Interface1D& i1, Interface1D& i2) + int operator()(Interface1D& /*i1*/, Interface1D& /*i2*/) { result = false; return 0; diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp index 244b20f6b89..b4a3646edef 100644 --- a/source/blender/freestyle/intern/stroke/Stroke.cpp +++ b/source/blender/freestyle/intern/stroke/Stroke.cpp @@ -752,12 +752,12 @@ Interface0DIterator Stroke::verticesEnd() return ret; } -Interface0DIterator Stroke::pointsBegin(float t) +Interface0DIterator Stroke::pointsBegin(float /*t*/) { return verticesBegin(); // FIXME } -Interface0DIterator Stroke::pointsEnd(float t) +Interface0DIterator Stroke::pointsEnd(float /*t*/) { return verticesEnd(); } diff --git a/source/blender/freestyle/intern/view_map/BoxGrid.cpp b/source/blender/freestyle/intern/view_map/BoxGrid.cpp index f770bf6843f..de60cc3812f 100644 --- a/source/blender/freestyle/intern/view_map/BoxGrid.cpp +++ b/source/blender/freestyle/intern/view_map/BoxGrid.cpp @@ -71,7 +71,7 @@ void BoxGrid::Cell::indexPolygons() // Iterator ////////////////// -BoxGrid::Iterator::Iterator (BoxGrid& grid, Vec3r& center, real epsilon) +BoxGrid::Iterator::Iterator (BoxGrid& grid, Vec3r& center, real /*epsilon*/) : _target(grid.transform(center)), _foundOccludee(false) { // Find target cell @@ -122,7 +122,7 @@ BoxGrid::BoxGrid(OccluderSource& source, GridDensityProvider& density, ViewMap * BoxGrid::~BoxGrid() {} -void BoxGrid::assignCells (OccluderSource& source, GridDensityProvider& density, ViewMap *viewMap) +void BoxGrid::assignCells (OccluderSource& /*source*/, GridDensityProvider& density, ViewMap *viewMap) { _cellSize = density.cellSize(); _cellsX = density.cellsX(); diff --git a/source/blender/freestyle/intern/view_map/Interface1D.cpp b/source/blender/freestyle/intern/view_map/Interface1D.cpp index 985310e52b5..f4abad11479 100644 --- a/source/blender/freestyle/intern/view_map/Interface1D.cpp +++ b/source/blender/freestyle/intern/view_map/Interface1D.cpp @@ -42,13 +42,13 @@ Interface0DIterator Interface1D::verticesEnd() return Interface0DIterator(); } -Interface0DIterator Interface1D::pointsBegin(float t) +Interface0DIterator Interface1D::pointsBegin(float /*t*/) { PyErr_SetString(PyExc_TypeError, "method pointsBegin() not properly overridden"); return Interface0DIterator(); } -Interface0DIterator Interface1D::pointsEnd(float t) +Interface0DIterator Interface1D::pointsEnd(float /*t*/) { PyErr_SetString(PyExc_TypeError, "method pointsEnd() not properly overridden"); return Interface0DIterator(); diff --git a/source/blender/freestyle/intern/view_map/Silhouette.h b/source/blender/freestyle/intern/view_map/Silhouette.h index 94b00157ccd..a80fea0342f 100644 --- a/source/blender/freestyle/intern/view_map/Silhouette.h +++ b/source/blender/freestyle/intern/view_map/Silhouette.h @@ -1122,12 +1122,12 @@ Interface0DIterator FEdge::verticesEnd() return ret; } -Interface0DIterator FEdge::pointsBegin(float t) +Interface0DIterator FEdge::pointsBegin(float /*t*/) { return verticesBegin(); } -Interface0DIterator FEdge::pointsEnd(float t) +Interface0DIterator FEdge::pointsEnd(float /*t*/) { return verticesEnd(); } diff --git a/source/blender/freestyle/intern/view_map/SphericalGrid.cpp b/source/blender/freestyle/intern/view_map/SphericalGrid.cpp index 60ad7daea0a..fedd5767e32 100644 --- a/source/blender/freestyle/intern/view_map/SphericalGrid.cpp +++ b/source/blender/freestyle/intern/view_map/SphericalGrid.cpp @@ -72,7 +72,7 @@ void SphericalGrid::Cell::indexPolygons() // Iterator ////////////////// -SphericalGrid::Iterator::Iterator(SphericalGrid& grid, Vec3r& center, real epsilon) +SphericalGrid::Iterator::Iterator(SphericalGrid& grid, Vec3r& center, real /*epsilon*/) : _target(SphericalGrid::Transform::sphericalProjection(center)), _foundOccludee(false) { // Find target cell @@ -120,7 +120,7 @@ SphericalGrid::SphericalGrid(OccluderSource& source, GridDensityProvider& densit SphericalGrid::~SphericalGrid() {} -void SphericalGrid::assignCells(OccluderSource& source, GridDensityProvider& density, ViewMap *viewMap) +void SphericalGrid::assignCells(OccluderSource& /*source*/, GridDensityProvider& density, ViewMap *viewMap) { _cellSize = density.cellSize(); _cellsX = density.cellsX(); diff --git a/source/blender/freestyle/intern/view_map/ViewMap.cpp b/source/blender/freestyle/intern/view_map/ViewMap.cpp index 6bb0082e379..52769413e79 100644 --- a/source/blender/freestyle/intern/view_map/ViewMap.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMap.cpp @@ -701,12 +701,12 @@ Interface0DIterator ViewEdge::verticesEnd() return ret; } -Interface0DIterator ViewEdge::pointsBegin(float t) +Interface0DIterator ViewEdge::pointsBegin(float /*t*/) { return verticesBegin(); } -Interface0DIterator ViewEdge::pointsEnd(float t) +Interface0DIterator ViewEdge::pointsEnd(float /*t*/) { return verticesEnd(); } diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp index 8adc2fa66fd..932c23698dc 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.cpp @@ -56,7 +56,7 @@ static const Global &_global = G; using namespace std; template <typename G, typename I> -static void findOccludee(FEdge *fe, G& grid, I& occluders, real epsilon, WFace **oaWFace, +static void findOccludee(FEdge *fe, G& /*grid*/, I& occluders, real epsilon, WFace **oaWFace, Vec3r& u, Vec3r& A, Vec3r& origin, Vec3r& edge, vector<WVertex*>& faceVertices) { WFace *face = NULL; @@ -169,7 +169,7 @@ static void findOccludee(FEdge *fe, G& grid, I& occluders, real epsilon, WFace * } template <typename G, typename I> -static void findOccludee(FEdge *fe, G& grid, real epsilon, ViewEdge *ve, WFace **oaFace) +static void findOccludee(FEdge *fe, G& grid, real epsilon, ViewEdge * /*ve*/, WFace **oaFace) { Vec3r A; Vec3r edge; @@ -205,7 +205,7 @@ static void findOccludee(FEdge *fe, G& grid, real epsilon, ViewEdge *ve, WFace * // computeVisibility takes a pointer to foundOccluders, instead of using a reference, // so that computeVeryFastVisibility can skip the AddOccluders step with minimal overhead. template <typename G, typename I> -static int computeVisibility(ViewMap *viewMap, FEdge *fe, G& grid, real epsilon, ViewEdge *ve, WFace **oaWFace, +static int computeVisibility(ViewMap *viewMap, FEdge *fe, G& grid, real epsilon, ViewEdge * /*ve*/, WFace **oaWFace, set<ViewShape*> *foundOccluders) { int qi = 0; diff --git a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h index 08b2fde8f31..36497bf8d22 100644 --- a/source/blender/freestyle/intern/view_map/ViewMapBuilder.h +++ b/source/blender/freestyle/intern/view_map/ViewMapBuilder.h @@ -145,7 +145,7 @@ public: * The viewport. 4 real array: origin.x, origin.y, width, length */ inline void setTransform(const real iModelViewMatrix[4][4], const real iProjectionMatrix[4][4], - const int iViewport[4], real iFocalLength, real iAspect, real iFovy) + const int iViewport[4], real iFocalLength, real /*iAspect*/, real /*iFovy*/) { _orthographicProjection = (iProjectionMatrix[3][3] != 0.0); SilhouetteGeomEngine::setTransform(iModelViewMatrix, iProjectionMatrix, iViewport, iFocalLength); diff --git a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp index c9f2f3badab..df990a3468f 100644 --- a/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp +++ b/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.cpp @@ -221,7 +221,7 @@ void WingedEdgeBuilder::buildWVertices(WShape& shape, const real *vertices, unsi } } -void WingedEdgeBuilder::buildTriangleStrip(const real *vertices, const real *normals, vector<FrsMaterial>& iMaterials, +void WingedEdgeBuilder::buildTriangleStrip(const real * /*vertices*/, const real *normals, vector<FrsMaterial>& /*iMaterials*/, const real *texCoords, const IndexedFaceSet::FaceEdgeMark *iFaceEdgeMarks, const unsigned *vindices, const unsigned *nindices, const unsigned *mindices, const unsigned *tindices, const unsigned nvertices) @@ -296,15 +296,15 @@ void WingedEdgeBuilder::buildTriangleStrip(const real *vertices, const real *nor } } -void WingedEdgeBuilder::buildTriangleFan(const real *vertices, const real *normals, vector<FrsMaterial>& iMaterials, - const real *texCoords, const IndexedFaceSet::FaceEdgeMark *iFaceEdgeMarks, - const unsigned *vindices, const unsigned *nindices, const unsigned *mindices, - const unsigned *tindices, const unsigned nvertices) +void WingedEdgeBuilder::buildTriangleFan(const real * /*vertices*/, const real * /*normals*/, vector<FrsMaterial>& /*iMaterials*/, + const real * /*texCoords*/, const IndexedFaceSet::FaceEdgeMark * /*iFaceEdgeMarks*/, + const unsigned * /*vindices*/, const unsigned * /*nindices*/, const unsigned * /*mindices*/, + const unsigned * /*tindices*/, const unsigned /*nvertices*/) { // Nothing to be done } -void WingedEdgeBuilder::buildTriangles(const real *vertices, const real *normals, vector<FrsMaterial>& iMaterials, +void WingedEdgeBuilder::buildTriangles(const real * /*vertices*/, const real *normals, vector<FrsMaterial>& /*iMaterials*/, const real *texCoords, const IndexedFaceSet::FaceEdgeMark *iFaceEdgeMarks, const unsigned *vindices, const unsigned *nindices, const unsigned *mindices, const unsigned *tindices, const unsigned nvertices) diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index 629ac5103a4..cda7bffe93f 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -42,10 +42,8 @@ struct BMesh; struct CCGElem; struct CCGKey; -struct CustomData; struct DMFlagMat; struct DerivedMesh; -struct GHash; struct GSet; struct GPUVertPointLink; struct PBVH; diff --git a/source/blender/gpu/GPU_compositing.h b/source/blender/gpu/GPU_compositing.h index 57d8c0631d6..04e89da00a7 100644 --- a/source/blender/gpu/GPU_compositing.h +++ b/source/blender/gpu/GPU_compositing.h @@ -42,10 +42,8 @@ struct GPUDOFSettings; struct GPUSSAOSettings; struct GPUOffScreen; struct GPUFXSettings; -struct RegionView3D; struct rcti; struct Scene; -struct View3D; enum eGPUFXFlags; /**** Public API *****/ diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h index 0c0ab1097d3..cc1a63d6256 100644 --- a/source/blender/gpu/GPU_draw.h +++ b/source/blender/gpu/GPU_draw.h @@ -36,6 +36,7 @@ extern "C" { #endif +struct ImBuf; struct Image; struct ImageUser; struct MTFace; diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index e27916e5bf7..b61bdf969cc 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -45,10 +45,7 @@ struct Image; struct ImageUser; struct Material; struct Object; -struct Lamp; struct Image; -struct bNode; -struct LinkNode; struct Scene; struct SceneRenderLayer; struct GPUVertexAttribs; diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index 89bd3a8ee99..c6ed2e3f837 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -43,7 +43,6 @@ struct GPUShader; struct GPUOutput; struct GPUNode; struct GPUVertexAttribs; -struct GPUFrameBuffer; struct PreviewImage; /* Pass Generation diff --git a/source/blender/ikplugin/BIK_api.h b/source/blender/ikplugin/BIK_api.h index 95b1dafd129..177be074897 100644 --- a/source/blender/ikplugin/BIK_api.h +++ b/source/blender/ikplugin/BIK_api.h @@ -41,7 +41,6 @@ extern "C" { struct Object; struct bPoseChannel; struct bPose; -struct bArmature; struct Scene; struct bConstraint; diff --git a/source/blender/ikplugin/CMakeLists.txt b/source/blender/ikplugin/CMakeLists.txt index 139dbd32349..8991e113410 100644 --- a/source/blender/ikplugin/CMakeLists.txt +++ b/source/blender/ikplugin/CMakeLists.txt @@ -23,6 +23,8 @@ # # ***** END GPL LICENSE BLOCK ***** +remove_extra_strict_flags() + set(INC . ../blenkernel diff --git a/source/blender/ikplugin/intern/ikplugin_api.h b/source/blender/ikplugin/intern/ikplugin_api.h index 53d9da8e614..cd32bf26242 100644 --- a/source/blender/ikplugin/intern/ikplugin_api.h +++ b/source/blender/ikplugin/intern/ikplugin_api.h @@ -40,7 +40,6 @@ extern "C" { struct Object; struct bPoseChannel; -struct bArmature; struct Scene; diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h index 9407750c039..59df8334099 100644 --- a/source/blender/imbuf/IMB_colormanagement.h +++ b/source/blender/imbuf/IMB_colormanagement.h @@ -47,10 +47,6 @@ struct ColormanageProcessor; struct EnumPropertyItem; struct ImBuf; struct Main; -struct rcti; -struct PartialBufferUpdateContext; -struct wmWindow; -struct Scene; struct ImageFormatData; struct ColorSpace; diff --git a/source/blender/imbuf/intern/dds/dds_api.cpp b/source/blender/imbuf/intern/dds/dds_api.cpp index a6d53ffac96..45d9fa2ac59 100644 --- a/source/blender/imbuf/intern/dds/dds_api.cpp +++ b/source/blender/imbuf/intern/dds/dds_api.cpp @@ -47,7 +47,7 @@ extern "C" { #include "IMB_colormanagement.h" #include "IMB_colormanagement_intern.h" -int imb_save_dds(struct ImBuf *ibuf, const char *name, int flags) +int imb_save_dds(struct ImBuf *ibuf, const char *name, int /*flags*/) { return(0); /* todo: finish this function */ diff --git a/source/blender/imbuf/intern/oiio/openimageio_api.cpp b/source/blender/imbuf/intern/oiio/openimageio_api.cpp index 6e3f97a4902..7728183d3b6 100644 --- a/source/blender/imbuf/intern/oiio/openimageio_api.cpp +++ b/source/blender/imbuf/intern/oiio/openimageio_api.cpp @@ -182,7 +182,7 @@ int imb_is_a_photoshop(const char *filename) return BLI_testextensie_array(filename, photoshop_extension); } -int imb_save_photoshop(struct ImBuf *ibuf, const char *name, int flags) +int imb_save_photoshop(struct ImBuf *ibuf, const char * /*name*/, int flags) { if (flags & IB_mem) { std::cerr << __func__ << ": Photoshop PSD-save: Create PSD in memory" diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h index e3731129632..c9a5e056e4a 100644 --- a/source/blender/makesdna/DNA_color_types.h +++ b/source/blender/makesdna/DNA_color_types.h @@ -133,7 +133,6 @@ typedef struct Histogram { float co[2][2]; } Histogram; -struct ImBuf; typedef struct Scopes { int ok; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 288743d5e2f..205ed7e7380 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -46,7 +46,6 @@ struct Key; struct Material; struct VFont; struct AnimData; -struct SelBox; struct EditFont; struct GHash; diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h index dece93af122..17553e98817 100644 --- a/source/blender/makesdna/DNA_dynamicpaint_types.h +++ b/source/blender/makesdna/DNA_dynamicpaint_types.h @@ -29,7 +29,6 @@ #define __DNA_DYNAMICPAINT_TYPES_H__ #include "DNA_listBase.h" -struct CurveMapping; struct PaintSurfaceData; /* surface format */ diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h index dca1c8330b0..7444abb6d11 100644 --- a/source/blender/makesdna/DNA_image_types.h +++ b/source/blender/makesdna/DNA_image_types.h @@ -39,7 +39,6 @@ struct PackedFile; struct Scene; struct anim; -struct ImBuf; struct MovieCache; struct RenderResult; struct GPUTexture; diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 8067fa5db2d..3799de011d4 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -37,7 +37,6 @@ #include "DNA_customdata_types.h" struct AnimData; -struct DerivedMesh; struct Ipo; struct Key; struct MCol; @@ -47,13 +46,11 @@ struct MLoop; struct MLoopCol; struct MLoopUV; struct MPoly; -struct MSticky; struct MTexPoly; struct MVert; struct Material; struct Mesh; struct Multires; -struct OcInfo; typedef struct Mesh { ID id; diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 3304980f964..b76f40c884d 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -35,7 +35,6 @@ #include "DNA_customdata_types.h" #include "DNA_listBase.h" -struct Bone; struct Image; /*tessellation face, see MLoop/MPoly for the real face data*/ @@ -216,7 +215,6 @@ typedef struct MultiresEdge { unsigned int mid; } MultiresEdge; -struct MultiresMapNode; typedef struct MultiresLevel { struct MultiresLevel *next, *prev; diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index f08b3ea9590..9ab6527daee 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -40,7 +40,6 @@ struct ID; struct ListBase; -struct SpaceNode; struct bNodeLink; struct bNodeType; struct bNodeTreeExec; @@ -383,7 +382,7 @@ typedef struct bNodeTree { /* callbacks */ void (*progress)(void *, float progress); - void (*stats_draw)(void *, char *str); + void (*stats_draw)(void *, const char *str); int (*test_break)(void *); void (*update_draw)(void *); void *tbh, *prh, *sdh, *udh; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 26cc264b3df..0cbf1f8ffa3 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -48,7 +48,6 @@ struct Ipo; struct BoundBox; struct Path; struct Material; -struct bConstraintChannel; struct PartDeflect; struct SoftBody; struct FluidsimSettings; diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h index 81f497d97a4..f2e63b3bfa4 100644 --- a/source/blender/makesdna/DNA_screen_types.h +++ b/source/blender/makesdna/DNA_screen_types.h @@ -41,7 +41,6 @@ struct SpaceLink; struct ARegion; struct ARegionType; struct PanelType; -struct HeaderType; struct Scene; struct uiLayout; struct wmTimer; diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h index cb132c1b550..811d78d67c2 100644 --- a/source/blender/makesdna/DNA_sound_types.h +++ b/source/blender/makesdna/DNA_sound_types.h @@ -41,7 +41,6 @@ struct Ipo; struct PackedFile; -struct SpaceLink; typedef struct bSound { ID id; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index dcb7591a181..302718dc40e 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -51,28 +51,21 @@ struct ID; struct Text; struct Script; -struct bSound; -struct ImBuf; struct Image; struct Scopes; struct Histogram; struct SpaceIpo; -struct BlendHandle; struct bNodeTree; -struct uiBlock; struct FileList; struct bGPdata; struct bDopeSheet; struct FileSelectParams; struct FileLayout; -struct bScreen; -struct Scene; struct wmOperator; struct wmTimer; struct MovieClip; struct MovieClipScopes; struct Mask; -struct GHash; struct BLI_mempool; diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index c471cb26892..9888b735b8b 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -43,11 +43,9 @@ /* match-moving data */ struct bGPdata; -struct ImBuf; struct Image; struct MovieReconstructedCamera; struct MovieTrackingCamera; -struct MovieTrackingBundle; struct MovieTrackingMarker; struct MovieTrackingTrack; struct MovieTracking; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index d4d1bcda2b3..4f555b7303e 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -35,9 +35,7 @@ struct ViewDepths; struct Object; struct Image; -struct Tex; struct SpaceLink; -struct Base; struct BoundBox; struct MovieClip; struct MovieClipUser; diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 7f5f3ccddca..74f6f5f75e8 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -49,12 +49,9 @@ struct wmKeyConfig; /* forwards */ struct bContext; -struct wmLocal; struct bScreen; -struct uiBlock; struct wmSubWindow; struct wmTimer; -struct StructRNA; struct PointerRNA; struct ReportList; struct Report; diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index a9c0f591858..0c99769a390 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -37,10 +37,8 @@ extern "C" { struct ParameterList; struct FunctionRNA; struct PropertyRNA; -struct EnumPropertyRNA; struct StructRNA; struct BlenderRNA; -struct IDProperty; struct bContext; struct Main; struct ReportList; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 8c93438545e..883576ccb81 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -2027,7 +2027,8 @@ static void rna_def_struct_function_call_impl_cpp(FILE *f, StructRNA *srna, Func if ((func->flag & FUNC_NO_SELF) == 0) { WRITE_COMMA; - if (dsrna->dnaname) fprintf(f, "(::%s *) this->ptr.data", dsrna->dnaname); + if (dsrna->dnafromprop) fprintf(f, "(::%s *) this->ptr.data", dsrna->dnafromname); + else if (dsrna->dnaname) fprintf(f, "(::%s *) this->ptr.data", dsrna->dnaname); else fprintf(f, "(::%s *) this->ptr.data", srna->identifier); } else if (func->flag & FUNC_USE_SELF_TYPE) { @@ -2222,7 +2223,8 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA } if ((func->flag & FUNC_NO_SELF) == 0) { - if (dsrna->dnaname) fprintf(f, "\tstruct %s *_self;\n", dsrna->dnaname); + if (dsrna->dnafromprop) fprintf(f, "\tstruct %s *_self;\n", dsrna->dnafromname); + else if (dsrna->dnaname) fprintf(f, "\tstruct %s *_self;\n", dsrna->dnaname); else fprintf(f, "\tstruct %s *_self;\n", srna->identifier); } else if (func->flag & FUNC_USE_SELF_TYPE) { @@ -2274,7 +2276,8 @@ static void rna_def_function_funcs(FILE *f, StructDefRNA *dsrna, FunctionDefRNA } if ((func->flag & FUNC_NO_SELF) == 0) { - if (dsrna->dnaname) fprintf(f, "\t_self = (struct %s *)_ptr->data;\n", dsrna->dnaname); + if (dsrna->dnafromprop) fprintf(f, "\t_self = (struct %s *)_ptr->data;\n", dsrna->dnafromname); + else if (dsrna->dnaname) fprintf(f, "\t_self = (struct %s *)_ptr->data;\n", dsrna->dnaname); else fprintf(f, "\t_self = (struct %s *)_ptr->data;\n", srna->identifier); } else if (func->flag & FUNC_USE_SELF_TYPE) { @@ -2675,7 +2678,8 @@ static void rna_generate_static_parameter_prototypes(FILE *f, StructRNA *srna, F if ((func->flag & FUNC_NO_SELF) == 0) { if (!first) fprintf(f, ", "); - if (dsrna->dnaname) fprintf(f, "struct %s *_self", dsrna->dnaname); + if (dsrna->dnafromprop) fprintf(f, "struct %s *_self", dsrna->dnafromname); + else if (dsrna->dnaname) fprintf(f, "struct %s *_self", dsrna->dnaname); else fprintf(f, "struct %s *_self", srna->identifier); first = 0; } @@ -3764,7 +3768,7 @@ static const char *cpp_classes = "" "\n" "class DefaultCollectionFunctions {\n" "public:\n" -" DefaultCollectionFunctions(const PointerRNA &p) {}\n" +" DefaultCollectionFunctions(const PointerRNA & /*p*/) {}\n" "};\n" "\n" "\n"; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 06fdf6d3b77..ef798820321 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1622,7 +1622,7 @@ bool RNA_property_animateable(PointerRNA *ptr, PropertyRNA *prop) bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop) { int len = 1, index; - bool driven; + bool driven, special; if (!prop) return false; @@ -1631,7 +1631,7 @@ bool RNA_property_animated(PointerRNA *ptr, PropertyRNA *prop) len = RNA_property_array_length(ptr, prop); for (index = 0; index < len; index++) { - if (rna_get_fcurve(ptr, prop, index, NULL, NULL, &driven)) + if (rna_get_fcurve(ptr, prop, index, NULL, NULL, &driven, &special)) return true; } diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index c621778cc3c..30f21a225fe 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -35,16 +35,13 @@ #define RNA_MAGIC ((int)~0) -struct ColorBand; struct ID; struct IDProperty; struct Main; struct Mesh; struct Object; -struct RenderEngine; struct ReportList; struct SDNA; -struct Sequence; /* Data structures used during define */ diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index 845d76debd2..ba0705b5caa 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -38,10 +38,8 @@ struct StructRNA; struct PropertyRNA; struct PointerRNA; struct FunctionRNA; -struct ReportList; struct CollectionPropertyIterator; struct bContext; -struct EnumProperty; struct IDProperty; struct GHash; struct Main; diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index 1cd372df161..45f16448638 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -520,8 +520,8 @@ static void rna_Main_fonts_remove(Main *bmain, ReportList *reports, PointerRNA * static Tex *rna_Main_textures_new(Main *bmain, const char *name, int type) { - Tex *tex = add_texture(bmain, name); - tex_set_type(tex, type); + Tex *tex = BKE_texture_add(bmain, name); + BKE_texture_type_set(tex, type); id_us_min(&tex->id); return tex; } diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index 7a06b647ae3..874e861f75f 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -377,7 +377,7 @@ static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED MTex *rna_mtex_texture_slots_add(ID *self_id, struct bContext *C, ReportList *reports) { - MTex *mtex = add_mtex_id(self_id, -1); + MTex *mtex = BKE_texture_mtex_add_id(self_id, -1); if (mtex == NULL) { BKE_reportf(reports, RPT_ERROR, "Maximum number of textures added %d", MAX_MTEX); return NULL; @@ -398,7 +398,7 @@ MTex *rna_mtex_texture_slots_create(ID *self_id, struct bContext *C, ReportList return NULL; } - mtex = add_mtex_id(self_id, index); + mtex = BKE_texture_mtex_add_id(self_id, index); /* for redraw only */ WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C)); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 73d1c1b3070..f21f1c1af92 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -4507,7 +4507,7 @@ static void rna_def_modifier_normaledit(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_NormalEditModifier_defgrp_name_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_property(srna, "use_invert_vertex_group", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "invert_vertex_group", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_NORMALEDIT_INVERT_VGROUP); RNA_def_property_ui_text(prop, "Invert", "Invert vertex group influence"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index eb2cb9e9312..90ee9e1d7d9 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -2701,7 +2701,7 @@ static void rna_Image_Node_update_id(Main *UNUSED(bmain), Scene *UNUSED(scene), static void rna_Mapping_Node_update(Main *bmain, Scene *scene, PointerRNA *ptr) { bNode *node = ptr->data; - init_tex_mapping(node->storage); + BKE_texture_mapping_init(node->storage); rna_Node_update(bmain, scene, ptr); } diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index c1882e7767d..726744782ed 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -181,7 +181,7 @@ static void rna_Texture_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *pt static void rna_Texture_mapping_update(Main *bmain, Scene *scene, PointerRNA *ptr) { TexMapping *texmap = ptr->data; - init_tex_mapping(texmap); + BKE_texture_mapping_init(texmap); rna_Texture_update(bmain, scene, ptr); } @@ -222,7 +222,7 @@ static void rna_Texture_type_set(PointerRNA *ptr, int value) { Tex *tex = (Tex *)ptr->data; - tex_set_type(tex, value); + BKE_texture_type_set(tex, value); } void rna_TextureSlot_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) @@ -445,7 +445,7 @@ static void rna_Envmap_update_generic(Main *bmain, Scene *scene, PointerRNA *ptr Tex *tex = ptr->id.data; if (tex->env) { ED_preview_kill_jobs(bmain->wm.first, bmain); - BKE_free_envmapdata(tex->env); + BKE_texture_envmap_free_data(tex->env); } rna_Texture_update(bmain, scene, ptr); } diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c index acf8333d6dc..a27ba6ea06d 100644 --- a/source/blender/makesrna/intern/rna_texture_api.c +++ b/source/blender/makesrna/intern/rna_texture_api.c @@ -60,7 +60,7 @@ static void clear_envmap(struct EnvMap *env, bContext *C) Main *bmain = CTX_data_main(C); Tex *tex; - BKE_free_envmapdata(env); + BKE_texture_envmap_free_data(env); for (tex = bmain->tex.first; tex; tex = tex->id.next) if (tex->env == env) { diff --git a/source/blender/modifiers/intern/MOD_boolean_util.h b/source/blender/modifiers/intern/MOD_boolean_util.h index 04d76d45652..00d7c37b266 100644 --- a/source/blender/modifiers/intern/MOD_boolean_util.h +++ b/source/blender/modifiers/intern/MOD_boolean_util.h @@ -33,9 +33,7 @@ #ifndef __MOD_BOOLEAN_UTIL_H__ #define __MOD_BOOLEAN_UTIL_H__ -struct Scene; struct Object; -struct Base; struct DerivedMesh; /* Performs a boolean between two mesh objects, it is assumed that both objects diff --git a/source/blender/modifiers/intern/MOD_meshcache_util.h b/source/blender/modifiers/intern/MOD_meshcache_util.h index f3b5f43009d..241806f49e1 100644 --- a/source/blender/modifiers/intern/MOD_meshcache_util.h +++ b/source/blender/modifiers/intern/MOD_meshcache_util.h @@ -27,8 +27,6 @@ #ifndef __MOD_MESHCACHE_UTIL_H__ #define __MOD_MESHCACHE_UTIL_H__ -struct MPoly; -struct MLoop; /* MOD_meshcache_mdd.c */ bool MOD_meshcache_read_mdd_index(FILE *fp, diff --git a/source/blender/modifiers/intern/MOD_util.h b/source/blender/modifiers/intern/MOD_util.h index adb1cf31bbd..5a1f1fc876a 100644 --- a/source/blender/modifiers/intern/MOD_util.h +++ b/source/blender/modifiers/intern/MOD_util.h @@ -31,14 +31,12 @@ /* so modifier types match their defines */ #include "MOD_modifiertypes.h" -struct CustomData; struct DerivedMesh; struct MDeformVert; struct ModifierData; struct Object; struct Scene; struct Tex; -struct TexResult; void modifier_init_texture(const struct Scene *scene, struct Tex *texture); void get_texture_coords(struct MappingInfoModifierData *dmd, struct Object *ob, struct DerivedMesh *dm, diff --git a/source/blender/nodes/NOD_socket.h b/source/blender/nodes/NOD_socket.h index 81230456193..5c8875593e7 100644 --- a/source/blender/nodes/NOD_socket.h +++ b/source/blender/nodes/NOD_socket.h @@ -43,7 +43,6 @@ struct bNodeTree; struct bNode; -struct bNodeStack; struct bNodeSocket *node_add_socket_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp, int in_out); diff --git a/source/blender/nodes/composite/nodes/node_composite_mapValue.c b/source/blender/nodes/composite/nodes/node_composite_mapValue.c index 22d16e93879..35096d57a4e 100644 --- a/source/blender/nodes/composite/nodes/node_composite_mapValue.c +++ b/source/blender/nodes/composite/nodes/node_composite_mapValue.c @@ -44,7 +44,7 @@ static bNodeSocketTemplate cmp_node_map_value_out[] = { static void node_composit_init_map_value(bNodeTree *UNUSED(ntree), bNode *node) { - node->storage = add_tex_mapping(TEXMAP_TYPE_POINT); + node->storage = BKE_texture_mapping_add(TEXMAP_TYPE_POINT); } void register_node_type_cmp_map_value(void) diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c index cff4a039602..2af6e19565b 100644 --- a/source/blender/nodes/shader/nodes/node_shader_mapping.c +++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c @@ -71,7 +71,7 @@ static void node_shader_exec_mapping(void *UNUSED(data), int UNUSED(thread), bNo static void node_shader_init_mapping(bNodeTree *UNUSED(ntree), bNode *node) { - node->storage = add_tex_mapping(TEXMAP_TYPE_POINT); + node->storage = BKE_texture_mapping_add(TEXMAP_TYPE_POINT); } static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out) diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_brick.c b/source/blender/nodes/shader/nodes/node_shader_tex_brick.c index f75f6a654d1..569eaf5ff9b 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_brick.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_brick.c @@ -51,8 +51,8 @@ static bNodeSocketTemplate sh_node_tex_brick_out[] = { static void node_shader_init_tex_brick(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexBrick *tex = MEM_callocN(sizeof(NodeTexBrick), "NodeTexBrick"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->offset = 0.5f; tex->squash = 1.0f; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_checker.c b/source/blender/nodes/shader/nodes/node_shader_tex_checker.c index 30e51c7cb7d..b7498df1706 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_checker.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_checker.c @@ -46,8 +46,8 @@ static bNodeSocketTemplate sh_node_tex_checker_out[] = { static void node_shader_init_tex_checker(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexChecker *tex = MEM_callocN(sizeof(NodeTexChecker), "NodeTexChecker"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); node->storage = tex; } diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c index 8d6a77455bb..2b43667a009 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c @@ -42,8 +42,8 @@ static bNodeSocketTemplate sh_node_tex_environment_out[] = { static void node_shader_init_tex_environment(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexEnvironment *tex = MEM_callocN(sizeof(NodeTexEnvironment), "NodeTexEnvironment"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->color_space = SHD_COLORSPACE_COLOR; tex->projection = SHD_PROJ_EQUIRECTANGULAR; tex->iuser.frames = 1; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c index e11591ab5ce..24916e8f013 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c @@ -43,8 +43,8 @@ static bNodeSocketTemplate sh_node_tex_gradient_out[] = { static void node_shader_init_tex_gradient(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexGradient *tex = MEM_callocN(sizeof(NodeTexGradient), "NodeTexGradient"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->gradient_type = SHD_BLEND_LINEAR; node->storage = tex; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c index 62db5b70891..f87e792399b 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c @@ -43,8 +43,8 @@ static bNodeSocketTemplate sh_node_tex_image_out[] = { static void node_shader_init_tex_image(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexImage *tex = MEM_callocN(sizeof(NodeTexImage), "NodeTexImage"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->color_space = SHD_COLORSPACE_COLOR; tex->iuser.frames = 1; tex->iuser.sfra = 1; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_magic.c b/source/blender/nodes/shader/nodes/node_shader_tex_magic.c index de2daeb8ee1..80904e376bc 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_magic.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_magic.c @@ -45,8 +45,8 @@ static bNodeSocketTemplate sh_node_tex_magic_out[] = { static void node_shader_init_tex_magic(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexMagic *tex = MEM_callocN(sizeof(NodeTexMagic), "NodeTexMagic"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->depth = 2; node->storage = tex; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c index 75566773ea2..825ba7eb3c1 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c @@ -49,8 +49,8 @@ static bNodeSocketTemplate sh_node_tex_musgrave_out[] = { static void node_shader_init_tex_musgrave(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexMusgrave *tex = MEM_callocN(sizeof(NodeTexMusgrave), "NodeTexMusgrave"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->musgrave_type = SHD_MUSGRAVE_FBM; node->storage = tex; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_noise.c b/source/blender/nodes/shader/nodes/node_shader_tex_noise.c index 601a31dff00..d806140694e 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_noise.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_noise.c @@ -46,8 +46,8 @@ static bNodeSocketTemplate sh_node_tex_noise_out[] = { static void node_shader_init_tex_noise(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexNoise *tex = MEM_callocN(sizeof(NodeTexNoise), "NodeTexNoise"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); node->storage = tex; } diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c index 51cca0df851..495c78ca929 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c @@ -42,8 +42,8 @@ static bNodeSocketTemplate sh_node_tex_sky_out[] = { static void node_shader_init_tex_sky(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexSky *tex = MEM_callocN(sizeof(NodeTexSky), "NodeTexSky"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->sun_direction[0] = 0.0f; tex->sun_direction[1] = 0.0f; tex->sun_direction[2] = 1.0f; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c index 5eba5f3f59d..88596a4a72f 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c @@ -44,8 +44,8 @@ static bNodeSocketTemplate sh_node_tex_voronoi_out[] = { static void node_shader_init_tex_voronoi(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexVoronoi *tex = MEM_callocN(sizeof(NodeTexVoronoi), "NodeTexVoronoi"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->coloring = SHD_VORONOI_INTENSITY; node->storage = tex; diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c index ef79aac0d32..100510641e8 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c @@ -47,8 +47,8 @@ static bNodeSocketTemplate sh_node_tex_wave_out[] = { static void node_shader_init_tex_wave(bNodeTree *UNUSED(ntree), bNode *node) { NodeTexWave *tex = MEM_callocN(sizeof(NodeTexWave), "NodeTexWave"); - default_tex_mapping(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); - default_color_mapping(&tex->base.color_mapping); + BKE_texture_mapping_default(&tex->base.tex_mapping, TEXMAP_TYPE_POINT); + BKE_texture_colormapping_default(&tex->base.color_mapping); tex->wave_type = SHD_WAVE_BANDS; node->storage = tex; diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c index b49ec1fd503..0be5f875a23 100644 --- a/source/blender/nodes/texture/nodes/node_texture_proc.c +++ b/source/blender/nodes/texture/nodes/node_texture_proc.c @@ -286,7 +286,7 @@ static void init(bNodeTree *UNUSED(ntree), bNode *node) Tex *tex = MEM_callocN(sizeof(Tex), "Tex"); node->storage = tex; - default_tex(tex); + BKE_texture_default(tex); tex->type = node->type - TEX_NODE_PROC; if (tex->type == TEX_WOOD) diff --git a/source/blender/physics/intern/hair_volume.cpp b/source/blender/physics/intern/hair_volume.cpp index b07af1d201c..d79cf7d8c31 100644 --- a/source/blender/physics/intern/hair_volume.cpp +++ b/source/blender/physics/intern/hair_volume.cpp @@ -594,7 +594,7 @@ BLI_INLINE float hair_volume_density_divergence(float density, float target_dens return 0.0f; } -bool BPH_hair_volume_solve_divergence(HairGrid *grid, float dt, float target_density, float target_strength) +bool BPH_hair_volume_solve_divergence(HairGrid *grid, float /*dt*/, float target_density, float target_strength) { const float flowfac = grid->cellsize; const float inv_flowfac = 1.0f / grid->cellsize; diff --git a/source/blender/physics/intern/implicit.h b/source/blender/physics/intern/implicit.h index d286d3df1a5..dba1cd11ae0 100644 --- a/source/blender/physics/intern/implicit.h +++ b/source/blender/physics/intern/implicit.h @@ -59,7 +59,6 @@ extern "C" { //#define IMPLICIT_ENABLE_EIGEN_DEBUG struct Implicit_Data; -struct ImplicitSolverInput; typedef struct ImplicitSolverResult { int status; @@ -133,7 +132,6 @@ bool BPH_mass_spring_force_spring_goal(struct Implicit_Data *data, int i, const struct HairGrid; -struct Object; struct VoxelData; #define MAX_HAIR_GRID_RES 256 diff --git a/source/blender/quicktime/quicktime_export.h b/source/blender/quicktime/quicktime_export.h index 6709f87fb1c..360c475fdb5 100644 --- a/source/blender/quicktime/quicktime_export.h +++ b/source/blender/quicktime/quicktime_export.h @@ -54,7 +54,6 @@ struct ImageFormatData; struct RenderData; struct ReportList; struct Scene; -struct wmOperatorType; int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports, bool preview); //for movie handle (BKE writeavi.c now) int append_qt(struct RenderData *rd, int start_frame, int frame, int *pixels, int rectx, int recty, struct ReportList *reports); diff --git a/source/blender/render/extern/include/RE_bake.h b/source/blender/render/extern/include/RE_bake.h index 481da452529..ffc1246b878 100644 --- a/source/blender/render/extern/include/RE_bake.h +++ b/source/blender/render/extern/include/RE_bake.h @@ -32,6 +32,7 @@ #ifndef __RE_BAKE_H__ #define __RE_BAKE_H__ +struct ImBuf; struct Render; struct Mesh; diff --git a/source/blender/render/extern/include/RE_render_ext.h b/source/blender/render/extern/include/RE_render_ext.h index d76d16a641e..6adbb6d0e62 100644 --- a/source/blender/render/extern/include/RE_render_ext.h +++ b/source/blender/render/extern/include/RE_render_ext.h @@ -39,10 +39,8 @@ /* called by meshtools */ struct DerivedMesh; struct ImagePool; -struct LinkNode; struct MTex; struct Scene; -struct View3D; /* particle.c, effect.c, editmesh_modes.c and brush.c, returns 1 if rgb, 0 otherwise */ int externtex(struct MTex *mtex, const float vec[3], float *tin, float *tr, float *tg, float *tb, float *ta, const int thread, struct ImagePool *pool, const bool skip_load_image); diff --git a/source/blender/render/intern/include/initrender.h b/source/blender/render/intern/include/initrender.h index 1f11cdc6729..87e2d2519d5 100644 --- a/source/blender/render/intern/include/initrender.h +++ b/source/blender/render/intern/include/initrender.h @@ -33,7 +33,6 @@ #ifndef __INITRENDER_H__ #define __INITRENDER_H__ -struct Object; /* Functions */ diff --git a/source/blender/render/intern/include/occlusion.h b/source/blender/render/intern/include/occlusion.h index 2f3ac2a7bff..4a70d691436 100644 --- a/source/blender/render/intern/include/occlusion.h +++ b/source/blender/render/intern/include/occlusion.h @@ -35,11 +35,8 @@ struct Render; struct ShadeInput; -struct ShadeResult; struct RenderPart; struct ShadeSample; -struct DerivedMesh; -struct ObjectRen; void make_occ_tree(struct Render *re); void free_occ(struct Render *re); diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h index faf8c5f54f5..8f23455564f 100644 --- a/source/blender/render/intern/include/pixelshading.h +++ b/source/blender/render/intern/include/pixelshading.h @@ -32,7 +32,6 @@ #ifndef __PIXELSHADING_H__ #define __PIXELSHADING_H__ -struct ImagePool; /** * Render the pixel at (x,y) for object ap. Apply the jitter mask. diff --git a/source/blender/render/intern/include/pointdensity.h b/source/blender/render/intern/include/pointdensity.h index e0c293e2473..1d1e808e8d3 100644 --- a/source/blender/render/intern/include/pointdensity.h +++ b/source/blender/render/intern/include/pointdensity.h @@ -37,10 +37,12 @@ * Make point density kd-trees for all point density textures in the scene */ +struct PointDensity; struct Render; struct TexResult; -void cache_pointdensity(struct Render *re, struct Tex *tex); +void free_pointdensity(struct PointDensity *pd); +void cache_pointdensity(struct Render *re, struct PointDensity *pd); void make_pointdensities(struct Render *re); void free_pointdensities(struct Render *re); int pointdensitytex(struct Tex *tex, const float texvec[3], struct TexResult *texres); diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index a53ff302475..0d23c81afb0 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -58,7 +58,6 @@ struct MemArena; struct VertTableNode; struct VlakTableNode; struct GHash; -struct RenderBuckets; struct ObjectInstanceRen; struct RayObject; struct RayFace; @@ -389,7 +388,6 @@ struct halosort { /* ------------------------------------------------------------------------- */ struct Material; -struct MTFace; struct ImagePool; typedef struct RadFace { diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h index 88b639c4ba9..308903c6c6d 100644 --- a/source/blender/render/intern/include/rendercore.h +++ b/source/blender/render/intern/include/rendercore.h @@ -34,14 +34,11 @@ #include "render_types.h" -struct HaloRen; struct ShadeInput; struct ShadeResult; struct World; struct RenderPart; struct RenderLayer; -struct ObjectRen; -struct ListBase; struct RayObject; /* ------------------------------------------------------------------------- */ diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h index 7c168baada7..ece6902b6b2 100644 --- a/source/blender/render/intern/include/shadbuf.h +++ b/source/blender/render/intern/include/shadbuf.h @@ -34,7 +34,6 @@ #include "render_types.h" -struct ObjectRen; /** * Calculates shadowbuffers for a vector of shadow-giving lamps diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h index 4f6e005d742..11dcc9d9e80 100644 --- a/source/blender/render/intern/include/shading.h +++ b/source/blender/render/intern/include/shading.h @@ -33,7 +33,6 @@ struct RenderLayer; struct PixStr; struct LampRen; struct VlakRen; -struct StrandSegment; struct StrandPoint; struct ObjectInstanceRen; struct Isect; diff --git a/source/blender/render/intern/include/sss.h b/source/blender/render/intern/include/sss.h index 91a8b91e638..0952c6bff65 100644 --- a/source/blender/render/intern/include/sss.h +++ b/source/blender/render/intern/include/sss.h @@ -55,7 +55,6 @@ void scatter_tree_free(ScatterTree *tree); struct Render; struct Material; -struct VlakRen; void make_sss_tree(struct Render *re); void sss_add_points(Render *re, float (*co)[3], float (*color)[3], float *area, int totpoint); diff --git a/source/blender/render/intern/include/strand.h b/source/blender/render/intern/include/strand.h index fdcce687f54..5687ef3c837 100644 --- a/source/blender/render/intern/include/strand.h +++ b/source/blender/render/intern/include/strand.h @@ -34,9 +34,6 @@ struct StrandBuffer; struct ShadeSample; struct StrandPart; struct Render; -struct RenderPart; -struct RenderBuckets; -struct RenderPrimitiveIterator; struct ZSpan; struct ObjectInstanceRen; struct StrandSurface; diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h index ec30c3241ab..cf804d75d70 100644 --- a/source/blender/render/intern/include/zbuf.h +++ b/source/blender/render/intern/include/zbuf.h @@ -36,7 +36,6 @@ struct RenderPart; struct RenderLayer; struct LampRen; -struct VlakRen; struct ListBase; struct ZSpan; struct APixstrand; diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index f0268836104..0698f849073 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -70,7 +70,7 @@ static void envmap_split_ima(EnvMap *env, ImBuf *ibuf) BLI_lock_thread(LOCK_IMAGE); if (env->cube[1] == NULL) { - BKE_free_envmapdata(env); + BKE_texture_envmap_free_data(env); dx = ibuf->y; dx /= 2; @@ -511,7 +511,7 @@ static void render_envmap(Render *re, EnvMap *env) } - if (re->test_break(re->tbh)) BKE_free_envmapdata(env); + if (re->test_break(re->tbh)) BKE_texture_envmap_free_data(env); else { if (envre->r.mode & R_OSA) env->ok = ENV_OSA; else env->ok = ENV_NORMAL; @@ -572,13 +572,13 @@ void make_envmaps(Render *re) if (env->ok) { /* free when OSA, and old one isn't OSA */ if ((re->r.mode & R_OSA) && env->ok == ENV_NORMAL) - BKE_free_envmapdata(env); + BKE_texture_envmap_free_data(env); /* free when size larger */ else if (env->lastsize < re->r.size) - BKE_free_envmapdata(env); + BKE_texture_envmap_free_data(env); /* free when env is in recalcmode */ else if (env->recalc) - BKE_free_envmapdata(env); + BKE_texture_envmap_free_data(env); } if (env->ok == 0 && depth == 0) env->recalc = 1; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index cffb8c5764c..449c4be042b 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1956,7 +1956,7 @@ static void ntree_render_scenes(Render *re) } /* bad call... need to think over proper method still */ -static void render_composit_stats(void *UNUSED(arg), char *str) +static void render_composit_stats(void *UNUSED(arg), const char *str) { R.i.infostr = str; R.stats_draw(R.sdh, &R.i); diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index 1f4726809de..3a1f1fbb744 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -1,4 +1,4 @@ -/* +/* * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -68,25 +68,34 @@ extern struct Render R; static int point_data_used(PointDensity *pd) { int pd_bitflag = 0; - + if (pd->source == TEX_PD_PSYS) { - if ((pd->noise_influence == TEX_PD_NOISE_VEL) || (pd->falloff_type == TEX_PD_FALLOFF_PARTICLE_VEL) || (pd->color_source == TEX_PD_COLOR_PARTVEL) || (pd->color_source == TEX_PD_COLOR_PARTSPEED)) + if ((pd->noise_influence == TEX_PD_NOISE_VEL) || + (pd->falloff_type == TEX_PD_FALLOFF_PARTICLE_VEL) || + (pd->color_source == TEX_PD_COLOR_PARTVEL) || + (pd->color_source == TEX_PD_COLOR_PARTSPEED)) + { pd_bitflag |= POINT_DATA_VEL; - if ((pd->noise_influence == TEX_PD_NOISE_AGE) || (pd->color_source == TEX_PD_COLOR_PARTAGE) || (pd->falloff_type == TEX_PD_FALLOFF_PARTICLE_AGE)) + } + if ((pd->noise_influence == TEX_PD_NOISE_AGE) || + (pd->color_source == TEX_PD_COLOR_PARTAGE) || + (pd->falloff_type == TEX_PD_FALLOFF_PARTICLE_AGE)) + { pd_bitflag |= POINT_DATA_LIFE; + } } - + return pd_bitflag; } -/* additional data stored alongside the point density BVH, - * accessible by point index number to retrieve other information +/* additional data stored alongside the point density BVH, + * accessible by point index number to retrieve other information * such as particle velocity or lifetime */ static void alloc_point_data(PointDensity *pd, int total_particles, int point_data_used) { int data_size = 0; - + if (point_data_used & POINT_DATA_VEL) { /* store 3 channels of velocity data */ data_size += 3; @@ -96,60 +105,69 @@ static void alloc_point_data(PointDensity *pd, int total_particles, int point_da data_size += 1; } - if (data_size) - pd->point_data = MEM_mallocN(sizeof(float)*data_size*total_particles, "particle point data"); + if (data_size) { + pd->point_data = MEM_mallocN(sizeof(float) * data_size * total_particles, + "particle point data"); + } } -static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, ParticleSystem *psys) +static void pointdensity_cache_psys(Scene *scene, + PointDensity *pd, + Object *ob, + ParticleSystem *psys, + float viewmat[4][4], + float winmat[4][4], + int winx, int winy) { - DerivedMesh* dm; + DerivedMesh *dm; ParticleKey state; ParticleCacheKey *cache; - ParticleSimulationData sim= {NULL}; - ParticleData *pa=NULL; - float cfra = BKE_scene_frame_get(re->scene); + ParticleSimulationData sim = {NULL}; + ParticleData *pa = NULL; + float cfra = BKE_scene_frame_get(scene); int i /*, childexists*/ /* UNUSED */; - int total_particles, offset=0; + int total_particles, offset = 0; int data_used = point_data_used(pd); float partco[3]; - float obview[4][4]; - + /* init everything */ - if (!psys || !ob || !pd) return; + if (!psys || !ob || !pd) { + return; + } - mul_m4_m4m4(obview, ob->obmat, re->viewinv); - /* Just to create a valid rendering context for particles */ - psys_render_set(ob, psys, re->viewmat, re->winmat, re->winx, re->winy, 0); - - dm = mesh_create_derived_render(re->scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL); - + psys_render_set(ob, psys, viewmat, winmat, winx, winy, 0); + + dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH | CD_MASK_MTFACE | CD_MASK_MCOL); + if ( !psys_check_enabled(ob, psys)) { psys_render_restore(ob, psys); return; } - - sim.scene= re->scene; - sim.ob= ob; - sim.psys= psys; + + sim.scene = scene; + sim.ob = ob; + sim.psys = psys; /* in case ob->imat isn't up-to-date */ invert_m4_m4(ob->imat, ob->obmat); - - total_particles = psys->totpart+psys->totchild; + + total_particles = psys->totpart + psys->totchild; psys->lattice_deform_data = psys_create_lattice_deform_data(&sim); - + pd->point_tree = BLI_bvhtree_new(total_particles, 0.0, 4, 6); alloc_point_data(pd, total_particles, data_used); pd->totpoints = total_particles; - if (data_used & POINT_DATA_VEL) offset = pd->totpoints*3; - + if (data_used & POINT_DATA_VEL) { + offset = pd->totpoints * 3; + } + #if 0 /* UNUSED */ if (psys->totchild > 0 && !(psys->part->draw & PART_DRAW_PARENT)) childexists = 1; #endif - for (i=0, pa=psys->particles; i < total_particles; i++, pa++) { + for (i = 0, pa = psys->particles; i < total_particles; i++, pa++) { if (psys->part->type == PART_HAIR) { /* hair particles */ @@ -175,19 +193,19 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa if (data_used & POINT_DATA_LIFE) { if (i < psys->totpart) { - state.time = (cfra - pa->time)/pa->lifetime; + state.time = (cfra - pa->time) / pa->lifetime; } else { - ChildParticle *cpa= (psys->child + i) - psys->totpart; + ChildParticle *cpa = (psys->child + i) - psys->totpart; float pa_birthtime, pa_dietime; - + state.time = psys_get_child_time(psys, cpa, cfra, &pa_birthtime, &pa_dietime); } } } copy_v3_v3(partco, state.co); - + if (pd->psys_cache_space == TEX_PD_OBJECTSPACE) mul_m4_v3(ob->imat, partco); else if (pd->psys_cache_space == TEX_PD_OBJECTLOC) { @@ -196,48 +214,50 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa else { /* TEX_PD_WORLDSPACE */ } - + BLI_bvhtree_insert(pd->point_tree, i, partco, 1); - + if (data_used & POINT_DATA_VEL) { - pd->point_data[i*3 + 0] = state.vel[0]; - pd->point_data[i*3 + 1] = state.vel[1]; - pd->point_data[i*3 + 2] = state.vel[2]; + pd->point_data[i * 3 + 0] = state.vel[0]; + pd->point_data[i * 3 + 1] = state.vel[1]; + pd->point_data[i * 3 + 2] = state.vel[2]; } if (data_used & POINT_DATA_LIFE) { pd->point_data[offset + i] = state.time; } } - + BLI_bvhtree_balance(pd->point_tree); dm->release(dm); - + if (psys->lattice_deform_data) { end_latt_deform(psys->lattice_deform_data); psys->lattice_deform_data = NULL; } - + psys_render_restore(ob, psys); } -static void pointdensity_cache_object(Render *re, PointDensity *pd, Object *ob) +static void pointdensity_cache_object(Scene *scene, PointDensity *pd, Object *ob) { int i; DerivedMesh *dm; MVert *mvert = NULL; - - dm = mesh_create_derived_render(re->scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL); - mvert= dm->getVertArray(dm); /* local object space */ - - pd->totpoints= dm->getNumVerts(dm); - if (pd->totpoints == 0) return; + + dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH | CD_MASK_MTFACE | CD_MASK_MCOL); + mvert = dm->getVertArray(dm); /* local object space */ + + pd->totpoints = dm->getNumVerts(dm); + if (pd->totpoints == 0) { + return; + } pd->point_tree = BLI_bvhtree_new(pd->totpoints, 0.0, 4, 6); - - for (i=0; i < pd->totpoints; i++, mvert++) { + + for (i = 0; i < pd->totpoints; i++, mvert++) { float co[3]; - + copy_v3_v3(co, mvert->co); switch (pd->ob_cache_space) { @@ -255,47 +275,60 @@ static void pointdensity_cache_object(Render *re, PointDensity *pd, Object *ob) BLI_bvhtree_insert(pd->point_tree, i, co, 1); } - + BLI_bvhtree_balance(pd->point_tree); dm->release(dm); } -void cache_pointdensity(Render *re, Tex *tex) + +static void cache_pointdensity_ex(Scene *scene, + PointDensity *pd, + float viewmat[4][4], + float winmat[4][4], + int winx, int winy) { - PointDensity *pd = tex->pd; - - if (!pd) + if (pd == NULL) { return; + } if (pd->point_tree) { BLI_bvhtree_free(pd->point_tree); pd->point_tree = NULL; } - + if (pd->source == TEX_PD_PSYS) { Object *ob = pd->object; ParticleSystem *psys; - if (!ob || !pd->psys) return; + if (!ob || !pd->psys) { + return; + } - psys= BLI_findlink(&ob->particlesystem, pd->psys-1); - if (!psys) return; - - pointdensity_cache_psys(re, pd, ob, psys); + psys = BLI_findlink(&ob->particlesystem, pd->psys - 1); + if (!psys) { + return; + } + + pointdensity_cache_psys(scene, pd, ob, psys, viewmat, winmat, winx, winy); } else if (pd->source == TEX_PD_OBJECT) { Object *ob = pd->object; if (ob && ob->type == OB_MESH) - pointdensity_cache_object(re, pd, ob); + pointdensity_cache_object(scene, pd, ob); } } -static void free_pointdensity(Render *UNUSED(re), Tex *tex) +void cache_pointdensity(Render *re, PointDensity *pd) { - PointDensity *pd = tex->pd; + cache_pointdensity_ex(re->scene, pd, re->viewmat, re->winmat, re->winx, re->winy); +} + +void free_pointdensity(PointDensity *pd) +{ + if (pd == NULL) { + return; + } - if (!pd) return; - if (pd->point_tree) { BLI_bvhtree_free(pd->point_tree); pd->point_tree = NULL; @@ -308,24 +341,23 @@ static void free_pointdensity(Render *UNUSED(re), Tex *tex) pd->totpoints = 0; } - - void make_pointdensities(Render *re) { Tex *tex; - - if (re->scene->r.scemode & R_BUTS_PREVIEW) + + if (re->scene->r.scemode & R_BUTS_PREVIEW) { return; - + } + re->i.infostr = IFACE_("Caching Point Densities"); re->stats_draw(re->sdh, &re->i); - for (tex= re->main->tex.first; tex; tex= tex->id.next) { - if (tex->id.us && tex->type==TEX_POINTDENSITY) { - cache_pointdensity(re, tex); + for (tex = re->main->tex.first; tex != NULL; tex = tex->id.next) { + if (tex->id.us && tex->type == TEX_POINTDENSITY) { + cache_pointdensity(re, tex->pd); } } - + re->i.infostr = NULL; re->stats_draw(re->sdh, &re->i); } @@ -333,13 +365,13 @@ void make_pointdensities(Render *re) void free_pointdensities(Render *re) { Tex *tex; - + if (re->scene->r.scemode & R_BUTS_PREVIEW) return; - - for (tex= re->main->tex.first; tex; tex= tex->id.next) { - if (tex->id.us && tex->type==TEX_POINTDENSITY) { - free_pointdensity(re, tex); + + for (tex = re->main->tex.first; tex != NULL; tex = tex->id.next) { + if (tex->id.us && tex->type == TEX_POINTDENSITY) { + free_pointdensity(tex->pd); } } } @@ -364,20 +396,20 @@ static void accum_density(void *userdata, int index, float squared_dist) PointDensityRangeData *pdr = (PointDensityRangeData *)userdata; const float dist = (pdr->squared_radius - squared_dist) / pdr->squared_radius * 0.5f; float density = 0.0f; - + if (pdr->point_data_used & POINT_DATA_VEL) { - pdr->vec[0] += pdr->point_data[index*3 + 0]; // * density; - pdr->vec[1] += pdr->point_data[index*3 + 1]; // * density; - pdr->vec[2] += pdr->point_data[index*3 + 2]; // * density; + pdr->vec[0] += pdr->point_data[index * 3 + 0]; // * density; + pdr->vec[1] += pdr->point_data[index * 3 + 1]; // * density; + pdr->vec[2] += pdr->point_data[index * 3 + 2]; // * density; } if (pdr->point_data_used & POINT_DATA_LIFE) { *pdr->age += pdr->point_data[pdr->offset + index]; // * density; } - + if (pdr->falloff_type == TEX_PD_FALLOFF_STD) density = dist; else if (pdr->falloff_type == TEX_PD_FALLOFF_SMOOTH) - density = 3.0f*dist*dist - 2.0f*dist*dist*dist; + density = 3.0f * dist * dist - 2.0f * dist * dist * dist; else if (pdr->falloff_type == TEX_PD_FALLOFF_SOFT) density = pow(dist, pdr->softness); else if (pdr->falloff_type == TEX_PD_FALLOFF_CONSTANT) @@ -386,30 +418,30 @@ static void accum_density(void *userdata, int index, float squared_dist) density = sqrtf(dist); else if (pdr->falloff_type == TEX_PD_FALLOFF_PARTICLE_AGE) { if (pdr->point_data_used & POINT_DATA_LIFE) - density = dist*MIN2(pdr->point_data[pdr->offset + index], 1.0f); + density = dist * MIN2(pdr->point_data[pdr->offset + index], 1.0f); else density = dist; } else if (pdr->falloff_type == TEX_PD_FALLOFF_PARTICLE_VEL) { if (pdr->point_data_used & POINT_DATA_VEL) - density = dist*len_v3(pdr->point_data + index*3)*pdr->velscale; + density = dist * len_v3(pdr->point_data + index * 3) * pdr->velscale; else density = dist; } - + if (pdr->density_curve && dist != 0.0f) { curvemapping_initialize(pdr->density_curve); - density = curvemapping_evaluateF(pdr->density_curve, 0, density/dist)*dist; + density = curvemapping_evaluateF(pdr->density_curve, 0, density / dist) * dist; } - + *pdr->density += density; } -static void init_pointdensityrangedata(PointDensity *pd, PointDensityRangeData *pdr, +static void init_pointdensityrangedata(PointDensity *pd, PointDensityRangeData *pdr, float *density, float *vec, float *age, struct CurveMapping *density_curve, float velscale) { - pdr->squared_radius = pd->radius*pd->radius; + pdr->squared_radius = pd->radius * pd->radius; pdr->density = density; pdr->point_data = pd->point_data; pdr->falloff_type = pd->falloff_type; @@ -418,7 +450,7 @@ static void init_pointdensityrangedata(PointDensity *pd, PointDensityRangeData * pdr->softness = pd->falloff_softness; pdr->noise_influence = pd->noise_influence; pdr->point_data_used = point_data_used(pd); - pdr->offset = (pdr->point_data_used & POINT_DATA_VEL)?pd->totpoints*3:0; + pdr->offset = (pdr->point_data_used & POINT_DATA_VEL) ? pd->totpoints * 3 : 0; pdr->density_curve = density_curve; pdr->velscale = velscale; } @@ -429,52 +461,56 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres) int retval = TEX_INT; PointDensity *pd = tex->pd; PointDensityRangeData pdr; - float density=0.0f, age=0.0f, time=0.0f; + float density = 0.0f, age = 0.0f, time = 0.0f; float vec[3] = {0.0f, 0.0f, 0.0f}, co[3]; float col[4]; float turb, noise_fac; - int num=0; - + int num = 0; + texres->tin = 0.0f; - + if ((!pd) || (!pd->point_tree)) return 0; - - init_pointdensityrangedata(pd, &pdr, &density, vec, &age, - (pd->flag&TEX_PD_FALLOFF_CURVE ? pd->falloff_curve : NULL), pd->falloff_speed_scale*0.001f); + + init_pointdensityrangedata(pd, &pdr, &density, vec, &age, + (pd->flag & TEX_PD_FALLOFF_CURVE ? pd->falloff_curve : NULL), + pd->falloff_speed_scale * 0.001f); noise_fac = pd->noise_fac * 0.5f; /* better default */ - + copy_v3_v3(co, texvec); - + if (point_data_used(pd)) { /* does a BVH lookup to find accumulated density and additional point data * * stores particle velocity vector in 'vec', and particle lifetime in 'time' */ num = BLI_bvhtree_range_query(pd->point_tree, co, pd->radius, accum_density, &pdr); if (num > 0) { age /= num; - mul_v3_fl(vec, 1.0f/num); + mul_v3_fl(vec, 1.0f / num); } - + /* reset */ density = vec[0] = vec[1] = vec[2] = 0.0f; } - + if (pd->flag & TEX_PD_TURBULENCE) { - + if (pd->noise_influence == TEX_PD_NOISE_AGE) { - turb = BLI_gTurbulence(pd->noise_size, texvec[0]+age, texvec[1]+age, texvec[2]+age, pd->noise_depth, 0, pd->noise_basis); + turb = BLI_gTurbulence(pd->noise_size, texvec[0] + age, texvec[1] + age, texvec[2] + age, + pd->noise_depth, 0, pd->noise_basis); } else if (pd->noise_influence == TEX_PD_NOISE_TIME) { time = R.r.cfra / (float)R.r.efra; - turb = BLI_gTurbulence(pd->noise_size, texvec[0]+time, texvec[1]+time, texvec[2]+time, pd->noise_depth, 0, pd->noise_basis); + turb = BLI_gTurbulence(pd->noise_size, texvec[0] + time, texvec[1] + time, texvec[2] + time, + pd->noise_depth, 0, pd->noise_basis); //turb = BLI_turbulence(pd->noise_size, texvec[0]+time, texvec[1]+time, texvec[2]+time, pd->noise_depth); } else { - turb = BLI_gTurbulence(pd->noise_size, texvec[0]+vec[0], texvec[1]+vec[1], texvec[2]+vec[2], pd->noise_depth, 0, pd->noise_basis); + turb = BLI_gTurbulence(pd->noise_size, texvec[0] + vec[0], texvec[1] + vec[1], texvec[2] + vec[2], + pd->noise_depth, 0, pd->noise_basis); } turb -= 0.5f; /* re-center 0.0-1.0 range around 0 to prevent offsetting result */ - + /* now we have an offset coordinate to use for the density lookup */ co[0] = texvec[0] + noise_fac * turb; co[1] = texvec[1] + noise_fac * turb; @@ -485,17 +521,17 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres) num = BLI_bvhtree_range_query(pd->point_tree, co, pd->radius, accum_density, &pdr); if (num > 0) { age /= num; - mul_v3_fl(vec, 1.0f/num); + mul_v3_fl(vec, 1.0f / num); } - + texres->tin = density; BRICONT; - + if (pd->color_source == TEX_PD_COLOR_CONSTANT) return retval; - + retval |= TEX_RGB; - + switch (pd->color_source) { case TEX_PD_COLOR_PARTAGE: if (pd->coba) { @@ -510,7 +546,7 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres) case TEX_PD_COLOR_PARTSPEED: { float speed = len_v3(vec) * pd->speed_scale; - + if (pd->coba) { if (do_colorband(pd->coba, speed, col)) { texres->talpha = true; @@ -533,9 +569,9 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres) break; } BRICONTRGB; - + return retval; - + #if 0 if (texres->nor!=NULL) { texres->nor[0] = texres->nor[1] = texres->nor[2] = 0.0f; diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index 531c31848a6..dc8c714bea5 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -116,7 +116,7 @@ static void init_render_texture(Render *re, Tex *tex) if (G.is_rendering && re) { if (re->r.mode & R_ENVMAP) if (tex->env->stype==ENV_ANIM) - BKE_free_envmapdata(tex->env); + BKE_texture_envmap_free_data(tex->env); } } } @@ -3493,7 +3493,7 @@ void render_realtime_texture(ShadeInput *shi, Image *ima) if (firsttime) { for (a=0; a<BLENDER_MAX_THREADS; a++) { memset(&imatex[a], 0, sizeof(Tex)); - default_tex(&imatex[a]); + BKE_texture_default(&imatex[a]); imatex[a].type= TEX_IMAGE; } @@ -3614,7 +3614,7 @@ Material *RE_init_sample_material(Material *orig_mat, Scene *scene) } /* copy texture */ - tex= mtex->tex = localize_texture(cur_tex); + tex= mtex->tex = BKE_texture_localize(cur_tex); /* update texture anims */ BKE_animsys_evaluate_animdata(scene, &tex->id, tex->adt, BKE_scene_frame_get(scene), ADT_RECALC_ANIM); @@ -3631,7 +3631,7 @@ Material *RE_init_sample_material(Material *orig_mat, Scene *scene) unit_m4(dummy_re.viewmat); unit_m4(dummy_re.winmat); dummy_re.winx = dummy_re.winy = 128; - cache_pointdensity(&dummy_re, tex); + cache_pointdensity(&dummy_re, tex->pd); } /* update image sequences and movies */ diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 52f106a4d2a..0ccc3888b5e 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -54,7 +54,6 @@ struct wmEvent; struct wmEventHandler; struct wmGesture; struct wmJob; -struct wmNotifier; struct wmOperatorType; struct wmOperator; struct wmWidget; @@ -65,7 +64,6 @@ struct wmWidgetMapType; struct rcti; struct PointerRNA; struct PropertyRNA; -struct EnumPropertyItem; struct MenuType; struct wmDropBox; struct wmDrag; diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index b670552f982..455375a0fec 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -109,7 +109,6 @@ extern "C" { struct bContext; struct wmEvent; struct wmWindowManager; -struct uiLayout; struct wmOperator; struct ImBuf; diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index 833234b0f13..fc7c9e191b0 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -32,7 +32,6 @@ #ifndef __WM_WINDOW_H__ #define __WM_WINDOW_H__ -struct bScreen; struct wmOperator; /* *************** internal api ************** */ diff --git a/source/creator/creator.c b/source/creator/creator.c index 8a7f9499c86..5fd8bc53a42 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -1561,13 +1561,13 @@ char **environ = NULL; * or exit when running in background mode. */ int main( - int argc, + int argc, #ifdef WIN32 const char **UNUSED(argv_c) #else const char **argv #endif - ) + ) { bContext *C; SYS_SystemHandle syshandle; @@ -1577,6 +1577,14 @@ int main( #endif #ifdef WIN32 + char **argv; + int argv_num; +#endif + + /* --- end declarations --- */ + + +#ifdef WIN32 /* FMA3 support in the 2013 CRT is broken on Vista and Windows 7 RTM (fixed in SP1). Just disable it. */ # if defined(_MSC_VER) && _MSC_VER >= 1800 && defined(_M_X64) _set_FMA3_enable(0); @@ -1586,16 +1594,15 @@ int main( /* NOTE: cannot use guardedalloc malloc here, as it's not yet initialized * (it depends on the args passed in, which is what we're getting here!) */ - wchar_t **argv_16 = CommandLineToArgvW(GetCommandLineW(), &argc); - char **argv = malloc(argc * sizeof(char *)); - int argci = 0; - - for (argci = 0; argci < argc; argci++) { - argv[argci] = alloc_utf_8_from_16(argv_16[argci], 0); + { + wchar_t **argv_16 = CommandLineToArgvW(GetCommandLineW(), &argc); + argv = malloc(argc * sizeof(char *)); + for (argv_num = 0; argv_num < argc; argv_num++) { + argv[argv_num] = alloc_utf_8_from_16(argv_16[argv_num], 0); + } + LocalFree(argv_16); } - - LocalFree(argv_16); -#endif +#endif /* WIN32 */ /* NOTE: Special exception for guarded allocator type switch: * we need to perform switch from lock-free to fully @@ -1663,7 +1670,7 @@ int main( setCallbacks(); #if defined(__APPLE__) && !defined(WITH_PYTHON_MODULE) -/* patch to ignore argument finder gives us (pid?) */ + /* patch to ignore argument finder gives us (pid?) */ if (argc == 2 && STREQLEN(argv[1], "-psn_", 5)) { extern int GHOST_HACK_getFirstFile(char buf[]); static char firstfilebuf[512]; @@ -1822,8 +1829,8 @@ int main( #endif #ifdef WIN32 - while (argci) { - free(argv[--argci]); + while (argv_num) { + free(argv[--argv_num]); } free(argv); argv = NULL; diff --git a/source/gameengine/CMakeLists.txt b/source/gameengine/CMakeLists.txt index cf7895e98ea..62523175f46 100644 --- a/source/gameengine/CMakeLists.txt +++ b/source/gameengine/CMakeLists.txt @@ -23,6 +23,8 @@ # # ***** END GPL LICENSE BLOCK ***** +remove_extra_strict_flags() + # there are too many inter-includes so best define here if(WITH_PYTHON) blender_include_dirs_sys("${PYTHON_INCLUDE_DIRS}") diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index f876afd01c1..84916b45ebf 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1991,7 +1991,7 @@ PyAttributeDef KX_GameObject::Attributes[] = { KX_PYATTRIBUTE_RO_FUNCTION("scene", KX_GameObject, pyattr_get_scene), KX_PYATTRIBUTE_RO_FUNCTION("life", KX_GameObject, pyattr_get_life), KX_PYATTRIBUTE_RW_FUNCTION("mass", KX_GameObject, pyattr_get_mass, pyattr_set_mass), - KX_PYATTRIBUTE_RO_FUNCTION("isDynamicsSuspended", KX_GameObject, pyattr_get_dynamics_suspended), + KX_PYATTRIBUTE_RO_FUNCTION("isSuspendDynamics", KX_GameObject, pyattr_get_is_suspend_dynamics), KX_PYATTRIBUTE_RW_FUNCTION("linVelocityMin", KX_GameObject, pyattr_get_lin_vel_min, pyattr_set_lin_vel_min), KX_PYATTRIBUTE_RW_FUNCTION("linVelocityMax", KX_GameObject, pyattr_get_lin_vel_max, pyattr_set_lin_vel_max), KX_PYATTRIBUTE_RW_FUNCTION("visible", KX_GameObject, pyattr_get_visible, pyattr_set_visible), @@ -2405,14 +2405,14 @@ int KX_GameObject::pyattr_set_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrd return PY_SET_ATTR_SUCCESS; } -PyObject* KX_GameObject::pyattr_get_dynamics_suspended(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef) +PyObject *KX_GameObject::pyattr_get_is_suspend_dynamics(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { KX_GameObject* self = static_cast<KX_GameObject*>(self_v); // Only objects with a physics controller can be suspended if (!self->GetPhysicsController()) { - PyErr_SetString(PyExc_AttributeError, "This object has not Physics Controller"); - return NULL; + PyErr_SetString(PyExc_AttributeError, "This object has not Physics Controller"); + return NULL; } return PyBool_FromLong(self->IsDynamicsSuspended()); diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index 8f823e728de..5038feb2d68 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -1040,7 +1040,7 @@ public: static PyObject* pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); - static PyObject* pyattr_get_dynamics_suspended(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static PyObject* pyattr_get_is_suspend_dynamics(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_lin_vel_min(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); static PyObject* pyattr_get_lin_vel_max(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); |