[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58634] branches/soc-2013-cycles_mblur: Merged trunk into branch.
Gavin Howard
gavin.d.howard at gmail.com
Fri Jul 26 23:42:29 CEST 2013
Revision: 58634
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58634
Author: gdh
Date: 2013-07-26 21:42:28 +0000 (Fri, 26 Jul 2013)
Log Message:
-----------
Merged trunk into branch. Includes r58612 to r58633.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58612
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58633
Modified Paths:
--------------
branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/camera.c
branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/editderivedmesh.c
branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c
branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_buffer.h
branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_math_matrix.h
branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/math_matrix.c
branches/soc-2013-cycles_mblur/source/blender/bmesh/intern/bmesh_opdefines.c
branches/soc-2013-cycles_mblur/source/blender/bmesh/intern/bmesh_operators.c
branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_dupe.c
branches/soc-2013-cycles_mblur/source/blender/bmesh/operators/bmo_utils.c
branches/soc-2013-cycles_mblur/source/blender/editors/mesh/editmesh_extrude.c
branches/soc-2013-cycles_mblur/source/blender/editors/space_clip/tracking_ops.c
branches/soc-2013-cycles_mblur/source/blender/editors/uvedit/uvedit_draw.c
branches/soc-2013-cycles_mblur/source/blender/modifiers/intern/MOD_simpledeform.c
branches/soc-2013-cycles_mblur/source/blender/modifiers/intern/MOD_skin.c
branches/soc-2013-cycles_mblur/source/blender/render/intern/source/external_engine.c
Property Changed:
----------------
branches/soc-2013-cycles_mblur/
Property changes on: branches/soc-2013-cycles_mblur
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-58611
+ /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/branches/soc-2013-depsgraph_mt:57516
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57388-58633
Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/camera.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/camera.c 2013-07-26 19:58:19 UTC (rev 58633)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/camera.c 2013-07-26 21:42:28 UTC (rev 58634)
@@ -408,26 +408,33 @@
}
else {
/* that way it's always visible - clipsta+0.1 */
- float fac;
- float half_sensor = 0.5f * ((camera->sensor_fit == CAMERA_SENSOR_FIT_VERT) ? (camera->sensor_y) : (camera->sensor_x));
+ float fac, scale_x, scale_y;
+ float half_sensor = 0.5f * ((camera->sensor_fit == CAMERA_SENSOR_FIT_VERT) ?
+ (camera->sensor_y) : (camera->sensor_x));
- *r_drawsize = drawsize / ((scale[0] + scale[1] + scale[2]) / 3.0f);
if (do_clip) {
/* fixed depth, variable size (avoids exceeding clipping range) */
- depth = -(camera->clipsta + 0.1f);
- fac = depth / (camera->lens / (-half_sensor) * scale[2]);
+ /* r_drawsize shouldn't be used in this case, set to dummy value */
+ *r_drawsize = 1.0f;
+ depth = -(camera->clipsta + 0.1f) * scale[2];
+ fac = depth / (camera->lens / (-half_sensor));
+ scale_x = 1.0f;
+ scale_y = 1.0f;
}
else {
/* fixed size, variable depth (stays a reasonable size in the 3D view) */
+ *r_drawsize = drawsize / ((scale[0] + scale[1] + scale[2]) / 3.0f);
depth = *r_drawsize * camera->lens / (-half_sensor) * scale[2];
fac = *r_drawsize;
+ scale_x = scale[0];
+ scale_y = scale[1];
}
- facx = fac * r_asp[0] * scale[0];
- facy = fac * r_asp[1] * scale[1];
- r_shift[0] = camera->shiftx * fac * 2 * scale[0];
- r_shift[1] = camera->shifty * fac * 2 * scale[1];
+ facx = fac * r_asp[0] * scale_x;
+ facy = fac * r_asp[1] * scale_y;
+ r_shift[0] = camera->shiftx * fac * 2.0f * scale_x;
+ r_shift[1] = camera->shifty * fac * 2.0f * scale_y;
}
r_vec[0][0] = r_shift[0] + facx; r_vec[0][1] = r_shift[1] + facy; r_vec[0][2] = depth;
Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/editderivedmesh.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/editderivedmesh.c 2013-07-26 19:58:19 UTC (rev 58633)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/editderivedmesh.c 2013-07-26 21:42:28 UTC (rev 58634)
@@ -1582,17 +1582,17 @@
if (DM_release(dm)) {
if (bmdm->vertexCos) {
- MEM_freeN(bmdm->vertexCos);
+ MEM_freeN((void *)bmdm->vertexCos);
if (bmdm->vertexNos) {
- MEM_freeN(bmdm->vertexNos);
+ MEM_freeN((void *)bmdm->vertexNos);
}
if (bmdm->polyNos) {
- MEM_freeN(bmdm->polyNos);
+ MEM_freeN((void *)bmdm->polyNos);
}
}
if (bmdm->polyCos) {
- MEM_freeN(bmdm->polyCos);
+ MEM_freeN((void *)bmdm->polyCos);
}
MEM_freeN(bmdm);
Modified: branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c 2013-07-26 19:58:19 UTC (rev 58633)
+++ branches/soc-2013-cycles_mblur/source/blender/blenkernel/intern/object.c 2013-07-26 21:42:28 UTC (rev 58634)
@@ -693,6 +693,14 @@
sbuts->pinid = NULL;
}
}
+ else if (sl->spacetype == SPACE_NODE) {
+ SpaceNode *snode = (SpaceNode *)sl;
+
+ if (snode->from == (ID *)ob) {
+ snode->flag &= ~SNODE_PIN;
+ snode->from = NULL;
+ }
+ }
}
sa = sa->next;
Modified: branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_buffer.h
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_buffer.h 2013-07-26 19:58:19 UTC (rev 58633)
+++ branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_buffer.h 2013-07-26 21:42:28 UTC (rev 58634)
@@ -53,7 +53,7 @@
#define BLI_buffer_declare_static(type_, name_, flag_, static_count_) \
char name_ ## user; /* warn for free only */ \
- type_ *name_ ## _static_[static_count_]; \
+ type_ name_ ## _static_[static_count_]; \
BLI_Buffer name_ = { \
/* clear the static memory if this is a calloc'd array */ \
((void)((flag_ & BLI_BUFFER_USE_CALLOC) ? \
Modified: branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_math_matrix.h
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_math_matrix.h 2013-07-26 19:58:19 UTC (rev 58633)
+++ branches/soc-2013-cycles_mblur/source/blender/blenlib/BLI_math_matrix.h 2013-07-26 21:42:28 UTC (rev 58634)
@@ -133,12 +133,12 @@
void orthogonalize_m3(float R[3][3], int axis);
void orthogonalize_m4(float R[4][4], int axis);
-int is_orthogonal_m3(float mat[3][3]);
-int is_orthogonal_m4(float mat[4][4]);
-int is_orthonormal_m3(float mat[3][3]);
-int is_orthonormal_m4(float mat[4][4]);
+bool is_orthogonal_m3(float mat[3][3]);
+bool is_orthogonal_m4(float mat[4][4]);
+bool is_orthonormal_m3(float mat[3][3]);
+bool is_orthonormal_m4(float mat[4][4]);
-int is_uniform_scaled_m3(float mat[3][3]);
+bool is_uniform_scaled_m3(float mat[3][3]);
void adjoint_m2_m2(float R[2][2], float A[2][2]);
void adjoint_m3_m3(float R[3][3], float A[3][3]);
@@ -175,8 +175,8 @@
void translate_m4(float mat[4][4], float tx, float ty, float tz);
void rotate_m4(float mat[4][4], const char axis, const float angle);
void rotate_m2(float mat[2][2], const float angle);
+void pivot_m4(float mat[4][4], const float pivot[3]);
-
void mat3_to_rot_size(float rot[3][3], float size[3], float mat3[3][3]);
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], float wmat[4][4]);
void mat4_to_loc_quat(float loc[3], float quat[4], float wmat[4][4]);
@@ -194,9 +194,12 @@
void blend_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], const float t);
void blend_m4_m4m4(float R[4][4], float A[4][4], float B[4][4], const float t);
-int is_negative_m3(float mat[3][3]);
-int is_negative_m4(float mat[4][4]);
+bool is_negative_m3(float mat[3][3]);
+bool is_negative_m4(float mat[4][4]);
+bool is_zero_m3(float mat[3][3]);
+bool is_zero_m4(float mat[4][4]);
+
/*********************************** Other ***********************************/
void print_m3(const char *str, float M[3][3]);
Modified: branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/math_matrix.c
===================================================================
--- branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/math_matrix.c 2013-07-26 19:58:19 UTC (rev 58633)
+++ branches/soc-2013-cycles_mblur/source/blender/blenlib/intern/math_matrix.c 2013-07-26 21:42:28 UTC (rev 58634)
@@ -930,7 +930,7 @@
mul_v3_fl(mat[2], size[2]);
}
-int is_orthogonal_m3(float m[3][3])
+bool is_orthogonal_m3(float m[3][3])
{
int i, j;
@@ -944,7 +944,7 @@
return 1;
}
-int is_orthogonal_m4(float m[4][4])
+bool is_orthogonal_m4(float m[4][4])
{
int i, j;
@@ -959,7 +959,7 @@
return 1;
}
-int is_orthonormal_m3(float m[3][3])
+bool is_orthonormal_m3(float m[3][3])
{
if (is_orthogonal_m3(m)) {
int i;
@@ -974,7 +974,7 @@
return 0;
}
-int is_orthonormal_m4(float m[4][4])
+bool is_orthonormal_m4(float m[4][4])
{
if (is_orthogonal_m4(m)) {
int i;
@@ -989,7 +989,7 @@
return 0;
}
-int is_uniform_scaled_m3(float m[3][3])
+bool is_uniform_scaled_m3(float m[3][3])
{
const float eps = 1e-7;
float t[3][3];
@@ -1374,6 +1374,21 @@
mat[1][0] = -mat[0][1];
}
+/* scale or rotate around a non zero pivot */
+void pivot_m4(float mat[4][4], const float pivot[3])
+{
+ float tmat[4][4];
+
+ unit_m4(tmat);
+
+ copy_v3_v3(tmat[3], pivot);
+ mul_m4_m4m4(mat, tmat, mat);
+
+ /* invert the matrix */
+ negate_v3(tmat[3]);
+ mul_m4_m4m4(mat, mat, tmat);
+}
+
void blend_m3_m3m3(float out[3][3], float dst[3][3], float src[3][3], const float srcweight)
{
float srot[3][3], drot[3][3];
@@ -1419,20 +1434,34 @@
loc_quat_size_to_mat4(out, floc, fquat, fsize);
}
-int is_negative_m3(float mat[3][3])
+bool is_negative_m3(float mat[3][3])
{
float vec[3];
cross_v3_v3v3(vec, mat[0], mat[1]);
return (dot_v3v3(vec, mat[2]) < 0.0f);
}
-int is_negative_m4(float mat[4][4])
+bool is_negative_m4(float mat[4][4])
{
float vec[3];
cross_v3_v3v3(vec, mat[0], mat[1]);
return (dot_v3v3(vec, mat[2]) < 0.0f);
}
+bool is_zero_m3(float mat[3][3])
+{
+ return (is_zero_v3(mat[0]) &&
+ is_zero_v3(mat[1]) &&
+ is_zero_v3(mat[2]));
+}
+bool is_zero_m4(float mat[4][4])
+{
+ return (is_zero_v4(mat[0]) &&
+ is_zero_v4(mat[1]) &&
+ is_zero_v4(mat[2]) &&
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list