Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-06-10 13:44:26 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-06-10 13:44:26 +0400
commitf06f1878c218653cd326fc2df6ac54bad404d94d (patch)
treeaa86205dd2f7f73389a588871316513c54756538 /source/blender
parent7bb79e777dd44d3d919a15b37d1bf4863c8d2856 (diff)
parent6e9e758d605741a2ecb8b0fbf24881a17dbe7453 (diff)
Merging r47624 through r47661 from trunk into soc-2011-tomato
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_gpencil.h1
-rw-r--r--source/blender/blenkernel/BKE_image.h2
-rw-r--r--source/blender/blenkernel/intern/constraint.c12
-rw-r--r--source/blender/blenkernel/intern/gpencil.c13
-rw-r--r--source/blender/blenkernel/intern/image.c18
-rw-r--r--source/blender/blenlib/BLI_string_cursor_utf8.h2
-rw-r--r--source/blender/bmesh/operators/bmo_mesh_conv.c2
-rw-r--r--source/blender/bmesh/operators/bmo_triangulate.c2
-rw-r--r--source/blender/bmesh/operators/bmo_utils.c2
-rw-r--r--source/blender/compositor/CMakeLists.txt420
-rw-r--r--source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp2
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp40
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.cpp3
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp30
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_FogGlowImageOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp8
-rw-r--r--source/blender/editors/gpencil/editaction_gpencil.c53
-rw-r--r--source/blender/editors/include/ED_gpencil.h22
-rw-r--r--source/blender/editors/include/ED_mask.h32
-rw-r--r--source/blender/editors/include/ED_transform.h2
-rw-r--r--source/blender/editors/mask/mask_edit.c2
-rw-r--r--source/blender/editors/mask/mask_editaction.c31
-rw-r--r--source/blender/editors/mask/mask_relationships.c2
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c17
-rw-r--r--source/blender/editors/object/object_relations.c1
-rw-r--r--source/blender/editors/space_action/action_edit.c8
-rw-r--r--source/blender/editors/space_action/action_select.c34
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_draw.c2
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_ops.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c26
-rw-r--r--source/blender/editors/space_node/drawnode.c10
-rw-r--r--source/blender/editors/transform/transform.c8
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h2
-rw-r--r--source/blender/makesrna/intern/makesrna.c4
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c1
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c13
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bokehblur.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bokehimage.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_boxmask.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_ellipsemask.c2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_switch.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_utils.c2
-rw-r--r--source/blender/python/intern/bpy_interface.c7
60 files changed, 533 insertions, 507 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 134ec1acd8e..f3223fb4af1 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -57,6 +57,7 @@ struct bGPdata *gpencil_data_duplicate(struct bGPdata *gpd);
void gpencil_frame_delete_laststroke(struct bGPDlayer *gpl, struct bGPDframe *gpf);
+struct bGPDframe *BKE_gpencil_layer_find_frame(struct bGPDlayer *gpl, int cframe);
struct bGPDframe *gpencil_layer_getframe(struct bGPDlayer *gpl, int cframe, short addnew);
void gpencil_layer_delframe(struct bGPDlayer *gpl, struct bGPDframe *gpf);
struct bGPDlayer *gpencil_layer_getactive(struct bGPdata *gpd);
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index 279ec272fe8..baa530c0599 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -157,7 +157,7 @@ void BKE_image_assign_ibuf(struct Image *ima, struct ImBuf *ibuf);
void BKE_image_user_frame_calc(struct ImageUser *iuser, int cfra, int fieldnr);
void BKE_image_user_check_frame_calc(struct ImageUser *iuser, int cfra, int fieldnr);
int BKE_image_user_frame_get(const struct ImageUser *iuser, int cfra, int fieldnr);
-void BKE_image_user_file_path(struct ImageUser *iuser, struct Image *ima, int cfra, char *path);
+void BKE_image_user_file_path(struct ImageUser *iuser, struct Image *ima, char *path);
/* sets index offset for multilayer files */
struct RenderPass *BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser);
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index afd50de8159..0150646a96c 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1460,7 +1460,7 @@ static bConstraintTypeInfo CTI_ROTLIMIT = {
rotlimit_evaluate /* evaluate */
};
-/* --------- Limit Scaling --------- */
+/* --------- Limit Scale --------- */
static void sizelimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets))
@@ -1507,7 +1507,7 @@ static void sizelimit_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *U
static bConstraintTypeInfo CTI_SIZELIMIT = {
CONSTRAINT_TYPE_SIZELIMIT, /* type */
sizeof(bSizeLimitConstraint), /* size */
- "Limit Scaling", /* name */
+ "Limit Scale", /* name */
"bSizeLimitConstraint", /* struct name */
NULL, /* free data */
NULL, /* id looper */
@@ -1721,7 +1721,7 @@ static bConstraintTypeInfo CTI_ROTLIKE = {
rotlike_evaluate /* evaluate */
};
-/* ---------- Copy Scaling ---------- */
+/* ---------- Copy Scale ---------- */
static void sizelike_new_data(void *cdata)
{
@@ -3352,7 +3352,7 @@ static void transform_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
static bConstraintTypeInfo CTI_TRANSFORM = {
CONSTRAINT_TYPE_TRANSFORM, /* type */
sizeof(bTransformConstraint), /* size */
- "Transform", /* name */
+ "Transformation", /* name */
"bTransformConstraint", /* struct name */
NULL, /* free data */
transform_id_looper, /* id looper */
@@ -4213,10 +4213,10 @@ static void constraints_init_typeinfo(void)
constraintsTypeInfo[4] = &CTI_FOLLOWPATH; /* Follow-Path Constraint */
constraintsTypeInfo[5] = &CTI_ROTLIMIT; /* Limit Rotation Constraint */
constraintsTypeInfo[6] = &CTI_LOCLIMIT; /* Limit Location Constraint */
- constraintsTypeInfo[7] = &CTI_SIZELIMIT; /* Limit Scaling Constraint */
+ constraintsTypeInfo[7] = &CTI_SIZELIMIT; /* Limit Scale Constraint */
constraintsTypeInfo[8] = &CTI_ROTLIKE; /* Copy Rotation Constraint */
constraintsTypeInfo[9] = &CTI_LOCLIKE; /* Copy Location Constraint */
- constraintsTypeInfo[10] = &CTI_SIZELIKE; /* Copy Scaling Constraint */
+ constraintsTypeInfo[10] = &CTI_SIZELIKE; /* Copy Scale Constraint */
constraintsTypeInfo[11] = &CTI_PYTHON; /* Python/Script Constraint */
constraintsTypeInfo[12] = &CTI_ACTION; /* Action Constraint */
constraintsTypeInfo[13] = &CTI_LOCKTRACK; /* Locked-Track Constraint */
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 6ec19018ab5..c317dc63ef7 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -321,6 +321,19 @@ void gpencil_frame_delete_laststroke(bGPDlayer *gpl, bGPDframe *gpf)
/* -------- GP-Layer API ---------- */
+bGPDframe *BKE_gpencil_layer_find_frame(bGPDlayer *gpl, int cframe)
+{
+ bGPDframe *gpf;
+
+ for (gpf = gpl->frames.last; gpf; gpf = gpf->prev) {
+ if (gpf->framenum == cframe) {
+ return gpf;
+ }
+ }
+
+ return NULL;
+}
+
/* get the appropriate gp-frame from a given layer
* - this sets the layer's actframe var (if allowed to)
* - extension beyond range (if first gp-frame is after all frame in interest and cannot add)
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index d733092e792..157c8782523 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2092,7 +2092,7 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
ima->tpageflag |= IMA_TPAGE_REFRESH;
ima->lastframe = frame;
- BKE_image_user_file_path(iuser, ima, frame, name);
+ BKE_image_user_file_path(iuser, ima, name);
flag = IB_rect | IB_multilayer;
if (ima->flag & IMA_DO_PREMUL)
@@ -2204,7 +2204,7 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
if (ima->anim == NULL) {
char str[FILE_MAX];
- BKE_image_user_file_path(iuser, ima, frame, str);
+ BKE_image_user_file_path(iuser, ima, str);
/* FIXME: make several stream accessible in image editor, too*/
ima->anim = openanim(str, IB_rect, 0);
@@ -2267,7 +2267,8 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
flag |= IB_premul;
/* get the right string */
- BKE_image_user_file_path(iuser, ima, cfra, str);
+ BKE_image_user_frame_calc(iuser, cfra, 0);
+ BKE_image_user_file_path(iuser, ima, str);
/* read ibuf */
ibuf = IMB_loadiffname(str, flag);
@@ -2741,21 +2742,14 @@ void BKE_image_user_check_frame_calc(ImageUser *iuser, int cfra, int fieldnr)
}
}
-void BKE_image_user_file_path(ImageUser *iuser, Image *ima, int cfra, char *filepath)
+void BKE_image_user_file_path(ImageUser *iuser, Image *ima, char *filepath)
{
BLI_strncpy(filepath, ima->name, FILE_MAX);
if (ima->source == IMA_SRC_SEQUENCE) {
char head[FILE_MAX], tail[FILE_MAX];
unsigned short numlen;
- int frame;
-
- if(iuser) {
- BKE_image_user_frame_calc(iuser, cfra, 0);
- frame = iuser->framenr;
- }
- else {
- }
+ int frame = iuser->framenr;
BLI_stringdec(filepath, head, tail, &numlen);
BLI_stringenc(filepath, head, tail, numlen, frame);
diff --git a/source/blender/blenlib/BLI_string_cursor_utf8.h b/source/blender/blenlib/BLI_string_cursor_utf8.h
index 11c91aac6ac..3c38c0380e0 100644
--- a/source/blender/blenlib/BLI_string_cursor_utf8.h
+++ b/source/blender/blenlib/BLI_string_cursor_utf8.h
@@ -26,7 +26,7 @@
#ifndef __BLI_STRING_CURSOR_UTF8_H__
#define __BLI_STRING_CURSOR_UTF8_H__
-/** \file BLI_string_utf8.h
+/** \file BLI_string_cursor_utf8.h
* \ingroup bli
*/
diff --git a/source/blender/bmesh/operators/bmo_mesh_conv.c b/source/blender/bmesh/operators/bmo_mesh_conv.c
index 4578270d571..c550a17e696 100644
--- a/source/blender/bmesh/operators/bmo_mesh_conv.c
+++ b/source/blender/bmesh/operators/bmo_mesh_conv.c
@@ -20,7 +20,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/bmesh/operators/bmesh_mesh_conv.c
+/** \file blender/bmesh/operators/bmo_mesh_conv.c
* \ingroup bmesh
*
* This file contains functions
diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c
index e53144bd597..0903620f9a0 100644
--- a/source/blender/bmesh/operators/bmo_triangulate.c
+++ b/source/blender/bmesh/operators/bmo_triangulate.c
@@ -20,7 +20,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/bmesh/operators/bmo_subdivide.c
+/** \file blender/bmesh/operators/bmo_triangulate.c
* \ingroup bmesh
*/
diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c
index 4377eb3e883..3ebc7b04aa4 100644
--- a/source/blender/bmesh/operators/bmo_utils.c
+++ b/source/blender/bmesh/operators/bmo_utils.c
@@ -20,7 +20,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/bmesh/operators/bmo_subdivide.c
+/** \file blender/bmesh/operators/bmo_utils.c
* \ingroup bmesh
*
* utility bmesh operators, e.g. transform,
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index 6fc938c192c..b9e5c7d385c 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -26,24 +26,24 @@
set(INC
.
+ intern
+ nodes
+ operations
../blenkernel
../blenlib
+ ../blenlib
+ ../blenloader
+ ../imbuf
../makesdna
- ../render/extern/include
- ../render/intern/include
../makesrna
- ../blenloader
- ../blenlib
+ ../opencl
../windowmanager
- ../imbuf
- ../../../intern/guardedalloc
- nodes
- ../nodes/
+ ../nodes
../nodes/composite
../nodes/intern
- intern
- operations
- ../opencl
+ ../render/extern/include
+ ../render/intern/include
+ ../../../intern/guardedalloc
)
set(SRC
@@ -100,7 +100,7 @@ set(SRC
operations/COM_QualityStepHelper.h
operations/COM_QualityStepHelper.cpp
-# Internal nodes
+ # Internal nodes
nodes/COM_MuteNode.cpp
nodes/COM_MuteNode.h
nodes/COM_GroupNode.cpp
@@ -108,7 +108,7 @@ set(SRC
nodes/COM_SocketProxyNode.cpp
nodes/COM_SocketProxyNode.h
-# input nodes
+ # input nodes
nodes/COM_RenderLayersNode.cpp
nodes/COM_RenderLayersNode.h
nodes/COM_ImageNode.cpp
@@ -132,7 +132,7 @@ set(SRC
nodes/COM_MaskNode.cpp
nodes/COM_MaskNode.h
-# output nodes
+ # output nodes
nodes/COM_CompositorNode.cpp
nodes/COM_CompositorNode.h
nodes/COM_ViewerNode.cpp
@@ -146,7 +146,7 @@ set(SRC
operations/COM_CalculateMeanOperation.cpp
operations/COM_CalculateMeanOperation.h
-# distort nodes
+ # distort nodes
nodes/COM_TranslateNode.cpp
nodes/COM_TranslateNode.h
nodes/COM_ScaleNode.cpp
@@ -193,27 +193,27 @@ set(SRC
nodes/COM_DefocusNode.cpp
nodes/COM_DefocusNode.h
-# color nodes
- nodes/COM_VectorCurveNode.cpp
- nodes/COM_VectorCurveNode.h
- nodes/COM_ColorCurveNode.cpp
- nodes/COM_ColorCurveNode.h
- nodes/COM_ColorToBWNode.cpp
- nodes/COM_ColorToBWNode.h
- nodes/COM_ColorRampNode.cpp
- nodes/COM_ColorRampNode.h
- nodes/COM_MixNode.cpp
- nodes/COM_MixNode.h
- nodes/COM_AlphaOverNode.cpp
- nodes/COM_AlphaOverNode.h
- nodes/COM_ZCombineNode.cpp
- nodes/COM_ZCombineNode.h
- nodes/COM_BrightnessNode.cpp
- nodes/COM_BrightnessNode.h
- nodes/COM_ColorBalanceNode.cpp
- nodes/COM_ColorBalanceNode.h
- nodes/COM_InvertNode.cpp
- nodes/COM_InvertNode.h
+ # color nodes
+ nodes/COM_VectorCurveNode.cpp
+ nodes/COM_VectorCurveNode.h
+ nodes/COM_ColorCurveNode.cpp
+ nodes/COM_ColorCurveNode.h
+ nodes/COM_ColorToBWNode.cpp
+ nodes/COM_ColorToBWNode.h
+ nodes/COM_ColorRampNode.cpp
+ nodes/COM_ColorRampNode.h
+ nodes/COM_MixNode.cpp
+ nodes/COM_MixNode.h
+ nodes/COM_AlphaOverNode.cpp
+ nodes/COM_AlphaOverNode.h
+ nodes/COM_ZCombineNode.cpp
+ nodes/COM_ZCombineNode.h
+ nodes/COM_BrightnessNode.cpp
+ nodes/COM_BrightnessNode.h
+ nodes/COM_ColorBalanceNode.cpp
+ nodes/COM_ColorBalanceNode.h
+ nodes/COM_InvertNode.cpp
+ nodes/COM_InvertNode.h
nodes/COM_GammaNode.cpp
nodes/COM_GammaNode.h
nodes/COM_SetAlphaNode.cpp
@@ -233,25 +233,25 @@ set(SRC
operations/COM_TonemapOperation.cpp
operations/COM_TonemapOperation.h
-# converter nodes
- nodes/COM_IDMaskNode.cpp
- nodes/COM_IDMaskNode.h
- nodes/COM_SeparateRGBANode.cpp
- nodes/COM_SeparateRGBANode.h
- nodes/COM_CombineRGBANode.cpp
- nodes/COM_CombineRGBANode.h
- nodes/COM_SeparateHSVANode.cpp
- nodes/COM_SeparateHSVANode.h
- nodes/COM_CombineHSVANode.cpp
- nodes/COM_CombineHSVANode.h
- nodes/COM_SeparateYUVANode.cpp
- nodes/COM_SeparateYUVANode.h
- nodes/COM_CombineYUVANode.cpp
- nodes/COM_CombineYUVANode.h
- nodes/COM_SeparateYCCANode.cpp
- nodes/COM_SeparateYCCANode.h
- nodes/COM_CombineYCCANode.cpp
- nodes/COM_CombineYCCANode.h
+ # converter nodes
+ nodes/COM_IDMaskNode.cpp
+ nodes/COM_IDMaskNode.h
+ nodes/COM_SeparateRGBANode.cpp
+ nodes/COM_SeparateRGBANode.h
+ nodes/COM_CombineRGBANode.cpp
+ nodes/COM_CombineRGBANode.h
+ nodes/COM_SeparateHSVANode.cpp
+ nodes/COM_SeparateHSVANode.h
+ nodes/COM_CombineHSVANode.cpp
+ nodes/COM_CombineHSVANode.h
+ nodes/COM_SeparateYUVANode.cpp
+ nodes/COM_SeparateYUVANode.h
+ nodes/COM_CombineYUVANode.cpp
+ nodes/COM_CombineYUVANode.h
+ nodes/COM_SeparateYCCANode.cpp
+ nodes/COM_SeparateYCCANode.h
+ nodes/COM_CombineYCCANode.cpp
+ nodes/COM_CombineYCCANode.h
nodes/COM_NormalNode.cpp
nodes/COM_NormalNode.h
@@ -265,7 +265,7 @@ set(SRC
operations/COM_NormalizeOperation.cpp
operations/COM_NormalizeOperation.h
-# Filter nodes
+ # Filter nodes
nodes/COM_BilateralBlurNode.cpp
nodes/COM_BilateralBlurNode.h
operations/COM_BilateralBlurOperation.cpp
@@ -275,12 +275,10 @@ set(SRC
operations/COM_VectorBlurOperation.cpp
operations/COM_VectorBlurOperation.h
-
-
- nodes/COM_FilterNode.cpp
- nodes/COM_FilterNode.h
- nodes/COM_DilateErodeNode.cpp
- nodes/COM_DilateErodeNode.h
+ nodes/COM_FilterNode.cpp
+ nodes/COM_FilterNode.h
+ nodes/COM_DilateErodeNode.cpp
+ nodes/COM_DilateErodeNode.h
nodes/COM_BlurNode.cpp
nodes/COM_BlurNode.h
nodes/COM_BokehBlurNode.cpp
@@ -310,7 +308,7 @@ set(SRC
operations/COM_GammaCorrectOperation.h
operations/COM_GammaCorrectOperation.cpp
-# Matte nodes
+ # Matte nodes
nodes/COM_BoxMaskNode.cpp
nodes/COM_BoxMaskNode.h
nodes/COM_EllipseMaskNode.cpp
@@ -323,6 +321,7 @@ set(SRC
operations/COM_DoubleEdgeMaskOperation.cpp
operations/COM_DoubleEdgeMaskOperation.h
+
nodes/COM_KeyingNode.cpp
nodes/COM_KeyingNode.h
nodes/COM_KeyingScreenNode.cpp
@@ -336,50 +335,50 @@ set(SRC
operations/COM_KeyingClipOperation.cpp
operations/COM_KeyingClipOperation.h
-operations/COM_ColorSpillOperation.cpp
-operations/COM_ColorSpillOperation.h
- operations/COM_RenderLayersBaseProg.cpp
- operations/COM_RenderLayersBaseProg.h
- operations/COM_RenderLayersImageProg.cpp
- operations/COM_RenderLayersImageProg.h
- operations/COM_RenderLayersAlphaProg.cpp
- operations/COM_RenderLayersAlphaProg.h
- operations/COM_RenderLayersDepthProg.cpp
- operations/COM_RenderLayersDepthProg.h
- operations/COM_RenderLayersNormalOperation.cpp
- operations/COM_RenderLayersNormalOperation.h
- operations/COM_RenderLayersSpeedOperation.cpp
- operations/COM_RenderLayersSpeedOperation.h
- operations/COM_RenderLayersColorOperation.cpp
- operations/COM_RenderLayersColorOperation.h
- operations/COM_RenderLayersUVOperation.cpp
- operations/COM_RenderLayersUVOperation.h
- operations/COM_RenderLayersMistOperation.cpp
- operations/COM_RenderLayersMistOperation.h
- operations/COM_RenderLayersObjectIndexOperation.cpp
- operations/COM_RenderLayersObjectIndexOperation.h
- operations/COM_RenderLayersMaterialIndexOperation.cpp
- operations/COM_RenderLayersMaterialIndexOperation.h
- operations/COM_RenderLayersDiffuseOperation.cpp
- operations/COM_RenderLayersDiffuseOperation.h
- operations/COM_RenderLayersSpecularOperation.cpp
- operations/COM_RenderLayersSpecularOperation.h
- operations/COM_RenderLayersShadowOperation.cpp
- operations/COM_RenderLayersShadowOperation.h
- operations/COM_RenderLayersAOOperation.cpp
- operations/COM_RenderLayersAOOperation.h
- operations/COM_RenderLayersEmitOperation.cpp
- operations/COM_RenderLayersEmitOperation.h
- operations/COM_RenderLayersReflectionOperation.cpp
- operations/COM_RenderLayersReflectionOperation.h
- operations/COM_RenderLayersRefractionOperation.cpp
- operations/COM_RenderLayersRefractionOperation.h
- operations/COM_RenderLayersEnvironmentOperation.cpp
- operations/COM_RenderLayersEnvironmentOperation.h
- operations/COM_RenderLayersIndirectOperation.cpp
- operations/COM_RenderLayersIndirectOperation.h
- operations/COM_RenderLayersCyclesOperation.cpp
- operations/COM_RenderLayersCyclesOperation.h
+ operations/COM_ColorSpillOperation.cpp
+ operations/COM_ColorSpillOperation.h
+ operations/COM_RenderLayersBaseProg.cpp
+ operations/COM_RenderLayersBaseProg.h
+ operations/COM_RenderLayersImageProg.cpp
+ operations/COM_RenderLayersImageProg.h
+ operations/COM_RenderLayersAlphaProg.cpp
+ operations/COM_RenderLayersAlphaProg.h
+ operations/COM_RenderLayersDepthProg.cpp
+ operations/COM_RenderLayersDepthProg.h
+ operations/COM_RenderLayersNormalOperation.cpp
+ operations/COM_RenderLayersNormalOperation.h
+ operations/COM_RenderLayersSpeedOperation.cpp
+ operations/COM_RenderLayersSpeedOperation.h
+ operations/COM_RenderLayersColorOperation.cpp
+ operations/COM_RenderLayersColorOperation.h
+ operations/COM_RenderLayersUVOperation.cpp
+ operations/COM_RenderLayersUVOperation.h
+ operations/COM_RenderLayersMistOperation.cpp
+ operations/COM_RenderLayersMistOperation.h
+ operations/COM_RenderLayersObjectIndexOperation.cpp
+ operations/COM_RenderLayersObjectIndexOperation.h
+ operations/COM_RenderLayersMaterialIndexOperation.cpp
+ operations/COM_RenderLayersMaterialIndexOperation.h
+ operations/COM_RenderLayersDiffuseOperation.cpp
+ operations/COM_RenderLayersDiffuseOperation.h
+ operations/COM_RenderLayersSpecularOperation.cpp
+ operations/COM_RenderLayersSpecularOperation.h
+ operations/COM_RenderLayersShadowOperation.cpp
+ operations/COM_RenderLayersShadowOperation.h
+ operations/COM_RenderLayersAOOperation.cpp
+ operations/COM_RenderLayersAOOperation.h
+ operations/COM_RenderLayersEmitOperation.cpp
+ operations/COM_RenderLayersEmitOperation.h
+ operations/COM_RenderLayersReflectionOperation.cpp
+ operations/COM_RenderLayersReflectionOperation.h
+ operations/COM_RenderLayersRefractionOperation.cpp
+ operations/COM_RenderLayersRefractionOperation.h
+ operations/COM_RenderLayersEnvironmentOperation.cpp
+ operations/COM_RenderLayersEnvironmentOperation.h
+ operations/COM_RenderLayersIndirectOperation.cpp
+ operations/COM_RenderLayersIndirectOperation.h
+ operations/COM_RenderLayersCyclesOperation.cpp
+ operations/COM_RenderLayersCyclesOperation.h
operations/COM_ImageOperation.cpp
operations/COM_ImageOperation.h
@@ -391,39 +390,39 @@ operations/COM_ColorSpillOperation.h
operations/COM_BokehImageOperation.h
- operations/COM_SocketProxyOperation.h
- operations/COM_SocketProxyOperation.cpp
+ operations/COM_SocketProxyOperation.h
+ operations/COM_SocketProxyOperation.cpp
- operations/COM_CompositorOperation.h
- operations/COM_CompositorOperation.cpp
+ operations/COM_CompositorOperation.h
+ operations/COM_CompositorOperation.cpp
operations/COM_OutputFileOperation.h
operations/COM_OutputFileOperation.cpp
- operations/COM_ViewerBaseOperation.h
- operations/COM_ViewerBaseOperation.cpp
- operations/COM_ViewerOperation.h
- operations/COM_ViewerOperation.cpp
- operations/COM_PreviewOperation.h
- operations/COM_PreviewOperation.cpp
- operations/COM_SplitViewerOperation.h
- operations/COM_SplitViewerOperation.cpp
- operations/COM_ConvertValueToColourProg.h
- operations/COM_ConvertValueToColourProg.cpp
- operations/COM_ConvertColourToValueProg.h
- operations/COM_ConvertColourToValueProg.cpp
- operations/COM_ConvertColorToBWOperation.h
- operations/COM_ConvertColorToBWOperation.cpp
- operations/COM_ConvertColorToVectorOperation.h
- operations/COM_ConvertColorToVectorOperation.cpp
- operations/COM_ConvertValueToVectorOperation.h
- operations/COM_ConvertValueToVectorOperation.cpp
- operations/COM_ConvertVectorToColorOperation.h
- operations/COM_ConvertVectorToColorOperation.cpp
- operations/COM_ConvertVectorToValueOperation.h
- operations/COM_ConvertVectorToValueOperation.cpp
-operations/COM_ConvertDepthToRadiusOperation.h
-operations/COM_ConvertDepthToRadiusOperation.cpp
- operations/COM_ZCombineOperation.cpp
- operations/COM_ZCombineOperation.h
+ operations/COM_ViewerBaseOperation.h
+ operations/COM_ViewerBaseOperation.cpp
+ operations/COM_ViewerOperation.h
+ operations/COM_ViewerOperation.cpp
+ operations/COM_PreviewOperation.h
+ operations/COM_PreviewOperation.cpp
+ operations/COM_SplitViewerOperation.h
+ operations/COM_SplitViewerOperation.cpp
+ operations/COM_ConvertValueToColourProg.h
+ operations/COM_ConvertValueToColourProg.cpp
+ operations/COM_ConvertColourToValueProg.h
+ operations/COM_ConvertColourToValueProg.cpp
+ operations/COM_ConvertColorToBWOperation.h
+ operations/COM_ConvertColorToBWOperation.cpp
+ operations/COM_ConvertColorToVectorOperation.h
+ operations/COM_ConvertColorToVectorOperation.cpp
+ operations/COM_ConvertValueToVectorOperation.h
+ operations/COM_ConvertValueToVectorOperation.cpp
+ operations/COM_ConvertVectorToColorOperation.h
+ operations/COM_ConvertVectorToColorOperation.cpp
+ operations/COM_ConvertVectorToValueOperation.h
+ operations/COM_ConvertVectorToValueOperation.cpp
+ operations/COM_ConvertDepthToRadiusOperation.h
+ operations/COM_ConvertDepthToRadiusOperation.cpp
+ operations/COM_ZCombineOperation.cpp
+ operations/COM_ZCombineOperation.h
operations/COM_ConvertRGBToYCCOperation.h
operations/COM_ConvertRGBToYCCOperation.cpp
@@ -484,86 +483,86 @@ operations/COM_ConvertDepthToRadiusOperation.cpp
operations/COM_GammaOperation.h
operations/COM_ColorCorrectionOperation.cpp
operations/COM_ColorCorrectionOperation.h
- operations/COM_SetValueOperation.h
- operations/COM_SetValueOperation.cpp
- operations/COM_SetColorOperation.h
- operations/COM_SetColorOperation.cpp
- operations/COM_SetVectorOperation.h
- operations/COM_SetVectorOperation.cpp
-
- operations/COM_MixBurnOperation.h
- operations/COM_MixBurnOperation.cpp
- operations/COM_MixColorOperation.h
- operations/COM_MixColorOperation.cpp
- operations/COM_MixDarkenOperation.h
- operations/COM_MixDarkenOperation.cpp
- operations/COM_MixDodgeOperation.h
- operations/COM_MixDodgeOperation.cpp
- operations/COM_MixDifferenceOperation.h
- operations/COM_MixDifferenceOperation.cpp
- operations/COM_MixDivideOperation.h
- operations/COM_MixDivideOperation.cpp
- operations/COM_MixHueOperation.h
- operations/COM_MixHueOperation.cpp
- operations/COM_MixLightenOperation.h
- operations/COM_MixLightenOperation.cpp
- operations/COM_MixLinearLightOperation.h
- operations/COM_MixLinearLightOperation.cpp
- operations/COM_MixOverlayOperation.h
- operations/COM_MixOverlayOperation.cpp
- operations/COM_MixSaturationOperation.h
- operations/COM_MixSaturationOperation.cpp
- operations/COM_MixScreenOperation.h
- operations/COM_MixScreenOperation.cpp
- operations/COM_MixSoftLightOperation.h
- operations/COM_MixSoftLightOperation.cpp
- operations/COM_MixValueOperation.h
- operations/COM_MixValueOperation.cpp
- operations/COM_MixSubtractOperation.h
- operations/COM_MixSubtractOperation.cpp
+ operations/COM_SetValueOperation.h
+ operations/COM_SetValueOperation.cpp
+ operations/COM_SetColorOperation.h
+ operations/COM_SetColorOperation.cpp
+ operations/COM_SetVectorOperation.h
+ operations/COM_SetVectorOperation.cpp
+
+ operations/COM_MixBurnOperation.h
+ operations/COM_MixBurnOperation.cpp
+ operations/COM_MixColorOperation.h
+ operations/COM_MixColorOperation.cpp
+ operations/COM_MixDarkenOperation.h
+ operations/COM_MixDarkenOperation.cpp
+ operations/COM_MixDodgeOperation.h
+ operations/COM_MixDodgeOperation.cpp
+ operations/COM_MixDifferenceOperation.h
+ operations/COM_MixDifferenceOperation.cpp
+ operations/COM_MixDivideOperation.h
+ operations/COM_MixDivideOperation.cpp
+ operations/COM_MixHueOperation.h
+ operations/COM_MixHueOperation.cpp
+ operations/COM_MixLightenOperation.h
+ operations/COM_MixLightenOperation.cpp
+ operations/COM_MixLinearLightOperation.h
+ operations/COM_MixLinearLightOperation.cpp
+ operations/COM_MixOverlayOperation.h
+ operations/COM_MixOverlayOperation.cpp
+ operations/COM_MixSaturationOperation.h
+ operations/COM_MixSaturationOperation.cpp
+ operations/COM_MixScreenOperation.h
+ operations/COM_MixScreenOperation.cpp
+ operations/COM_MixSoftLightOperation.h
+ operations/COM_MixSoftLightOperation.cpp
+ operations/COM_MixValueOperation.h
+ operations/COM_MixValueOperation.cpp
+ operations/COM_MixSubtractOperation.h
+ operations/COM_MixSubtractOperation.cpp
operations/COM_MathBaseOperation.h
operations/COM_MathBaseOperation.cpp
- operations/COM_AlphaOverMixedOperation.h
- operations/COM_AlphaOverMixedOperation.cpp
- operations/COM_AlphaOverPremultiplyOperation.h
- operations/COM_AlphaOverPremultiplyOperation.cpp
- operations/COM_AlphaOverKeyOperation.h
- operations/COM_AlphaOverKeyOperation.cpp
-
- operations/COM_ColorBalanceLGGOperation.h
- operations/COM_ColorBalanceLGGOperation.cpp
- operations/COM_ColorBalanceASCCDLOperation.h
- operations/COM_ColorBalanceASCCDLOperation.cpp
- operations/COM_InvertOperation.cpp
- operations/COM_InvertOperation.h
+ operations/COM_AlphaOverMixedOperation.h
+ operations/COM_AlphaOverMixedOperation.cpp
+ operations/COM_AlphaOverPremultiplyOperation.h
+ operations/COM_AlphaOverPremultiplyOperation.cpp
+ operations/COM_AlphaOverKeyOperation.h
+ operations/COM_AlphaOverKeyOperation.cpp
+
+ operations/COM_ColorBalanceLGGOperation.h
+ operations/COM_ColorBalanceLGGOperation.cpp
+ operations/COM_ColorBalanceASCCDLOperation.h
+ operations/COM_ColorBalanceASCCDLOperation.cpp
+ operations/COM_InvertOperation.cpp
+ operations/COM_InvertOperation.h
operations/COM_SetAlphaOperation.cpp
operations/COM_SetAlphaOperation.h
operations/COM_MapValueOperation.cpp
operations/COM_MapValueOperation.h
-# Distort operation
- operations/COM_TranslateOperation.h
- operations/COM_TranslateOperation.cpp
- operations/COM_RotateOperation.h
- operations/COM_RotateOperation.cpp
- operations/COM_ScaleOperation.h
- operations/COM_ScaleOperation.cpp
- operations/COM_MapUVOperation.h
- operations/COM_MapUVOperation.cpp
- operations/COM_DisplaceOperation.h
- operations/COM_DisplaceOperation.cpp
- operations/COM_DisplaceSimpleOperation.h
- operations/COM_DisplaceSimpleOperation.cpp
- operations/COM_FlipOperation.h
- operations/COM_FlipOperation.cpp
- operations/COM_ProjectorLensDistortionOperation.cpp
- operations/COM_ProjectorLensDistortionOperation.h
- operations/COM_ScreenLensDistortionOperation.cpp
- operations/COM_ScreenLensDistortionOperation.h
-
-#Filter operations
+ # Distort operation
+ operations/COM_TranslateOperation.h
+ operations/COM_TranslateOperation.cpp
+ operations/COM_RotateOperation.h
+ operations/COM_RotateOperation.cpp
+ operations/COM_ScaleOperation.h
+ operations/COM_ScaleOperation.cpp
+ operations/COM_MapUVOperation.h
+ operations/COM_MapUVOperation.cpp
+ operations/COM_DisplaceOperation.h
+ operations/COM_DisplaceOperation.cpp
+ operations/COM_DisplaceSimpleOperation.h
+ operations/COM_DisplaceSimpleOperation.cpp
+ operations/COM_FlipOperation.h
+ operations/COM_FlipOperation.cpp
+ operations/COM_ProjectorLensDistortionOperation.cpp
+ operations/COM_ProjectorLensDistortionOperation.h
+ operations/COM_ScreenLensDistortionOperation.cpp
+ operations/COM_ScreenLensDistortionOperation.h
+
+ #Filter operations
operations/COM_ConvolutionFilterOperation.h
operations/COM_ConvolutionFilterOperation.cpp
operations/COM_ConvolutionEdgeFilterOperation.h
@@ -586,7 +585,7 @@ operations/COM_ConvertDepthToRadiusOperation.cpp
operations/COM_SetSamplerOperation.h
-#Convert operations
+ #Convert operations
operations/COM_IDMaskOperation.cpp
operations/COM_IDMaskOperation.h
@@ -597,7 +596,8 @@ operations/COM_ConvertDepthToRadiusOperation.cpp
operations/COM_DotproductOperation.cpp
operations/COM_DotproductOperation.h
-# Matte operation
+
+ # Matte operation
operations/COM_BoxMaskOperation.h
operations/COM_BoxMaskOperation.cpp
operations/COM_EllipseMaskOperation.h
diff --git a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
index 94110f0bcfe..0ab08ec5810 100644
--- a/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
+++ b/source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
@@ -35,6 +35,6 @@ double ChunkOrderHotspot::determineDistance(int x, int y)
int dx = x-this->x;
int dy = y-this->y;
double result = sqrt((double)(dx*dx+dy*dy));
- result += this->addition;
+ result += (double)this->addition;
return result;
}
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index 37d79607d12..3ebf8398c02 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -150,8 +150,8 @@ void MemoryBuffer::readCubic(float result[4], float x, float y)
float valuex = x - x1;
float valuey = y - y1;
- float mvaluex = 1.0 - valuex;
- float mvaluey = 1.0 - valuey;
+ float mvaluex = 1.0f - valuex;
+ float mvaluey = 1.0f - valuey;
float color1[4];
float color2[4];
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index c48f3b0a291..71a87dce2a7 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -121,9 +121,9 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
bufferindex +=offsetadd;
}
}
- color[0] = tempColor[0]*(1.0/overallmultiplyerr);
- color[1] = tempColor[1]*(1.0/overallmultiplyerg);
- color[2] = tempColor[2]*(1.0/overallmultiplyerb);
+ color[0] = tempColor[0] * (1.0f / overallmultiplyerr);
+ color[1] = tempColor[1] * (1.0f / overallmultiplyerg);
+ color[2] = tempColor[2] * (1.0f / overallmultiplyerb);
color[3] = 1.0f;
}
else {
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index 0279b9a5bdf..a0297b12961 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -34,25 +34,25 @@ void BokehImageOperation::initExecution()
this->centerY = getHeight() / 2;
this->center[0] = this->centerX;
this->center[1] = this->centerY;
- this->inverseRounding = 1.0-this->data->rounding;
+ this->inverseRounding = 1.0f - this->data->rounding;
this->circularDistance = getWidth()/2;
- this->flapRad = (M_PI*2)/this->data->flaps;
- this->flapRadAdd = (this->data->angle/360.0)*M_PI*2;
- while (this->flapRadAdd<0.0f) {
- this->flapRadAdd+=M_PI*2;
+ this->flapRad = (float)(M_PI * 2) / this->data->flaps;
+ this->flapRadAdd = (this->data->angle / 360.0f) * (float)(M_PI * 2.0);
+ while (this->flapRadAdd < 0.0f) {
+ this->flapRadAdd += (float)(M_PI * 2.0);
}
- while (this->flapRadAdd>M_PI) {
- this->flapRadAdd-=M_PI*2;
+ while (this->flapRadAdd > (float)M_PI) {
+ this->flapRadAdd -= (float)(M_PI * 2.0);
}
}
void BokehImageOperation::detemineStartPointOfFlap(float r[2], int flapNumber, float distance)
{
- r[0] = sin(flapRad*flapNumber + flapRadAdd)*distance+centerX;
- r[1] = cos(flapRad*flapNumber + flapRadAdd)*distance+centerY;
+ r[0] = sinf(flapRad * flapNumber + flapRadAdd) * distance + centerX;
+ r[1] = cosf(flapRad * flapNumber + flapRadAdd) * distance + centerY;
}
float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
{
- float insideBokeh = 0.0;
+ float insideBokeh = 0.0f;
const float deltaX = x - centerX;
const float deltaY = y - centerY;
float closestPoint[2];
@@ -63,7 +63,7 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
point[1] = y;
const float distanceToCenter = len_v2v2(point, center);
- const float bearing = (atan2f(deltaX, deltaY) + (M_PI*2));
+ const float bearing = (atan2f(deltaX, deltaY) + (float)(M_PI * 2.0));
int flapNumber = (int)((bearing-flapRadAdd)/flapRad);
detemineStartPointOfFlap(lineP1, flapNumber, distance);
@@ -73,16 +73,16 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
const float distanceLineToCenter = len_v2v2(center, closestPoint);
const float distanceRoundingToCenter = inverseRounding*distanceLineToCenter+this->data->rounding*distance;
- const float catadioptricDistanceToCenter = distanceRoundingToCenter*this->data->catadioptric;
- if (distanceRoundingToCenter>=distanceToCenter && catadioptricDistanceToCenter<=distanceToCenter) {
- if (distanceRoundingToCenter-distanceToCenter<1.0) {
+ const float catadioptricDistanceToCenter = distanceRoundingToCenter * this->data->catadioptric;
+ if (distanceRoundingToCenter>=distanceToCenter && catadioptricDistanceToCenter <= distanceToCenter) {
+ if (distanceRoundingToCenter - distanceToCenter < 1.0f) {
insideBokeh = (distanceRoundingToCenter-distanceToCenter);
}
- else if (this->data->catadioptric != 0.0 && distanceToCenter-catadioptricDistanceToCenter<1.0) {
- insideBokeh = (distanceToCenter-catadioptricDistanceToCenter);
+ else if (this->data->catadioptric != 0.0f && distanceToCenter - catadioptricDistanceToCenter < 1.0f) {
+ insideBokeh = (distanceToCenter - catadioptricDistanceToCenter);
}
else {
- insideBokeh = 1.0;
+ insideBokeh = 1.0f;
}
}
return insideBokeh;
@@ -90,11 +90,11 @@ float BokehImageOperation::isInsideBokeh(float distance, float x, float y)
void BokehImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
float shift = this->data->lensshift;
- float shift2 = shift/2.0f;
+ float shift2 = shift / 2.0f;
float distance = this->circularDistance;
float insideBokehMax = isInsideBokeh(distance, x, y);
- float insideBokehMed = isInsideBokeh(distance-fabs(shift2*distance), x, y);
- float insideBokehMin = isInsideBokeh(distance-fabs(shift*distance), x, y);
+ float insideBokehMed = isInsideBokeh(distance - fabsf(shift2 * distance), x, y);
+ float insideBokehMin = isInsideBokeh(distance - fabsf(shift * distance), x, y);
if (shift<0) {
color[0] = insideBokehMax;
color[1] = insideBokehMed;
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
index 0244be4cad3..ae83115ff69 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -38,7 +38,7 @@ void BoxMaskOperation::initExecution()
{
this->inputMask = this->getInputSocketReader(0);
this->inputValue = this->getInputSocketReader(1);
- const double rad = DEG2RAD(this->data->rotation);
+ const double rad = DEG2RAD((double)this->data->rotation);
this->cosine = cos(rad);
this->sine = sin(rad);
this->aspectRatio = ((float)this->getWidth())/this->getHeight();
@@ -60,12 +60,12 @@ void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler
this->inputMask->read(inputMask, x, y, sampler, inputBuffers);
this->inputValue->read(inputValue, x, y, sampler, inputBuffers);
- float halfHeight = (this->data->height)/2.0f;
- float halfWidth = this->data->width/2.0f;
- bool inside = rx > this->data->x-halfWidth
- && rx < this->data->x+halfWidth
- && ry > this->data->y-halfHeight
- && ry < this->data->y+halfHeight;
+ float halfHeight = this->data->height / 2.0f;
+ float halfWidth = this->data->width / 2.0f;
+ bool inside = (rx > this->data->x - halfWidth &&
+ rx < this->data->x + halfWidth &&
+ ry > this->data->y - halfHeight &&
+ ry < this->data->y + halfHeight);
switch (this->maskType) {
case CMP_NODE_MASKTYPE_ADD:
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
index 9b7f87e38bc..f949b0a55fa 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
@@ -46,7 +46,8 @@ void ChangeHSVOperation::executePixel(float *outputValue, float x, float y, Pixe
inputOperation->read(inputColor1, x, y, sampler, inputBuffers);
outputValue[0] = inputColor1[0] + (this->hue - 0.5f);
- if (outputValue[0]>1.0f) outputValue[0]-=1.0; else if (outputValue[0]<0.0) outputValue[0]+= 1.0;
+ if (outputValue[0] > 1.0f) outputValue[0] -= 1.0f;
+ else if (outputValue[0] < 0.0f) outputValue[0] += 1.0f;
outputValue[1] = inputColor1[1] * this->saturation;
outputValue[2] = inputColor1[2] * this->value;
outputValue[3] = inputColor1[3];
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
index cc535cd95df..6fe6bde7c09 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
@@ -28,7 +28,7 @@ inline float colorbalance_cdl(float in, float offset, float power, float slope)
float x = in * slope + offset;
/* prevent NaN */
- CLAMP(x, 0.0, 1.0);
+ CLAMP(x, 0.0f, 1.0f);
return powf(x, power);
}
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
index af28b776892..82a71f6a7a8 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
@@ -62,21 +62,21 @@ void ColorCorrectionOperation::executePixel(float *output, float x, float y, Pix
float levelShadows = 0.0;
float levelMidtones = 0.0;
float levelHighlights = 0.0;
-#define MARGIN 0.10
-#define MARGIN_DIV (0.5/MARGIN)
- if (level < this->data->startmidtones-MARGIN) {
+#define MARGIN 0.10f
+#define MARGIN_DIV (0.5f / MARGIN)
+ if (level < this->data->startmidtones - MARGIN) {
levelShadows = 1.0f;
}
- else if (level < this->data->startmidtones+MARGIN) {
- levelMidtones = ((level-this->data->startmidtones)*MARGIN_DIV)+0.5;
- levelShadows = 1.0 - levelMidtones;
+ else if (level < this->data->startmidtones + MARGIN) {
+ levelMidtones = ((level - this->data->startmidtones) * MARGIN_DIV) + 0.5f;
+ levelShadows = 1.0f - levelMidtones;
}
- else if (level < this->data->endmidtones-MARGIN) {
+ else if (level < this->data->endmidtones - MARGIN) {
levelMidtones = 1.0f;
}
- else if (level < this->data->endmidtones+MARGIN) {
- levelHighlights = ((level-this->data->endmidtones)*MARGIN_DIV)+0.5;
- levelMidtones = 1.0 - levelHighlights;
+ else if (level < this->data->endmidtones + MARGIN) {
+ levelHighlights = ((level - this->data->endmidtones) * MARGIN_DIV) + 0.5f;
+ levelMidtones = 1.0f - levelHighlights;
}
else {
levelHighlights = 1.0f;
@@ -93,15 +93,15 @@ void ColorCorrectionOperation::executePixel(float *output, float x, float y, Pix
g = inputImageColor[1];
b = inputImageColor[2];
- float invgamma = 1.0f/gamma;
- float luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;
+ float invgamma = 1.0f / gamma;
+ float luma = 0.2126f * r + 0.7152f * g + 0.0722f * b;
r = (luma + saturation * (r - luma));
g = (luma + saturation * (g - luma));
b = (luma + saturation * (b - luma));
- r = 0.5+((r-0.5)*contrast);
- g = 0.5+((g-0.5)*contrast);
- b = 0.5+((b-0.5)*contrast);
+ r = 0.5f + ((r - 0.5f) * contrast);
+ g = 0.5f + ((g - 0.5f) * contrast);
+ b = 0.5f + ((b - 0.5f) * contrast);
r = powf(r*gain+lift, invgamma);
g = powf(g*gain+lift, invgamma);
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
index 069bbde5e73..a38012271f1 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
@@ -76,19 +76,19 @@ void ColorCurveOperation::executePixel(float *color, float x, float y, PixelSamp
this->inputFacProgram->read(fac, x, y, sampler, inputBuffers);
this->inputImageProgram->read(image, x, y, sampler, inputBuffers);
- if (fac[0] >= 1.0)
+ if (*fac >= 1.0f)
curvemapping_evaluate_premulRGBF(workingCopy, color, image);
- else if (*fac<=0.0) {
+ else if (*fac <= 0.0f) {
color[0] = image[0];
color[1] = image[1];
color[2] = image[2];
}
else {
- float col[4], mfac = 1.0f-*fac;
+ float col[4], mfac = 1.0f - *fac;
curvemapping_evaluate_premulRGBF(workingCopy, col, image);
- color[0] = mfac*image[0] + *fac*col[0];
- color[1] = mfac*image[1] + *fac*col[1];
- color[2] = mfac*image[2] + *fac*col[2];
+ color[0] = mfac * image[0] + *fac * col[0];
+ color[1] = mfac * image[1] + *fac * col[1];
+ color[2] = mfac * image[2] + *fac * col[2];
}
color[3] = image[3];
MEM_freeN(workingCopy);
@@ -137,19 +137,19 @@ void ConstantLevelColorCurveOperation::executePixel(float *color, float x, float
this->inputFacProgram->read(fac, x, y, sampler, inputBuffers);
this->inputImageProgram->read(image, x, y, sampler, inputBuffers);
- if (fac[0] >= 1.0)
+ if (*fac >= 1.0f)
curvemapping_evaluate_premulRGBF(this->curveMapping, color, image);
- else if (*fac<=0.0) {
+ else if (*fac <= 0.0f) {
color[0] = image[0];
color[1] = image[1];
color[2] = image[2];
}
else {
- float col[4], mfac = 1.0f-*fac;
+ float col[4], mfac = 1.0f - *fac;
curvemapping_evaluate_premulRGBF(this->curveMapping, col, image);
- color[0] = mfac*image[0] + *fac*col[0];
- color[1] = mfac*image[1] + *fac*col[1];
- color[2] = mfac*image[2] + *fac*col[2];
+ color[0] = mfac * image[0] + *fac * col[0];
+ color[1] = mfac * image[1] + *fac * col[1];
+ color[2] = mfac * image[2] + *fac * col[2];
}
color[3] = image[3];
}
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
index 628daa7c775..0b1ac1b2127 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -57,16 +57,16 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
this->inputImage1Program->read(inColor1, x, y, sampler, inputBuffers);
this->inputImage2Program->read(inColor2, x, y, sampler, inputBuffers);
- difference = (fabs(inColor2[0] - inColor1[0]) +
- fabs(inColor2[1] - inColor1[1]) +
- fabs(inColor2[2] - inColor1[2]));
+ difference = (fabsf(inColor2[0] - inColor1[0]) +
+ fabsf(inColor2[1] - inColor1[1]) +
+ fabsf(inColor2[2] - inColor1[2]));
- /*average together the distances*/
- difference=difference/3.0;
+ /* average together the distances */
+ difference = difference / 3.0f;
/*make 100% transparent*/
if (difference < tolerence) {
- outputValue[0]=0.0;
+ outputValue[0] = 0.0f;
}
/*in the falloff region, make partially transparent */
else if (difference < falloff+tolerence) {
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
index 30a09a45ade..43cba09d16f 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
@@ -51,17 +51,17 @@ void DirectionalBlurOperation::initExecution()
const float height = getHeight();
const float a = angle;
- const float itsc = 1.f / pow(2.f, (float)iterations);
+ const float itsc = 1.0f / powf(2.0f, (float)iterations);
float D;
D = distance * sqrtf(width*width + height*height);
center_x_pix = center_x * width;
center_y_pix = center_y * height;
- tx= itsc * D * cos(a);
- ty= -itsc * D * sin(a);
- sc= itsc * zoom;
- rot = itsc * spin;
+ tx = itsc * D * cosf(a);
+ ty = -itsc * D * sinf(a);
+ sc = itsc * zoom;
+ rot = itsc * spin;
}
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
index 85a629f7365..650c57dd8dc 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -38,7 +38,7 @@ void EllipseMaskOperation::initExecution()
{
this->inputMask = this->getInputSocketReader(0);
this->inputValue = this->getInputSocketReader(1);
- const double rad = DEG2RAD(this->data->rotation);
+ const double rad = DEG2RAD((double)this->data->rotation);
this->cosine = cos(rad);
this->sine = sin(rad);
this->aspectRatio = ((float)this->getWidth())/this->getHeight();
diff --git a/source/blender/compositor/operations/COM_FogGlowImageOperation.cpp b/source/blender/compositor/operations/COM_FogGlowImageOperation.cpp
index 600bfde64d9..05a758aca7f 100644
--- a/source/blender/compositor/operations/COM_FogGlowImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_FogGlowImageOperation.cpp
@@ -37,7 +37,7 @@ void FogGlowImageOperation::executePixel(float *color, float x, float y, PixelSa
u = 2.f*(x / (float)512) - 1.f;
r = (u*u + v*v)*256;
d = -sqrtf(sqrtf(sqrtf(r)));
- w = (0.5f + 0.5f*cos((double)u*M_PI))*(0.5f + 0.5f*cos((double)v*M_PI));
+ w = (0.5f + 0.5f * cosf(u * (float)M_PI)) * (0.5f + 0.5f * cosf(v * (float)M_PI));
color[0] = expf(d*cs_r) * w;
color[1] = expf(d*cs_g) * w;
color[2] = expf(d*cs_b) * w;
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp
index f0887d4adee..989ffd5dfba 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -46,9 +46,9 @@ void GammaOperation::executePixel(float *color, float x, float y, PixelSampler s
this->inputGammaProgram->read(inputGamma, x, y, sampler, inputBuffers);
const float gamma = inputGamma[0];
/* check for negative to avoid nan's */
- color[0] = inputValue[0]>0.0f?pow(inputValue[0], gamma):inputValue[0];
- color[1] = inputValue[1]>0.0f?pow(inputValue[1], gamma):inputValue[1];
- color[2] = inputValue[2]>0.0f?pow(inputValue[2], gamma):inputValue[2];
+ color[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0];
+ color[1] = inputValue[1] > 0.0f ? powf(inputValue[1], gamma) : inputValue[1];
+ color[2] = inputValue[2] > 0.0f ? powf(inputValue[2], gamma) : inputValue[2];
color[3] = inputValue[3];
}
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index 642a28627bd..e522d334d8b 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -147,11 +147,11 @@ void GaussianBokehBlurOperation::executePixel(float *color, int x, int y, Memory
bufferindex +=offsetadd;
}
}
- float divider = 1.0/overallmultiplyer;
- color[0] = tempColor[0]*divider;
- color[1] = tempColor[1]*divider;
- color[2] = tempColor[2]*divider;
- color[3] = tempColor[3]*divider;
+ float divider = 1.0f / overallmultiplyer;
+ color[0] = tempColor[0] * divider;
+ color[1] = tempColor[1] * divider;
+ color[2] = tempColor[2] * divider;
+ color[3] = tempColor[3] * divider;
}
void GaussianBokehBlurOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
index 852754416f4..2eb51b4577f 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
@@ -77,7 +77,7 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
tempColor[1] = 0;
tempColor[2] = 0;
tempColor[3] = 0;
- float overallmultiplyer = 0;
+ float overallmultiplyer = 0.0f;
MemoryBuffer *inputBuffer = (MemoryBuffer*)data;
float *buffer = inputBuffer->getBuffer();
int bufferwidth = inputBuffer->getWidth();
@@ -106,11 +106,11 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
overallmultiplyer += multiplyer;
bufferindex +=offsetadd;
}
- float divider = 1.0/overallmultiplyer;
- color[0] = tempColor[0]*divider;
- color[1] = tempColor[1]*divider;
- color[2] = tempColor[2]*divider;
- color[3] = tempColor[3]*divider;
+ float divider = 1.0f / overallmultiplyer;
+ color[0] = tempColor[0] * divider;
+ color[1] = tempColor[1] * divider;
+ color[2] = tempColor[2] * divider;
+ color[3] = tempColor[3] * divider;
}
void GaussianXBlurOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
index cab3e3d6094..28e8e548530 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
@@ -101,11 +101,11 @@ void GaussianYBlurOperation::executePixel(float *color, int x, int y, MemoryBuff
tempColor[3] += multiplyer * buffer[bufferindex+3];
overallmultiplyer += multiplyer;
}
- float divider = 1.0/overallmultiplyer;
- color[0] = tempColor[0]*divider;
- color[1] = tempColor[1]*divider;
- color[2] = tempColor[2]*divider;
- color[3] = tempColor[3]*divider;
+ float divider = 1.0f / overallmultiplyer;
+ color[0] = tempColor[0] * divider;
+ color[1] = tempColor[1] * divider;
+ color[2] = tempColor[2] * divider;
+ color[3] = tempColor[3] * divider;
}
void GaussianYBlurOperation::deinitExecution()
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
index 2970c396493..2afcc2e5cc7 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -63,8 +63,8 @@ void HueSaturationValueCorrectOperation::executePixel(float *output, float x, fl
f = curvemapping_evaluateF(this->curveMapping, 2, hsv[0]);
hsv[2] *= (f * 2.f);
- hsv[0] = hsv[0] - floor(hsv[0]); /* mod 1.0 */
- CLAMP(hsv[1], 0.f, 1.f);
+ hsv[0] = hsv[0] - floorf(hsv[0]); /* mod 1.0 */
+ CLAMP(hsv[1], 0.0f, 1.0f);
output[0] = hsv[0];
output[1] = hsv[1];
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index 7b393cc04a8..035f5584065 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -61,16 +61,16 @@ void MapUVOperation::executePixel(float *color, float x, float y, PixelSampler s
/* adaptive sampling, red (U) channel */
this->inputUVProgram->read(uv_a, x-1, y, COM_PS_NEAREST, inputBuffers);
this->inputUVProgram->read(uv_b, x+1, y, COM_PS_NEAREST, inputBuffers);
- uv_l = uv_a[2]!=0.f? fabs(inputUV[0] - uv_a[0]) : 0.f;
- uv_r = uv_b[2]!=0.f? fabs(inputUV[0] - uv_b[0]) : 0.f;
+ uv_l = uv_a[2]!=0.f? fabsf(inputUV[0] - uv_a[0]) : 0.f;
+ uv_r = uv_b[2]!=0.f? fabsf(inputUV[0] - uv_b[0]) : 0.f;
dx = 0.5f * (uv_l + uv_r);
/* adaptive sampling, green (V) channel */
this->inputUVProgram->read(uv_a, x, y-1, COM_PS_NEAREST, inputBuffers);
this->inputUVProgram->read(uv_b, x, y+1, COM_PS_NEAREST, inputBuffers);
- uv_u = uv_a[2]!=0.f? fabs(inputUV[1] - uv_a[1]) : 0.f;
- uv_d = uv_b[2]!=0.f? fabs(inputUV[1] - uv_b[1]) : 0.f;
+ uv_u = uv_a[2]!=0.f? fabsf(inputUV[1] - uv_a[1]) : 0.f;
+ uv_d = uv_b[2]!=0.f? fabsf(inputUV[1] - uv_b[1]) : 0.f;
dy = 0.5f * (uv_u + uv_d);
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
index 2ea5f85253b..b943ec88fde 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
@@ -196,8 +196,8 @@ void MathPowerOperation::executePixel(float *outputValue, float x, float y, Pixe
else {
float y_mod_1 = fmod(inputValue2[0], 1);
/* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */
- if (y_mod_1 > 0.999 || y_mod_1 < 0.001) {
- outputValue[0] = pow(inputValue1[0], (float)floor(inputValue2[0] + 0.5));
+ if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) {
+ outputValue[0] = pow(inputValue1[0], floorf(inputValue2[0] + 0.5f));
}
else {
outputValue[0] = 0.0;
diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp
index 313e49d8609..af2633f0e53 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.cpp
+++ b/source/blender/compositor/operations/COM_RotateOperation.cpp
@@ -43,7 +43,7 @@ void RotateOperation::initExecution()
this->degreeSocket->read(degree, 0, 0, COM_PS_NEAREST, NULL);
double rad;
if (this->doDegree2RadConversion) {
- rad = DEG2RAD(degree[0]);
+ rad = DEG2RAD((double)degree[0]);
}
else {
rad = degree[0];
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp
index 56830f4970d..d8089bdf3ea 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.cpp
+++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp
@@ -53,14 +53,14 @@ void TonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *in
float dr = output[0] + this->data->offset;
float dg = output[1] + this->data->offset;
float db = output[2] + this->data->offset;
- output[0] /= ((dr == 0.f) ? 1.f : dr);
- output[1] /= ((dg == 0.f) ? 1.f : dg);
- output[2] /= ((db == 0.f) ? 1.f : db);
+ output[0] /= ((dr == 0.f) ? 1.0f : dr);
+ output[1] /= ((dg == 0.f) ? 1.0f : dg);
+ output[2] /= ((db == 0.f) ? 1.0f : db);
const float igm = avg->igm;
- if (igm != 0.f) {
- output[0] = pow((double)MAX2(output[0], 0.), (double)igm);
- output[1] = pow((double)MAX2(output[1], 0.), (double)igm);
- output[2] = pow((double)MAX2(output[2], 0.), (double)igm);
+ if (igm != 0.0f) {
+ output[0] = powf(MAX2(output[0], 0.0f), igm);
+ output[1] = powf(MAX2(output[1], 0.0f), igm);
+ output[2] = powf(MAX2(output[2], 0.0f), igm);
}
color[0] = output[0];
@@ -68,31 +68,31 @@ void TonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *in
color[2] = output[2];
color[3] = output[3];
}
-void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void * data)
+void PhotoreceptorTonemapOperation::executePixel(float *color, int x, int y, MemoryBuffer *inputBuffers[], void *data)
{
- AvgLogLum * avg = (AvgLogLum*)data;
+ AvgLogLum *avg = (AvgLogLum *)data;
NodeTonemap *ntm = this->data;
- const float f = exp((double)-this->data->f);
- const float m = (ntm->m > 0.f) ? ntm->m : (0.3f + 0.7f*pow((double)avg->auto_key, 1.4));
- const float ic = 1.f - ntm->c, ia = 1.f - ntm->a;
+ const float f = expf(-this->data->f);
+ const float m = (ntm->m > 0.0f) ? ntm->m : (0.3f + 0.7f * powf(avg->auto_key, 1.4f));
+ const float ic = 1.0f - ntm->c, ia = 1.0f - ntm->a;
float output[4];
this->imageReader->read(output, x, y, inputBuffers, NULL);
- const float L = 0.212671f*output[0] + 0.71516f*output[1] + 0.072169f*output[2];
- float I_l = output[0] + ic*(L - output[0]);
- float I_g = avg->cav[0] + ic*(avg->lav - avg->cav[0]);
- float I_a = I_l + ia*(I_g - I_l);
- output[0] /= (output[0] + pow((double)f*I_a, (double)m));
- I_l = output[1] + ic*(L - output[1]);
- I_g = avg->cav[1] + ic*(avg->lav - avg->cav[1]);
- I_a = I_l + ia*(I_g - I_l);
- output[1] /= (output[1] + pow((double)f*I_a,(double)m));
- I_l = output[2] + ic*(L - output[2]);
- I_g = avg->cav[2] + ic*(avg->lav - avg->cav[2]);
- I_a = I_l + ia*(I_g - I_l);
- output[2] /= (output[2] + pow((double)f*I_a, (double)m));
+ const float L = 0.212671f * output[0] + 0.71516f * output[1] + 0.072169f * output[2];
+ float I_l = output[0] + ic * (L - output[0]);
+ float I_g = avg->cav[0] + ic * (avg->lav - avg->cav[0]);
+ float I_a = I_l + ia * (I_g - I_l);
+ output[0] /= (output[0] + powf(f * I_a, m));
+ I_l = output[1] + ic * (L - output[1]);
+ I_g = avg->cav[1] + ic * (avg->lav - avg->cav[1]);
+ I_a = I_l + ia * (I_g - I_l);
+ output[1] /= (output[1] + powf(f * I_a, m));
+ I_l = output[2] + ic * (L - output[2]);
+ I_g = avg->cav[2] + ic * (avg->lav - avg->cav[2]);
+ I_a = I_l + ia * (I_g - I_l);
+ output[2] /= (output[2] + powf(f * I_a, m));
color[0] = output[0];
color[1] = output[1];
@@ -133,20 +133,20 @@ void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuff
float * buffer = tile->getBuffer();
- float lsum = 0;
+ float lsum = 0.0f;
int p = tile->getWidth() * tile->getHeight();
float *bc = buffer;
float avl, maxl = -1e10f, minl = 1e10f;
- const float sc = 1.f/(p);
+ const float sc = 1.0f / p;
float Lav = 0.f;
float cav[4] = {0.0f,0.0f,0.0f,0.0f};
while (p--) {
- float L = 0.212671f*bc[0] + 0.71516f*bc[1] + 0.072169f*bc[2];
+ float L = 0.212671f * bc[0] + 0.71516f * bc[1] + 0.072169f * bc[2];
Lav += L;
cav[0] += bc[0];
cav[1] += bc[1];
cav[2] += bc[2];
- lsum += (float)log((double)MAX2(L, 0.0) + 1e-5);
+ lsum += logf(MAX2(L, 0.0f) + 1e-5f);
maxl = (L > maxl) ? L : maxl;
minl = (L < minl) ? L : minl;
bc+=4;
@@ -155,7 +155,7 @@ void *TonemapOperation::initializeTileData(rcti *rect, MemoryBuffer **memoryBuff
data->cav[0] = cav[0]*sc;
data->cav[1] = cav[1]*sc;
data->cav[2] = cav[2]*sc;
- maxl = log((double)maxl + 1e-5); minl = log((double)minl + 1e-5f); avl = lsum*sc;
+ maxl = log((double)maxl + 1e-5); minl = log((double)minl + 1e-5); avl = lsum * sc;
data->auto_key = (maxl > minl) ? ((maxl - avl) / (maxl - minl)) : 1.f;
float al = exp((double)avl);
data->al = (al == 0.f) ? 0.f : (this->data->key / al);
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index f14de097dfd..270fedc174b 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -89,7 +89,7 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
if (nx == x && ny == y) {
/* pass */
}
- else if (size>= fabs(dx) && size >= fabs(dy)) {
+ else if (size >= fabsf(dx) && size >= fabsf(dy)) {
float u = 256 + dx*256/size;
float v = 256 + dy*256/size;
inputBokehProgram->read(bokeh, u, v, COM_PS_NEAREST, inputBuffers);
@@ -104,9 +104,9 @@ void VariableSizeBokehBlurOperation::executePixel(float *color, int x, int y, Me
}
}
}
- color[0] = tempColor[0]*(1.0/overallmultiplyerr);
- color[1] = tempColor[1]*(1.0/overallmultiplyerg);
- color[2] = tempColor[2]*(1.0/overallmultiplyerb);
+ color[0] = tempColor[0] * (1.0f / overallmultiplyerr);
+ color[1] = tempColor[1] * (1.0f / overallmultiplyerg);
+ color[2] = tempColor[2] * (1.0f / overallmultiplyerb);
color[3] = 1.0f;
}
diff --git a/source/blender/editors/gpencil/editaction_gpencil.c b/source/blender/editors/gpencil/editaction_gpencil.c
index 9cc738b016e..a7beaa74eb7 100644
--- a/source/blender/editors/gpencil/editaction_gpencil.c
+++ b/source/blender/editors/gpencil/editaction_gpencil.c
@@ -62,7 +62,7 @@
/* Generics - Loopers */
/* Loops over the gp-frames for a gp-layer, and applies the given callback */
-short gplayer_frames_looper(bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
+short ED_gplayer_frames_looper(bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
{
bGPDframe *gpf;
@@ -85,7 +85,7 @@ short gplayer_frames_looper(bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDfr
/* Data Conversion Tools */
/* make a listing all the gp-frames in a layer as cfraelems */
-void gplayer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, short onlysel)
+void ED_gplayer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, short onlysel)
{
bGPDframe *gpf;
CfraElem *ce;
@@ -111,7 +111,7 @@ void gplayer_make_cfra_list(bGPDlayer *gpl, ListBase *elems, short onlysel)
/* Selection Tools */
/* check if one of the frames in this layer is selected */
-short is_gplayer_frame_selected(bGPDlayer *gpl)
+short ED_gplayer_frame_select_check(bGPDlayer *gpl)
{
bGPDframe *gpf;
@@ -149,7 +149,7 @@ static void gpframe_select(bGPDframe *gpf, short select_mode)
}
/* set all/none/invert select (like above, but with SELECT_* modes) */
-void select_gpencil_frames(bGPDlayer *gpl, short select_mode)
+void ED_gpencil_select_frames(bGPDlayer *gpl, short select_mode)
{
bGPDframe *gpf;
@@ -164,36 +164,33 @@ void select_gpencil_frames(bGPDlayer *gpl, short select_mode)
}
/* set all/none/invert select */
-void set_gplayer_frame_selection(bGPDlayer *gpl, short mode)
+void ED_gplayer_frame_select_set(bGPDlayer *gpl, short mode)
{
/* error checking */
if (gpl == NULL)
return;
/* now call the standard function */
- select_gpencil_frames(gpl, mode);
+ ED_gpencil_select_frames(gpl, mode);
}
/* select the frame in this layer that occurs on this frame (there should only be one at most) */
-void select_gpencil_frame(bGPDlayer *gpl, int selx, short select_mode)
+void ED_gpencil_select_frame(bGPDlayer *gpl, int selx, short select_mode)
{
bGPDframe *gpf;
if (gpl == NULL)
return;
-
- /* search through frames for a match */
- for (gpf = gpl->frames.first; gpf; gpf = gpf->next) {
- /* there should only be one frame with this frame-number */
- if (gpf->framenum == selx) {
- gpframe_select(gpf, select_mode);
- break;
- }
+
+ gpf = BKE_gpencil_layer_find_frame(gpl, selx);
+
+ if (gpf) {
+ gpframe_select(gpf, select_mode);
}
}
/* select the frames in this layer that occur within the bounds specified */
-void borderselect_gplayer_frames(bGPDlayer *gpl, float min, float max, short select_mode)
+void ED_gplayer_frames_select_border(bGPDlayer *gpl, float min, float max, short select_mode)
{
bGPDframe *gpf;
@@ -211,7 +208,7 @@ void borderselect_gplayer_frames(bGPDlayer *gpl, float min, float max, short sel
/* Frame Editing Tools */
/* Delete selected frames */
-void delete_gplayer_frames(bGPDlayer *gpl)
+void ED_gplayer_frames_delete(bGPDlayer *gpl)
{
bGPDframe *gpf, *gpfn;
@@ -229,7 +226,7 @@ void delete_gplayer_frames(bGPDlayer *gpl)
}
/* Duplicate selected frames from given gp-layer */
-void duplicate_gplayer_frames(bGPDlayer *gpl)
+void ED_gplayer_frames_duplicate(bGPDlayer *gpl)
{
bGPDframe *gpf, *gpfn;
@@ -502,19 +499,19 @@ void snap_gplayer_frames(bGPDlayer *gpl, Scene *scene, short mode)
{
switch (mode) {
case 1: /* snap to nearest frame */
- gplayer_frames_looper(gpl, scene, snap_gpf_nearest);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_nearest);
break;
case 2: /* snap to current frame */
- gplayer_frames_looper(gpl, scene, snap_gpf_cframe);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_cframe);
break;
case 3: /* snap to nearest marker */
- gplayer_frames_looper(gpl, scene, snap_gpf_nearmarker);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_nearmarker);
break;
case 4: /* snap to nearest second */
- gplayer_frames_looper(gpl, scene, snap_gpf_nearestsec);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_nearestsec);
break;
default: /* just in case */
- gplayer_frames_looper(gpl, scene, snap_gpf_nearest);
+ ED_gplayer_frames_looper(gpl, scene, snap_gpf_nearest);
break;
}
}
@@ -604,21 +601,21 @@ void mirror_gplayer_frames(bGPDlayer *gpl, Scene *scene, short mode)
{
switch (mode) {
case 1: /* mirror over current frame */
- gplayer_frames_looper(gpl, scene, mirror_gpf_cframe);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_cframe);
break;
case 2: /* mirror over frame 0 */
- gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);
break;
case 3: /* mirror over value 0 */
- gplayer_frames_looper(gpl, scene, mirror_gpf_xaxis);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_xaxis);
break;
case 4: /* mirror over marker */
mirror_gpf_marker(NULL, NULL);
- gplayer_frames_looper(gpl, scene, mirror_gpf_marker);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_marker);
mirror_gpf_marker(NULL, NULL);
break;
default: /* just in case */
- gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);
+ ED_gplayer_frames_looper(gpl, scene, mirror_gpf_yaxis);
break;
}
}
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 80f7fb9d1ed..32eb63a26d5 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -83,25 +83,27 @@ void draw_gpencil_view3d(struct Scene *scene, struct View3D *v3d, struct ARegion
void gpencil_panel_standard(const struct bContext *C, struct Panel *pa);
/* ----------- Grease-Pencil AnimEdit API ------------------ */
-short gplayer_frames_looper(struct bGPDlayer *gpl, struct Scene *scene,
- short (*gpf_cb)(struct bGPDframe *, struct Scene *));
-void gplayer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, short onlysel);
+short ED_gplayer_frames_looper(struct bGPDlayer *gpl, struct Scene *scene,
+ short (*gpf_cb)(struct bGPDframe *, struct Scene *));
+void ED_gplayer_make_cfra_list(struct bGPDlayer *gpl, ListBase *elems, short onlysel);
-short is_gplayer_frame_selected(struct bGPDlayer *gpl);
-void set_gplayer_frame_selection(struct bGPDlayer *gpl, short mode);
-void select_gpencil_frames(struct bGPDlayer *gpl, short select_mode);
-void select_gpencil_frame(struct bGPDlayer *gpl, int selx, short select_mode);
-void borderselect_gplayer_frames(struct bGPDlayer *gpl, float min, float max, short select_mode);
+short ED_gplayer_frame_select_check(struct bGPDlayer *gpl);
+void ED_gplayer_frame_select_set(struct bGPDlayer *gpl, short mode);
+void ED_gplayer_frames_select_border(struct bGPDlayer *gpl, float min, float max, short select_mode);
+void ED_gpencil_select_frames(struct bGPDlayer *gpl, short select_mode);
+void ED_gpencil_select_frame(struct bGPDlayer *gpl, int selx, short select_mode);
-void delete_gplayer_frames(struct bGPDlayer *gpl);
-void duplicate_gplayer_frames(struct bGPDlayer *gpl);
+void ED_gplayer_frames_delete(struct bGPDlayer *gpl);
+void ED_gplayer_frames_duplicate(struct bGPDlayer *gpl);
+#if 0
void free_gpcopybuf(void);
void copy_gpdata(void);
void paste_gpdata(void);
void snap_gplayer_frames(struct bGPDlayer *gpl, short mode);
void mirror_gplayer_frames(struct bGPDlayer *gpl, short mode);
+#endif
/* ------------ Grease-Pencil Undo System ------------------ */
int ED_gpencil_session_active(void);
diff --git a/source/blender/editors/include/ED_mask.h b/source/blender/editors/include/ED_mask.h
index bbfc47c582a..773da04bc7b 100644
--- a/source/blender/editors/include/ED_mask.h
+++ b/source/blender/editors/include/ED_mask.h
@@ -49,24 +49,26 @@ int ED_mask_layer_shape_auto_key_all(struct Mask *mask, const int frame);
int ED_mask_layer_shape_auto_key_select(struct Mask *mask, const int frame);
/* ----------- Mask AnimEdit API ------------------ */
-short masklayer_frames_looper(struct MaskLayer *masklay, struct Scene *scene,
- short (*masklay_shape_cb)(struct MaskLayerShape *, struct Scene *));
-void masklayer_make_cfra_list(struct MaskLayer *masklay, ListBase *elems, short onlysel);
+short ED_masklayer_frames_looper(struct MaskLayer *masklay, struct Scene *scene,
+ short (*masklay_shape_cb)(struct MaskLayerShape *, struct Scene *));
+void ED_masklayer_make_cfra_list(struct MaskLayer *masklay, ListBase *elems, short onlysel);
-short is_masklayer_frame_selected(struct MaskLayer *masklay);
-void set_masklayer_frame_selection(struct MaskLayer *masklay, short mode);
-void select_mask_frames(struct MaskLayer *masklay, short select_mode);
-void select_mask_frame(struct MaskLayer *masklay, int selx, short select_mode);
-void borderselect_masklayer_frames(struct MaskLayer *masklay, float min, float max, short select_mode);
+short ED_masklayer_frame_select_check(struct MaskLayer *masklay);
+void ED_masklayer_frame_select_set(struct MaskLayer *masklay, short mode);
+void ED_masklayer_frames_select_border(struct MaskLayer *masklay, float min, float max, short select_mode);
+void ED_mask_select_frames(struct MaskLayer *masklay, short select_mode);
+void ED_mask_select_frame(struct MaskLayer *masklay, int selx, short select_mode);
-void delete_masklayer_frames(struct MaskLayer *masklay);
-void duplicate_masklayer_frames(struct MaskLayer *masklay);
+void ED_masklayer_frames_delete(struct MaskLayer *masklay);
+void ED_masklayer_frames_duplicate(struct MaskLayer *masklay);
-//void free_gpcopybuf(void);
-//void copy_gpdata(void);
-//void paste_gpdata(void);
+#if 0
+void free_gpcopybuf(void);
+void copy_gpdata(void);
+void paste_gpdata(void);
-void snap_masklayer_frames(struct MaskLayer *masklay, short mode);
-void mirror_masklayer_frames(struct MaskLayer *masklay, short mode);
+ void snap_masklayer_frames(struct MaskLayer *masklay, short mode);
+ void mirror_masklayer_frames(struct MaskLayer *masklay, short mode);
+#endif
#endif /* __ED_MASK_H__ */
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 42036d1ea17..608df8dd9b3 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -103,7 +103,7 @@ enum {
* returns 1 if successful, 0 otherwise (usually means there's no selection)
* (if 0 is returns, *vec is unmodified)
* */
-int calculateTransformCenter(struct bContext *C, int centerMode, float *cent3d, int *cent2d);
+int calculateTransformCenter(struct bContext *C, int centerMode, float cent3d[3], int cent2d[2]);
struct TransInfo;
struct ScrArea;
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c
index 6a59279934e..24f55f66bb8 100644
--- a/source/blender/editors/mask/mask_edit.c
+++ b/source/blender/editors/mask/mask_edit.c
@@ -25,7 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/editors/mask/mask_ops.c
+/** \file blender/editors/mask/mask_edit.c
* \ingroup edmask
*/
diff --git a/source/blender/editors/mask/mask_editaction.c b/source/blender/editors/mask/mask_editaction.c
index c773e13e2eb..3836b393bf8 100644
--- a/source/blender/editors/mask/mask_editaction.c
+++ b/source/blender/editors/mask/mask_editaction.c
@@ -59,7 +59,7 @@
/* Generics - Loopers */
/* Loops over the gp-frames for a gp-layer, and applies the given callback */
-short masklayer_frames_looper(MaskLayer *masklay, Scene *scene, short (*masklay_shape_cb)(MaskLayerShape *, Scene *))
+short ED_masklayer_frames_looper(MaskLayer *masklay, Scene *scene, short (*masklay_shape_cb)(MaskLayerShape *, Scene *))
{
MaskLayerShape *masklay_shape;
@@ -82,7 +82,7 @@ short masklayer_frames_looper(MaskLayer *masklay, Scene *scene, short (*masklay_
/* Data Conversion Tools */
/* make a listing all the gp-frames in a layer as cfraelems */
-void masklayer_make_cfra_list(MaskLayer *masklay, ListBase *elems, short onlysel)
+void ED_masklayer_make_cfra_list(MaskLayer *masklay, ListBase *elems, short onlysel)
{
MaskLayerShape *masklay_shape;
CfraElem *ce;
@@ -108,7 +108,7 @@ void masklayer_make_cfra_list(MaskLayer *masklay, ListBase *elems, short onlysel
/* Selection Tools */
/* check if one of the frames in this layer is selected */
-short is_masklayer_frame_selected(MaskLayer *masklay)
+short ED_masklayer_frame_select_check(MaskLayer *masklay)
{
MaskLayerShape *masklay_shape;
@@ -146,7 +146,7 @@ static void masklayshape_select(MaskLayerShape *masklay_shape, short select_mode
}
/* set all/none/invert select (like above, but with SELECT_* modes) */
-void select_mask_frames(MaskLayer *masklay, short select_mode)
+void ED_mask_select_frames(MaskLayer *masklay, short select_mode)
{
MaskLayerShape *masklay_shape;
@@ -161,36 +161,33 @@ void select_mask_frames(MaskLayer *masklay, short select_mode)
}
/* set all/none/invert select */
-void set_masklayer_frame_selection(MaskLayer *masklay, short mode)
+void ED_masklayer_frame_select_set(MaskLayer *masklay, short mode)
{
/* error checking */
if (masklay == NULL)
return;
/* now call the standard function */
- select_mask_frames(masklay, mode);
+ ED_mask_select_frames(masklay, mode);
}
/* select the frame in this layer that occurs on this frame (there should only be one at most) */
-void select_mask_frame(MaskLayer *masklay, int selx, short select_mode)
+void ED_mask_select_frame(MaskLayer *masklay, int selx, short select_mode)
{
MaskLayerShape *masklay_shape;
if (masklay == NULL)
return;
- /* search through frames for a match */
- for (masklay_shape = masklay->splines_shapes.first; masklay_shape; masklay_shape = masklay_shape->next) {
- /* there should only be one frame with this frame-number */
- if (masklay_shape->frame == selx) {
- masklayshape_select(masklay_shape, select_mode);
- break;
- }
+ masklay_shape = BKE_mask_layer_shape_find_frame(masklay, selx);
+
+ if (masklay_shape) {
+ masklayshape_select(masklay_shape, select_mode);
}
}
/* select the frames in this layer that occur within the bounds specified */
-void borderselect_masklayer_frames(MaskLayer *masklay, float min, float max, short select_mode)
+void ED_masklayer_frames_select_border(MaskLayer *masklay, float min, float max, short select_mode)
{
MaskLayerShape *masklay_shape;
@@ -208,7 +205,7 @@ void borderselect_masklayer_frames(MaskLayer *masklay, float min, float max, sho
/* Frame Editing Tools */
/* Delete selected frames */
-void delete_masklayer_frames(MaskLayer *masklay)
+void ED_masklayer_frames_delete(MaskLayer *masklay)
{
MaskLayerShape *masklay_shape, *masklay_shape_next;
@@ -226,7 +223,7 @@ void delete_masklayer_frames(MaskLayer *masklay)
}
/* Duplicate selected frames from given gp-layer */
-void duplicate_masklayer_frames(MaskLayer *masklay)
+void ED_masklayer_frames_duplicate(MaskLayer *masklay)
{
MaskLayerShape *masklay_shape, *gpfn;
diff --git a/source/blender/editors/mask/mask_relationships.c b/source/blender/editors/mask/mask_relationships.c
index 7c0a598ba9f..77fe2a71225 100644
--- a/source/blender/editors/mask/mask_relationships.c
+++ b/source/blender/editors/mask/mask_relationships.c
@@ -25,7 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/editors/mask/mask_relationshops.c
+/** \file blender/editors/mask/mask_relationships.c
* \ingroup edmask
*/
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 93ed7d37235..b6d89a62d05 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -4498,13 +4498,18 @@ static int edbm_bevel_invoke(bContext *C, wmOperator *op, wmEvent *event)
BevelData *opdata;
float mlen[2];
- if (!edbm_bevel_init(C, op, TRUE))
+ if (!edbm_bevel_init(C, op, TRUE)) {
return OPERATOR_CANCELLED;
+ }
- /* initialize mouse values */
opdata = op->customdata;
- calculateTransformCenter(C, V3D_CENTROID, NULL, opdata->mcenter);
+ /* initialize mouse values */
+ if (!calculateTransformCenter(C, V3D_CENTROID, NULL, opdata->mcenter)) {
+ /* in this case the tool will likely do nothing,
+ * ideally this will never happen and should be checked for above */
+ opdata->mcenter[0] = opdata->mcenter[1] = 0;
+ }
mlen[0] = opdata->mcenter[0] - event->mval[0];
mlen[1] = opdata->mcenter[1] - event->mval[1];
opdata->initial_length = len_v2(mlen);
@@ -4795,8 +4800,12 @@ static int edbm_inset_invoke(bContext *C, wmOperator *op, wmEvent *event)
opdata = op->customdata;
- calculateTransformCenter(C, V3D_CENTROID, NULL, opdata->mcenter);
/* initialize mouse values */
+ if (!calculateTransformCenter(C, V3D_CENTROID, NULL, opdata->mcenter)) {
+ /* in this case the tool will likely do nothing,
+ * ideally this will never happen and should be checked for above */
+ opdata->mcenter[0] = opdata->mcenter[1] = 0;
+ }
mlen[0] = opdata->mcenter[0] - event->mval[0];
mlen[1] = opdata->mcenter[1] - event->mval[1];
opdata->initial_length = len_v2(mlen);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 85b9d78c657..fc0aa39e733 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1929,6 +1929,7 @@ static int drop_named_material_invoke(bContext *C, wmOperator *op, wmEvent *even
DAG_ids_flush_update(bmain, 0);
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C));
+ WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING, ma);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 8b26461cc4f..b5cd49cc15c 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -702,9 +702,9 @@ static void duplicate_action_keys(bAnimContext *ac)
if (ale->type == ANIMTYPE_FCURVE)
duplicate_fcurve_keys((FCurve *)ale->key_data);
else if (ale->type == ANIMTYPE_GPLAYER)
- duplicate_gplayer_frames((bGPDlayer *)ale->data);
+ ED_gplayer_frames_duplicate((bGPDlayer *)ale->data);
else if (ale->type == ANIMTYPE_MASKLAYER)
- duplicate_masklayer_frames((MaskLayer *)ale->data);
+ ED_masklayer_frames_duplicate((MaskLayer *)ale->data);
else
BLI_assert(0);
}
@@ -777,10 +777,10 @@ static void delete_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_GPLAYER) {
- delete_gplayer_frames((bGPDlayer *)ale->data);
+ ED_gplayer_frames_delete((bGPDlayer *)ale->data);
}
else if (ale->type == ANIMTYPE_MASKLAYER) {
- delete_masklayer_frames((MaskLayer *)ale->data);
+ ED_masklayer_frames_delete((MaskLayer *)ale->data);
}
else {
FCurve *fcu = (FCurve *)ale->key_data;
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index bd73e35815b..539a32161e5 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -109,13 +109,13 @@ static void deselect_action_keys(bAnimContext *ac, short test, short sel)
if (test) {
for (ale = anim_data.first; ale; ale = ale->next) {
if (ale->type == ANIMTYPE_GPLAYER) {
- if (is_gplayer_frame_selected(ale->data)) {
+ if (ED_gplayer_frame_select_check(ale->data)) {
sel = SELECT_SUBTRACT;
break;
}
}
else if (ale->type == ANIMTYPE_MASKLAYER) {
- if (is_masklayer_frame_selected(ale->data)) {
+ if (ED_masklayer_frame_select_check(ale->data)) {
sel = SELECT_SUBTRACT;
break;
}
@@ -135,9 +135,9 @@ static void deselect_action_keys(bAnimContext *ac, short test, short sel)
/* Now set the flags */
for (ale = anim_data.first; ale; ale = ale->next) {
if (ale->type == ANIMTYPE_GPLAYER)
- set_gplayer_frame_selection(ale->data, sel);
+ ED_gplayer_frame_select_set(ale->data, sel);
else if (ale->type == ANIMTYPE_MASKLAYER)
- set_masklayer_frame_selection(ale->data, sel);
+ ED_masklayer_frame_select_set(ale->data, sel);
else
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, NULL, sel_cb, NULL);
}
@@ -259,9 +259,9 @@ static void borderselect_action(bAnimContext *ac, rcti rect, short mode, short s
{
/* loop over data selecting */
if (ale->type == ANIMTYPE_GPLAYER)
- borderselect_gplayer_frames(ale->data, rectf.xmin, rectf.xmax, selectmode);
+ ED_gplayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode);
else if (ale->type == ANIMTYPE_MASKLAYER)
- borderselect_masklayer_frames(ale->data, rectf.xmin, rectf.xmax, selectmode);
+ ED_masklayer_frames_select_border(ale->data, rectf.xmin, rectf.xmax, selectmode);
else
ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL);
}
@@ -410,10 +410,10 @@ static void markers_selectkeys_between(bAnimContext *ac)
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
else if (ale->type == ANIMTYPE_GPLAYER) {
- borderselect_gplayer_frames(ale->data, min, max, SELECT_ADD);
+ ED_gplayer_frames_select_border(ale->data, min, max, SELECT_ADD);
}
else if (ale->type == ANIMTYPE_MASKLAYER) {
- borderselect_masklayer_frames(ale->data, min, max, SELECT_ADD);
+ ED_masklayer_frames_select_border(ale->data, min, max, SELECT_ADD);
}
else {
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL);
@@ -447,7 +447,7 @@ static void columnselect_action_keys(bAnimContext *ac, short mode)
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale = anim_data.first; ale; ale = ale->next)
- gplayer_make_cfra_list(ale->data, &ked.list, 1);
+ ED_gplayer_make_cfra_list(ale->data, &ked.list, 1);
}
else {
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE /*| ANIMFILTER_CURVESONLY*/);
@@ -503,9 +503,9 @@ static void columnselect_action_keys(bAnimContext *ac, short mode)
/* select elements with frame number matching cfraelem */
if (ale->type == ANIMTYPE_GPLAYER)
- select_gpencil_frame(ale->data, ce->cfra, SELECT_ADD);
+ ED_gpencil_select_frame(ale->data, ce->cfra, SELECT_ADD);
else if (ale->type == ANIMTYPE_MASKLAYER)
- select_mask_frame(ale->data, ce->cfra, SELECT_ADD);
+ ED_mask_select_frame(ale->data, ce->cfra, SELECT_ADD);
else
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL);
}
@@ -788,9 +788,9 @@ static void actkeys_select_leftright(bAnimContext *ac, short leftright, short se
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
}
else if (ale->type == ANIMTYPE_GPLAYER)
- borderselect_gplayer_frames(ale->data, ked.f1, ked.f2, select_mode);
+ ED_gplayer_frames_select_border(ale->data, ked.f1, ked.f2, select_mode);
else if (ale->type == ANIMTYPE_MASKLAYER)
- borderselect_masklayer_frames(ale->data, ked.f1, ked.f2, select_mode);
+ ED_masklayer_frames_select_border(ale->data, ked.f1, ked.f2, select_mode);
else
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL);
}
@@ -927,9 +927,9 @@ static void actkeys_mselect_single(bAnimContext *ac, bAnimListElem *ale, short s
/* select the nominated keyframe on the given frame */
if (ale->type == ANIMTYPE_GPLAYER)
- select_gpencil_frame(ale->data, selx, select_mode);
+ ED_gpencil_select_frame(ale->data, selx, select_mode);
else if (ale->type == ANIMTYPE_MASKLAYER)
- select_mask_frame(ale->data, selx, select_mode);
+ ED_mask_select_frame(ale->data, selx, select_mode);
else
ANIM_animchannel_keyframes_loop(&ked, ac->ads, ale, ok_cb, select_cb, NULL);
}
@@ -971,9 +971,9 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se
/* select elements with frame number matching cfra */
if (ale->type == ANIMTYPE_GPLAYER)
- select_gpencil_frame(ale->key_data, selx, select_mode);
+ ED_gpencil_select_frame(ale->key_data, selx, select_mode);
else if (ale->type == ANIMTYPE_MASKLAYER)
- select_mask_frame(ale->key_data, selx, select_mode);
+ ED_mask_select_frame(ale->key_data, selx, select_mode);
else
ANIM_fcurve_keyframes_loop(&ked, ale->key_data, ok_cb, select_cb, NULL);
}
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c
index e264d7f3885..63148c2b69d 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_draw.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c
@@ -25,7 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/editors/space_clip/clip_graph_draw.c
+/** \file blender/editors/space_clip/clip_dopesheet_draw.c
* \ingroup spclip
*/
diff --git a/source/blender/editors/space_clip/clip_dopesheet_ops.c b/source/blender/editors/space_clip/clip_dopesheet_ops.c
index 499eae75a73..7b0b1eb170f 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_ops.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_ops.c
@@ -25,7 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/editors/space_clip/clip_graph_ops.c
+/** \file blender/editors/space_clip/clip_dopesheet_ops.c
* \ingroup spclip
*/
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 65d2b8f23b3..f6e9622f0a5 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -2325,14 +2325,17 @@ static int set_orientation_poll(bContext *C)
if (sc) {
Scene *scene = CTX_data_scene(C);
MovieClip *clip = ED_space_clip(sc);
- MovieTracking *tracking = &clip->tracking;
- MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking);
- if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
- return TRUE;
- }
- else {
- return OBACT != NULL;
+ if (clip) {
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking);
+
+ if (tracking_object->flag & TRACKING_OBJECT_CAMERA) {
+ return TRUE;
+ }
+ else {
+ return OBACT != NULL;
+ }
}
}
@@ -2935,10 +2938,13 @@ static int set_solution_scale_poll(bContext *C)
if (sc) {
MovieClip *clip = ED_space_clip(sc);
- MovieTracking *tracking = &clip->tracking;
- MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking);
- return (tracking_object->flag & TRACKING_OBJECT_CAMERA) == 0;
+ if (clip) {
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking);
+
+ return (tracking_object->flag & TRACKING_OBJECT_CAMERA) == 0;
+ }
}
return FALSE;
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 1a6ec2813fa..aed282e4a4a 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1442,18 +1442,16 @@ static void node_shader_set_butfunc(bNodeType *ntype)
static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node = ptr->data;
- PointerRNA imaptr;
- PropertyRNA *prop;
+ PointerRNA imaptr, iuserptr;
uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL);
if (!node->id) return;
- prop = RNA_struct_find_property(ptr, "image");
- if (!prop || RNA_property_type(prop) != PROP_POINTER) return;
- imaptr = RNA_property_pointer_get(ptr, prop);
+ imaptr = RNA_pointer_get(ptr, "image");
+ RNA_pointer_create((ID *)ptr->id.data, &RNA_ImageUser, node->storage, &iuserptr);
- node_buts_image_user(layout, C, &imaptr, ptr);
+ node_buts_image_user(layout, C, &imaptr, &iuserptr);
}
static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, PointerRNA *ptr)
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index fb28afbbdd9..d41294c7875 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1186,10 +1186,10 @@ int transformEvent(TransInfo *t, wmEvent *event)
return OPERATOR_PASS_THROUGH;
}
-int calculateTransformCenter(bContext *C, int centerMode, float *cent3d, int *cent2d)
+int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], int cent2d[2])
{
TransInfo *t = MEM_callocN(sizeof(TransInfo), "TransInfo data");
- int success = 1;
+ int success;
t->state = TRANS_RUNNING;
@@ -1204,10 +1204,10 @@ int calculateTransformCenter(bContext *C, int centerMode, float *cent3d, int *ce
t->around = centerMode; // override userdefined mode
if (t->total == 0) {
- success = 0;
+ success = FALSE;
}
else {
- success = 1;
+ success = TRUE;
calculateCenter(t);
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 7a2d2929e47..59d8e81de39 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -380,7 +380,7 @@ typedef struct bRotLimitConstraint {
short flag2;
} bRotLimitConstraint;
-/* Limit Scaling Constraint */
+/* Limit Scale Constraint */
typedef struct bSizeLimitConstraint {
float xmin, xmax;
float ymin, ymax;
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 3741d53c378..9cab08cbc34 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -2961,12 +2961,12 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f)
fprintf(f, "class %s : public %s {\n", srna->identifier, (srna->base) ? srna->base->identifier : "Pointer");
fprintf(f, "public:\n");
- fprintf(f, "\t%s(const PointerRNA& ptr) :\n\t\t%s(ptr)", srna->identifier,
+ fprintf(f, "\t%s(const PointerRNA& ptr_arg) :\n\t\t%s(ptr_arg)", srna->identifier,
(srna->base) ? srna->base->identifier : "Pointer");
for (dp = ds->cont.properties.first; dp; dp = dp->next)
if (!(dp->prop->flag & (PROP_IDPROPERTY | PROP_BUILTIN)))
if (dp->prop->type == PROP_COLLECTION)
- fprintf(f, ",\n\t\t%s(ptr)", dp->prop->identifier);
+ fprintf(f, ",\n\t\t%s(ptr_arg)", dp->prop->identifier);
fprintf(f, "\n\t\t{}\n\n");
for (dp = ds->cont.properties.first; dp; dp = dp->next)
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index e1f1ab97726..8e29e5c2e79 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -44,6 +44,7 @@
#include "ED_object.h"
#include "WM_types.h"
+/* please keep the names in sync with constraint.c */
EnumPropertyItem constraint_type_items[] = {
{0, "", 0, N_("Motion Tracking"), ""},
{CONSTRAINT_TYPE_CAMERASOLVER, "CAMERA_SOLVER", ICON_CONSTRAINT_DATA, "Camera Solver", ""},
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index e20435a07cd..3a534cd22b4 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -339,7 +339,6 @@ static StripElem *rna_SequenceElements_push(ID *id, Sequence *seq, const char *f
static void rna_SequenceElements_pop(ID *id, Sequence *seq, ReportList *reports, int index)
{
- int i;
Scene *scene = (Scene *)id;
StripElem *new_seq, *se;
@@ -361,12 +360,12 @@ static void rna_SequenceElements_pop(ID *id, Sequence *seq, ReportList *reports,
new_seq = MEM_callocN(sizeof(StripElem) * (seq->len - 1), "SequenceElements_pop");
seq->len--;
- /* TODO - simply use 2 memcpy calls */
- for (i = 0, se = seq->strip->stripdata; i < seq->len; i++, se++) {
- if (i == index)
- se++;
- BLI_strncpy(new_seq[i].name, se->name, sizeof(se->name));
- }
+ se = seq->strip->stripdata;
+ if (index > 0)
+ memcpy(new_seq, se, sizeof(StripElem) * index);
+
+ if (index < seq->len)
+ memcpy(&new_seq[index], &se[index + 1], sizeof(StripElem) * (seq->len - index));
MEM_freeN(seq->strip->stripdata);
seq->strip->stripdata = new_seq;
diff --git a/source/blender/nodes/composite/nodes/node_composite_bokehblur.c b/source/blender/nodes/composite/nodes/node_composite_bokehblur.c
index 06b6e79444a..6b24bdb5c52 100644
--- a/source/blender/nodes/composite/nodes/node_composite_bokehblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_bokehblur.c
@@ -28,7 +28,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_blur.c
+/** \file blender/nodes/composite/nodes/node_composite_bokehblur.c
* \ingroup cmpnodes
*/
diff --git a/source/blender/nodes/composite/nodes/node_composite_bokehimage.c b/source/blender/nodes/composite/nodes/node_composite_bokehimage.c
index b46e7e646de..24378c4d5b7 100644
--- a/source/blender/nodes/composite/nodes/node_composite_bokehimage.c
+++ b/source/blender/nodes/composite/nodes/node_composite_bokehimage.c
@@ -28,7 +28,7 @@
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_gamma.c
+/** \file blender/nodes/composite/nodes/node_composite_bokehimage.c
* \ingroup cmpnodes
*/
diff --git a/source/blender/nodes/composite/nodes/node_composite_boxmask.c b/source/blender/nodes/composite/nodes/node_composite_boxmask.c
index 4bd6ab4698b..81c13980f22 100644
--- a/source/blender/nodes/composite/nodes/node_composite_boxmask.c
+++ b/source/blender/nodes/composite/nodes/node_composite_boxmask.c
@@ -27,7 +27,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_math.c
+/** \file blender/nodes/composite/nodes/node_composite_boxmask.c
* \ingroup cmpnodes
*/
diff --git a/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c b/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c
index 7a1e82ddd9b..18a86680245 100644
--- a/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c
+++ b/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c
@@ -27,7 +27,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_math.c
+/** \file blender/nodes/composite/nodes/node_composite_ellipsemask.c
* \ingroup cmpnodes
*/
diff --git a/source/blender/nodes/composite/nodes/node_composite_switch.c b/source/blender/nodes/composite/nodes/node_composite_switch.c
index 8c2c2746593..258fac18c11 100644
--- a/source/blender/nodes/composite/nodes/node_composite_switch.c
+++ b/source/blender/nodes/composite/nodes/node_composite_switch.c
@@ -27,7 +27,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_switch.c
+/** \file blender/nodes/composite/nodes/node_composite_switch.c
* \ingroup cmpnodes
*/
diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c
index 9fecc0cdeda..374a01c51f8 100644
--- a/source/blender/python/bmesh/bmesh_py_utils.c
+++ b/source/blender/python/bmesh/bmesh_py_utils.c
@@ -23,7 +23,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/python/bmesh/bmesh_py_api.c
+/** \file blender/python/bmesh/bmesh_py_utils.c
* \ingroup pybmesh
*
* This file defines the 'bmesh.utils' module.
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 73188b3f830..ac9ff4c8ef5 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -537,7 +537,12 @@ int BPY_button_exec(bContext *C, const char *expr, double *value, const short ve
val = 0.0;
for (i = 0; i < PyTuple_GET_SIZE(retval); i++) {
- val += PyFloat_AsDouble(PyTuple_GET_ITEM(retval, i));
+ const double val_item = PyFloat_AsDouble(PyTuple_GET_ITEM(retval, i));
+ if (val_item == -1 && PyErr_Occurred()) {
+ val = -1;
+ break;
+ }
+ val += val_item;
}
}
else {