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:
authorCampbell Barton <ideasman42@gmail.com>2011-12-30 13:23:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-30 13:23:06 +0400
commit50ca81154e5ead104723ba137942e92cb860ace8 (patch)
tree31c1c97893da5d6eec3d1cdc6af0f400e911391d
parent7ee3da151d781bd3bac69958bb7d5d6b5cde125e (diff)
parent6d965f4493871c9bd4550939b8263d0c509b7c41 (diff)
svn merge ^/trunk/blender -r42973:42991
-rw-r--r--intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp6
-rw-r--r--intern/cycles/blender/blender_camera.cpp13
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.cpp3
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm3
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp3
-rw-r--r--intern/ghost/intern/GHOST_WindowCarbon.cpp3
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp6
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp3
-rw-r--r--intern/smoke/intern/smoke_API.cpp3
-rw-r--r--release/plugins/sequence/color-correction-hsv.c3
-rw-r--r--release/plugins/sequence/color-correction-yuv.c9
-rw-r--r--release/plugins/sequence/dnr.c3
-rw-r--r--release/plugins/sequence/gamma.c3
-rw-r--r--source/blender/blenkernel/BKE_array_mallocn.h38
-rw-r--r--source/blender/blenkernel/intern/brush.c61
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c18
-rw-r--r--source/blender/blenkernel/intern/particle.c31
-rw-r--r--source/blender/blenkernel/intern/particle_system.c18
-rw-r--r--source/blender/collada/MeshImporter.cpp3
-rw-r--r--source/blender/editors/object/object_bake.c28
-rw-r--r--source/blender/editors/physics/physics_fluid.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c278
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c8
-rw-r--r--source/blender/makesdna/DNA_ID.h5
-rw-r--r--source/blender/makesdna/DNA_action_types.h10
-rw-r--r--source/blender/makesdna/DNA_anim_types.h6
-rw-r--r--source/blender/makesdna/DNA_armature_types.h6
-rw-r--r--source/blender/makesdna/DNA_boid_types.h6
-rw-r--r--source/blender/makesdna/DNA_brush_types.h6
-rw-r--r--source/blender/makesdna/DNA_camera_types.h5
-rw-r--r--source/blender/makesdna/DNA_cloth_types.h5
-rw-r--r--source/blender/makesdna/DNA_color_types.h5
-rw-r--r--source/blender/makesdna/DNA_constraint_types.h11
-rw-r--r--source/blender/makesdna/DNA_controller_types.h5
-rw-r--r--source/blender/makesdna/DNA_curve_types.h5
-rw-r--r--source/blender/makesdna/DNA_defs.h6
-rw-r--r--source/blender/makesdna/DNA_dynamicpaint_types.h39
-rw-r--r--source/blender/makesdna/DNA_effect_types.h5
-rw-r--r--source/blender/makesdna/DNA_fileglobal_types.h5
-rw-r--r--source/blender/makesdna/DNA_genfile.h6
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h5
-rw-r--r--source/blender/makesdna/DNA_group_types.h5
-rw-r--r--source/blender/makesdna/DNA_image_types.h5
-rw-r--r--source/blender/makesdna/DNA_lamp_types.h5
-rw-r--r--source/blender/makesdna/DNA_lattice_types.h5
-rw-r--r--source/blender/makesdna/DNA_listBase.h6
-rw-r--r--source/blender/makesdna/DNA_material_types.h5
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h5
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h5
-rw-r--r--source/blender/makesdna/DNA_meta_types.h5
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h6
-rw-r--r--source/blender/makesdna/DNA_movieclip_types.h6
-rw-r--r--source/blender/makesdna/DNA_nla_types.h6
-rw-r--r--source/blender/makesdna/DNA_node_types.h6
-rw-r--r--source/blender/makesdna/DNA_object_fluidsim.h5
-rw-r--r--source/blender/makesdna/DNA_object_force.h5
-rw-r--r--source/blender/makesdna/DNA_object_types.h5
-rw-r--r--source/blender/makesdna/DNA_outliner_types.h5
-rw-r--r--source/blender/makesdna/DNA_packedFile_types.h6
-rw-r--r--source/blender/makesdna/DNA_particle_types.h6
-rw-r--r--source/blender/makesdna/DNA_property_types.h5
-rw-r--r--source/blender/makesdna/DNA_scene_types.h52
-rw-r--r--source/blender/makesdna/DNA_screen_types.h5
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h5
-rw-r--r--source/blender/makesdna/DNA_sensor_types.h7
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h5
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h5
-rw-r--r--source/blender/makesdna/DNA_sound_types.h5
-rw-r--r--source/blender/makesdna/DNA_space_types.h5
-rw-r--r--source/blender/makesdna/DNA_speaker_types.h5
-rw-r--r--source/blender/makesdna/DNA_text_types.h5
-rw-r--r--source/blender/makesdna/DNA_texture_types.h5
-rw-r--r--source/blender/makesdna/DNA_tracking_types.h6
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h6
-rw-r--r--source/blender/makesdna/DNA_vec_types.h5
-rw-r--r--source/blender/makesdna/DNA_vfont_types.h5
-rw-r--r--source/blender/makesdna/DNA_view2d_types.h5
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h5
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h5
-rw-r--r--source/blender/makesdna/DNA_world_types.h5
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_dynamic.c12
-rw-r--r--source/blender/python/intern/bpy_rna.c14
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c18
-rw-r--r--source/blender/quicktime/apple/qtkit_export.m30
-rw-r--r--source/blender/quicktime/apple/qtkit_import.m3
-rw-r--r--source/blender/quicktime/apple/quicktime_export.c24
-rw-r--r--source/blender/quicktime/apple/quicktime_import.c3
-rw-r--r--source/blender/render/intern/source/pipeline.c12
-rw-r--r--source/gameengine/Converter/BL_ActionActuator.cpp3
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp6
-rw-r--r--source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp3
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp4
-rw-r--r--source/gameengine/Converter/KX_IpoConvert.cpp3
-rw-r--r--source/gameengine/Expressions/InputParser.cpp18
-rw-r--r--source/gameengine/Expressions/Operator1Expr.cpp5
-rw-r--r--source/gameengine/Expressions/Operator2Expr.cpp11
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h3
-rw-r--r--source/gameengine/Expressions/Value.cpp3
-rw-r--r--source/gameengine/GameLogic/SCA_ISensor.cpp30
-rw-r--r--source/gameengine/GameLogic/SCA_RandomActuator.cpp3
-rw-r--r--source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp9
-rw-r--r--source/gameengine/Ketsji/KX_TouchSensor.cpp3
102 files changed, 713 insertions, 451 deletions
diff --git a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp
index 9a79c412e4f..543e7e087b1 100644
--- a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp
+++ b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp
@@ -202,7 +202,7 @@ Operate(
}
- void
+ void
BSP_GhostTestApp3D::
UpdateFrame(
){
@@ -210,9 +210,9 @@ if (m_window) {
GHOST_Rect v_rect;
m_window->getClientBounds(v_rect);
-
+
glViewport(0,0,v_rect.getWidth(),v_rect.getHeight());
-
+
}
}
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp
index 9777de14b1e..cbc430d9240 100644
--- a/intern/cycles/blender/blender_camera.cpp
+++ b/intern/cycles/blender/blender_camera.cpp
@@ -72,17 +72,12 @@ static float blender_camera_focal_distance(BL::Object b_ob, BL::Camera b_camera)
if(!b_dof_object)
return b_camera.dof_distance();
- /* for dof object, return distance along camera direction. this is
- * compatible with blender, but does it fit our dof model? */
- Transform obmat = get_transform(b_ob.matrix_world());
+ /* for dof object, return distance along camera Z direction */
+ Transform obmat = transform_clear_scale(get_transform(b_ob.matrix_world()));
Transform dofmat = get_transform(b_dof_object.matrix_world());
+ Transform mat = transform_inverse(obmat) * dofmat;
- float3 cam_p = transform_get_column(&obmat, 3);
- float3 cam_dir = normalize(transform_get_column(&obmat, 2));
- float3 dof_p = transform_get_column(&dofmat, 3);
- float3 proj_p = dot(dof_p, cam_dir) * cam_dir;
-
- return len(proj_p - cam_p);
+ return fabsf(transform_get_column(&mat, 3).z);
}
static void blender_camera_from_object(BlenderCamera *bcam, BL::Object b_ob)
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.cpp b/intern/ghost/intern/GHOST_SystemCarbon.cpp
index be58d179aa4..5db392e1706 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.cpp
+++ b/intern/ghost/intern/GHOST_SystemCarbon.cpp
@@ -579,7 +579,8 @@ GHOST_TSuccess GHOST_SystemCarbon::getButtons(GHOST_Buttons& buttons) const
static bool g_hasFirstFile = false;
static char g_firstFileBuf[512];
-extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) {
+extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
+{
if (g_hasFirstFile) {
strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1);
buf[FIRSTFILEBUFLG - 1] = '\0';
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 12a732e59ef..50d8cfd074b 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -451,7 +451,8 @@ static bool g_hasFirstFile = false;
static char g_firstFileBuf[512];
//TODO:Need to investigate this. Function called too early in creator.c to have g_hasFirstFile == true
-extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) {
+extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
+{
if (g_hasFirstFile) {
strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1);
buf[FIRSTFILEBUFLG - 1] = '\0';
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 61c65384d2d..d701f9264b8 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -296,7 +296,8 @@ findGhostWindow(
}
-static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep) {
+static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep)
+{
int fd = ConnectionNumber(display);
fd_set fds;
diff --git a/intern/ghost/intern/GHOST_WindowCarbon.cpp b/intern/ghost/intern/GHOST_WindowCarbon.cpp
index b226d5ec83e..ab7325fcef8 100644
--- a/intern/ghost/intern/GHOST_WindowCarbon.cpp
+++ b/intern/ghost/intern/GHOST_WindowCarbon.cpp
@@ -70,7 +70,8 @@ const EventTypeSpec kWEvents[] = {
{ kEventClassWindow, kEventWindowZoom }, /* for new zoom behaviour */
};
-static OSStatus myWEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData) {
+static OSStatus myWEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData)
+{
WindowRef mywindow;
GHOST_WindowCarbon *ghost_window;
OSStatus err;
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index cb4d3f87e83..8e37d1832df 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -1269,7 +1269,8 @@ GHOST_TSuccess GHOST_WindowWin32::endProgressBar()
/* Ron Fosner's code for weighting pixel formats and forcing software.
See http://www.opengl.org/resources/faq/technical/weight.cpp */
-static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) {
+static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd)
+{
int weight = 0;
/* assume desktop color depth is 32 bits per pixel */
@@ -1302,7 +1303,8 @@ static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) {
/* A modification of Ron Fosner's replacement for ChoosePixelFormat */
/* returns 0 on error, else returns the pixel format number to be used */
-static int EnumPixelFormats(HDC hdc) {
+static int EnumPixelFormats(HDC hdc)
+{
int iPixelFormat;
int i, n, w, weight = 0;
PIXELFORMATDESCRIPTOR pfd;
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 5611644f8f2..71e3f7b3340 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -472,7 +472,8 @@ GHOST_WindowX11(
is configured but not plugged in.
*/
-static int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent) {
+static int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent)
+{
fprintf(stderr, "Ignoring Xlib error: error code %d request code %d\n",
theEvent->error_code, theEvent->request_code) ;
diff --git a/intern/smoke/intern/smoke_API.cpp b/intern/smoke/intern/smoke_API.cpp
index f34051dea76..a2f3c21bbbf 100644
--- a/intern/smoke/intern/smoke_API.cpp
+++ b/intern/smoke/intern/smoke_API.cpp
@@ -211,7 +211,8 @@ extern "C" void smoke_initWaveletBlenderRNA(WTURBULENCE *wt, float *strength)
wt->initBlenderRNA(strength);
}
-template < class T > inline T ABS( T a ) {
+template < class T > inline T ABS( T a )
+{
return (0 < a) ? a : -a ;
}
diff --git a/release/plugins/sequence/color-correction-hsv.c b/release/plugins/sequence/color-correction-hsv.c
index 1ee58e256d2..1dcf0096efa 100644
--- a/release/plugins/sequence/color-correction-hsv.c
+++ b/release/plugins/sequence/color-correction-hsv.c
@@ -62,7 +62,8 @@ int plugin_seq_getversion(void) { return B_PLUGIN_VERSION;}
void plugin_but_changed(int but) {}
void plugin_init() {}
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
info->name= name;
info->nvars= sizeof(varstr)/sizeof(VarStruct);
info->cfra= &cfra;
diff --git a/release/plugins/sequence/color-correction-yuv.c b/release/plugins/sequence/color-correction-yuv.c
index 1a78fc7d4b6..cc6c6198431 100644
--- a/release/plugins/sequence/color-correction-yuv.c
+++ b/release/plugins/sequence/color-correction-yuv.c
@@ -62,7 +62,8 @@ int plugin_seq_getversion(void) { return B_PLUGIN_VERSION;}
void plugin_but_changed(int but) {}
void plugin_init() {}
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
info->name= name;
info->nvars= sizeof(varstr)/sizeof(VarStruct);
info->cfra= &cfra;
@@ -74,7 +75,8 @@ void plugin_getinfo(PluginInfo *info) {
info->callback= plugin_but_changed;
}
-static void rgb_to_yuv(float rgb[3], float yuv[3]) {
+static void rgb_to_yuv(float rgb[3], float yuv[3])
+{
yuv[0]= 0.299*rgb[0] + 0.587*rgb[1] + 0.114*rgb[2];
yuv[1]= 0.492*(rgb[2] - yuv[0]);
yuv[2]= 0.877*(rgb[0] - yuv[0]);
@@ -84,7 +86,8 @@ static void rgb_to_yuv(float rgb[3], float yuv[3]) {
yuv[2] /= 0.615;
}
-static void yuv_to_rgb(float yuv[3], float rgb[3]) {
+static void yuv_to_rgb(float yuv[3], float rgb[3])
+{
yuv[1] *= 0.436;
yuv[2] *= 0.615;
diff --git a/release/plugins/sequence/dnr.c b/release/plugins/sequence/dnr.c
index 74b3a06ccbb..ab47361ea73 100644
--- a/release/plugins/sequence/dnr.c
+++ b/release/plugins/sequence/dnr.c
@@ -90,7 +90,8 @@ void plugin_seq_free_private_data(void * data)
free(d);
}
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
info->name= name;
info->nvars= sizeof(varstr)/sizeof(VarStruct);
info->cfra= &cfra;
diff --git a/release/plugins/sequence/gamma.c b/release/plugins/sequence/gamma.c
index 1560c5805df..596c98646f3 100644
--- a/release/plugins/sequence/gamma.c
+++ b/release/plugins/sequence/gamma.c
@@ -67,7 +67,8 @@ int plugin_seq_getversion(void) { return B_PLUGIN_VERSION; }
void plugin_but_changed(int but) {}
void plugin_init() {}
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
info->name= name;
info->nvars= sizeof(varstr)/sizeof(VarStruct);
info->cfra= &cfra;
diff --git a/source/blender/blenkernel/BKE_array_mallocn.h b/source/blender/blenkernel/BKE_array_mallocn.h
index 45ca4a5e694..0f312360521 100644
--- a/source/blender/blenkernel/BKE_array_mallocn.h
+++ b/source/blender/blenkernel/BKE_array_mallocn.h
@@ -34,28 +34,28 @@
*/
/* example of usage:
-
-int *arr = NULL;
-V_DECLARE(arr);
-int i;
-
-for (i=0; i<10; i++) {
- V_GROW(arr);
- arr[i] = something;
-}
-V_FREE(arr);
-
-arrays are buffered, using double-buffering (so on each reallocation,
-the array size is doubled). supposedly this should give good Big Oh
-behaviour, though it may not be the best in practice.
-*/
+ *
+ * int *arr = NULL;
+ * V_DECLARE(arr);
+ * int i;
+ *
+ * for (i=0; i<10; i++) {
+ * V_GROW(arr);
+ * arr[i] = something;
+ * }
+ * V_FREE(arr);
+ *
+ * arrays are buffered, using double-buffering (so on each reallocation,
+ * the array size is doubled). supposedly this should give good Big Oh
+ * behaviour, though it may not be the best in practice.
+ */
#define V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp
-/*in the future, I plan on having V_DECLARE allocate stack memory it'll
- use at first, and switch over to heap when it needs more. that'll mess
- up cases where you'd want to use this API to build a dynamic list for
- non-local use, so all such cases should use this macro.*/
+/* in the future, I plan on having V_DECLARE allocate stack memory it'll
+ * use at first, and switch over to heap when it needs more. that'll mess
+ * up cases where you'd want to use this API to build a dynamic list for
+ * non-local use, so all such cases should use this macro.*/
#define V_DYNDECLARE(vec) V_DECLARE(vec)
/*this returns the entire size of the array, including any buffering.*/
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 2bf80fb7ecc..61064bede7e 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -1216,6 +1216,9 @@ struct ImBuf *brush_gen_radial_control_imbuf(Brush *br)
/* Unified Size and Strength */
+/* XXX, wouldnt it be better to only pass the active scene?
+ * this can return any old scene! - campbell*/
+
static void set_unified_settings(Brush *brush, short flag, int value)
{
Scene *sce;
@@ -1369,7 +1372,9 @@ static float unified_unprojected_radius(Brush *brush)
}
void brush_set_size(Brush *brush, int size)
{
- if (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_SIZE)
+ const short us_flag = unified_settings(brush);
+
+ if (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE)
set_unified_size(brush, size);
else
brush->size= size;
@@ -1379,12 +1384,16 @@ void brush_set_size(Brush *brush, int size)
int brush_size(Brush *brush)
{
- return (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_SIZE) ? unified_size(brush) : brush->size;
+ const short us_flag = unified_settings(brush);
+
+ return (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) ? unified_size(brush) : brush->size;
}
void brush_set_use_locked_size(Brush *brush, int value)
{
- if (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_SIZE) {
+ const short us_flag = unified_settings(brush);
+
+ if (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) {
set_unified_settings(brush, SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE, value);
}
else {
@@ -1399,12 +1408,18 @@ void brush_set_use_locked_size(Brush *brush, int value)
int brush_use_locked_size(Brush *brush)
{
- return (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_SIZE) ? (unified_settings(brush) & SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE) : (brush->flag & BRUSH_LOCK_SIZE);
+ const short us_flag = unified_settings(brush);
+
+ return (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) ?
+ (us_flag & SCULPT_PAINT_UNIFIED_LOCK_BRUSH_SIZE) :
+ (brush->flag & BRUSH_LOCK_SIZE);
}
void brush_set_use_size_pressure(Brush *brush, int value)
{
- if (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_SIZE) {
+ const short us_flag = unified_settings(brush);
+
+ if (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) {
set_unified_settings(brush, SCULPT_PAINT_UNIFIED_SIZE_PRESSURE, value);
}
else {
@@ -1419,12 +1434,18 @@ void brush_set_use_size_pressure(Brush *brush, int value)
int brush_use_size_pressure(Brush *brush)
{
- return (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_SIZE) ? (unified_settings(brush) & SCULPT_PAINT_UNIFIED_SIZE_PRESSURE) : (brush->flag & BRUSH_SIZE_PRESSURE);
+ const short us_flag = unified_settings(brush);
+
+ return (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) ?
+ (us_flag & SCULPT_PAINT_UNIFIED_SIZE_PRESSURE) :
+ (brush->flag & BRUSH_SIZE_PRESSURE);
}
void brush_set_use_alpha_pressure(Brush *brush, int value)
{
- if (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_ALPHA) {
+ const short us_flag = unified_settings(brush);
+
+ if (us_flag & SCULPT_PAINT_USE_UNIFIED_ALPHA) {
set_unified_settings(brush, SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE, value);
}
else {
@@ -1439,12 +1460,18 @@ void brush_set_use_alpha_pressure(Brush *brush, int value)
int brush_use_alpha_pressure(Brush *brush)
{
- return (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_ALPHA) ? (unified_settings(brush) & SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE) : (brush->flag & BRUSH_ALPHA_PRESSURE);
+ const short us_flag = unified_settings(brush);
+
+ return (us_flag & SCULPT_PAINT_USE_UNIFIED_ALPHA) ?
+ (us_flag & SCULPT_PAINT_UNIFIED_ALPHA_PRESSURE) :
+ (brush->flag & BRUSH_ALPHA_PRESSURE);
}
void brush_set_unprojected_radius(Brush *brush, float unprojected_radius)
{
- if (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_SIZE)
+ const short us_flag = unified_settings(brush);
+
+ if (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE)
set_unified_unprojected_radius(brush, unprojected_radius);
else
brush->unprojected_radius= unprojected_radius;
@@ -1454,12 +1481,18 @@ void brush_set_unprojected_radius(Brush *brush, float unprojected_radius)
float brush_unprojected_radius(Brush *brush)
{
- return (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_SIZE) ? unified_unprojected_radius(brush) : brush->unprojected_radius;
+ const short us_flag = unified_settings(brush);
+
+ return (us_flag & SCULPT_PAINT_USE_UNIFIED_SIZE) ?
+ unified_unprojected_radius(brush) :
+ brush->unprojected_radius;
}
void brush_set_alpha(Brush *brush, float alpha)
{
- if (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_ALPHA)
+ const short us_flag = unified_settings(brush);
+
+ if (us_flag & SCULPT_PAINT_USE_UNIFIED_ALPHA)
set_unified_alpha(brush, alpha);
else
brush->alpha= alpha;
@@ -1469,5 +1502,9 @@ void brush_set_alpha(Brush *brush, float alpha)
float brush_alpha(Brush *brush)
{
- return (unified_settings(brush) & SCULPT_PAINT_USE_UNIFIED_ALPHA) ? unified_alpha(brush) : brush->alpha;
+ const short us_flag = unified_settings(brush);
+
+ return (us_flag & SCULPT_PAINT_USE_UNIFIED_ALPHA) ?
+ unified_alpha(brush) :
+ brush->alpha;
}
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index e17566b7d55..a76fa8e8579 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -269,7 +269,8 @@ DagNode * pop_queue(DagNodeQueue *queue)
}
}
-void *pop_ob_queue(struct DagNodeQueue *queue) {
+void *pop_ob_queue(struct DagNodeQueue *queue)
+{
return(pop_queue(queue)->ob);
}
@@ -278,7 +279,8 @@ DagNode * get_top_node_queue(DagNodeQueue *queue)
return queue->first->node;
}
-int queue_count(struct DagNodeQueue *queue){
+int queue_count(struct DagNodeQueue *queue)
+{
return queue->count;
}
@@ -1155,7 +1157,8 @@ void graph_bfs(void)
queue_delete(nqueue);
}
-int pre_and_post_BFS(DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data) {
+int pre_and_post_BFS(DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data)
+{
DagNode *node;
node = dag->DagNode.first;
@@ -1341,7 +1344,8 @@ DagNodeQueue * graph_dfs(void)
}
/* unused */
-int pre_and_post_DFS(DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data) {
+int pre_and_post_DFS(DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data)
+{
DagNode *node;
node = dag->DagNode.first;
@@ -1552,7 +1556,8 @@ struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob)
}
/* unused */
-short are_obs_related(struct DagForest *dag, void *ob1, void *ob2) {
+short are_obs_related(struct DagForest *dag, void *ob1, void *ob2)
+{
DagNode * node;
DagAdjList *itA;
@@ -1568,7 +1573,8 @@ short are_obs_related(struct DagForest *dag, void *ob1, void *ob2) {
return DAG_NO_RELATION;
}
-int is_acyclic( DagForest *dag) {
+int is_acyclic( DagForest *dag)
+{
return dag->is_acyclic;
}
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 1f475ea62e6..921e62769bf 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -92,7 +92,8 @@ static void do_child_modifiers(ParticleSimulationData *sim,
float *orco, float mat[4][4], ParticleKey *state, float t);
/* few helpers for countall etc. */
-int count_particles(ParticleSystem *psys){
+int count_particles(ParticleSystem *psys)
+{
ParticleSettings *part=psys->part;
PARTICLE_P;
int tot=0;
@@ -104,7 +105,8 @@ int count_particles(ParticleSystem *psys){
}
return tot;
}
-int count_particles_mod(ParticleSystem *psys, int totgr, int cur){
+int count_particles_mod(ParticleSystem *psys, int totgr, int cur)
+{
ParticleSettings *part=psys->part;
PARTICLE_P;
int tot=0;
@@ -1125,7 +1127,8 @@ static int get_pointcache_times_for_particle(PointCache *cache, int index, float
return ret == 2;
}
-float psys_get_dietime_from_cache(PointCache *cache, int index) {
+float psys_get_dietime_from_cache(PointCache *cache, int index)
+{
PTCacheMem *pm;
int dietime = 10000000; /* some max value so that we can default to pa->time+lifetime */
@@ -1368,7 +1371,9 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData
/* Particles on a dm */
/************************************************/
/* interpolate a location on a face based on face coordinates */
-void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*orcodata)[3], float *w, float *vec, float *nor, float *utan, float *vtan, float *orco,float *ornor){
+void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*orcodata)[3],
+ float *w, float *vec, float *nor, float *utan, float *vtan, float *orco,float *ornor)
+{
float *v1=0, *v2=0, *v3=0, *v4=0;
float e1[3],e2[3],s1,s2,t1,t2;
float *uv1, *uv2, *uv3, *uv4;
@@ -1830,7 +1835,8 @@ static void psys_particle_on_shape(int UNUSED(distr), int UNUSED(index), float *
/************************************************/
/* Particles on emitter */
/************************************************/
-void psys_particle_on_emitter(ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor){
+void psys_particle_on_emitter(ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
+{
if(psmd){
if(psmd->psys->part->distr==PART_DISTR_GRID && psmd->psys->part->from != PART_FROM_VERT){
if(vec)
@@ -3233,7 +3239,8 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf
/************************************************/
/* Particle Key handling */
/************************************************/
-void copy_particle_key(ParticleKey *to, ParticleKey *from, int time){
+void copy_particle_key(ParticleKey *to, ParticleKey *from, int time)
+{
if(time){
memcpy(to,from,sizeof(ParticleKey));
}
@@ -3243,7 +3250,8 @@ void copy_particle_key(ParticleKey *to, ParticleKey *from, int time){
to->time=to_time;
}
}
-void psys_get_from_key(ParticleKey *key, float *loc, float *vel, float *rot, float *time){
+void psys_get_from_key(ParticleKey *key, float *loc, float *vel, float *rot, float *time)
+{
if(loc) copy_v3_v3(loc,key->co);
if(vel) copy_v3_v3(vel,key->vel);
if(rot) copy_qt_qt(rot,key->rot);
@@ -3251,7 +3259,8 @@ void psys_get_from_key(ParticleKey *key, float *loc, float *vel, float *rot, flo
}
/*-------changing particle keys from space to another-------*/
#if 0
-static void key_from_object(Object *ob, ParticleKey *key){
+static void key_from_object(Object *ob, ParticleKey *key)
+{
float q[4];
add_v3_v3(key->vel, key->co);
@@ -4178,7 +4187,8 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
}
}
/* gets particle's state at a time, returns 1 if particle exists and can be seen and 0 if not */
-int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *state, int always){
+int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *state, int always)
+{
ParticleSystem *psys = sim->psys;
ParticleSettings *part = psys->part;
ParticleData *pa = NULL;
@@ -4515,7 +4525,8 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
madd_v3_v3fl(center, yvec, bb->offset[1]);
}
-void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys) {
+void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
+{
ParticleSimulationData sim= {0};
sim.scene= scene;
sim.ob= ob;
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 7a5f5524fbd..45b0fb80944 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -108,7 +108,8 @@
/* Reacting to system events */
/************************************************/
-static int particles_are_dynamic(ParticleSystem *psys) {
+static int particles_are_dynamic(ParticleSystem *psys)
+{
if(psys->pointcache->flag & PTCACHE_BAKED)
return 0;
@@ -2241,7 +2242,8 @@ static void sph_spring_delete(ParticleSystem *psys, int j)
psys->fluid_springs = (ParticleSpring*)MEM_reallocN(psys->fluid_springs, psys->alloc_fluidsprings * sizeof(ParticleSpring));
}
}
-static void sph_springs_modify(ParticleSystem *psys, float dtime){
+static void sph_springs_modify(ParticleSystem *psys, float dtime)
+{
SPHFluidSettings *fluid = psys->part->fluid;
ParticleData *pa1, *pa2;
ParticleSpring *spring = psys->fluid_springs;
@@ -2491,7 +2493,8 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
madd_v3_v3fl(force, gravity, fluid->buoyancy * (pfr.density-rest_density));
}
-static void sph_integrate(ParticleSimulationData *sim, ParticleData *pa, float dfra, float *gravity, EdgeHash *springhash, float *element_size, float flow[3]) {
+static void sph_integrate(ParticleSimulationData *sim, ParticleData *pa, float dfra, float *gravity, EdgeHash *springhash, float *element_size, float flow[3])
+{
ParticleTarget *pt;
int i;
@@ -3294,7 +3297,8 @@ static void collision_fail(ParticleData *pa, ParticleCollision *col)
* -uses Newton-Rhapson iteration to find the collisions
* -handles spherical particles and (nearly) point like particles
*/
-static void collision_check(ParticleSimulationData *sim, int p, float dfra, float cfra){
+static void collision_check(ParticleSimulationData *sim, int p, float dfra, float cfra)
+{
ParticleSettings *part = sim->psys->part;
ParticleData *pa = sim->psys->particles + p;
ParticleCollision col;
@@ -3562,7 +3566,8 @@ static void hair_step(ParticleSimulationData *sim, float cfra)
psys->flag |= PSYS_HAIR_UPDATED;
}
-static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra)){
+static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra))
+{
Object *ob = sim->ob;
ParticleSystem *psys = sim->psys;
HairKey *key, *root;
@@ -4242,7 +4247,8 @@ void psys_check_boid_data(ParticleSystem *psys)
}
}
-static void fluid_default_settings(ParticleSettings *part){
+static void fluid_default_settings(ParticleSettings *part)
+{
SPHFluidSettings *fluid = part->fluid;
fluid->spring_k = 0.f;
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 829ee5f290e..90671ddc162 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -187,7 +187,8 @@ void MeshImporter::set_face_indices(MFace *mface, unsigned int *indices, bool qu
// not used anymore, test_index_face from blenkernel is better
#if 0
// change face indices order so that v4 is not 0
-void MeshImporter::rotate_face_indices(MFace *mface) {
+void MeshImporter::rotate_face_indices(MFace *mface)
+{
mface->v4 = mface->v1;
mface->v1 = mface->v2;
mface->v2 = mface->v3;
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 16198e9e50e..c3c3f91e37d 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -997,9 +997,6 @@ static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *l
*lvl= mmd->lvl;
if(*lvl==0) {
-
- /* BMESH_TODO, baking from level zero currently doesnt give correct results */
-
DerivedMesh *tmp_dm= CDDM_from_mesh(me, ob);
dm= CDDM_copy(tmp_dm, 0);
tmp_dm->release(tmp_dm);
@@ -1062,6 +1059,7 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
{
Object *ob;
Scene *scene= CTX_data_scene(C);
+ int objects_baked= 0;
if(!multiresbake_check(C, op))
return OPERATOR_CANCELLED;
@@ -1092,6 +1090,10 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
/* create low-resolution DM (to bake to) and hi-resolution DM (to bake from) */
bkr.lores_dm= multiresbake_create_loresdm(scene, ob, &bkr.lvl);
+
+ if(!bkr.lores_dm)
+ continue;
+
bkr.hires_dm= multiresbake_create_hiresdm(scene, ob, &bkr.tot_lvl, &bkr.simple);
multiresbake_start(&bkr);
@@ -1100,9 +1102,14 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
bkr.lores_dm->release(bkr.lores_dm);
bkr.hires_dm->release(bkr.hires_dm);
+
+ objects_baked++;
}
CTX_DATA_END;
+ if(!objects_baked)
+ BKE_report(op->reports, RPT_ERROR, "No objects found to bake from");
+
return OPERATOR_FINISHED;
}
@@ -1120,13 +1127,21 @@ static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
MultiresBakerJobData *data;
+ DerivedMesh *lores_dm;
+ int lvl;
ob= base->object;
multires_force_update(ob);
+ lores_dm = multiresbake_create_loresdm(scene, ob, &lvl);
+ if(!lores_dm)
+ continue;
+
data= MEM_callocN(sizeof(MultiresBakerJobData), "multiresBaker derivedMesh_data");
- data->lores_dm = multiresbake_create_loresdm(scene, ob, &data->lvl);
+ data->lores_dm = lores_dm;
+ data->lvl = lvl;
data->hires_dm = multiresbake_create_hiresdm(scene, ob, &data->tot_lvl, &data->simple);
+
BLI_addtail(&bkj->data, data);
}
CTX_DATA_END;
@@ -1209,6 +1224,11 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
bkr= MEM_callocN(sizeof(MultiresBakeJob), "MultiresBakeJob data");
init_multiresbake_job(C, bkr);
+ if(!bkr->data.first) {
+ BKE_report(op->reports, RPT_ERROR, "No objects found to bake from");
+ return OPERATOR_CANCELLED;
+ }
+
/* setup job */
steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Multires Bake", WM_JOB_EXCL_RENDER|WM_JOB_PRIORITY|WM_JOB_PROGRESS);
WM_jobs_customdata(steve, bkr, multiresbake_freejob);
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index cc60f4a52fd..5294e29d3d5 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -146,7 +146,8 @@ static int fluid_is_animated_mesh(FluidsimSettings *fss)
#if 0
/* helper function */
-void fluidsimGetGeometryObjFilename(Object *ob, char *dst) { //, char *srcname) {
+void fluidsimGetGeometryObjFilename(Object *ob, char *dst) { //, char *srcname)
+{
//BLI_snprintf(dst,FILE_MAXFILE, "%s_cfgdata_%s.bobj.gz", srcname, ob->id.name);
BLI_snprintf(dst,FILE_MAXFILE, "fluidcfgdata_%s.bobj.gz", ob->id.name);
}
@@ -769,7 +770,8 @@ static void fluidbake_endjob(void *customdata)
}
}
-int runSimulationCallback(void *data, int status, int frame) {
+int runSimulationCallback(void *data, int status, int frame)
+{
FluidBakeJob *fb = (FluidBakeJob *)data;
elbeemSimulationSettings *settings = fb->settings;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 23e937e3d71..860afdb2b50 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -104,7 +104,7 @@ int vertex_paint_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
- return ob && ob->mode == OB_MODE_VERTEX_PAINT && ((Mesh *)ob->data)->totface;
+ return ob && ob->mode == OB_MODE_VERTEX_PAINT && ((Mesh *)ob->data)->totpoly;
}
int vertex_paint_poll(bContext *C)
@@ -125,7 +125,7 @@ int weight_paint_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
- return ob && ob->mode == OB_MODE_WEIGHT_PAINT && ((Mesh *)ob->data)->totface;
+ return ob && ob->mode == OB_MODE_WEIGHT_PAINT && ((Mesh *)ob->data)->totpoly;
}
int weight_paint_poll(bContext *C)
@@ -161,7 +161,7 @@ static VPaint *new_vpaint(int wpaint)
static int *get_indexarray(Mesh *me)
{
- return MEM_mallocN(sizeof(int)*(me->totface+1), "vertexpaint");
+ return MEM_mallocN(sizeof(int)*(me->totpoly+1), "vertexpaint");
}
@@ -354,9 +354,9 @@ static void make_vertexcol(Object *ob) /* single ob */
}
/* mirror_vgroup is set to -1 when invalid */
-static int wpaint_mirror_vgroup_ensure(Object *ob)
+static int wpaint_mirror_vgroup_ensure(Object *ob, const int vgroup_active)
{
- bDeformGroup *defgroup= BLI_findlink(&ob->defbase, ob->actdef - 1);
+ bDeformGroup *defgroup= BLI_findlink(&ob->defbase, vgroup_active);
if(defgroup) {
bDeformGroup *curdef;
@@ -430,7 +430,7 @@ void vpaint_fill(Object *ob, unsigned int paintcol)
int i, j, selected;
me= get_mesh(ob);
- if(me==NULL || me->totface==0) return;
+ if(me==NULL || me->totpoly==0) return;
if(!me->mcol) make_vertexcol(ob);
if(!me->mcol) return; /* possible we can't make mcol's */
@@ -471,7 +471,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
Mesh *me= ob->data;
MPoly *mf;
MDeformWeight *dw, *uw;
- int vgroup, vgroup_mirror= -1;
+ int vgroup_active, vgroup_mirror= -1;
unsigned int index;
/* mutually exclusive, could be made into a */
@@ -479,11 +479,11 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
if(me->totpoly==0 || me->dvert==NULL || !me->mpoly) return;
- vgroup= ob->actdef-1;
+ vgroup_active = ob->actdef - 1;
/* if mirror painting, find the other group */
if(me->editflag & ME_EDIT_MIRROR_X) {
- vgroup_mirror= wpaint_mirror_vgroup_ensure(ob);
+ vgroup_mirror= wpaint_mirror_vgroup_ensure(ob, vgroup_active);
}
copy_wpaint_prev(wp, me->dvert, me->totvert);
@@ -503,9 +503,9 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
continue;
}
- dw= defvert_verify_index(&me->dvert[vidx], vgroup);
+ dw= defvert_verify_index(&me->dvert[vidx], vgroup_active);
if(dw) {
- uw= defvert_verify_index(wp->wpaint_prev+vidx, vgroup);
+ uw= defvert_verify_index(wp->wpaint_prev+vidx, vgroup_active);
uw->weight= dw->weight; /* set the undo weight */
dw->weight= paintweight;
@@ -517,8 +517,8 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
dw= defvert_verify_index(me->dvert+j, vgroup_mirror);
uw= defvert_verify_index(wp->wpaint_prev+j, vgroup_mirror);
} else {
- dw= defvert_verify_index(me->dvert+j, vgroup);
- uw= defvert_verify_index(wp->wpaint_prev+j, vgroup);
+ dw= defvert_verify_index(me->dvert+j, vgroup_active);
+ uw= defvert_verify_index(wp->wpaint_prev+j, vgroup_active);
}
uw->weight= dw->weight; /* set the undo weight */
dw->weight= paintweight;
@@ -544,7 +544,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
}
/* XXX: should be re-implemented as a vertex/weight paint 'color correct' operator
-
+
void vpaint_dogamma(Scene *scene)
{
VPaint *vp= scene->toolsettings->vpaint;
@@ -562,12 +562,12 @@ void vpaint_dogamma(Scene *scene)
igam= 1.0/vp->gamma;
for(a=0; a<256; a++) {
-
+
fac= ((float)a)/255.0;
fac= vp->mul*pow( fac, igam);
-
+
temp= 255.9*fac;
-
+
if(temp<=0) gamtab[a]= 0;
else if(temp>=255) gamtab[a]= 255;
else gamtab[a]= temp;
@@ -576,16 +576,17 @@ void vpaint_dogamma(Scene *scene)
a= 4*me->totface;
cp= (unsigned char *)me->mcol;
while(a--) {
-
+
cp[1]= gamtab[ cp[1] ];
cp[2]= gamtab[ cp[2] ];
cp[3]= gamtab[ cp[3] ];
-
+
cp+= 4;
}
}
*/
+
static unsigned int mcol_blend(unsigned int col1, unsigned int col2, int fac)
{
char *cp1, *cp2, *cp;
@@ -814,56 +815,64 @@ static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x
return tot;
}
-static float calc_vp_alpha_dl(VPaint *vp, ViewContext *vc, float vpimat[][3], float *vert_nor, const float mval[2], float pressure)
+/* whats _dl mean? */
+static float calc_vp_strength_dl(VPaint *vp, ViewContext *vc, const float *vert_nor,
+ const float mval[2], const float brush_size_final)
{
Brush *brush = paint_brush(&vp->paint);
- float fac, fac_2, size, dx, dy;
- float alpha;
- int vertco[2];
- const int radius= brush_size(brush);
+ float dist_squared;
+ float vertco[2], delta[2];
- project_int_noclip(vc->ar, vert_nor, vertco);
- dx= mval[0]-vertco[0];
- dy= mval[1]-vertco[1];
-
- if (brush_use_size_pressure(brush))
- size = pressure * radius;
- else
- size = radius;
-
- fac_2= dx*dx + dy*dy;
- if(fac_2 > size*size) return 0.f;
- fac = sqrtf(fac_2);
-
- alpha= brush_alpha(brush) * brush_curve_strength_clamp(brush, fac, size);
-
- if (brush_use_alpha_pressure(brush))
- alpha *= pressure;
-
- if(vp->flag & VP_NORMALS) {
- float *no= vert_nor+3;
-
- /* transpose ! */
- fac= vpimat[2][0]*no[0]+vpimat[2][1]*no[1]+vpimat[2][2]*no[2];
- if(fac > 0.0f) {
- dx= vpimat[0][0]*no[0]+vpimat[0][1]*no[1]+vpimat[0][2]*no[2];
- dy= vpimat[1][0]*no[0]+vpimat[1][1]*no[1]+vpimat[1][2]*no[2];
-
- alpha*= fac/sqrtf(dx*dx + dy*dy + fac*fac);
+ project_float_noclip(vc->ar, vert_nor, vertco);
+ sub_v2_v2v2(delta, mval, vertco);
+ dist_squared= dot_v2v2(delta, delta); /* len squared */
+ if (dist_squared > brush_size_final * brush_size_final) {
+ return 0.0f;
+ }
+ else {
+ const float dist = sqrtf(dist_squared);
+ return brush_curve_strength_clamp(brush, dist, brush_size_final);
+ }
+}
+
+static float calc_vp_alpha_dl(VPaint *vp, ViewContext *vc,
+ float vpimat[][3], const float *vert_nor,
+ const float mval[2],
+ const float brush_size_final, const float brush_alpha_final)
+{
+ float strength = calc_vp_strength_dl(vp, vc, vert_nor, mval, brush_size_final);
+
+ if (strength > 0.0f) {
+ float alpha= brush_alpha_final * strength;
+
+ if(vp->flag & VP_NORMALS) {
+ float dvec[3];
+ const float *no= vert_nor + 3;
+
+ /* transpose ! */
+ dvec[2] = dot_v3v3(vpimat[2], no);
+ if (dvec[2] > 0.0f) {
+ dvec[0] = dot_v3v3(vpimat[0], no);
+ dvec[1] = dot_v3v3(vpimat[1], no);
+
+ alpha *= dvec[2] / len_v3(dvec);
+ }
+ else {
+ return 0.0f;
+ }
}
- else return 0.f;
+
+ return alpha;
}
-
- return alpha;
+
+ return 0.0f;
}
static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float alpha, float paintval, int flip, int multipaint)
{
Brush *brush = paint_brush(&wp->paint);
int tool = brush->vertexpaint_tool;
-
- if(dw==NULL || uw==NULL) return;
-
+
if (flip) {
switch(tool) {
case VP_MIX:
@@ -970,7 +979,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
else {
MPoly *mf= ((MPoly *)me->mpoly) + index-1;
- const int vgroup= vc.obact->actdef - 1;
+ const int vgroup_active= vc.obact->actdef - 1;
ToolSettings *ts= vc.scene->toolsettings;
float mval_f[2];
int v_idx_best= -1;
@@ -994,7 +1003,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event)
} while (fidx--);
if(v_idx_best != -1) { /* should always be valid */
- ts->vgroup_weight= defvert_find_weight(&me->dvert[v_idx_best], vgroup);
+ ts->vgroup_weight= defvert_find_weight(&me->dvert[v_idx_best], vgroup_active);
change= TRUE;
}
}
@@ -1046,7 +1055,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA
index= view3d_sample_backbuf(&vc, win->eventstate->x - vc.ar->winrct.xmin, win->eventstate->y - vc.ar->winrct.ymin);
- if(index && index<=me->totface) {
+ if(index && index<=me->totpoly) {
const int defbase_tot= BLI_countlist(&vc.obact->defbase);
if(defbase_tot) {
MPoly *mf= ((MPoly *)me->mpoly) + index-1;
@@ -1545,6 +1554,7 @@ typedef struct WeightPaintInfo {
int defbase_tot_sel;
int defbase_tot_unsel;
+ int vgroup_active; /* (ob->actdef - 1) */
int vgroup_mirror; /* mirror group or -1 */
const char *lock_flags; /* boolean array for locked bones,
@@ -1649,15 +1659,14 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
MDeformVert *dv= &me->dvert[index];
MDeformWeight *dw, *uw;
- int vgroup= ob->actdef-1;
if(wp->flag & VP_ONLYVGROUP) {
- dw= defvert_find_index(dv, vgroup);
- uw= defvert_find_index(wp->wpaint_prev+index, vgroup);
+ dw= defvert_find_index(dv, wpi->vgroup_active);
+ uw= defvert_find_index(wp->wpaint_prev+index, wpi->vgroup_active);
}
else {
- dw= defvert_verify_index(dv, vgroup);
- uw= defvert_verify_index(wp->wpaint_prev+index, vgroup);
+ dw= defvert_verify_index(dv, wpi->vgroup_active);
+ uw= defvert_verify_index(wp->wpaint_prev+index, wpi->vgroup_active);
}
if(dw==NULL || uw==NULL) {
@@ -1679,7 +1688,7 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
if(index_mirr != -1) {
MDeformVert *dv_mirr= &me->dvert[index_mirr];
/* copy, not paint again */
- uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
+ uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : wpi->vgroup_active);
uw->weight= dw->weight;
}
}
@@ -1778,7 +1787,7 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
if(index_mirr != -1) {
MDeformVert *dv_mirr= &me->dvert[index_mirr];
/* copy, not paint again */
- uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
+ uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : wpi->vgroup_active);
//uw->weight= dw->weight;
apply_mp_locks_normalize(me, wpi, index_mirr, uw, tdw, change, oldChange, oldw, neww);
}
@@ -1874,6 +1883,7 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot)
struct WPaintData {
ViewContext vc;
int *indexar;
+ int vgroup_active;
int vgroup_mirror;
float *vertexcosnos;
float wpimat[3][3];
@@ -1946,46 +1956,29 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
{
Scene *scene= CTX_data_scene(C);
struct PaintStroke *stroke = op->customdata;
- ToolSettings *ts= CTX_data_tool_settings(C);
+ ToolSettings *ts= scene->toolsettings;
VPaint *wp= ts->wpaint;
Object *ob= CTX_data_active_object(C);
struct WPaintData *wpd;
Mesh *me;
+
+// bDeformGroup *dg;
+
float mat[4][4], imat[4][4];
if(scene->obedit) return OPERATOR_CANCELLED;
me= get_mesh(ob);
- if(me==NULL || me->totface==0) return OPERATOR_PASS_THROUGH;
+ if(me==NULL || me->totpoly==0) return OPERATOR_PASS_THROUGH;
/* if nothing was added yet, we make dverts and a vertex deform group */
if (!me->dvert) {
ED_vgroup_data_create(&me->id);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
}
-
- /* make mode data storage */
- wpd= MEM_callocN(sizeof(struct WPaintData), "WPaintData");
- paint_stroke_set_mode_data(stroke, wpd);
- view3d_set_viewcontext(C, &wpd->vc);
- wpd->vgroup_mirror= -1;
-
- /*set up auto-normalize, and generate map for detecting which
- vgroups affect deform bones*/
- wpd->defbase_tot = BLI_countlist(&ob->defbase);
- wpd->lock_flags = gen_lock_flags(ob, wpd->defbase_tot);
- if (ts->auto_normalize || ts->multipaint || wpd->lock_flags) {
- wpd->vgroup_validmap = wpaint_make_validmap(ob);
- }
- /* ALLOCATIONS! no return after this line */
- /* painting on subsurfs should give correct points too, this returns me->totvert amount */
- wpd->vertexcosnos= mesh_get_mapped_verts_nors(scene, ob);
- wpd->indexar= get_indexarray(me);
- copy_wpaint_prev(wp, me->dvert, me->totvert);
-
/* this happens on a Bone select, when no vgroup existed yet */
- if(ob->actdef<=0) {
+ if (ob->actdef <= 0) {
Object *modob;
if((modob = modifiers_isDeformedByArmature(ob))) {
Bone *actbone= ((bArmature *)modob->data)->act_bone;
@@ -2010,14 +2003,55 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
ED_vgroup_add(ob);
}
+ /* ensure we dont try paint onto an invalid group */
+ if (ob->actdef <= 0) {
+ return OPERATOR_PASS_THROUGH;
+ }
+
+#if 0
+ /* check if we are attempting to paint onto a locked vertex group,
+ * and other options disallow it from doing anything useful */
+ dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
+ if ( (dg->flag & DG_LOCK_WEIGHT) &&
+ (ts->auto_normalize == FALSE) &&
+ (ts->multipaint == FALSE) )
+ {
+ BKE_report(op->reports, RPT_WARNING, "Active group is locked, multi-paint/normalize disabled, aborting");
+
+ return OPERATOR_CANCELLED;
+ }
+#endif
+
+ /* ALLOCATIONS! no return after this line */
+ /* make mode data storage */
+ wpd= MEM_callocN(sizeof(struct WPaintData), "WPaintData");
+ paint_stroke_set_mode_data(stroke, wpd);
+ view3d_set_viewcontext(C, &wpd->vc);
+
+ wpd->vgroup_active = ob->actdef - 1;
+ wpd->vgroup_mirror = -1;
+
+ /* set up auto-normalize, and generate map for detecting which
+ * vgroups affect deform bones*/
+ wpd->defbase_tot = BLI_countlist(&ob->defbase);
+ wpd->lock_flags = gen_lock_flags(ob, wpd->defbase_tot);
+ if (ts->auto_normalize || ts->multipaint || wpd->lock_flags) {
+ wpd->vgroup_validmap = wpaint_make_validmap(ob);
+ }
+
+ /* painting on subsurfs should give correct points too, this returns me->totvert amount */
+ wpd->vertexcosnos= mesh_get_mapped_verts_nors(scene, ob);
+ wpd->indexar= get_indexarray(me);
+ copy_wpaint_prev(wp, me->dvert, me->totvert);
+
/* imat for normals */
mult_m4_m4m4(mat, wpd->vc.rv3d->viewmat, ob->obmat);
invert_m4_m4(imat, mat);
copy_m3_m4(wpd->wpimat, imat);
-
+
/* if mirror painting, find the other group */
if(me->editflag & ME_EDIT_MIRROR_X) {
- wpd->vgroup_mirror= wpaint_mirror_vgroup_ensure(ob);
+ wpd->vgroup_mirror = wpaint_mirror_vgroup_ensure(ob, wpd->vgroup_active);
}
return 1;
@@ -2035,13 +2069,17 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
float mat[4][4];
float paintweight;
int *indexar;
- int totw;
+ float totw;
unsigned int index, totindex;
float alpha;
- float mval[2], pressure;
+ float mval[2];
int use_vert_sel;
char *defbase_sel;
+ const float pressure = RNA_float_get(itemptr, "pressure");
+ const float brush_size_final = brush_size(brush) * (brush_use_size_pressure(brush) ? pressure : 1.0f);
+ const float brush_alpha_final = brush_alpha(brush) * (brush_use_alpha_pressure(brush) ? pressure : 1.0f);
+
/* intentionally dont initialize as NULL, make sure we initialize all members below */
WeightPaintInfo wpi;
@@ -2063,7 +2101,6 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
/* load projection matrix */
mult_m4_m4m4(mat, vc->rv3d->persmat, ob->obmat);
- pressure = RNA_float_get(itemptr, "pressure");
RNA_float_get_array(itemptr, "mouse", mval);
mval[0]-= vc->ar->winrct.xmin;
mval[1]-= vc->ar->winrct.ymin;
@@ -2078,6 +2115,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
if(wpi.defbase_tot_sel == 0 && ob->actdef > 0) wpi.defbase_tot_sel = 1;
wpi.defbase_tot_unsel= wpi.defbase_tot - wpi.defbase_tot_sel;
+ wpi.vgroup_active= wpd->vgroup_active;
wpi.vgroup_mirror= wpd->vgroup_mirror;
wpi.lock_flags= wpd->lock_flags;
wpi.vgroup_validmap= wpd->vgroup_validmap;
@@ -2096,7 +2134,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
if(wp->flag & VP_AREA) {
/* Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell */
me->editflag &= ~ME_EDIT_VERT_SEL;
- totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush_size(brush));
+ totindex= sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_final);
me->editflag |= use_vert_sel ? ME_EDIT_VERT_SEL : 0;
}
else {
@@ -2131,7 +2169,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
/* make sure each vertex gets treated only once */
/* and calculate filter weight */
- totw= 0;
+ totw= 0.0f;
if(brush->vertexpaint_tool==VP_BLUR)
paintweight= 0.0f;
else
@@ -2164,19 +2202,21 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
ml = me->mloop + mpoly->loopstart;
for (i=0; i<mpoly->totloop; i++, ml++) {
- dw = dw_func(me->dvert+ml->v, ob->actdef-1);
- if (dw) {
- paintweight += dw->weight;
- totw++;
+ const float fac = calc_vp_strength_dl(wp, vc, wpd->vertexcosnos+6*ml->v, mval, brush_size_final);
+ if (fac > 0.0f) {
+ dw = dw_func(&me->dvert[ml->v], wpi.vgroup_active);
+ paintweight += dw ? (dw->weight * fac) : 0.0f;
+ totw += fac;
}
}
}
}
}
- if(brush->vertexpaint_tool==VP_BLUR)
- paintweight/= (float)totw;
-
+ if (brush->vertexpaint_tool==VP_BLUR) {
+ paintweight /= totw;
+ }
+
for(index=0; index<totindex; index++) {
if(indexar[index] && indexar[index]<=me->totpoly) {
MPoly *mpoly= me->mpoly + (indexar[index]-1);
@@ -2186,7 +2226,8 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
for (i=0; i<mpoly->totloop; i++, ml++) {
unsigned int vidx= ml->v;
if (me->dvert[vidx].flag) {
- alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*vidx, mval, pressure);
+ alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*vidx,
+ mval, brush_size_final, brush_alpha_final);
if(alpha) {
do_weight_paint_vertex(wp, ob, &wpi, vidx, alpha, paintweight);
}
@@ -2488,7 +2529,10 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent
}
#if 0
-static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, int index, const float mval[2], float pressure, int UNUSED(flip))
+static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob,
+ const unsigned int index, const float mval[2],
+ const float brush_size_final, const float brush_alpha_final,
+ int UNUSED(flip))
{
ViewContext *vc = &vpd->vc;
Brush *brush = paint_brush(&vp->paint);
@@ -2516,9 +2560,11 @@ static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, int index
}
for(i = 0; i < (mface->v4 ? 4 : 3); ++i) {
- alpha= calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*(&mface->v1)[i], mval, pressure);
- if(alpha)
+ alpha = calc_vp_alpha_dl(vp, vc, vpd->vpimat, vpd->vertexcosnos+6*(&mface->v1)[i],
+ mval, brush_size_final, brush_alpha_final);
+ if(alpha) {
vpaint_blend(vp, mcol+i, mcolorig+i, vpd->paintcol, (int)(alpha*255.0f));
+ }
}
}
#endif
@@ -2536,11 +2582,14 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
float mat[4][4];
int *indexar= vpd->indexar;
int totindex, index, flip;
- float pressure, mval[2];
+ float mval[2];
+
+ const float pressure = RNA_float_get(itemptr, "pressure");
+ const float brush_size_final = brush_size(brush) * (brush_use_size_pressure(brush) ? pressure : 1.0f);
+ const float brush_alpha_final = brush_alpha(brush) * (brush_use_alpha_pressure(brush) ? pressure : 1.0f);
RNA_float_get_array(itemptr, "mouse", mval);
flip = RNA_boolean_get(itemptr, "pen_flip");
- pressure = RNA_float_get(itemptr, "pressure");
(void)flip; /* BMESH_TODO */
@@ -2555,7 +2604,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
/* which faces are involved */
if(vp->flag & VP_AREA) {
- totindex= sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size(brush));
+ totindex= sample_backbuf_area(vc, indexar, me->totpoly, mval[0], mval[1], brush_size_final);
}
else {
indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
@@ -2573,7 +2622,7 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
if(mpoly->mat_nr!=ob->actcol-1) {
indexar[index]= 0;
}
- }
+ }
}
}
@@ -2635,7 +2684,8 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
ml = me->mloop + mpoly->loopstart;
for (i=0; i<mpoly->totloop; i++, ml++) {
alpha= calc_vp_alpha_dl(vp, vc, vpd->vpimat,
- vpd->vertexcosnos+6*ml->v, mval, pressure);
+ vpd->vertexcosnos+6*ml->v, mval,
+ brush_size_final, brush_alpha_final);
if(alpha > 0.0f) vpaint_blend(vp, lcol+i, lcolorig+i, vpd->paintcol, (int)(alpha*255.0f));
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index bd194dc1070..ab12bd40622 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -673,16 +673,16 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3],
radius = ss->cache->pixel_radius; // use pressure adjusted size for fixed mode
- x = point_2d[0];
- y = point_2d[1];
+ x = point_2d[0] + ss->cache->vc->ar->winrct.xmin;
+ y = point_2d[1] + ss->cache->vc->ar->winrct.ymin;
}
else /* else (mtex->brush_map_mode == MTEX_MAP_MODE_TILED),
leave the coordinates relative to the screen */
{
radius = brush_size(br); // use unadjusted size for tiled mode
- x = point_2d[0] - ss->cache->vc->ar->winrct.xmin;
- y = point_2d[1] - ss->cache->vc->ar->winrct.ymin;
+ x = point_2d[0];
+ y = point_2d[1];
}
x /= ss->cache->vc->ar->winx;
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 8de7ae39a55..f0e126db813 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -24,14 +24,15 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_ID_H
-#define DNA_ID_H
/** \file DNA_ID.h
* \ingroup DNA
* \brief ID and Library types, which are fundamental for sdna.
*/
+#ifndef DNA_ID_H
+#define DNA_ID_H
+
#include "DNA_listBase.h"
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 7dce437e543..9cee4e188ff 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -1,4 +1,4 @@
-/*
+/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -29,7 +29,6 @@
* \ingroup DNA
*/
-
#ifndef DNA_ACTION_TYPES_H
#define DNA_ACTION_TYPES_H
@@ -204,7 +203,9 @@ typedef struct bPoseChannel {
bMotionPath *mpath; /* motion path cache for this bone */
struct Object *custom; /* draws custom object instead of default bone shape */
- struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. needed in rare cases for advanced rigs, since the alternative is highly complicated - campbell */
+ struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform.
+ * needed in rare cases for advanced rigs,
+ * since the alternative is highly complicated - campbell */
/* transforms - written in by actions or transform */
float loc[3];
@@ -219,7 +220,8 @@ typedef struct bPoseChannel {
float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */
float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat */
- float constinv[4][4]; /* inverse result of constraints. doesn't include effect of restposition, parent, and local transform*/
+ float constinv[4][4]; /* inverse result of constraints.
+ * doesn't include effect of restposition, parent, and local transform*/
float pose_head[3]; /* actually pose_mat[3] */
float pose_tail[3]; /* also used for drawing help lines... */
diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h
index e1dfd652900..2233da86385 100644
--- a/source/blender/makesdna/DNA_anim_types.h
+++ b/source/blender/makesdna/DNA_anim_types.h
@@ -23,13 +23,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_ANIM_TYPES_H
-#define DNA_ANIM_TYPES_H
-
/** \file DNA_anim_types.h
* \ingroup DNA
*/
+#ifndef DNA_ANIM_TYPES_H
+#define DNA_ANIM_TYPES_H
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 442fc3ddcce..45c30315575 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -23,13 +23,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_ARMATURE_TYPES_H
-#define DNA_ARMATURE_TYPES_H
-
/** \file DNA_armature_types.h
* \ingroup DNA
*/
+#ifndef DNA_ARMATURE_TYPES_H
+#define DNA_ARMATURE_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_boid_types.h b/source/blender/makesdna/DNA_boid_types.h
index 4de03f55077..53ff5179049 100644
--- a/source/blender/makesdna/DNA_boid_types.h
+++ b/source/blender/makesdna/DNA_boid_types.h
@@ -26,13 +26,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_BOID_TYPES_H
-#define DNA_BOID_TYPES_H
-
/** \file DNA_boid_types.h
* \ingroup DNA
*/
+#ifndef DNA_BOID_TYPES_H
+#define DNA_BOID_TYPES_H
+
#include "DNA_listBase.h"
typedef enum BoidRuleType {
diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h
index 1dfef225828..e5c500f1fea 100644
--- a/source/blender/makesdna/DNA_brush_types.h
+++ b/source/blender/makesdna/DNA_brush_types.h
@@ -25,13 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_BRUSH_TYPES_H
-#define DNA_BRUSH_TYPES_H
-
/** \file DNA_brush_types.h
* \ingroup DNA
*/
+#ifndef DNA_BRUSH_TYPES_H
+#define DNA_BRUSH_TYPES_H
+
#include "DNA_ID.h"
#include "DNA_texture_types.h" /* for MTex */
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index ff04a7fd366..a46be730d6c 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_CAMERA_TYPES_H
-#define DNA_CAMERA_TYPES_H
/** \file DNA_camera_types.h
* \ingroup DNA
*/
+#ifndef DNA_CAMERA_TYPES_H
+#define DNA_CAMERA_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h
index 7b2fb292d27..5c333c3fc1f 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_CLOTH_TYPES_H
-#define DNA_CLOTH_TYPES_H
/** \file DNA_cloth_types.h
* \ingroup DNA
*/
+#ifndef DNA_CLOTH_TYPES_H
+#define DNA_CLOTH_TYPES_H
+
/**
* This struct contains all the global data required to run a simulation.
* At the time of this writing, this structure contains data appropriate
diff --git a/source/blender/makesdna/DNA_color_types.h b/source/blender/makesdna/DNA_color_types.h
index f3cfab4503b..f5762f8b49f 100644
--- a/source/blender/makesdna/DNA_color_types.h
+++ b/source/blender/makesdna/DNA_color_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
-#ifndef DNA_COLOR_TYPES_H
-#define DNA_COLOR_TYPES_H
/** \file DNA_color_types.h
* \ingroup DNA
*/
+#ifndef DNA_COLOR_TYPES_H
+#define DNA_COLOR_TYPES_H
+
#include "DNA_vec_types.h"
/* general defines for kernel functions */
diff --git a/source/blender/makesdna/DNA_constraint_types.h b/source/blender/makesdna/DNA_constraint_types.h
index 87c680a6ee2..dd18ba903f6 100644
--- a/source/blender/makesdna/DNA_constraint_types.h
+++ b/source/blender/makesdna/DNA_constraint_types.h
@@ -26,13 +26,13 @@
* Constraint DNA data
*/
-#ifndef DNA_CONSTRAINT_TYPES_H
-#define DNA_CONSTRAINT_TYPES_H
-
/** \file DNA_constraint_types.h
* \ingroup DNA
*/
+#ifndef DNA_CONSTRAINT_TYPES_H
+#define DNA_CONSTRAINT_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_listBase.h"
@@ -180,7 +180,10 @@ typedef struct bSplineIKConstraint {
/* Track To Constraint */
typedef struct bTrackToConstraint {
struct Object *tar;
- int reserved1; /* I'll be using reserved1 and reserved2 as Track and Up flags, not sure if that's what they were intented for anyway. Not sure either if it would create backward incompatibility if I were to rename them. - theeth*/
+ int reserved1; /* I'll be using reserved1 and reserved2 as Track and Up flags,
+ * not sure if that's what they were intented for anyway.
+ * Not sure either if it would create backward incompatibility if I were to rename them.
+ * - theeth*/
int reserved2;
int flags;
int pad;
diff --git a/source/blender/makesdna/DNA_controller_types.h b/source/blender/makesdna/DNA_controller_types.h
index 049e7bd4886..c8f4325d717 100644
--- a/source/blender/makesdna/DNA_controller_types.h
+++ b/source/blender/makesdna/DNA_controller_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_CONTROLLER_TYPES_H
-#define DNA_CONTROLLER_TYPES_H
/** \file DNA_controller_types.h
* \ingroup DNA
*/
+#ifndef DNA_CONTROLLER_TYPES_H
+#define DNA_CONTROLLER_TYPES_H
+
struct bActuator;
struct Text;
struct bSensor;
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 545829911e5..ffcc516f393 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_CURVE_TYPES_H
-#define DNA_CURVE_TYPES_H
/** \file DNA_curve_types.h
* \ingroup DNA
*/
+#ifndef DNA_CURVE_TYPES_H
+#define DNA_CURVE_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
diff --git a/source/blender/makesdna/DNA_defs.h b/source/blender/makesdna/DNA_defs.h
index 127f7edda91..e23175b40e4 100644
--- a/source/blender/makesdna/DNA_defs.h
+++ b/source/blender/makesdna/DNA_defs.h
@@ -20,13 +20,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_DEFS_H
-#define DNA_DEFS_H
-
/** \file DNA_defs.h
* \ingroup DNA
*/
+#ifndef DNA_DEFS_H
+#define DNA_DEFS_H
+
/* makesdna ignores */
#ifdef DNA_DEPRECATED_ALLOW
/* allow use of deprecated items */
diff --git a/source/blender/makesdna/DNA_dynamicpaint_types.h b/source/blender/makesdna/DNA_dynamicpaint_types.h
index fdfd1e2b754..d58e11d9640 100644
--- a/source/blender/makesdna/DNA_dynamicpaint_types.h
+++ b/source/blender/makesdna/DNA_dynamicpaint_types.h
@@ -1,15 +1,30 @@
-/**
-* ***** BEGIN GPL LICENSE BLOCK *****
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* Contributor(s): Miika Hämäläinen
-*
-* ***** END GPL LICENSE BLOCK *****
-*/
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Miika Hämäläinen
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/** \file DNA_dynamicpaint_types.h
+ * \ingroup DNA
+ */
+
#ifndef DNA_DYNAMICPAINT_TYPES_H
#define DNA_DYNAMICPAINT_TYPES_H
diff --git a/source/blender/makesdna/DNA_effect_types.h b/source/blender/makesdna/DNA_effect_types.h
index 237360f003e..b7437b5e973 100644
--- a/source/blender/makesdna/DNA_effect_types.h
+++ b/source/blender/makesdna/DNA_effect_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_EFFECT_TYPES_H
-#define DNA_EFFECT_TYPES_H
/** \file DNA_effect_types.h
* \ingroup DNA
*/
+#ifndef DNA_EFFECT_TYPES_H
+#define DNA_EFFECT_TYPES_H
+
/* don't forget, new effects also in writefile.c for dna!!! */
#define PAF_MAXMULT 4
diff --git a/source/blender/makesdna/DNA_fileglobal_types.h b/source/blender/makesdna/DNA_fileglobal_types.h
index c606e5132d2..31ad628d630 100644
--- a/source/blender/makesdna/DNA_fileglobal_types.h
+++ b/source/blender/makesdna/DNA_fileglobal_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_FILEGLOBAL_TYPES_H
-#define DNA_FILEGLOBAL_TYPES_H
/** \file DNA_fileglobal_types.h
* \ingroup DNA
*/
+#ifndef DNA_FILEGLOBAL_TYPES_H
+#define DNA_FILEGLOBAL_TYPES_H
+
struct bScreen;
struct Scene;
diff --git a/source/blender/makesdna/DNA_genfile.h b/source/blender/makesdna/DNA_genfile.h
index be13c8bba4f..6516b50402d 100644
--- a/source/blender/makesdna/DNA_genfile.h
+++ b/source/blender/makesdna/DNA_genfile.h
@@ -25,14 +25,14 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef GENFILE_H
-#define GENFILE_H
-
/** \file DNA_genfile.h
* \ingroup DNA
* \brief blenloader genfile private function prototypes
*/
+#ifndef DNA_GENFILE_H
+#define DNA_GENFILE_H
+
struct SDNA;
extern unsigned char DNAstr[]; /* DNA.c */
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index a4d0b3685e3..71f0dbb60b1 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -22,13 +22,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_GPENCIL_TYPES_H
-#define DNA_GPENCIL_TYPES_H
/** \file DNA_gpencil_types.h
* \ingroup DNA
*/
+#ifndef DNA_GPENCIL_TYPES_H
+#define DNA_GPENCIL_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_group_types.h b/source/blender/makesdna/DNA_group_types.h
index e174900aa8d..ab42086d6d0 100644
--- a/source/blender/makesdna/DNA_group_types.h
+++ b/source/blender/makesdna/DNA_group_types.h
@@ -27,13 +27,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_GROUP_TYPES_H
-#define DNA_GROUP_TYPES_H
/** \file DNA_group_types.h
* \ingroup DNA
*/
+#ifndef DNA_GROUP_TYPES_H
+#define DNA_GROUP_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index 4c3cc0ac0eb..fc8807d0f7c 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_IMAGE_TYPES_H
-#define DNA_IMAGE_TYPES_H
/** \file DNA_image_types.h
* \ingroup DNA
*/
+#ifndef DNA_IMAGE_TYPES_H
+#define DNA_IMAGE_TYPES_H
+
#include "DNA_ID.h"
struct PackedFile;
diff --git a/source/blender/makesdna/DNA_lamp_types.h b/source/blender/makesdna/DNA_lamp_types.h
index 1c22583b82c..18fbde8a3c3 100644
--- a/source/blender/makesdna/DNA_lamp_types.h
+++ b/source/blender/makesdna/DNA_lamp_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_LAMP_TYPES_H
-#define DNA_LAMP_TYPES_H
/** \file DNA_lamp_types.h
* \ingroup DNA
*/
+#ifndef DNA_LAMP_TYPES_H
+#define DNA_LAMP_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_lattice_types.h b/source/blender/makesdna/DNA_lattice_types.h
index baa2f5f911a..2a67afb5708 100644
--- a/source/blender/makesdna/DNA_lattice_types.h
+++ b/source/blender/makesdna/DNA_lattice_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_LATTICE_TYPES_H
-#define DNA_LATTICE_TYPES_H
/** \file DNA_lattice_types.h
* \ingroup DNA
*/
+#ifndef DNA_LATTICE_TYPES_H
+#define DNA_LATTICE_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_listBase.h b/source/blender/makesdna/DNA_listBase.h
index 6a472272382..99ad6f41e96 100644
--- a/source/blender/makesdna/DNA_listBase.h
+++ b/source/blender/makesdna/DNA_listBase.h
@@ -27,15 +27,15 @@
*
*/
-#ifndef DNA_LISTBASE_H
-#define DNA_LISTBASE_H
-
/** \file DNA_listBase.h
* \ingroup DNA
* \brief These structs are the foundation for all linked lists in the
* library system.
*/
+#ifndef DNA_LISTBASE_H
+#define DNA_LISTBASE_H
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 189f52eead9..55e9328a72a 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_MATERIAL_TYPES_H
-#define DNA_MATERIAL_TYPES_H
/** \file DNA_material_types.h
* \ingroup DNA
*/
+#ifndef DNA_MATERIAL_TYPES_H
+#define DNA_MATERIAL_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_listBase.h"
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index dd10cdea7ef..ce8efa722de 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_MESH_TYPES_H
-#define DNA_MESH_TYPES_H
/** \file DNA_mesh_types.h
* \ingroup DNA
*/
+#ifndef DNA_MESH_TYPES_H
+#define DNA_MESH_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 9325192f27a..ed13ae00632 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_MESHDATA_TYPES_H
-#define DNA_MESHDATA_TYPES_H
/** \file DNA_meshdata_types.h
* \ingroup DNA
*/
+#ifndef DNA_MESHDATA_TYPES_H
+#define DNA_MESHDATA_TYPES_H
+
#include "DNA_customdata_types.h"
#include "DNA_listBase.h"
diff --git a/source/blender/makesdna/DNA_meta_types.h b/source/blender/makesdna/DNA_meta_types.h
index 1ce90e7d526..ae658cee8f5 100644
--- a/source/blender/makesdna/DNA_meta_types.h
+++ b/source/blender/makesdna/DNA_meta_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_META_TYPES_H
-#define DNA_META_TYPES_H
/** \file DNA_meta_types.h
* \ingroup DNA
*/
+#ifndef DNA_META_TYPES_H
+#define DNA_META_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 41ca37c8863..093ab2f6dc1 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -18,13 +18,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_MODIFIER_TYPES_H
-#define DNA_MODIFIER_TYPES_H
-
/** \file DNA_modifier_types.h
* \ingroup DNA
*/
+#ifndef DNA_MODIFIER_TYPES_H
+#define DNA_MODIFIER_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_listBase.h"
diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h
index 1a065741121..5d2f2f5978f 100644
--- a/source/blender/makesdna/DNA_movieclip_types.h
+++ b/source/blender/makesdna/DNA_movieclip_types.h
@@ -26,15 +26,15 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_MOVIECLIP_TYPES_H
-#define DNA_MOVIECLIP_TYPES_H
-
/** \file DNA_movieclip_types.h
* \ingroup DNA
* \since may-2011
* \author Sergey Sharybin
*/
+#ifndef DNA_MOVIECLIP_TYPES_H
+#define DNA_MOVIECLIP_TYPES_H
+
#include "DNA_ID.h"
#include "DNA_tracking_types.h"
diff --git a/source/blender/makesdna/DNA_nla_types.h b/source/blender/makesdna/DNA_nla_types.h
index b92cf5c67e4..a28097e8449 100644
--- a/source/blender/makesdna/DNA_nla_types.h
+++ b/source/blender/makesdna/DNA_nla_types.h
@@ -25,13 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_NLA_TYPES_H
-#define DNA_NLA_TYPES_H
-
/** \file DNA_nla_types.h
* \ingroup DNA
*/
+#ifndef DNA_NLA_TYPES_H
+#define DNA_NLA_TYPES_H
+
#include "DNA_listBase.h"
struct bAction;
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 2dfc05bda04..aa9b43584fd 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -25,13 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_NODE_TYPES_H
-#define DNA_NODE_TYPES_H
-
/** \file DNA_node_types.h
* \ingroup DNA
*/
+#ifndef DNA_NODE_TYPES_H
+#define DNA_NODE_TYPES_H
+
#include "DNA_ID.h"
#include "DNA_vec_types.h"
#include "DNA_listBase.h"
diff --git a/source/blender/makesdna/DNA_object_fluidsim.h b/source/blender/makesdna/DNA_object_fluidsim.h
index fd6f4afd593..022dc53848f 100644
--- a/source/blender/makesdna/DNA_object_fluidsim.h
+++ b/source/blender/makesdna/DNA_object_fluidsim.h
@@ -26,13 +26,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_OBJECT_FLUIDSIM_H
-#define DNA_OBJECT_FLUIDSIM_H
/** \file DNA_object_fluidsim.h
* \ingroup DNA
*/
+#ifndef DNA_OBJECT_FLUIDSIM_H
+#define DNA_OBJECT_FLUIDSIM_H
+
#include "DNA_ID.h"
#ifdef __cplusplus
diff --git a/source/blender/makesdna/DNA_object_force.h b/source/blender/makesdna/DNA_object_force.h
index 61fc44d94ff..5875ff30bcc 100644
--- a/source/blender/makesdna/DNA_object_force.h
+++ b/source/blender/makesdna/DNA_object_force.h
@@ -26,13 +26,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_OBJECT_FORCE_H
-#define DNA_OBJECT_FORCE_H
/** \file DNA_object_force.h
* \ingroup DNA
*/
+#ifndef DNA_OBJECT_FORCE_H
+#define DNA_OBJECT_FORCE_H
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 46b971e8e0d..7f1239195ec 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -24,14 +24,15 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_OBJECT_TYPES_H
-#define DNA_OBJECT_TYPES_H
/** \file DNA_object_types.h
* \ingroup DNA
* \brief Object is a sort of wrapper for general info.
*/
+#ifndef DNA_OBJECT_TYPES_H
+#define DNA_OBJECT_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h
index ec8f85ea91f..ee3903c3b40 100644
--- a/source/blender/makesdna/DNA_outliner_types.h
+++ b/source/blender/makesdna/DNA_outliner_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_OUTLINER_TYPES_H
-#define DNA_OUTLINER_TYPES_H
/** \file DNA_outliner_types.h
* \ingroup DNA
*/
+#ifndef DNA_OUTLINER_TYPES_H
+#define DNA_OUTLINER_TYPES_H
+
#include "DNA_listBase.h"
struct ID;
diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h
index bbbbf39619b..91134c2c575 100644
--- a/source/blender/makesdna/DNA_packedFile_types.h
+++ b/source/blender/makesdna/DNA_packedFile_types.h
@@ -25,15 +25,15 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_PACKEDFILE_TYPES_H
-#define DNA_PACKEDFILE_TYPES_H
-
/** \file DNA_packedFile_types.h
* \ingroup DNA
* \author nzc
* \since 12-oct-2000 nzc
*/
+#ifndef DNA_PACKEDFILE_TYPES_H
+#define DNA_PACKEDFILE_TYPES_H
+
typedef struct PackedFile {
int size;
int seek;
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index 504c847a9ea..07efd17df7f 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -25,13 +25,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_PARTICLE_TYPES_H
-#define DNA_PARTICLE_TYPES_H
-
/** \file DNA_particle_types.h
* \ingroup DNA
*/
+#ifndef DNA_PARTICLE_TYPES_H
+#define DNA_PARTICLE_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_boid_types.h"
diff --git a/source/blender/makesdna/DNA_property_types.h b/source/blender/makesdna/DNA_property_types.h
index 004016606a5..e74ae41a421 100644
--- a/source/blender/makesdna/DNA_property_types.h
+++ b/source/blender/makesdna/DNA_property_types.h
@@ -27,8 +27,6 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_PROPERTY_TYPES_H
-#define DNA_PROPERTY_TYPES_H
/** \file DNA_property_types.h
* \ingroup DNA
@@ -38,6 +36,9 @@
* hierarchy here is a bit strange, and not desirable.
*/
+#ifndef DNA_PROPERTY_TYPES_H
+#define DNA_PROPERTY_TYPES_H
+
/* ********************* PROPERTY ************************ */
typedef struct bProperty {
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 64b5bda3fc8..d1ab12433fb 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SCENE_TYPES_H
-#define DNA_SCENE_TYPES_H
/** \file DNA_scene_types.h
* \ingroup DNA
*/
+#ifndef DNA_SCENE_TYPES_H
+#define DNA_SCENE_TYPES_H
+
#include "DNA_defs.h"
// XXX, temp feature - campbell
@@ -332,9 +333,15 @@ typedef struct RenderData {
/** For UR edge rendering: give the edges this color */
float edgeR, edgeG, edgeB;
-
- short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED, freqplay DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5
- short depth DNA_DEPRECATED, attrib DNA_DEPRECATED; /* standalone player */ // XXX deprecated since 2.5
+
+
+ /* standalone player */ // XXX deprecated since 2.5
+ short fullscreen DNA_DEPRECATED, xplay DNA_DEPRECATED, yplay DNA_DEPRECATED;
+ short freqplay DNA_DEPRECATED;
+ /* standalone player */ // XXX deprecated since 2.5
+ short depth DNA_DEPRECATED, attrib DNA_DEPRECATED;
+
+
int frame_step; /* frames to jump during render/playback */
short stereomode DNA_DEPRECATED; /* standalone player stereo settings */ // XXX deprecated since 2.5
@@ -1083,7 +1090,9 @@ typedef struct Scene {
#define R_STAMP_SEQSTRIP 0x0200
#define R_STAMP_RENDERTIME 0x0400
#define R_STAMP_CAMERALENS 0x0800
-#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE|R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP|R_STAMP_RENDERTIME|R_STAMP_CAMERALENS)
+#define R_STAMP_ALL (R_STAMP_TIME|R_STAMP_FRAME|R_STAMP_DATE|R_STAMP_CAMERA|R_STAMP_SCENE| \
+ R_STAMP_NOTE|R_STAMP_MARKER|R_STAMP_FILENAME|R_STAMP_SEQSTRIP| \
+ R_STAMP_RENDERTIME|R_STAMP_CAMERALENS)
/* alphamode */
#define R_ADDSKY 0
@@ -1141,12 +1150,31 @@ typedef struct Scene {
#define MINAFRAMEF -300000.0f
/* depricate this! */
-#define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
-#define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
-#define TESTBASELIB_BGMODE(v3d, scene, base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
-#define BASE_EDITABLE_BGMODE(v3d, scene, base) (((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==NULL) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
-#define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
-#define BASE_VISIBLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & OB_RESTRICT_VIEW)==0)
+#define TESTBASE(v3d, base) ( \
+ ((base)->flag & SELECT) && \
+ ((base)->lay & v3d->lay) && \
+ (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
+#define TESTBASELIB(v3d, base) ( \
+ ((base)->flag & SELECT) && \
+ ((base)->lay & v3d->lay) && \
+ ((base)->object->id.lib==NULL) && \
+ (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
+#define TESTBASELIB_BGMODE(v3d, scene, base) ( \
+ ((base)->flag & SELECT) && \
+ ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \
+ ((base)->object->id.lib==NULL) && \
+ (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
+#define BASE_EDITABLE_BGMODE(v3d, scene, base) ( \
+ ((base)->lay & (v3d ? v3d->lay : scene->lay)) && \
+ ((base)->object->id.lib==NULL) && \
+ (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+#define BASE_SELECTABLE(v3d, base) ( \
+ (base->lay & v3d->lay) && \
+ (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0 )
+#define BASE_VISIBLE(v3d, base) ( \
+ (base->lay & v3d->lay) && \
+ (base->object->restrictflag & OB_RESTRICT_VIEW)==0 )
+
#define FIRSTBASE scene->base.first
#define LASTBASE scene->base.last
#define BASACT (scene->basact)
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index c90a0acc273..504c8da7612 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -22,13 +22,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SCREEN_TYPES_H
-#define DNA_SCREEN_TYPES_H
/** \file DNA_screen_types.h
* \ingroup DNA
*/
+#ifndef DNA_SCREEN_TYPES_H
+#define DNA_SCREEN_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_view2d_types.h"
#include "DNA_vec_types.h"
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index b3419a77aab..462ff8ce045 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SDNA_H
-#define DNA_SDNA_H
/**
* \file DNA_sdna_types.h
* \ingroup DNA
*/
+#ifndef DNA_SDNA_H
+#define DNA_SDNA_H
+
#
#
typedef struct SDNA {
diff --git a/source/blender/makesdna/DNA_sensor_types.h b/source/blender/makesdna/DNA_sensor_types.h
index 451774b1abb..e7444b06898 100644
--- a/source/blender/makesdna/DNA_sensor_types.h
+++ b/source/blender/makesdna/DNA_sensor_types.h
@@ -24,15 +24,16 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SENSOR_TYPES_H
-#define DNA_SENSOR_TYPES_H
+
/** \file DNA_sensor_types.h
* \ingroup DNA
* \since mar-2001
* \author nzc
- *
*/
+#ifndef DNA_SENSOR_TYPES_H
+#define DNA_SENSOR_TYPES_H
+
struct Object;
struct Material;
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 50f406afbf9..aab20dbeee1 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -24,14 +24,15 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SEQUENCE_TYPES_H
-#define DNA_SEQUENCE_TYPES_H
/** \file DNA_sequence_types.h
* \ingroup DNA
* \since mar-2001
* \author nzc
*/
+#ifndef DNA_SEQUENCE_TYPES_H
+#define DNA_SEQUENCE_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index 5b3aae6e4a8..ed764c4f644 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SMOKE_TYPES_H
-#define DNA_SMOKE_TYPES_H
/** \file DNA_smoke_types.h
* \ingroup DNA
*/
+#ifndef DNA_SMOKE_TYPES_H
+#define DNA_SMOKE_TYPES_H
+
/* flags */
#define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */
#define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */
diff --git a/source/blender/makesdna/DNA_sound_types.h b/source/blender/makesdna/DNA_sound_types.h
index b83ab0f9f75..f530730a544 100644
--- a/source/blender/makesdna/DNA_sound_types.h
+++ b/source/blender/makesdna/DNA_sound_types.h
@@ -24,14 +24,15 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SOUND_TYPES_H
-#define DNA_SOUND_TYPES_H
/** \file DNA_sound_types.h
* \ingroup DNA
* \since mar-2001
* \author nzc
*/
+#ifndef DNA_SOUND_TYPES_H
+#define DNA_SOUND_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 29967dfc1bd..d502e56bf10 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -24,14 +24,15 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SPACE_TYPES_H
-#define DNA_SPACE_TYPES_H
/** \file DNA_space_types.h
* \ingroup DNA
* \since mar-2001
* \author nzc
*/
+#ifndef DNA_SPACE_TYPES_H
+#define DNA_SPACE_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_listBase.h"
#include "DNA_color_types.h" /* for Histogram */
diff --git a/source/blender/makesdna/DNA_speaker_types.h b/source/blender/makesdna/DNA_speaker_types.h
index 02106fa45ad..2e8227f4f92 100644
--- a/source/blender/makesdna/DNA_speaker_types.h
+++ b/source/blender/makesdna/DNA_speaker_types.h
@@ -19,13 +19,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_SPEAKER_TYPES_H
-#define DNA_SPEAKER_TYPES_H
/** \file DNA_speaker_types.h
* \ingroup DNA
*/
+#ifndef DNA_SPEAKER_TYPES_H
+#define DNA_SPEAKER_TYPES_H
+
#include "DNA_ID.h"
struct AnimData;
diff --git a/source/blender/makesdna/DNA_text_types.h b/source/blender/makesdna/DNA_text_types.h
index 18622cfe75f..67f3c5288f6 100644
--- a/source/blender/makesdna/DNA_text_types.h
+++ b/source/blender/makesdna/DNA_text_types.h
@@ -24,14 +24,15 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_TEXT_TYPES_H
-#define DNA_TEXT_TYPES_H
/** \file DNA_text_types.h
* \ingroup DNA
* \since mar-2001
* \author nzc
*/
+#ifndef DNA_TEXT_TYPES_H
+#define DNA_TEXT_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_ID.h"
diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h
index 5d060f152aa..82ffa82cf60 100644
--- a/source/blender/makesdna/DNA_texture_types.h
+++ b/source/blender/makesdna/DNA_texture_types.h
@@ -24,8 +24,6 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_TEXTURE_TYPES_H
-#define DNA_TEXTURE_TYPES_H
/** \file DNA_texture_types.h
* \ingroup DNA
@@ -33,6 +31,9 @@
* \author nzc
*/
+#ifndef DNA_TEXTURE_TYPES_H
+#define DNA_TEXTURE_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_image_types.h" /* ImageUser */
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h
index 82ccbf87c0b..a93ce75ebc9 100644
--- a/source/blender/makesdna/DNA_tracking_types.h
+++ b/source/blender/makesdna/DNA_tracking_types.h
@@ -26,15 +26,15 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_TRACKING_TYPES_H
-#define DNA_TRACKING_TYPES_H
-
/** \file DNA_tracking_types.h
* \ingroup DNA
* \since may-2011
* \author Sergey Sharybin
*/
+#ifndef DNA_TRACKING_TYPES_H
+#define DNA_TRACKING_TYPES_H
+
#include "DNA_listBase.h"
/* match-moving data */
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index b30a1baf7bb..b3398460500 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -25,15 +25,15 @@
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_USERDEF_TYPES_H
-#define DNA_USERDEF_TYPES_H
/** \file DNA_userdef_types.h
* \ingroup DNA
* \since mar-2001
* \author nzc
- *
*/
+#ifndef DNA_USERDEF_TYPES_H
+#define DNA_USERDEF_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_texture_types.h" /* ColorBand */
diff --git a/source/blender/makesdna/DNA_vec_types.h b/source/blender/makesdna/DNA_vec_types.h
index 9e7e9ffad3f..2ac0614aad9 100644
--- a/source/blender/makesdna/DNA_vec_types.h
+++ b/source/blender/makesdna/DNA_vec_types.h
@@ -26,14 +26,15 @@
*
*/
-#ifndef DNA_VEC_TYPES_H
-#define DNA_VEC_TYPES_H
/** \file DNA_vec_types.h
* \ingroup DNA
* \since dec-2000
* \author nzc
*/
+#ifndef DNA_VEC_TYPES_H
+#define DNA_VEC_TYPES_H
+
/* types */
/** vector of two shorts. */
diff --git a/source/blender/makesdna/DNA_vfont_types.h b/source/blender/makesdna/DNA_vfont_types.h
index d51b59b966e..7132751848d 100644
--- a/source/blender/makesdna/DNA_vfont_types.h
+++ b/source/blender/makesdna/DNA_vfont_types.h
@@ -24,8 +24,6 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_VFONT_TYPES_H
-#define DNA_VFONT_TYPES_H
/** \file DNA_vfont_types.h
* \ingroup DNA
@@ -33,6 +31,9 @@
* \author nzc
*/
+#ifndef DNA_VFONT_TYPES_H
+#define DNA_VFONT_TYPES_H
+
#include "DNA_ID.h"
struct PackedFile;
diff --git a/source/blender/makesdna/DNA_view2d_types.h b/source/blender/makesdna/DNA_view2d_types.h
index 8f64246db31..0581cad4170 100644
--- a/source/blender/makesdna/DNA_view2d_types.h
+++ b/source/blender/makesdna/DNA_view2d_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_VIEW2D_TYPES_H
-#define DNA_VIEW2D_TYPES_H
/** \file DNA_view2d_types.h
* \ingroup DNA
*/
+#ifndef DNA_VIEW2D_TYPES_H
+#define DNA_VIEW2D_TYPES_H
+
#include "DNA_vec_types.h"
/* ---------------------------------- */
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 51ee8f63df5..ae026b0bcc9 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_VIEW3D_TYPES_H
-#define DNA_VIEW3D_TYPES_H
/** \file DNA_view3d_types.h
* \ingroup DNA
*/
+#ifndef DNA_VIEW3D_TYPES_H
+#define DNA_VIEW3D_TYPES_H
+
struct ViewDepths;
struct Object;
struct Image;
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 0065fc110c3..57989424d4a 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -23,13 +23,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_WINDOWMANAGER_TYPES_H
-#define DNA_WINDOWMANAGER_TYPES_H
/** \file DNA_windowmanager_types.h
* \ingroup DNA
*/
+#ifndef DNA_WINDOWMANAGER_TYPES_H
+#define DNA_WINDOWMANAGER_TYPES_H
+
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
diff --git a/source/blender/makesdna/DNA_world_types.h b/source/blender/makesdna/DNA_world_types.h
index 149393b6723..a04ea89a291 100644
--- a/source/blender/makesdna/DNA_world_types.h
+++ b/source/blender/makesdna/DNA_world_types.h
@@ -24,13 +24,14 @@
*
* ***** END GPL LICENSE BLOCK *****
*/
-#ifndef DNA_WORLD_TYPES_H
-#define DNA_WORLD_TYPES_H
/** \file DNA_world_types.h
* \ingroup DNA
*/
+#ifndef DNA_WORLD_TYPES_H
+#define DNA_WORLD_TYPES_H
+
#include "DNA_defs.h"
#include "DNA_ID.h"
diff --git a/source/blender/nodes/shader/nodes/node_shader_dynamic.c b/source/blender/nodes/shader/nodes/node_shader_dynamic.c
index 5e7c99f7276..e55b1b164df 100644
--- a/source/blender/nodes/shader/nodes/node_shader_dynamic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_dynamic.c
@@ -61,7 +61,8 @@ static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNode
static void node_dynamic_free_storage_cb(bNode *node);
#ifdef WITH_PYTHON
-static PyObject *init_dynamicdict(void) {
+static PyObject *init_dynamicdict(void)
+{
PyObject *newscriptdict, *item;
PyGILState_STATE gilstate = PyGILState_Ensure();
@@ -329,7 +330,8 @@ static void node_dynamic_reset_loaded(bNode *node)
node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, NULL);
}
-int nodeDynamicUnlinkText(ID *txtid) {
+int nodeDynamicUnlinkText(ID *txtid)
+{
Material *ma;
bNode *nd;
@@ -653,7 +655,8 @@ static void node_dynamic_setup(bNode *node)
* NODE_DYNAMIC_MENU: for the default Dynamic node type
* > NODE_DYNAMIC_MENU: for the new types defined by scripts
*/
-static void node_dynamic_init_cb(bNode *node) {
+static void node_dynamic_init_cb(bNode *node)
+{
int type = node->custom2;
node->custom2 = 0;
@@ -700,7 +703,8 @@ static void node_dynamic_copy_cb(bNode *orig_node, bNode *new_node)
/* node_dynamic_exec_cb: the execution callback called per pixel
* during rendering. */
-static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out) {
+static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
+{
#ifndef WITH_PYTHON
return;
#else
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index b23db759603..d911fcb99b1 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1118,12 +1118,10 @@ static int pyrna_string_to_enum(PyObject *item, PointerRNA *ptr, PropertyRNA *pr
const char *param = _PyUnicode_AsString(item);
if (param == NULL) {
- const char *enum_str = pyrna_enum_as_string(ptr, prop);
PyErr_Format(PyExc_TypeError,
- "%.200s expected a string enum type in (%.200s)",
- error_prefix, enum_str);
- MEM_freeN((void *)enum_str);
- return 0;
+ "%.200s expected a string enum, not %.200s",
+ error_prefix, Py_TYPE(item)->tp_name);
+ return -1;
}
else {
/* hack so that dynamic enums used for operator properties will be able to be built (i.e. context will be supplied to itemf)
@@ -1136,11 +1134,11 @@ static int pyrna_string_to_enum(PyObject *item, PointerRNA *ptr, PropertyRNA *pr
"%.200s enum \"%.200s\" not found in (%.200s)",
error_prefix, param, enum_str);
MEM_freeN((void *)enum_str);
- return 0;
+ return -1;
}
}
- return 1;
+ return 0;
}
/* 'value' _must_ be a set type, error check before calling */
@@ -1652,7 +1650,7 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
}
else {
/* simple enum string */
- if (!pyrna_string_to_enum(value, ptr, prop, &val, error_prefix) < 0) {
+ if (pyrna_string_to_enum(value, ptr, prop, &val, error_prefix) < 0) {
return -1;
}
}
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index c44443f0ed5..0e52d43b525 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -2075,22 +2075,6 @@ static PyNumberMethods Matrix_NumMethods = {
NULL, /* nb_index */
};
-PyDoc_STRVAR(Matrix_row_size_doc,
-"The row size of the matrix (readonly).\n\n:type: int"
-);
-static PyObject *Matrix_row_size_get(MatrixObject *self, void *UNUSED(closure))
-{
- return PyLong_FromLong((long) self->num_col);
-}
-
-PyDoc_STRVAR(Matrix_col_size_doc,
-"The column size of the matrix (readonly).\n\n:type: int"
-);
-static PyObject *Matrix_col_size_get(MatrixObject *self, void *UNUSED(closure))
-{
- return PyLong_FromLong((long) self->num_row);
-}
-
PyDoc_STRVAR(Matrix_translation_doc,
"The translation component of the matrix.\n\n:type: Vector"
);
@@ -2225,8 +2209,6 @@ static PyObject *Matrix_is_orthogonal_get(MatrixObject *self, void *UNUSED(closu
/* Python attributes get/set structure: */
/*****************************************************************************/
static PyGetSetDef Matrix_getseters[] = {
- {(char *)"row_size", (getter)Matrix_row_size_get, (setter)NULL, Matrix_row_size_doc, NULL},
- {(char *)"col_size", (getter)Matrix_col_size_get, (setter)NULL, Matrix_col_size_doc, NULL},
{(char *)"median_scale", (getter)Matrix_median_scale_get, (setter)NULL, Matrix_median_scale_doc, NULL},
{(char *)"translation", (getter)Matrix_translation_get, (setter)Matrix_translation_set, Matrix_translation_doc, NULL},
{(char *)"row", (getter)Matrix_row_get, (setter)NULL, Matrix_row_doc, NULL},
diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m
index b1fa00d3509..365a06c7cd8 100644
--- a/source/blender/quicktime/apple/qtkit_export.m
+++ b/source/blender/quicktime/apple/qtkit_export.m
@@ -127,7 +127,8 @@ static QuicktimeCodecTypeDesc qtVideoCodecList[] = {
static int qtVideoCodecCount = 18;
-int quicktime_get_num_videocodecs() {
+int quicktime_get_num_videocodecs()
+{
return qtVideoCodecCount;
}
@@ -138,7 +139,8 @@ QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue) {
return NULL;
}
-int quicktime_rnatmpvalue_from_videocodectype(int codecType) {
+int quicktime_rnatmpvalue_from_videocodectype(int codecType)
+{
int i;
for (i=0;i<qtVideoCodecCount;i++) {
if (qtVideoCodecList[i].codecType == codecType)
@@ -148,7 +150,8 @@ int quicktime_rnatmpvalue_from_videocodectype(int codecType) {
return 0;
}
-int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue) {
+int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue)
+{
int i;
for (i=0;i<qtVideoCodecCount;i++) {
if (qtVideoCodecList[i].rnatmpvalue == rnatmpvalue)
@@ -168,7 +171,8 @@ static QuicktimeCodecTypeDesc qtAudioCodecList[] = {
static int qtAudioCodecCount = 4;
-int quicktime_get_num_audiocodecs() {
+int quicktime_get_num_audiocodecs()
+{
return qtAudioCodecCount;
}
@@ -179,7 +183,8 @@ QuicktimeCodecTypeDesc* quicktime_get_audiocodecType_desc(int indexValue) {
return NULL;
}
-int quicktime_rnatmpvalue_from_audiocodectype(int codecType) {
+int quicktime_rnatmpvalue_from_audiocodectype(int codecType)
+{
int i;
for (i=0;i<qtAudioCodecCount;i++) {
if (qtAudioCodecList[i].codecType == codecType)
@@ -189,7 +194,8 @@ int quicktime_rnatmpvalue_from_audiocodectype(int codecType) {
return 0;
}
-int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue) {
+int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue)
+{
int i;
for (i=0;i<qtAudioCodecCount;i++) {
if (qtAudioCodecList[i].rnatmpvalue == rnatmpvalue)
@@ -200,7 +206,8 @@ int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue) {
}
-static NSString *stringWithCodecType(int codecType) {
+static NSString *stringWithCodecType(int codecType)
+{
char str[5];
*((int*)str) = EndianU32_NtoB(codecType);
@@ -209,7 +216,8 @@ static NSString *stringWithCodecType(int codecType) {
return [NSString stringWithCString:str encoding:NSASCIIStringEncoding];
}
-void makeqtstring (RenderData *rd, char *string) {
+void makeqtstring (RenderData *rd, char *string)
+{
char txt[64];
strcpy(string, rd->pic);
@@ -223,7 +231,8 @@ void makeqtstring (RenderData *rd, char *string) {
}
}
-void filepath_qt(char *string, RenderData *rd) {
+void filepath_qt(char *string, RenderData *rd)
+{
if (string==NULL) return;
strcpy(string, rd->pic);
@@ -779,7 +788,8 @@ void end_qt(void)
}
-void free_qtcomponentdata(void) {
+void free_qtcomponentdata(void)
+{
}
void quicktime_verify_image_type(RenderData *rd, ImageFormatData *imf)
diff --git a/source/blender/quicktime/apple/qtkit_import.m b/source/blender/quicktime/apple/qtkit_import.m
index 4307529002c..4c2bcee0150 100644
--- a/source/blender/quicktime/apple/qtkit_import.m
+++ b/source/blender/quicktime/apple/qtkit_import.m
@@ -112,7 +112,8 @@ int anim_is_quicktime (const char *name)
}
-void free_anim_quicktime (struct anim *anim) {
+void free_anim_quicktime (struct anim *anim)
+{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if (anim == NULL) return;
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c
index 5dfce9d3e80..101fcc0a732 100644
--- a/source/blender/quicktime/apple/quicktime_export.c
+++ b/source/blender/quicktime/apple/quicktime_export.c
@@ -148,7 +148,8 @@ static QuicktimeCodecTypeDesc qtVideoCodecList[] = {
static int qtVideoCodecCount = 12;
-int quicktime_get_num_videocodecs() {
+int quicktime_get_num_videocodecs()
+{
return qtVideoCodecCount;
}
@@ -159,7 +160,8 @@ QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue) {
return NULL;
}
-int quicktime_rnatmpvalue_from_videocodectype(int codecType) {
+int quicktime_rnatmpvalue_from_videocodectype(int codecType)
+{
int i;
for (i=0;i<qtVideoCodecCount;i++) {
if (qtVideoCodecList[i].codecType == codecType)
@@ -169,7 +171,8 @@ int quicktime_rnatmpvalue_from_videocodectype(int codecType) {
return 0;
}
-int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue) {
+int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue)
+{
int i;
for (i=0;i<qtVideoCodecCount;i++) {
if (qtVideoCodecList[i].rnatmpvalue == rnatmpvalue)
@@ -496,7 +499,8 @@ static void QT_EndAddVideoSamplesToMedia (void)
}
-void filepath_qt(char *string, RenderData *rd) {
+void filepath_qt(char *string, RenderData *rd)
+{
char txt[64];
if (string==0) return;
@@ -513,7 +517,8 @@ void filepath_qt(char *string, RenderData *rd) {
}
-int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, ReportList *reports) {
+int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, ReportList *reports)
+{
OSErr err = noErr;
char name[2048];
@@ -599,13 +604,15 @@ int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, R
}
-int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports) {
+int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports)
+{
QT_DoAddVideoSamplesToMedia(frame, pixels, rectx, recty, reports);
return 1;
}
-void end_qt(void) {
+void end_qt(void)
+{
OSErr err = noErr;
short resId = movieInDataForkResID;
@@ -639,7 +646,8 @@ void end_qt(void) {
}
-void free_qtcomponentdata(void) {
+void free_qtcomponentdata(void)
+{
if(qtdata) {
if(qtdata->theComponent) CloseComponent(qtdata->theComponent);
MEM_freeN(qtdata);
diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c
index d7ef371873a..b58b4a646e2 100644
--- a/source/blender/quicktime/apple/quicktime_import.c
+++ b/source/blender/quicktime/apple/quicktime_import.c
@@ -249,7 +249,8 @@ int anim_is_quicktime (const char *name)
}
-void free_anim_quicktime (struct anim *anim) {
+void free_anim_quicktime (struct anim *anim)
+{
if (anim == NULL) return;
if (anim->qtime == NULL) return;
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 0a481629ee8..7713dcffc5c 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2968,15 +2968,17 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
/* write movie or image */
if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
int dofree = 0;
+ unsigned int *rect32 = (unsigned int *)rres.rect32;
/* note; the way it gets 32 bits rects is weak... */
- if(rres.rect32==NULL) {
- rres.rect32= MEM_mapallocN(sizeof(int)*rres.rectx*rres.recty, "temp 32 bits rect");
+ if(rres.rect32 == NULL) {
+ rect32 = MEM_mapallocN(sizeof(int)*rres.rectx*rres.recty, "temp 32 bits rect");
+ RE_ResultGet32(re, rect32);
dofree = 1;
}
- RE_ResultGet32(re, (unsigned int *)rres.rect32);
- ok= mh->append_movie(&re->r, scene->r.cfra, rres.rect32, rres.rectx, rres.recty, re->reports);
+
+ ok= mh->append_movie(&re->r, scene->r.cfra, (int *)rect32, rres.rectx, rres.recty, re->reports);
if(dofree) {
- MEM_freeN(rres.rect32);
+ MEM_freeN(rect32);
}
printf("Append frame %d", scene->r.cfra);
}
diff --git a/source/gameengine/Converter/BL_ActionActuator.cpp b/source/gameengine/Converter/BL_ActionActuator.cpp
index 1bfe5945bbc..2aab0498765 100644
--- a/source/gameengine/Converter/BL_ActionActuator.cpp
+++ b/source/gameengine/Converter/BL_ActionActuator.cpp
@@ -123,7 +123,8 @@ void BL_ActionActuator::ProcessReplica()
}
-void BL_ActionActuator::SetBlendTime (float newtime){
+void BL_ActionActuator::SetBlendTime (float newtime)
+{
m_blendframe = newtime;
}
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 30d7c153748..f64bcf14d11 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1852,7 +1852,8 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
-static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) {
+static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter)
+{
RAS_LightObject lightobj;
KX_LightObject *gamelight;
@@ -1896,7 +1897,8 @@ static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int l
return gamelight;
}
-static KX_Camera *gamecamera_from_bcamera(Object *ob, KX_Scene *kxscene, KX_BlenderSceneConverter *converter) {
+static KX_Camera *gamecamera_from_bcamera(Object *ob, KX_Scene *kxscene, KX_BlenderSceneConverter *converter)
+{
Camera* ca = static_cast<Camera*>(ob->data);
RAS_CameraData camdata(ca->lens, ca->ortho_scale, ca->sensor_x, ca->sensor_y, ca->sensor_fit, ca->clipsta, ca->clipend, ca->type == CAM_PERSP, ca->YF_dofdist);
KX_Camera *gamecamera;
diff --git a/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp b/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
index a7ef518336a..343cf023417 100644
--- a/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
+++ b/source/gameengine/Converter/KX_BlenderScalarInterpolator.cpp
@@ -66,7 +66,8 @@ BL_InterpolatorList::~BL_InterpolatorList() {
}
}
-KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(const char *rna_path, int array_index) {
+KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(const char *rna_path, int array_index)
+{
for(BL_InterpolatorList::iterator i = begin(); (i != end()) ; i++ )
{
FCurve *fcu= (static_cast<BL_ScalarInterpolator *>(*i))->GetFCurve();
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index 2f5125a63dd..4fe436d634c 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -703,8 +703,8 @@ void KX_BlenderSceneConverter::ResetPhysicsObjectsAnimationIpo(bool clearIpo)
}
-void KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(){
-
+void KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo()
+{
if (addInitFromFrame){
KX_SceneList* scenes = m_ketsjiEngine->CurrentScenes();
int numScenes = scenes->size();
diff --git a/source/gameengine/Converter/KX_IpoConvert.cpp b/source/gameengine/Converter/KX_IpoConvert.cpp
index 1db5f1114c2..a56fbe5bef2 100644
--- a/source/gameengine/Converter/KX_IpoConvert.cpp
+++ b/source/gameengine/Converter/KX_IpoConvert.cpp
@@ -72,7 +72,8 @@
#include "STR_HashedString.h"
-static BL_InterpolatorList *GetAdtList(struct bAction *for_act, KX_BlenderSceneConverter *converter) {
+static BL_InterpolatorList *GetAdtList(struct bAction *for_act, KX_BlenderSceneConverter *converter)
+{
BL_InterpolatorList *adtList= converter->FindInterpolatorList(for_act);
if (!adtList) {
diff --git a/source/gameengine/Expressions/InputParser.cpp b/source/gameengine/Expressions/InputParser.cpp
index 27f4f0b10cb..726fea795ba 100644
--- a/source/gameengine/Expressions/InputParser.cpp
+++ b/source/gameengine/Expressions/InputParser.cpp
@@ -346,7 +346,8 @@ void CParser::NextSym()
}
#if 0
-int CParser::MakeInt() {
+int CParser::MakeInt()
+{
// returns the integer representation of the value in the global
// variable const_as_string
// pre: const_as_string contains only numercal chars
@@ -354,7 +355,8 @@ int CParser::MakeInt() {
}
#endif
-STR_String CParser::Symbol2Str(int s) {
+STR_String CParser::Symbol2Str(int s)
+{
// returns a string representation of of symbol s,
// for use in Term when generating an error
switch(s) {
@@ -373,7 +375,8 @@ STR_String CParser::Symbol2Str(int s) {
}
}
-void CParser::Term(int s) {
+void CParser::Term(int s)
+{
// generates an error if the next symbol isn't the specified symbol s
// otherwise, skip the symbol
if(s == sym) NextSym();
@@ -387,7 +390,8 @@ void CParser::Term(int s) {
}
}
-int CParser::Priority(int optorkind) {
+int CParser::Priority(int optorkind)
+{
// returns the priority of an operator
// higher number means higher priority
switch(optorkind) {
@@ -409,7 +413,8 @@ int CParser::Priority(int optorkind) {
return 0; // should not happen
}
-CExpression *CParser::Ex(int i) {
+CExpression *CParser::Ex(int i)
+{
// parses an expression in the imput, starting at priority i, and
// returns an CExpression, containing the parsed input
CExpression *e1 = NULL, *e2 = NULL;
@@ -551,7 +556,8 @@ CExpression *CParser::Ex(int i) {
return e1;
}
-CExpression *CParser::Expr() {
+CExpression *CParser::Expr()
+{
// parses an expression in the imput, and
// returns an CExpression, containing the parsed input
return Ex(1);
diff --git a/source/gameengine/Expressions/Operator1Expr.cpp b/source/gameengine/Expressions/Operator1Expr.cpp
index 0ef35108233..4e93ee0cb09 100644
--- a/source/gameengine/Expressions/Operator1Expr.cpp
+++ b/source/gameengine/Expressions/Operator1Expr.cpp
@@ -98,10 +98,9 @@ bool COperator1Expr::IsInside(float x, float y, float z,bool bBorderInclude)
}
*/
-bool COperator1Expr::NeedsRecalculated() {
-
+bool COperator1Expr::NeedsRecalculated()
+{
return m_lhs->NeedsRecalculated();
-
}
CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks) {
diff --git a/source/gameengine/Expressions/Operator2Expr.cpp b/source/gameengine/Expressions/Operator2Expr.cpp
index 7a012c4165c..11a509e59d0 100644
--- a/source/gameengine/Expressions/Operator2Expr.cpp
+++ b/source/gameengine/Expressions/Operator2Expr.cpp
@@ -168,17 +168,18 @@ bool COperator2Expr::IsInside(float x, float y, float z,bool bBorderInclude)
-bool COperator2Expr::IsRightInside(float x, float y, float z,bool bBorderInclude) {
-
+bool COperator2Expr::IsRightInside(float x, float y, float z,bool bBorderInclude)
+{
return m_rhs->IsInside(x,y,z,bBorderInclude) ;
-
}
-bool COperator2Expr::IsLeftInside(float x, float y, float z,bool bBorderInclude) {
+bool COperator2Expr::IsLeftInside(float x, float y, float z,bool bBorderInclude)
+{
return m_lhs->IsInside(x,y,z,bBorderInclude);
}
*/
-bool COperator2Expr::NeedsRecalculated() {
+bool COperator2Expr::NeedsRecalculated()
+{
// added some lines, just for debugging purposes, it could be a one-liner :)
//bool modleft
//bool modright;
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index 3e1c54b0cc7..b1072dd8336 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -54,7 +54,8 @@ extern "C" {
}
#endif
-static inline void Py_Fatal(const char *M) {
+static inline void Py_Fatal(const char *M)
+{
fprintf(stderr, "%s\n", M);
exit(-1);
};
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index 91fdbb0dabc..49150fc775f 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -530,7 +530,8 @@ PyAttributeDef CValue::Attributes[] = {
{ NULL } //Sentinel
};
-PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef) {
+PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef)
+{
CValue * self = static_cast<CValue *> (self_v);
return PyUnicode_From_STR_String(self->GetName());
}
diff --git a/source/gameengine/GameLogic/SCA_ISensor.cpp b/source/gameengine/GameLogic/SCA_ISensor.cpp
index 336150b2d6d..2a903e4f8b6 100644
--- a/source/gameengine/GameLogic/SCA_ISensor.cpp
+++ b/source/gameengine/GameLogic/SCA_ISensor.cpp
@@ -86,7 +86,8 @@ void SCA_ISensor::ProcessReplica()
m_linkedcontrollers.clear();
}
-bool SCA_ISensor::IsPositiveTrigger() {
+bool SCA_ISensor::IsPositiveTrigger()
+{
bool result = false;
if (m_eventval) {
@@ -107,40 +108,49 @@ void SCA_ISensor::SetPulseMode(bool posmode,
m_pulse_frequency = freq;
}
-void SCA_ISensor::SetInvert(bool inv) {
+void SCA_ISensor::SetInvert(bool inv)
+{
m_invert = inv;
}
-void SCA_ISensor::SetLevel(bool lvl) {
+void SCA_ISensor::SetLevel(bool lvl)
+{
m_level = lvl;
}
-void SCA_ISensor::SetTap(bool tap) {
+void SCA_ISensor::SetTap(bool tap)
+{
m_tap = tap;
}
-double SCA_ISensor::GetNumber() {
+double SCA_ISensor::GetNumber()
+{
return GetState();
}
-void SCA_ISensor::Suspend() {
+void SCA_ISensor::Suspend()
+{
m_suspended = true;
}
-bool SCA_ISensor::IsSuspended() {
+bool SCA_ISensor::IsSuspended()
+{
return m_suspended;
}
-void SCA_ISensor::Resume() {
+void SCA_ISensor::Resume()
+{
m_suspended = false;
}
-void SCA_ISensor::Init() {
+void SCA_ISensor::Init()
+{
printf("Sensor %s has no init function, please report this bug to Blender.org\n", m_name.Ptr());
}
-void SCA_ISensor::DecLink() {
+void SCA_ISensor::DecLink()
+{
m_links--;
if (m_links < 0)
{
diff --git a/source/gameengine/GameLogic/SCA_RandomActuator.cpp b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
index b055a7b1603..430326cbce0 100644
--- a/source/gameengine/GameLogic/SCA_RandomActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomActuator.cpp
@@ -266,7 +266,8 @@ bool SCA_RandomActuator::Update()
return false;
}
-void SCA_RandomActuator::enforceConstraints() {
+void SCA_RandomActuator::enforceConstraints()
+{
/* The constraints that are checked here are the ones fundamental to */
/* the various distributions. Limitations of the algorithms are checked */
/* elsewhere (or they should be... ). */
diff --git a/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp b/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
index c3a8ba0e467..a12619aa925 100644
--- a/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
+++ b/source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
@@ -65,7 +65,8 @@ SCA_RandomNumberGenerator::~SCA_RandomNumberGenerator() {
/* intentionally empty */
}
-void SCA_RandomNumberGenerator::SetStartVector(void) {
+void SCA_RandomNumberGenerator::SetStartVector(void)
+{
/* setting initial seeds to mt[N] using */
/* the generator Line 25 of Table 1 in */
/* [KNUTH 1981, The Art of Computer Programming */
@@ -85,7 +86,8 @@ void SCA_RandomNumberGenerator::SetSeed(long newseed)
/**
* This is the important part: copied verbatim :)
*/
-unsigned long SCA_RandomNumberGenerator::Draw() {
+unsigned long SCA_RandomNumberGenerator::Draw()
+{
static unsigned long mag01[2] = { 0x0, MATRIX_A };
/* mag01[x] = x * MATRIX_A for x=0,1 */
@@ -121,7 +123,8 @@ unsigned long SCA_RandomNumberGenerator::Draw() {
return y;
}
-float SCA_RandomNumberGenerator::DrawFloat() {
+float SCA_RandomNumberGenerator::DrawFloat()
+{
return ( (float) Draw()/ (unsigned long) 0xffffffff );
}
diff --git a/source/gameengine/Ketsji/KX_TouchSensor.cpp b/source/gameengine/Ketsji/KX_TouchSensor.cpp
index b30e674e821..aa864349035 100644
--- a/source/gameengine/Ketsji/KX_TouchSensor.cpp
+++ b/source/gameengine/Ketsji/KX_TouchSensor.cpp
@@ -55,7 +55,8 @@ void KX_TouchSensor::SynchronizeTransform()
}
-void KX_TouchSensor::EndFrame() {
+void KX_TouchSensor::EndFrame()
+{
m_colliders->ReleaseAndRemoveAll();
m_hitObject = NULL;
m_bTriggered = false;