[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47001] trunk/blender/source/blender/ modifiers/intern/MOD_solidify.c: code cleanup: solidify modifier - remove dead assignment and unneeded NULL chec

2012-05-24 Thread Campbell Barton
Revision: 47001
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47001
Author:   campbellbarton
Date: 2012-05-25 06:54:01 + (Fri, 25 May 2012)
Log Message:
---
code cleanup: solidify modifier - remove dead assignment and unneeded NULL 
check.

Modified Paths:
--
trunk/blender/source/blender/modifiers/intern/MOD_solidify.c

Modified: trunk/blender/source/blender/modifiers/intern/MOD_solidify.c
===
--- trunk/blender/source/blender/modifiers/intern/MOD_solidify.c
2012-05-25 03:36:07 UTC (rev 47000)
+++ trunk/blender/source/blender/modifiers/intern/MOD_solidify.c
2012-05-25 06:54:01 UTC (rev 47001)
@@ -240,8 +240,7 @@
 
int *edge_users = NULL;
char *edge_order = NULL;
-   int *edge_origIndex;
-   
+
float (*vert_nors)[3] = NULL;
 
float (*face_nors_result)[3] = NULL;
@@ -570,7 +569,6 @@
}
 
if (smd->flag & MOD_SOLIDIFY_RIM) {
-   int *origindex;

/* bugger, need to re-calculate the normals for the new edge 
faces.
 * This could be done in many ways, but probably the quickest 
way
@@ -592,24 +590,26 @@
const unsigned char crease_outer = smd->crease_outer * 255.0f;
const unsigned char crease_inner = smd->crease_inner * 255.0f;
 
+   int *origindex_edge;
+   int *orig_ed;
+
/* add faces & edges */
-   origindex = result->getEdgeDataArray(result, CD_ORIGINDEX);
-   ed = medge + (numEdges * 2);
-   for (i = 0; i < newEdges; i++, ed++) {
+   origindex_edge = result->getEdgeDataArray(result, CD_ORIGINDEX);
+   ed = &medge[numEdges * 2];
+   orig_ed = &origindex_edge[numEdges * 2];
+   for (i = 0; i < newEdges; i++, ed++, orig_ed++) {
ed->v1 = new_vert_arr[i];
ed->v2 = new_vert_arr[i] + numVerts;
ed->flag |= ME_EDGEDRAW;
 
-   origindex[numEdges * 2 + i] = ORIGINDEX_NONE;
+   *orig_ed = ORIGINDEX_NONE;
 
-   if (crease_rim)
+   if (crease_rim) {
ed->crease = crease_rim;
+   }
}
 
/* faces */
-   edge_origIndex = origindex;
-   origindex = DM_get_poly_data_layer(result, CD_ORIGINDEX);
-   
mp = mpoly + (numFaces * 2);
ml = mloop + (numLoops * 2);
j = 0;
@@ -673,10 +673,8 @@
ml[j++].e = numEdges * 2 + old_vert_arr[ed->v2];
}

-   if (edge_origIndex) {
-   edge_origIndex[ml[j - 3].e] = ORIGINDEX_NONE;
-   edge_origIndex[ml[j - 1].e] = ORIGINDEX_NONE;
-   }
+   origindex_edge[ml[j - 3].e] = ORIGINDEX_NONE;
+   origindex_edge[ml[j - 1].e] = ORIGINDEX_NONE;
 
/* use the next material index if option enabled */
if (mat_ofs_rim) {

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47000] branches/soc-2012-swiss_cheese/ source/blender/blenfont: gcc fixes 2

2012-05-24 Thread Jason Wilkins
Revision: 47000
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47000
Author:   jwilkins
Date: 2012-05-25 03:36:07 + (Fri, 25 May 2012)
Log Message:
---
gcc fixes 2

difference between (void) and ()

pointer type difference (GLenum* <-> GLint*)

too many arguments for gpuEnd()

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c

Modified: branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
===
--- branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
2012-05-25 03:28:24 UTC (rev 46999)
+++ branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
2012-05-25 03:36:07 UTC (rev 47000)
@@ -78,8 +78,8 @@
 
 /* Draw large blocks of text more efficiently by
explicitely reserving OpenGL for that purpose*/
-void BLF_draw_lock();
-void BLF_draw_unlock();
+void BLF_draw_lock(void);
+void BLF_draw_unlock(void);
 
 /* This function return the bounding box of the string
  * and are not multiplied by the aspect.

Modified: branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c
===
--- branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c 
2012-05-25 03:28:24 UTC (rev 46999)
+++ branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c 
2012-05-25 03:36:07 UTC (rev 47000)
@@ -484,8 +484,8 @@
 void BLF_draw_lock(void)
 {
if (!gpuImmediateIsLocked()) {
-   GLint  texCoordSizes[1] = { 2 };
-   GLenum texUnitMap[1];
+   GLint texCoordSizes[1] = { 2 };
+   GLint texUnitMap[1];
 
glGetIntegerv(GL_ACTIVE_TEXTURE, texUnitMap);
 
@@ -500,7 +500,7 @@
}
 }
 
-void BLF_draw_unlock()
+void BLF_draw_unlock(void)
 {
if (gpuImmediateIsLocked()) {
gpuImmediateUnlock();
@@ -556,7 +556,7 @@
 
 static void blf_draw__end(GLint mode, GLint param)
 {
-   gpuEnd(GL_QUADS);
+   gpuEnd();
BLF_draw_unlock();
 
/* and restore the original value. */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46999] branches/soc-2012-swiss_cheese/ source/blender/gpu/intern: fixes for gcc

2012-05-24 Thread Jason Wilkins
Revision: 46999
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46999
Author:   jwilkins
Date: 2012-05-25 03:28:24 + (Fri, 25 May 2012)
Log Message:
---
fixes for gcc

difference between (void) and ()

gave GPU_IMMEDIATE an initializer so it was not considered "common"

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c

branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h

branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_internal.h

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 03:14:51 UTC (rev 46998)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 03:28:24 UTC (rev 46999)
@@ -38,11 +38,11 @@
 
 
 /* global symbol needed because the immediate drawing functons are inline */
-GPUimmediate *restrict GPU_IMMEDIATE;
+GPUimmediate *restrict GPU_IMMEDIATE = NULL;
 
 
 
-GLsizei gpu_calc_stride()
+GLsizei gpu_calc_stride(void)
 {
size_t i;
size_t stride = 0;
@@ -163,7 +163,7 @@
 
 GPUimmediate *restrict gpuNewImmediate(void)
 {
-   GPUimmediate* immediate =
+   GPUimmediate *restrict immediate =
MEM_callocN(sizeof(GPUimmediate), "GPUimmediate");
 
assert(immediate);

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h
===
--- 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h 
2012-05-25 03:14:51 UTC (rev 46998)
+++ 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h 
2012-05-25 03:28:24 UTC (rev 46999)
@@ -347,7 +347,7 @@
 
 
 
-BLI_INLINE void gpuEnd()
+BLI_INLINE void gpuEnd(void)
 {
GPU_CHECK_IMMEDIATE();
 

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_internal.h
===
--- 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_internal.h
   2012-05-25 03:14:51 UTC (rev 46998)
+++ 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_internal.h
   2012-05-25 03:28:24 UTC (rev 46999)
@@ -52,7 +52,7 @@
 
 
 
-GLsizei gpu_calc_stride();
+GLsizei gpu_calc_stride(void);
 
 
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46998] branches/soc-2012-swiss_cheese/ source/blender/gpu/intern/gpu_immediate.c: conflicting qualifiers on certain functions

2012-05-24 Thread Jason Wilkins
Revision: 46998
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46998
Author:   jwilkins
Date: 2012-05-25 03:14:51 + (Fri, 25 May 2012)
Log Message:
---
conflicting qualifiers on certain functions

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 03:04:54 UTC (rev 46997)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 03:14:51 UTC (rev 46998)
@@ -38,7 +38,7 @@
 
 
 /* global symbol needed because the immediate drawing functons are inline */
-GPUimmediate* GPU_IMMEDIATE;
+GPUimmediate *restrict GPU_IMMEDIATE;
 
 
 
@@ -161,7 +161,7 @@
 
 
 
-GPUimmediate* gpuNewImmediate(void)
+GPUimmediate *restrict gpuNewImmediate(void)
 {
GPUimmediate* immediate =
MEM_callocN(sizeof(GPUimmediate), "GPUimmediate");
@@ -192,14 +192,14 @@
 
 
 
-void gpuImmediateMakeCurrent(GPUimmediate* immediate)
+void gpuImmediateMakeCurrent(GPUimmediate *restrict immediate)
 {
GPU_IMMEDIATE = immediate;
 }
 
 
 
-void gpuDeleteImmediate(GPUimmediate* immediate)
+void gpuDeleteImmediate(GPUimmediate *restrict immediate)
 {
assert(immediate);
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46997] branches/soc-2012-swiss_cheese/ source/blender/gpu/intern: fixed include file capitalization issue

2012-05-24 Thread Jason Wilkins
Revision: 46997
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46997
Author:   jwilkins
Date: 2012-05-25 03:04:54 + (Fri, 25 May 2012)
Log Message:
---
fixed include file capitalization issue

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c

branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_gl11.c
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_vbo.c

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 02:54:32 UTC (rev 46996)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 03:04:54 UTC (rev 46997)
@@ -29,7 +29,7 @@
 *  \ingroup gpu
 */
 
-#include "GPU_immediate_internal.h"
+#include "gpu_immediate_internal.h"
 
 #include "MEM_guardedalloc.h"
 
@@ -64,7 +64,7 @@
 
if (GPU_IMMEDIATE->colorSize != 0) {
/* color always get 4 bytes for efficient memory alignment */
-   stride += 4;
+   stride += 4; //-V112
}
 
/* texture coordinate */

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_gl11.c
===
--- 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_gl11.c   
2012-05-25 02:54:32 UTC (rev 46996)
+++ 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_gl11.c   
2012-05-25 03:04:54 UTC (rev 46997)
@@ -29,7 +29,7 @@
 *  \ingroup gpu
 */
 
-#include "GPU_immediate_internal.h"
+#include "gpu_immediate_internal.h"
 
 #include "MEM_guardedalloc.h"
 

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_vbo.c
===
--- 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_vbo.c
2012-05-25 02:54:32 UTC (rev 46996)
+++ 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_vbo.c
2012-05-25 03:04:54 UTC (rev 46997)
@@ -29,7 +29,7 @@
 *  \ingroup gpu
 */
 
-#include "GPU_immediate_internal.h"
+#include "gpu_immediate_internal.h"
 
 
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46996] branches/soc-2012-swiss_cheese/ source/blender/gpu/intern: fixed some asserts that fire in debug mode

2012-05-24 Thread Jason Wilkins
Revision: 46996
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46996
Author:   jwilkins
Date: 2012-05-25 02:54:32 + (Fri, 25 May 2012)
Log Message:
---
fixed some asserts that fire in debug mode

been building in release all day for profiling and forgot to check

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c

branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 02:42:33 UTC (rev 46995)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 02:54:32 UTC (rev 46996)
@@ -215,14 +215,6 @@
SWAP(GPUimmediate*, immediate, GPU_IMMEDIATE);
}
 
-   assert(!(immediate->bufferData));
-
-   if (immediate->bufferData) {
-   SWAP(GPUimmediate*, immediate, GPU_IMMEDIATE);
-   gpuImmediateUnlock();
-   SWAP(GPUimmediate*, immediate, GPU_IMMEDIATE);
-   }
-
if (GPU_IMMEDIATE == immediate) {
gpuImmediateMakeCurrent(NULL);
}

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h
===
--- 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h 
2012-05-25 02:42:33 UTC (rev 46995)
+++ 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h 
2012-05-25 02:54:32 UTC (rev 46996)
@@ -54,15 +54,15 @@
 {
GPU_CHECK_NO_BEGIN();
 
+#if GPU_LEGACY_INTEROP
+   gpu_legacy_get_state();
+#endif
+
GPU_IMMEDIATE->mode = mode;
 
assert(GPU_IMMEDIATE->beginBuffer);
 
if (GPU_IMMEDIATE->beginBuffer) {
-#if GPU_LEGACY_INTEROP
-   gpu_legacy_get_state();
-#endif
-
GPU_IMMEDIATE->beginBuffer();
}
 }
@@ -355,15 +355,15 @@
 
if (GPU_IMMEDIATE->endBuffer) {
GPU_IMMEDIATE->endBuffer();
-
-#if GPU_LEGACY_INTEROP
-   gpu_legacy_put_state();
-#endif
}
 
GPU_IMMEDIATE->buffer = NULL;
GPU_IMMEDIATE->offset = 0;
GPU_IMMEDIATE->count  = 0;
+
+#if GPU_LEGACY_INTEROP
+   gpu_legacy_put_state();
+#endif
 }
 
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46995] branches/soc-2012-swiss_cheese/ source/blender/gpu/intern/gpu_immediate.h: Cannot use restrict with a function pointer.

2012-05-24 Thread Jason Wilkins
Revision: 46995
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46995
Author:   jwilkins
Date: 2012-05-25 02:42:33 + (Fri, 25 May 2012)
Log Message:
---
Cannot use restrict with a function pointer.

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.h

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.h
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.h
2012-05-25 02:41:50 UTC (rev 46994)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.h
2012-05-25 02:42:33 UTC (rev 46995)
@@ -130,11 +130,11 @@
 
int lockCount;
 
-   void (*restrict lockBuffer)(void);
-   void (*restrict unlockBuffer)(void);
-   void (*restrict beginBuffer)(void);
-   void (*restrict endBuffer)(void);
-   void (*restrict shutdownBuffer)(struct GPUimmediate *restrict 
immediate);
+   void (*lockBuffer)(void);
+   void (*unlockBuffer)(void);
+   void (*beginBuffer)(void);
+   void (*endBuffer)(void);
+   void (*shutdownBuffer)(struct GPUimmediate *restrict immediate);
 } GPUimmediate;
 
 extern GPUimmediate *restrict GPU_IMMEDIATE;

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46994] branches/soc-2012-swiss_cheese: Merged r46824-r46992

2012-05-24 Thread Jason Wilkins
Revision: 46994
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46994
Author:   jwilkins
Date: 2012-05-25 02:41:50 + (Fri, 25 May 2012)
Log Message:
---
Merged r46824-r46992

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46824

http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46992

Modified Paths:
--
branches/soc-2012-swiss_cheese/CMakeLists.txt
branches/soc-2012-swiss_cheese/intern/guardedalloc/intern/mmap_win.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/BKE_blender.h
branches/soc-2012-swiss_cheese/source/blender/blenkernel/BKE_fcurve.h
branches/soc-2012-swiss_cheese/source/blender/blenkernel/BKE_key.h
branches/soc-2012-swiss_cheese/source/blender/blenkernel/BKE_mesh.h
branches/soc-2012-swiss_cheese/source/blender/blenkernel/BKE_node.h
branches/soc-2012-swiss_cheese/source/blender/blenkernel/BKE_object.h
branches/soc-2012-swiss_cheese/source/blender/blenkernel/BKE_screen.h
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/blender.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/brush.c

branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/cloth.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/collision.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/constraint.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/customdata.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/deform.c

branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/editderivedmesh.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/fcurve.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/key.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/lattice.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/mesh.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/movieclip.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/node.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/object.c

branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/particle_system.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/pointcache.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/smoke.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/softbody.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/tracking.c
branches/soc-2012-swiss_cheese/source/blender/blenkernel/intern/unit.c
branches/soc-2012-swiss_cheese/source/blender/blenlib/intern/noise.c
branches/soc-2012-swiss_cheese/source/blender/blenloader/intern/readfile.c

branches/soc-2012-swiss_cheese/source/blender/blenloader/intern/versioning_250.c
branches/soc-2012-swiss_cheese/source/blender/blenloader/intern/writefile.c
branches/soc-2012-swiss_cheese/source/blender/bmesh/bmesh_class.h
branches/soc-2012-swiss_cheese/source/blender/bmesh/intern/bmesh_construct.c
branches/soc-2012-swiss_cheese/source/blender/bmesh/intern/bmesh_interp.c
branches/soc-2012-swiss_cheese/source/blender/bmesh/intern/bmesh_marking.c
branches/soc-2012-swiss_cheese/source/blender/bmesh/intern/bmesh_mesh_conv.c
branches/soc-2012-swiss_cheese/source/blender/bmesh/intern/bmesh_queries.c
branches/soc-2012-swiss_cheese/source/blender/bmesh/intern/bmesh_queries.h
branches/soc-2012-swiss_cheese/source/blender/bmesh/operators/bmo_extrude.c
branches/soc-2012-swiss_cheese/source/blender/bmesh/operators/bmo_slide.c

branches/soc-2012-swiss_cheese/source/blender/compositor/intern/COM_ExecutionSystem.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/intern/COM_InputSocket.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/intern/COM_InputSocket.h
branches/soc-2012-swiss_cheese/source/blender/compositor/intern/COM_Node.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/intern/COM_WorkScheduler.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/intern/COM_compositor.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/nodes/COM_AlphaOverNode.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/nodes/COM_BilateralBlurNode.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/nodes/COM_BlurNode.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/nodes/COM_BokehBlurNode.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/nodes/COM_BoxMaskNode.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/nodes/COM_BrightnessNode.cpp

branches/soc-2012-swiss_cheese/source/blender/compositor/nodes/CO

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46993] branches/soc-2012-swiss_cheese/ source/blender/gpu/intern/gpu_immediate.c: missing header file

2012-05-24 Thread Jason Wilkins
Revision: 46993
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46993
Author:   jwilkins
Date: 2012-05-25 02:37:05 + (Fri, 25 May 2012)
Log Message:
---
missing header file

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 01:30:42 UTC (rev 46992)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 02:37:05 UTC (rev 46993)
@@ -33,6 +33,7 @@
 
 #include "MEM_guardedalloc.h"
 
+#include 
 
 
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46992] branches/soc-2012-swiss_cheese/ source/blender/editors/space_text/text_draw.c: Improved the pathological behavior of the text editor.

2012-05-24 Thread Jason Wilkins
Revision: 46992
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46992
Author:   jwilkins
Date: 2012-05-25 01:30:42 + (Fri, 25 May 2012)
Log Message:
---
Improved the pathological behavior of the text editor.

Now batches up multiple characters to draw at once.  My changes could use some 
refactoring, but I'd like to put it on the back shelf.  All I needed to do for 
now is keep it from being unusable.

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/editors/space_text/text_draw.c

Modified: 
branches/soc-2012-swiss_cheese/source/blender/editors/space_text/text_draw.c
===
--- 
branches/soc-2012-swiss_cheese/source/blender/editors/space_text/text_draw.c
2012-05-25 01:28:42 UTC (rev 46991)
+++ 
branches/soc-2012-swiss_cheese/source/blender/editors/space_text/text_draw.c
2012-05-25 01:30:42 UTC (rev 46992)
@@ -92,19 +92,7 @@
return st->cwidth;
 }
 
-static int text_font_draw_character_utf8(SpaceText *st, int x, int y, const 
char *c)
-{
-   char str[BLI_UTF8_MAX + 1];
-   size_t len = BLI_str_utf8_size(c);
-   memcpy(str, c, len);
-   str[len] = '\0';
 
-   BLF_position(mono, x, y, 0);
-   BLF_draw(mono, str, len);
-
-   return st->cwidth;
-}
-
 /** flatten string **/
 
 static void flatten_string_append(FlattenString *fs, const char *c, int accum, 
int len) 
@@ -721,6 +709,12 @@

for (i = 0, mi = 0; str[mi]; i++, mi += BLI_str_utf8_size(str + mi)) {
if (i - start >= max) {
+   int str_shift = 0;
+   int ox;
+   char last_format;
+   char buffer[BLF_DRAW_STR_DUMMY_MAX];
+   size_t len = 0;
+
/* skip hidden part of line */
if (skip) {
skip--;
@@ -729,11 +723,43 @@
continue;
}
 
+   if (st->showsyntax && format) {
+   last_format = format[start];
+   format_draw_color(format[start]);
+   }
+
+   ox = x;
+
+   ma = mstart;
+
/* Draw the visible portion of text on the overshot 
line */
-   for (a = start, ma = mstart; a < end; a++, ma += 
BLI_str_utf8_size(str + ma)) {
-   if (st->showsyntax && format) 
format_draw_color(format[a]);
-   x += text_font_draw_character_utf8(st, x, y, 
str + ma);
+   for (a = start; a < end; a++) {
+   size_t char_len;
+
+   if (st->showsyntax && format && last_format != 
format[a]) {
+   memcpy(buffer, str + ma - len, len);
+   buffer[len] = '\0';
+   text_font_draw(st, ox, y, buffer);
+
+   ox  = x;
+   len = 0;
+
+   format_draw_color(format[a]);
+   last_format = format[a];
+   }
+
+   char_len = BLI_str_utf8_size(str + ma);
+   len += char_len;
+   ma  += char_len;
+
+   x += st->cwidth;
}
+
+   /* draw last chunk */
+   memcpy(buffer, str + ma - len, len);
+   buffer[len] = '\0';
+   text_font_draw(st, ox, y, buffer);
+
y -= st->lheight;
x = basex;
lines++;
@@ -748,11 +774,48 @@
}
 
/* Draw the remaining text */
-   for (a = start, ma = mstart; str[ma] && y > 0; a++, ma += 
BLI_str_utf8_size(str + ma)) {
-   if (st->showsyntax && format)
-   format_draw_color(format[a]);
+   if (y > 0) {
+   int str_shift = 0;
+   int ox;
+   char last_format;
+   char buffer[BLF_DRAW_STR_DUMMY_MAX];
+   size_t len = 0;
 
-   x += text_font_draw_character_utf8(st, x, y, str + ma);
+   if (st->showsyntax && format) {
+   last_format = format[start];
+   format_draw_color(format[start]);
+   }
+
+   ox = x;
+
+   ma = mstart;
+
+   for (a = start; str[ma]; a++) {
+   size_t char_len;
+
+   if (st->showsyntax && format && last_format != 
format[a]) {
+  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46991] branches/soc-2012-swiss_cheese/ source/blender/blenfont: Modified blenfont to use gpuImmediateLock/ gpuImmediateUnlock

2012-05-24 Thread Jason Wilkins
Revision: 46991
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46991
Author:   jwilkins
Date: 2012-05-25 01:28:42 + (Fri, 25 May 2012)
Log Message:
---
Modified blenfont to use gpuImmediateLock/gpuImmediateUnlock

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c
branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_font.c
branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_glyph.c
branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_internal.h

Modified: branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
===
--- branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
2012-05-25 01:26:20 UTC (rev 46990)
+++ branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
2012-05-25 01:28:42 UTC (rev 46991)
@@ -76,6 +76,11 @@
 void BLF_draw(int fontid, const char *str, size_t len);
 void BLF_draw_ascii(int fontid, const char *str, size_t len);
 
+/* Draw large blocks of text more efficiently by
+   explicitely reserving OpenGL for that purpose*/
+void BLF_draw_lock();
+void BLF_draw_unlock();
+
 /* This function return the bounding box of the string
  * and are not multiplied by the aspect.
  */

Modified: branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c
===
--- branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c 
2012-05-25 01:26:20 UTC (rev 46990)
+++ branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c 
2012-05-25 01:28:42 UTC (rev 46991)
@@ -481,6 +481,32 @@
}
 }
 
+void BLF_draw_lock(void)
+{
+   if (!gpuImmediateIsLocked()) {
+   GLint  texCoordSizes[1] = { 2 };
+   GLenum texUnitMap[1];
+
+   glGetIntegerv(GL_ACTIVE_TEXTURE, texUnitMap);
+
+   gpuImmediateElementSizes(2, 0, 4); //-V112
+   gpuImmediateTextureUnitCount(1);
+   gpuImmediateTexCoordSizes(texCoordSizes);
+   gpuImmediateTextureUnitMap(texUnitMap);
+   gpuImmediateFloatAttribCount(0);
+   gpuImmediateUbyteAttribCount(0);
+
+   gpuImmediateLock();
+   }
+}
+
+void BLF_draw_unlock()
+{
+   if (gpuImmediateIsLocked()) {
+   gpuImmediateUnlock();
+   }
+}
+
 static void blf_draw__start(FontBLF *font, GLint *mode, GLint *param)
 {
/*
@@ -524,26 +550,14 @@
if (*param != GL_MODULATE)
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 
-   { // XXX: setup immediate, common setups could be refactored into 
utilities
-   GLint  texCoordSizes[1] = { 2 };
-   GLenum texUnitMap[1];
-
-   glGetIntegerv(GL_ACTIVE_TEXTURE, texUnitMap);
-
-   gpuImmediateElementSizes(2, 0, 4);
-   gpuImmediateTextureUnitCount(1);
-   gpuImmediateTexCoordSizes(texCoordSizes);
-   gpuImmediateTextureUnitMap(texUnitMap);
-   gpuImmediateFloatAttribCount(0);
-   gpuImmediateUbyteAttribCount(0);
-   }
-
+   BLF_draw_lock();
gpuBegin(GL_QUADS);
 }
 
 static void blf_draw__end(GLint mode, GLint param)
 {
gpuEnd(GL_QUADS);
+   BLF_draw_unlock();
 
/* and restore the original value. */
if (param != GL_MODULATE)
@@ -564,25 +578,29 @@
 
 void BLF_draw(int fontid, const char *str, size_t len)
 {
-   FontBLF *font = BLF_get(fontid);
-   GLint mode, param;
+   if (len > 0) {
+   FontBLF *font = BLF_get(fontid);
+   GLint mode, param;
 
-   if (font && font->glyph_cache) {
-   blf_draw__start(font, &mode, ¶m);
-   blf_font_draw(font, str, len);
-   blf_draw__end(mode, param);
+   if (font && font->glyph_cache) {
+   blf_draw__start(font, &mode, ¶m);
+   blf_font_draw(font, str, len);
+   blf_draw__end(mode, param);
+   }
}
 }
 
 void BLF_draw_ascii(int fontid, const char *str, size_t len)
 {
-   FontBLF *font = BLF_get(fontid);
-   GLint mode, param;
+   if (len > 0) {
+   FontBLF *font = BLF_get(fontid);
+   GLint mode, param;
 
-   if (font && font->glyph_cache) {
-   blf_draw__start(font, &mode, ¶m);
-   blf_font_draw_ascii(font, str, len);
-   blf_draw__end(mode, param);
+   if (font && font->glyph_cache) {
+   blf_draw__start(font, &mode, ¶m);
+   blf_font_draw_ascii(font, str, len);
+   blf_draw__end(mode, param);
+   }
}
 }
 

Modified: 
branches/soc-2012-swiss_cheese/sou

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46990] branches/soc-2012-swiss_cheese/ source/blender/gpu: Optimization (after Profiling), and refactoring of gpuImmediate.

2012-05-24 Thread Jason Wilkins
Revision: 46990
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46990
Author:   jwilkins
Date: 2012-05-25 01:26:20 + (Fri, 25 May 2012)
Log Message:
---
Optimization (after Profiling), and refactoring of gpuImmediate.

Added gpuImmediateLock/gpuImmediateUnlock so that gpuBegin/gpuEnd have less to 
do so it is faster to send multiple batches.

Profiled the code using the text renderer as a pathological case.

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/blender/gpu/CMakeLists.txt
branches/soc-2012-swiss_cheese/source/blender/gpu/GPU_compatibility.h
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c

Added Paths:
---
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.h

branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_gl11.c

branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h

branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_internal.h
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_vbo.c

Removed Paths:
-
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.h

Modified: branches/soc-2012-swiss_cheese/source/blender/gpu/CMakeLists.txt
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/CMakeLists.txt
2012-05-24 23:50:20 UTC (rev 46989)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/CMakeLists.txt
2012-05-25 01:26:20 UTC (rev 46990)
@@ -50,6 +50,8 @@
intern/gpu_draw.c
intern/gpu_extensions.c
intern/gpu_immediate.c
+   intern/gpu_immediate_gl11.c
+   intern/gpu_immediate_vbo.c
intern/gpu_material.c

shaders/gpu_shader_material.glsl.c
@@ -67,6 +69,8 @@
intern/gpu_codegen.h
intern/gpu_deprecated.h
intern/gpu_immediate.h
+   intern/gpu_immediate_inline.h
+   intern/gpu_immediate_internal.h
 )
 
 if(WITH_MOD_SMOKE)

Modified: branches/soc-2012-swiss_cheese/source/blender/gpu/GPU_compatibility.h
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/GPU_compatibility.h   
2012-05-24 23:50:20 UTC (rev 46989)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/GPU_compatibility.h   
2012-05-25 01:26:20 UTC (rev 46990)
@@ -32,7 +32,7 @@
 #ifndef __GPU_COMPATIBILITY_H__
 #define __GPU_COMPATIBILITY_H__
 
-#include "intern/gpu_immediate.h"
+#include "intern/gpu_immediate_inline.h"
 #include "intern/gpu_deprecated.h"
 
 #ifdef __cplusplus

Modified: 
branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
===
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-24 23:50:20 UTC (rev 46989)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
2012-05-25 01:26:20 UTC (rev 46990)
@@ -29,66 +29,60 @@
 *  \ingroup gpu
 */
 
-#include "GPU_immediate.h"
+#include "GPU_immediate_internal.h"
 
 #include "MEM_guardedalloc.h"
 
 
 
+
 /* global symbol needed because the immediate drawing functons are inline */
 GPUimmediate* GPU_IMMEDIATE;
 
 
 
-static GLsizei calcStride()
+GLsizei gpu_calc_stride()
 {
size_t i;
size_t stride = 0;
 
/* vertex */
 
-   if (GPU_IMMEDIATE->vertexSize > 0) {
+   if (GPU_IMMEDIATE->vertexSize != 0) {
stride += (size_t)(GPU_IMMEDIATE->vertexSize) * sizeof(GLfloat);
}
 
/* normal */
 
-   if (GPU_IMMEDIATE->normalSize == 3) {
+   if (GPU_IMMEDIATE->normalSize != 0) {
+   /* normals always have 3 components */
stride += 3 * sizeof(GLfloat);
}
 
/* color */
 
-   if (GPU_IMMEDIATE->colorSize > 0) {
-   /* 4 bytes are always reserved for color, for efficient memory 
alignment */
-   stride += 4 * sizeof(GLubyte);
+   if (GPU_IMMEDIATE->colorSize != 0) {
+   /* color always get 4 bytes for efficient memory alignment */
+   stride += 4;
}
 
/* texture coordinate */
 
for (i = 0; i < GPU_IMMEDIATE->textureUnitCount; i++) {
-   if (GPU_IMMEDIATE->texCoordSize[i] > 0) {
-   stride +=
-   (size_t)(GPU_IMMEDIATE->texCoordSize[i]) * 
sizeof(GLfloat);
-   }
+   stride += (size_t)(GPU_IMMEDIATE->texCoordSize[i]) * 
sizeof(GLfloat);
}
 
/* float vertex attribute */
 
for (i = 0; i < GPU_IMMEDIATE->attribCount_f; i++) {
-   if (GPU_IMMEDIATE->attribSize_f[i] > 0) {
-   stride +=
-   (size_t)(GPU_IMMEDIATE->attribSize_f[i]) * 
sizeof(GLfloat);
-   }
+   stride += (si

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46989] trunk/blender: Smoke: Start fixing scaling issues which happen with non cube-shaped domains.

2012-05-24 Thread Daniel Genrich
Revision: 46989
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46989
Author:   genscher
Date: 2012-05-24 23:50:20 + (Thu, 24 May 2012)
Log Message:
---
Smoke: Start fixing scaling issues which happen with non cube-shaped domains.
Detail: Smoke solver and Blender side of smoke now share the same cell length.

First reported by the Sintel artists long ago, again reported by MiikaH.

Part of my Smoke Development Project Phase III.

Modified Paths:
--
trunk/blender/intern/smoke/intern/FLUID_3D.cpp
trunk/blender/source/blender/blenkernel/BKE_blender.h
trunk/blender/source/blender/blenkernel/intern/smoke.c
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/editors/space_view3d/drawobject.c
trunk/blender/source/blender/makesdna/DNA_smoke_types.h

Modified: trunk/blender/intern/smoke/intern/FLUID_3D.cpp
===
--- trunk/blender/intern/smoke/intern/FLUID_3D.cpp  2012-05-24 21:58:12 UTC 
(rev 46988)
+++ trunk/blender/intern/smoke/intern/FLUID_3D.cpp  2012-05-24 23:50:20 UTC 
(rev 46989)
@@ -249,7 +249,6 @@
// set vorticity from RNA value
_vorticityEps = (*_vorticityRNA)/_constantScaling;
 
-
 #if PARALLEL==1
int threadval = 1;
threadval = omp_get_max_threads();

Modified: trunk/blender/source/blender/blenkernel/BKE_blender.h
===
--- trunk/blender/source/blender/blenkernel/BKE_blender.h   2012-05-24 
21:58:12 UTC (rev 46988)
+++ trunk/blender/source/blender/blenkernel/BKE_blender.h   2012-05-24 
23:50:20 UTC (rev 46989)
@@ -42,7 +42,7 @@
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION 263
-#define BLENDER_SUBVERSION  6
+#define BLENDER_SUBVERSION  7
 
 #define BLENDER_MINVERSION  250
 #define BLENDER_MINSUBVERSION   0

Modified: trunk/blender/source/blender/blenkernel/intern/smoke.c
===
--- trunk/blender/source/blender/blenkernel/intern/smoke.c  2012-05-24 
21:58:12 UTC (rev 46988)
+++ trunk/blender/source/blender/blenkernel/intern/smoke.c  2012-05-24 
23:50:20 UTC (rev 46989)
@@ -198,8 +198,6 @@
// calc other res with max_res provided
sub_v3_v3v3(size, max, min);
 
-   // printf("size: %f, %f, %f\n", size[0], size[1], size[2]);
-
// prevent crash when initializing a plane as domain
if((size[0] < FLT_EPSILON) || (size[1] < FLT_EPSILON) || 
(size[2] < FLT_EPSILON))
return 0;
@@ -209,14 +207,16 @@
if(size[0] > size[2])
{
scale = res / size[0];
-   smd->domain->dx = size[0] / res; // dx is in 
global coords
+   smd->domain->scale = size[0];
+   smd->domain->dx = 1.0f / res; 
smd->domain->res[0] = res;
smd->domain->res[1] = (int)(size[1] * scale + 
0.5);
smd->domain->res[2] = (int)(size[2] * scale + 
0.5);
}
else {
scale = res / size[2];
-   smd->domain->dx = size[2] / res; // dx is in 
global coords
+   smd->domain->scale = size[2];
+   smd->domain->dx = 1.0f / res;
smd->domain->res[2] = res;
smd->domain->res[0] = (int)(size[0] * scale + 
0.5);
smd->domain->res[1] = (int)(size[1] * scale + 
0.5);
@@ -226,25 +226,24 @@
if(size[1] > size[2])
{
scale = res / size[1];
-   smd->domain->dx = size[1] / res; // dx is in 
global coords
+   smd->domain->scale = size[1];
+   smd->domain->dx = 1.0f / res; 
smd->domain->res[1] = res;
smd->domain->res[0] = (int)(size[0] * scale + 
0.5);
smd->domain->res[2] = (int)(size[2] * scale + 
0.5);
}
else {
scale = res / size[2];
-   smd->domain->dx = size[2] / res;
+   smd->domain->scale = size[2];
+   smd->domain->dx = 1.0f / res;
smd->domain->res[2] = res;
smd->domain->res[0] = (int)(size[0] * scale + 
0.5);
smd->d

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46988] trunk/blender/source/blender/ editors: remove some float/double conversions

2012-05-24 Thread Campbell Barton
Revision: 46988
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46988
Author:   campbellbarton
Date: 2012-05-24 21:58:12 + (Thu, 24 May 2012)
Log Message:
---
remove some float/double conversions

Modified Paths:
--
trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
trunk/blender/source/blender/editors/transform/transform_conversions.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_draw.c
===
--- trunk/blender/source/blender/editors/space_view3d/view3d_draw.c 
2012-05-24 21:42:35 UTC (rev 46987)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_draw.c 
2012-05-24 21:58:12 UTC (rev 46988)
@@ -264,7 +264,8 @@
glDisableClientState(GL_VERTEX_ARRAY);
 }
 
-#define GRID_MIN_PX 6.0f
+#define GRID_MIN_PX_D   6.0
+#define GRID_MIN_PX_F 6.0f
 
 static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char 
**grid_unit)
 {
@@ -316,16 +317,16 @@
while (i--) {
double scalar = bUnit_GetScaler(usys, i);
 
-   dx_scalar = dx * scalar / unit->scale_length;
-   if (dx_scalar < (GRID_MIN_PX * 2.0))
+   dx_scalar = dx * scalar / 
(double)unit->scale_length;
+   if (dx_scalar < (GRID_MIN_PX_D * 2.0))
continue;
 
/* Store the smallest drawn grid size units 
name so users know how big each grid cell is */
if (*grid_unit == NULL) {
*grid_unit = bUnit_GetNameDisplay(usys, 
i);
-   rv3d->gridview = (float)((scalar * 
v3d->grid) / (double)unit->scale_length);
+   rv3d->gridview = (float)((scalar * 
(double)v3d->grid) / (double)unit->scale_length);
}
-   blend_fac = 1.0f - ((GRID_MIN_PX * 2.0f) / 
(float)dx_scalar);
+   blend_fac = 1.0f - ((GRID_MIN_PX_F * 2.0f) / 
(float)dx_scalar);
 
/* tweak to have the fade a bit nicer */
blend_fac = (blend_fac * blend_fac) * 2.0f;
@@ -341,25 +342,25 @@
else {
short sublines = v3d->gridsubdiv;
 
-   if (dx < GRID_MIN_PX) {
+   if (dx < GRID_MIN_PX_D) {
rv3d->gridview *= sublines;
dx *= sublines;
 
-   if (dx < GRID_MIN_PX) {
+   if (dx < GRID_MIN_PX_D) {
rv3d->gridview *= sublines;
dx *= sublines;
 
-   if (dx < GRID_MIN_PX) {
+   if (dx < GRID_MIN_PX_D) {
rv3d->gridview *= sublines;
dx *= sublines;
-   if (dx < GRID_MIN_PX) ;
+   if (dx < GRID_MIN_PX_D) ;
else {
UI_ThemeColor(TH_GRID);
drawgrid_draw(ar, wx, wy, x, y, 
dx);
}
}
else {  // start blending out
-   UI_ThemeColorBlend(TH_BACK, TH_GRID, dx 
/ (GRID_MIN_PX * 6.0f));
+   UI_ThemeColorBlend(TH_BACK, TH_GRID, dx 
/ (GRID_MIN_PX_D * 6.0));
drawgrid_draw(ar, wx, wy, x, y, dx);
 
UI_ThemeColor(TH_GRID);
@@ -367,7 +368,7 @@
}
}
else {  // start blending out (GRID_MIN_PX < dx < 
(GRID_MIN_PX*10))
-   UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / 
(GRID_MIN_PX * 6.0f));
+   UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / 
(GRID_MIN_PX_D * 6.0));
drawgrid_draw(ar, wx, wy, x, y, dx);
 
UI_ThemeColor(TH_GRID);
@@ -375,32 +376,32 @@
}
}
else {
-   if (dx > (GRID_MIN_PX * 10)) {  // start blending in
+   if (dx > (GRID_MIN_PX_D * 10.0)) {  // start 
blending in
rv3d->gridview /= sublines;
dx /= sublines;
-   if (dx > (GRID_MIN_PX * 10)) {  // start 
blending in
+   if (dx > (GRID_MIN_PX_D * 10.0)) {  // 
start ble

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46987] trunk/blender/source/blender/ editors/mesh/editmesh_select.c: Missed a change from "extend" to "toggle" in last commit.

2012-05-24 Thread Nathan Vegdahl
Revision: 46987
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46987
Author:   cessen
Date: 2012-05-24 21:42:35 + (Thu, 24 May 2012)
Log Message:
---
Missed a change from "extend" to "toggle" in last commit.

Thanks Campbell for the catch. :-)

Modified Paths:
--
trunk/blender/source/blender/editors/mesh/editmesh_select.c

Modified: trunk/blender/source/blender/editors/mesh/editmesh_select.c
===
--- trunk/blender/source/blender/editors/mesh/editmesh_select.c 2012-05-24 
21:05:27 UTC (rev 46986)
+++ trunk/blender/source/blender/editors/mesh/editmesh_select.c 2012-05-24 
21:42:35 UTC (rev 46987)
@@ -1496,7 +1496,7 @@
BM_select_history_store(vc.em->bm, efa);
BM_face_select_set(vc.em->bm, efa, 
TRUE);
}
-   else if (extend) {
+   else if (toggle) {
BM_select_history_remove(vc.em->bm, 
efa);
BM_face_select_set(vc.em->bm, efa, 
FALSE);
}

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46986] trunk/blender/source/blender/ editors: Modifications to the view3d.select() operator:

2012-05-24 Thread Nathan Vegdahl
Revision: 46986
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46986
Author:   cessen
Date: 2012-05-24 21:05:27 + (Thu, 24 May 2012)
Log Message:
---
Modifications to the view3d.select() operator: 

1. Two new boolean options have been added to the operator: "deselect"
   and "toggle".
2. The previous behavior of "extend" (toggling the selection) has
   been moved to the "toggle" option.
3. "extend" now only extends the selection, it never deselects.
4. "deselect" is pretty self-explanatory: it deselects (i.e. opposite
   of extend).
5. The built-in keymap has been changed to use "toggle" where
   "extend" was used before for this operator, to maintain the
   previous behavior in the default keymap.

In short, this works towards making "extend" and "deselect" fully
consistent across all selection tools (adding to and removing from
selection, respectively), but still preserves the old behavior
as well.

(Patch reviewed by Brecht.)

Modified Paths:
--
trunk/blender/source/blender/editors/armature/editarmature.c
trunk/blender/source/blender/editors/curve/editcurve.c
trunk/blender/source/blender/editors/include/ED_armature.h
trunk/blender/source/blender/editors/include/ED_curve.h
trunk/blender/source/blender/editors/include/ED_mball.h
trunk/blender/source/blender/editors/include/ED_mesh.h
trunk/blender/source/blender/editors/include/ED_object.h
trunk/blender/source/blender/editors/include/ED_particle.h
trunk/blender/source/blender/editors/mesh/editface.c
trunk/blender/source/blender/editors/mesh/editmesh_select.c
trunk/blender/source/blender/editors/metaball/mball_edit.c
trunk/blender/source/blender/editors/object/object_lattice.c
trunk/blender/source/blender/editors/physics/particle_edit.c
trunk/blender/source/blender/editors/space_view3d/view3d_ops.c
trunk/blender/source/blender/editors/space_view3d/view3d_select.c

Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===
--- trunk/blender/source/blender/editors/armature/editarmature.c
2012-05-24 20:20:12 UTC (rev 46985)
+++ trunk/blender/source/blender/editors/armature/editarmature.c
2012-05-24 21:05:27 UTC (rev 46986)
@@ -1842,7 +1842,7 @@
 }
 
 /* context: editmode armature in view3d */
-int mouse_armature(bContext *C, const int mval[2], int extend)
+int mouse_armature(bContext *C, const int mval[2], int extend, int deselect, 
int toggle)
 {
Object *obedit = CTX_data_edit_object(C);
bArmature *arm = obedit->data;
@@ -1857,7 +1857,7 @@
nearBone = get_nearest_editbonepoint(&vc, mval, arm->edbo, 1, &selmask);
if (nearBone) {
 
-   if (!extend)
+   if (!extend && !deselect && !toggle)
ED_armature_deselect_all(obedit, 0);

/* by definition the non-root connected bones have no root 
point drawn,
@@ -1867,6 +1867,18 @@
if (nearBone->parent && (nearBone->flag & 
BONE_CONNECTED)) {
/* click in a chain */
if (extend) {
+   /* select this bone */
+   nearBone->flag |= BONE_TIPSEL;
+   nearBone->parent->flag |= BONE_TIPSEL;
+   }
+   else if (deselect) {
+   /* deselect this bone */
+   nearBone->flag &= ~(BONE_TIPSEL | 
BONE_SELECTED);
+   /* only deselect parent tip if it is 
not selected */
+   if (!(nearBone->parent->flag & 
BONE_SELECTED))
+   nearBone->parent->flag &= 
~BONE_TIPSEL;
+   }
+   else if (toggle) {
/* hold shift inverts this bone's 
selection */
if (nearBone->flag & BONE_SELECTED) {
/* deselect this bone */
@@ -1889,18 +1901,29 @@
}
else {
if (extend) {
+   nearBone->flag |= (BONE_TIPSEL | 
BONE_ROOTSEL);
+   }
+   else if (deselect) {
+   nearBone->flag &= ~(BONE_TIPSEL | 
BONE_ROOTSEL);
+   }
+   else if (toggle) {
/* hold shift inverts this bone's 
selection */
if (nearBone->flag & BONE_SELECTED)
nearBone->flag &= ~(

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46985] trunk/blender/source/blender/ blenkernel/intern/object.c: Fix bug [#31512] Focus Zoom on text object with modifers fails

2012-05-24 Thread Nicholas Bishop
Revision: 46985
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46985
Author:   nicholasbishop
Date: 2012-05-24 20:20:12 + (Thu, 24 May 2012)
Log Message:
---
Fix bug [#31512] Focus Zoom on text object with modifers fails

Change BKE_object_minmax() to use the same logic as meshes: use the
object bounding box if available, since it will include the modifier
DM output.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/object.c

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===
--- trunk/blender/source/blender/blenkernel/intern/object.c 2012-05-24 
20:03:09 UTC (rev 46984)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2012-05-24 
20:20:12 UTC (rev 46985)
@@ -2258,8 +2258,15 @@
{
Curve *cu = ob->data;
 
-   if (cu->bb == NULL) BKE_curve_texspace_calc(cu);
-   bb = *(cu->bb);
+   /* Use the object bounding box so that modifier output
+  gets taken into account */
+   if (ob->bb)
+   bb = *(ob->bb);
+   else {
+   if (cu->bb == NULL)
+   BKE_curve_texspace_calc(cu);
+   bb = *(cu->bb);
+   }
 
for (a = 0; a < 8; a++) {
mul_m4_v3(ob->obmat, bb.vec[a]);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46984] branches/meshdata_transfer/source/ blender/editors/object/object_vgroup.c: Restructuring code.

2012-05-24 Thread Ove Murberg Henriksen
Revision: 46984
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46984
Author:   cyborgmuppet
Date: 2012-05-24 20:03:09 + (Thu, 24 May 2012)
Log Message:
---
Restructuring code.
All functions merged into ED_vgroup_transfer_weight() to avoid duplicate code.

Modified Paths:
--
branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c

Modified: 
branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
===
--- branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
2012-05-24 19:41:09 UTC (rev 46983)
+++ branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
2012-05-24 20:03:09 UTC (rev 46984)
@@ -376,79 +376,34 @@
return 1;
 }
 
-/** Start transfer weight functions */
+/***Start transfer weight function/
 
-int ED_vgroup_transfer_weight_by_index(Object *ob_dst, Object *ob_src, short 
dw_replace_options, bDeformGroup *dg_src)
+int ED_vgroup_transfer_weight(
+Object *ob_dst, Object *ob_src, bDeformGroup *dg_src, short 
replace_options, short method_options)
 {
-   MDeformVert **dv_array_src;
-   MDeformVert **dv_array_dst;
-   MDeformWeight *dw_dst, *dw_src;
-   MVert *mv_dst;
-   Mesh *me_dst;
-   int dv_tot_src, dv_tot_dst;
-   int i, index_src, index_dst;
bDeformGroup *dg_dst;
-
-   enum dw_options {REPLACE_ALL_WEIGHTS = 1, REPLACE_EMPTY_WEIGHTS = 2, 
REPLACE_SELECTED_WEIGHTS = 3} dw_options = dw_replace_options;
-
-   /*create new and overwrite vertex group on destination without data*/
-   if (!defgroup_find_name(ob_dst, dg_src->name) || dw_options == 1){
-   ED_vgroup_delete(ob_dst, defgroup_find_name(ob_dst, 
dg_src->name));
-   ED_vgroup_add_name(ob_dst, dg_src->name);
-   }
-
-   /*get meshes*/
-   me_dst = ob_dst->data;
-
-   /*get vertices*/
-   mv_dst = me_dst->mvert;
-
-   /*get destination deformgroup*/
-   dg_dst = defgroup_find_name(ob_dst, dg_src->name);
-
-   /*get vertex group arrays*/
-   ED_vgroup_give_parray(ob_src->data, &dv_array_src, &dv_tot_src, FALSE);
-   ED_vgroup_give_parray(ob_dst->data, &dv_array_dst, &dv_tot_dst, FALSE);
-
-   /*get indexes of vertex groups*/
-   index_src = BLI_findindex(&ob_src->defbase, dg_src);
-   index_dst = BLI_findindex(&ob_dst->defbase, dg_dst);
-
-   /*check if indices are matching, delete and return if not*/
-   if (ob_dst == ob_src || dv_tot_dst == 0 || (dv_tot_dst != dv_tot_src) 
|| dv_array_src == NULL || dv_array_dst == NULL) {
-   ED_vgroup_delete(ob_dst, defgroup_find_name(ob_dst, 
dg_dst->name));
-   return 0;
-   }
-
-   /* loop through the vertices and copy weight*/
-   for (i = 0; i < dv_tot_dst; i++, dv_array_src++, dv_array_dst++, 
mv_dst++){
-   dw_src = defvert_verify_index(*dv_array_src, index_src);
-   dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
-   if (dw_options == REPLACE_ALL_WEIGHTS) dw_dst->weight = 
dw_src->weight;
-   else if (dw_options == REPLACE_EMPTY_WEIGHTS) {if 
(!dw_dst->weight || dw_dst->weight == 0) dw_dst->weight = dw_src->weight;}
-   else if (dw_options == REPLACE_SELECTED_WEIGHTS) {if 
(mv_dst->flag & SELECT) dw_dst->weight = dw_src->weight;}
-   else return 0;
-   }
-   return 1;
-}
-
-int ED_vgroup_transfer_weight_by_nearest_vertex(Object *ob_dst, Object 
*ob_src, short dw_replace_options, bDeformGroup *dg_src)
-{
-   bDeformGroup *dg_dst;
-   MDeformVert **dv_array_src, **dv_array_dst;
-   MDeformWeight *dw_dst, *dw_src;
-   MVert *mv_dst;
Mesh *me_dst;
-   BVHTreeFromMesh tree_mesh_src;
-   BVHTreeNearest nearest;
DerivedMesh *dmesh_src;
-   int dv_tot_src, dv_tot_dst, i, index_dst, index_src;
-   float tmp_co[3], tmp_mat[4][4];
+   BVHTreeFromMesh tree_mesh_vertices_src, tree_mesh_faces_src = {NULL};
+   MDeformVert **dv_array_src, **dv_array_dst;
+   MVert *mv_dst, *mv_src;
+   MFace *mface_src;
+   BVHTreeNearest nearest;
+   MDeformWeight *dw_dst, *dw_src;
+   int dv_tot_src, dv_tot_dst, i, index_dst, index_src, index_nearest, 
index_nearest_vertex;
+   float weight, tmp_weight[4], tmp_co[3], normal[3], tmp_mat[4][4], 
dist_v1, dist_v2, dist_v3, dist_v4;
 
-   enum dw_options {REPLACE_ALL_WEIGHTS = 1, REPLACE_EMPTY_WEIGHTS = 2, 
REPLACE_SELECTED_WEIGHTS = 3} dw_options = dw_replace_options;
+   enum replace_option {REPLACE_ALL_WEIGHTS = 1,
+REPLACE_EMPTY_WEIGHTS = 2,
+REPLACE_SELECTED_WEIGHTS = 3} 
replace_option = replace_options;
 
+   enum method_option {BY_IN

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46983] trunk/blender/source/blender/ modifiers/intern/MOD_skin.c: Fix bug #31582, Crash with Skin modifier

2012-05-24 Thread Nicholas Bishop
Revision: 46983
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46983
Author:   nicholasbishop
Date: 2012-05-24 19:41:09 + (Thu, 24 May 2012)
Log Message:
---
Fix bug #31582, Crash with Skin modifier

Buffer overflow error in collecting split_face vertices.

Modified Paths:
--
trunk/blender/source/blender/modifiers/intern/MOD_skin.c

Modified: trunk/blender/source/blender/modifiers/intern/MOD_skin.c
===
--- trunk/blender/source/blender/modifiers/intern/MOD_skin.c2012-05-24 
19:16:08 UTC (rev 46982)
+++ trunk/blender/source/blender/modifiers/intern/MOD_skin.c2012-05-24 
19:41:09 UTC (rev 46983)
@@ -1173,9 +1173,9 @@
BLI_assert(split_face->len >= 3);
 
/* Extrude the split face */
-   BMO_mesh_flag_disable_all(bm, NULL, BM_FACE, 1);
-   BMO_elem_flag_enable(bm, split_face, 1);
-   BMO_op_initf(bm, &op, "extrude_face_indiv faces=%ff", 1);
+   BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, FALSE);
+   BM_elem_flag_enable(split_face, BM_ELEM_TAG);
+   BMO_op_initf(bm, &op, "extrude_face_indiv faces=%hf", BM_ELEM_TAG);
BMO_op_exec(bm, &op);
 
/* Update split face (should only be one new face created
@@ -1194,10 +1194,12 @@
/* Need at least four ring edges, so subdivide longest edge if
 * face is a triangle */
longest_edge = BM_face_find_longest_edge(split_face);
-   BMO_mesh_flag_disable_all(bm, NULL, BM_EDGE, 1);
-   BMO_elem_flag_enable(bm, longest_edge, 1);
-   BMO_op_callf(bm, "esubd edges=%fe numcuts=%i quadcornertype=%i",
-1, 1, SUBD_STRAIGHT_CUT);
+   
+   BM_mesh_elem_hflag_disable_all(bm, BM_EDGE, BM_ELEM_TAG, FALSE);
+   BM_elem_flag_enable(longest_edge, BM_ELEM_TAG);
+
+   BMO_op_callf(bm, "esubd edges=%he numcuts=%i quadcornertype=%i",
+BM_ELEM_TAG, 1, SUBD_STRAIGHT_CUT);
}
else if (split_face->len > 4) {
/* Maintain a dynamic vert array containing the split_face's
@@ -1209,7 +1211,7 @@
 
/* Get split face's verts */
BM_iter_as_array(bm, BM_VERTS_OF_FACE, split_face,
-(void **)verts, split_face->len);
+(void **)vert_buf, split_face->len);
 
/* Earlier edge split operations may have turned some quads
 * into higher-degree faces */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46982] branches/soc-2011-tomato/source/ blender: adding new keyframes now updates existing shapekeys

2012-05-24 Thread Campbell Barton
Revision: 46982
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46982
Author:   campbellbarton
Date: 2012-05-24 19:16:08 + (Thu, 24 May 2012)
Log Message:
---
adding new keyframes now updates existing shapekeys

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
===
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h   
2012-05-24 18:22:36 UTC (rev 46981)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h   
2012-05-24 19:16:08 UTC (rev 46982)
@@ -110,6 +110,11 @@
 void BKE_mask_object_shape_unlink(struct MaskObject *maskobj, struct 
MaskObjectShape *maskobj_shape);
 void BKE_mask_object_shape_sort(struct MaskObject *maskobj);
 
+int BKE_mask_object_shape_spline_index(struct MaskObject *maskobj, int index,
+   struct MaskSpline **r_maskobj_shape, 
int *r_index);
+void BKE_mask_object_shape_changed_add(struct MaskObject *maskobj, int index,
+   int do_init, int do_init_interpolate);
+
 /* rasterization */
 void BKE_mask_rasterize(struct Mask *mask, int width, int height, float 
*buffer);
 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 18:22:36 UTC (rev 46981)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 19:16:08 UTC (rev 46982)
@@ -1082,6 +1082,24 @@
return tot;
 }
 
+static void mask_object_shape_from_mask_point(BezTriple *bezt, float 
fp[MASK_OBJECT_SHAPE_ELEM_SIZE])
+{
+   copy_v2_v2(&fp[0], bezt->vec[0]);
+   copy_v2_v2(&fp[2], bezt->vec[1]);
+   copy_v2_v2(&fp[4], bezt->vec[2]);
+   fp[6] = bezt->weight;
+   fp[7] = bezt->radius;
+}
+
+static void mask_object_shape_to_mask_point(BezTriple *bezt, float 
fp[MASK_OBJECT_SHAPE_ELEM_SIZE])
+{
+   copy_v2_v2(bezt->vec[0], &fp[0]);
+   copy_v2_v2(bezt->vec[1], &fp[2]);
+   copy_v2_v2(bezt->vec[2], &fp[4]);
+   bezt->weight = fp[6];
+   bezt->radius = fp[7];
+}
+
 /* these functions match. copy is swapped */
 void BKE_mask_object_shape_from_mask(MaskObject *maskobj, MaskObjectShape 
*maskobj_shape)
 {
@@ -1094,13 +1112,8 @@
for (spline = maskobj->splines.first; spline; spline = 
spline->next) {
int i;
for (i = 0; i < spline->tot_point; i++) {
-   BezTriple *bezt = &spline->points[i].bezt;
-   /* *** BKE_mask_object_shape_to_mask - swapped 
*** */
-   copy_v2_v2(fp, bezt->vec[0]); fp += 2;
-   copy_v2_v2(fp, bezt->vec[1]); fp += 2;
-   copy_v2_v2(fp, bezt->vec[2]); fp += 2;
-   fp[0] = bezt->weight;
-   fp[1] = bezt->radius; fp += 2;
+   
mask_object_shape_from_mask_point(&spline->points[i].bezt, fp);
+   fp += MASK_OBJECT_SHAPE_ELEM_SIZE;
}
}
}
@@ -1120,13 +1133,8 @@
for (spline = maskobj->splines.first; spline; spline = 
spline->next) {
int i;
for (i = 0; i < spline->tot_point; i++) {
-   BezTriple *bezt = &spline->points[i].bezt;
-   /* *** BKE_mask_object_shape_from_mask - 
swapped *** */
-   copy_v2_v2(bezt->vec[0], fp); fp += 2;
-   copy_v2_v2(bezt->vec[1], fp); fp += 2;
-   copy_v2_v2(bezt->vec[2], fp); fp += 2;
-   bezt->weight = fp[0];
-   bezt->radius = fp[1]; fp += 2;
+   
mask_object_shape_to_mask_point(&spline->points[i].bezt, fp);
+   fp += MASK_OBJECT_SHAPE_ELEM_SIZE;
}
}
}
@@ -1287,6 +1295,96 @@
BLI_sortlist(&maskobj->splines_shapes, mask_object_shape_sort_cb);
 }
 
+int BKE_mask_object_shape_spline_index(MaskObject *maskobj, int index,
+   MaskSpline **r_maskobj_shape, int 
*r_index)
+{
+   MaskSpline *spline;
+
+   for (spline = maskobj->splines.first; spline; spline = spline->next) {
+   if (index < spline->tot_point) {
+   *r_maskobj_shape = spline;
+   *r_index = index;

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46981] trunk/blender/source/blender/ blenkernel/intern/smoke.c: Smoke: Fix wrong maximum timestep, resulting in exploding/unstable fluids.

2012-05-24 Thread Daniel Genrich
Revision: 46981
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46981
Author:   genscher
Date: 2012-05-24 18:22:36 + (Thu, 24 May 2012)
Log Message:
---
Smoke: Fix wrong maximum timestep, resulting in exploding/unstable fluids.

Part of my Smoke Development project.
In conjunction with MiikaH and his gSoC project.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/smoke.c

Modified: trunk/blender/source/blender/blenkernel/intern/smoke.c
===
--- trunk/blender/source/blender/blenkernel/intern/smoke.c  2012-05-24 
16:37:40 UTC (rev 46980)
+++ trunk/blender/source/blender/blenkernel/intern/smoke.c  2012-05-24 
18:22:36 UTC (rev 46981)
@@ -1598,8 +1598,8 @@
/* adapt timestep for different framerates, dt = 0.1 is at 25fps */
dt *= (25.0f / fps);
 
-   // printf("test maxVel: %f\n", (sds->dx * 1.5) / dt); // gives 0.9
-   maxVel = (sds->dx * 1.5);
+   // maximum timestep/"CFL" constraint: dt < dx * maxVel
+   maxVel = (sds->dx * 1.0);
 
for(i = 0; i < size; i++)
{

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46980] branches/soc-2011-tomato: svn merge ^/trunk/blender -r46966:46979

2012-05-24 Thread Campbell Barton
Revision: 46980
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46980
Author:   campbellbarton
Date: 2012-05-24 16:37:40 + (Thu, 24 May 2012)
Log Message:
---
svn merge ^/trunk/blender -r46966:46979

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46966

Modified Paths:
--
branches/soc-2011-tomato/intern/ghost/test/gears/GHOST_C-Test.c
branches/soc-2011-tomato/intern/ghost/test/gears/GHOST_Test.cpp
branches/soc-2011-tomato/intern/ghost/test/multitest/Basic.c
branches/soc-2011-tomato/intern/ghost/test/multitest/MultiTest.c
branches/soc-2011-tomato/intern/ghost/test/multitest/ScrollBar.c
branches/soc-2011-tomato/intern/ghost/test/multitest/Util.c
branches/soc-2011-tomato/intern/ghost/test/multitest/WindowData.c
branches/soc-2011-tomato/release/plugins/sequence/blur.c
branches/soc-2011-tomato/release/plugins/sequence/dnr.c
branches/soc-2011-tomato/release/plugins/sequence/scatter.c
branches/soc-2011-tomato/source/blender/blenkernel/BKE_fcurve.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/fcurve.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/particle_system.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/pointcache.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/softbody.c
branches/soc-2011-tomato/source/blender/blenloader/intern/versioning_250.c
branches/soc-2011-tomato/source/blender/collada/ExportSettings.h
branches/soc-2011-tomato/source/blender/collada/SceneExporter.cpp
branches/soc-2011-tomato/source/blender/collada/collada.cpp
branches/soc-2011-tomato/source/blender/collada/collada.h

branches/soc-2011-tomato/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp

branches/soc-2011-tomato/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp
branches/soc-2011-tomato/source/blender/editors/physics/particle_edit.c
branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c
branches/soc-2011-tomato/source/blender/editors/space_graph/graph_edit.c
branches/soc-2011-tomato/source/blender/editors/space_graph/graph_intern.h
branches/soc-2011-tomato/source/blender/editors/space_graph/space_graph.c
branches/soc-2011-tomato/source/blender/editors/space_node/node_templates.c
branches/soc-2011-tomato/source/blender/editors/transform/transform_snap.c
branches/soc-2011-tomato/source/blender/gpu/intern/gpu_codegen.c
branches/soc-2011-tomato/source/blender/gpu/intern/gpu_draw.c
branches/soc-2011-tomato/source/blender/gpu/intern/gpu_extensions.c
branches/soc-2011-tomato/source/blender/imbuf/intern/cineon/logImageLib.c
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene_api.c
branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_skin.c

branches/soc-2011-tomato/source/blender/render/intern/source/convertblender.c
branches/soc-2011-tomato/source/blender/render/intern/source/rendercore.c
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.c

Property Changed:

branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___
Modified: svn:mergeinfo
   - 
/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/vgroup_modifiers:38694-39989
/trunk/blender:36831-46966
   + 
/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/vgroup_modifiers:38694-39989
/trunk/blender:36831-46979

Modified: branches/soc-2011-tomato/intern/ghost/test/gears/GHOST_C-Test.c
===
--- branches/soc-2011-tomato/intern/ghost/test/gears/GHOST_C-Test.c 
2012-05-24 16:35:45 UTC (rev 46979)
+++ branches/soc-2011-tomato/intern/ghost/test/gears/GHOST_C-Test.c 
2012-05-24 16:37:40 UTC (rev 46980)
@@ -46,22 +46,22 @@
 #include "GHOST_C-api.h"
 
 #if defined(WIN32) || defined(__APPLE__)
-   #ifdef WIN32
-   #include 
-   #include 
-   #else /* WIN32 */
-   /* __APPLE__ is defined */
-   #include 
-   #endif /* WIN32 */
+#  ifdef WIN32
+#include 
+#include 
+#  else /* WIN

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46979] trunk/blender: style cleanup: brace placement/newlines

2012-05-24 Thread Campbell Barton
Revision: 46979
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46979
Author:   campbellbarton
Date: 2012-05-24 16:35:45 + (Thu, 24 May 2012)
Log Message:
---
style cleanup: brace placement/newlines

Modified Paths:
--
trunk/blender/release/plugins/sequence/dnr.c
trunk/blender/source/blender/blenkernel/intern/particle_system.c
trunk/blender/source/blender/blenkernel/intern/pointcache.c
trunk/blender/source/blender/blenkernel/intern/softbody.c
trunk/blender/source/blender/blenloader/intern/versioning_250.c
trunk/blender/source/blender/editors/physics/particle_edit.c
trunk/blender/source/blender/editors/space_clip/tracking_ops.c
trunk/blender/source/blender/editors/space_node/node_templates.c
trunk/blender/source/blender/editors/transform/transform_snap.c
trunk/blender/source/blender/gpu/intern/gpu_codegen.c
trunk/blender/source/blender/gpu/intern/gpu_draw.c
trunk/blender/source/blender/gpu/intern/gpu_extensions.c
trunk/blender/source/blender/imbuf/intern/cineon/logImageLib.c
trunk/blender/source/blender/modifiers/intern/MOD_skin.c
trunk/blender/source/blender/render/intern/source/convertblender.c
trunk/blender/source/blender/render/intern/source/rendercore.c

Modified: trunk/blender/release/plugins/sequence/dnr.c
===
--- trunk/blender/release/plugins/sequence/dnr.c2012-05-24 16:21:15 UTC 
(rev 46978)
+++ trunk/blender/release/plugins/sequence/dnr.c2012-05-24 16:35:45 UTC 
(rev 46979)
@@ -132,8 +132,9 @@
d->last_level = cast->level;
}
 
-   if (width != d->last_width || height != d->last_height
-   || cfra != d->last_cfra + 1) {
+   if (width != d->last_width || height != d->last_height ||
+   cfra != d->last_cfra + 1)
+   {
free(d->last_frame);
d->last_frame = (unsigned char*) calloc(width * height, 4);


Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c
2012-05-24 16:21:15 UTC (rev 46978)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c
2012-05-24 16:35:45 UTC (rev 46979)
@@ -,7 +,8 @@
 static int hair_needs_recalc(ParticleSystem *psys)
 {
if (!(psys->flag & PSYS_EDITED) && (!psys->edit || !psys->edit->edited) 
&&
-   ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & 
PSYS_RECALC_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit))) {
+   ((psys->flag & PSYS_HAIR_DONE)==0 || psys->recalc & 
PSYS_RECALC_RESET || (psys->part->flag & PART_HAIR_REGROW && !psys->edit)))
+   {
return 1;
}
 

Modified: trunk/blender/source/blender/blenkernel/intern/pointcache.c
===
--- trunk/blender/source/blender/blenkernel/intern/pointcache.c 2012-05-24 
16:21:15 UTC (rev 46978)
+++ trunk/blender/source/blender/blenkernel/intern/pointcache.c 2012-05-24 
16:35:45 UTC (rev 46979)
@@ -2190,8 +2190,9 @@

BLI_strncpy(num, de->d_name + (strlen(de->d_name) - 15), sizeof(num));
frame = 
atoi(num);

-   if 
((mode==PTCACHE_CLEAR_BEFORE && frame < cfra)|| 
-   
(mode==PTCACHE_CLEAR_AFTER && frame > cfra) ) {
+   if ((mode == 
PTCACHE_CLEAR_BEFORE && frame < cfra) ||
+   (mode == 
PTCACHE_CLEAR_AFTER && frame > cfra))
+   {


BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);

BLI_delete(path_full, 0, 0);
@@ -2226,8 +2227,9 @@
}
else {
while (pm) {
-   if ((mode==PTCACHE_CLEAR_BEFORE && 
pm->frame < cfra)|| 
-   (mode==PTCACHE_CLEAR_AFTER && pm->frame 
> cfra) ) {
+   if ((mode == PTCACHE_CLEAR_BEFORE && 
pm->frame < cfra) ||
+   (mode == PTCACHE_CLEAR_AFTER && 
pm->frame > cfra))
+   {
   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46978] branches/soc-2012-bratwurst: Reuse UVCALC_TRANSFORM_CORRECT as Campbell suggested.

2012-05-24 Thread Antony Riakiotakis
Revision: 46978
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46978
Author:   psy-fi
Date: 2012-05-24 16:21:15 + (Thu, 24 May 2012)
Log Message:
---
Reuse UVCALC_TRANSFORM_CORRECT as Campbell suggested. I have enabled it
default for now to test with all transforms when ready and will probably
disable for certain transformations later. This resolves #29771.
Also fixed evil crasher due to index variable strolling out of bounds.

Modified Paths:
--

branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py

branches/soc-2012-bratwurst/source/blender/editors/transform/transform_conversions.c

branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_ops.c
branches/soc-2012-bratwurst/source/blender/makesdna/DNA_scene_types.h
branches/soc-2012-bratwurst/source/blender/makesrna/intern/rna_scene.c

Modified: 
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===
--- 
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py
   2012-05-24 15:29:50 UTC (rev 46977)
+++ 
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py
   2012-05-24 16:21:15 UTC (rev 46978)
@@ -207,7 +207,7 @@
 col.label("Edge Select Mode:")
 col.prop(tool_settings, "edge_path_mode", text="")
 col.prop(tool_settings, "edge_path_live_unwrap")
-col.prop(tool_settings, "retain_image_pos")
+col.prop(tool_settings, "correct_uv")
 
 col.label("Double Threshold:")
 col.prop(tool_settings, "double_threshold", text="")

Modified: 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_conversions.c
===
--- 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_conversions.c
2012-05-24 15:29:50 UTC (rev 46977)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_conversions.c
2012-05-24 16:21:15 UTC (rev 46978)
@@ -1945,7 +1945,7 @@
float *mappedcos = NULL, *quats= NULL;
float mtx[3][3], smtx[3][3], (*defmats)[3][3] = NULL, (*defcos)[3] = 
NULL;
float *dists=NULL;
-   int count=0, countsel=0, a, totleft;
+   int count=0, countsel=0, a, i, totleft;
int propmode = (t->flag & T_PROP_EDIT) ? (t->flag & (T_PROP_EDIT | 
T_PROP_CONNECTED)) : 0;
int mirror = 0;
char *selstate = NULL;
@@ -2097,7 +2097,7 @@
}
 
eve = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL);
-   for (a=0; eve; eve=BM_iter_step(&iter), a++) {
+   for (a=0, i=0; eve; eve=BM_iter_step(&iter), a++) {
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
if (propmode || selstate[a]) {
float *bweight = 
CustomData_bmesh_get(&bm->vdata, eve->head.data, CD_BWEIGHT);
@@ -2107,7 +2107,7 @@
tx++;
 
if(t->flag & T_IMAGE_PRESERVE_CALC)
-   t->affected_verts[a] = eve;
+   t->affected_verts[i] = eve;
 
/* selected */
if (selstate[a]) tob->flag |= TD_SELECTED;
@@ -2160,6 +2160,7 @@
}
}
tob++;
+   i++;
}
}
}

Modified: 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
===
--- 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
   2012-05-24 15:29:50 UTC (rev 46977)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
   2012-05-24 16:21:15 UTC (rev 46978)
@@ -1049,7 +1049,7 @@
v3d->twtype = 0;
}
 
-   if(ts->retain_image_pos)
+   if(ts->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)
t->flag |= T_IMAGE_PRESERVE_CALC;
 
if (v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
@@ -1089,8 +1089,8 @@
RNA_boolean_set(op->ptr, "correct_uv", 
t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT);
}
}
+   }
 
-   }
else if (t->spacetype==SPACE_IMAGE) {
SpaceImage *sima = sa->spacedata.first;
// XXX for now, get View2D from the active region
@@ -1269,8 +1269,10 @@
v3d->twtype = t->twtype;
}
if(t->flag & T_IMAGE_PRESERVE_CALC) {
-  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46977] branches/soc-2011-tomato/source/ blender: fix bug in own recent edits - shape key insertion

2012-05-24 Thread Campbell Barton
Revision: 46977
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46977
Author:   campbellbarton
Date: 2012-05-24 15:29:50 + (Thu, 24 May 2012)
Log Message:
---
fix bug in own recent edits - shape key insertion 

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 14:56:09 UTC (rev 46976)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 15:29:50 UTC (rev 46977)
@@ -1186,7 +1186,7 @@
if (frame == maskobj_shape->frame) {
return maskobj_shape;
}
-   else if (frame > maskobj_shape->frame) {
+   else if (frame < maskobj_shape->frame) {
break;
}
}
@@ -1249,6 +1249,19 @@
BKE_mask_object_shape_sort(maskobj);
}
 
+#if 0
+   {
+   MaskObjectShape *maskobj_shape;
+   int i = 0;
+   for (maskobj_shape = maskobj->splines_shapes.first;
+maskobj_shape;
+maskobj_shape = maskobj_shape->next)
+   {
+   printf("mask %d, %d\n", i++, 
maskobj_shape->frame);
+   }
+   }
+#endif
+
return maskobj_shape;
 }
 

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
2012-05-24 14:56:09 UTC (rev 46976)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
2012-05-24 15:29:50 UTC (rev 46977)
@@ -62,18 +62,25 @@
const int frame = CFRA;
Mask *mask = CTX_data_edit_mask(C);
MaskObject *maskobj;
+   int change = FALSE;
 
for (maskobj = mask->maskobjs.first; maskobj; maskobj = maskobj->next) {
MaskObjectShape *maskobj_shape;
 
maskobj_shape = BKE_mask_object_shape_varify_frame(maskobj, 
frame);
BKE_mask_object_shape_from_mask(maskobj, maskobj_shape);
+   change = TRUE;
}
 
-   WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
-   DAG_id_tag_update(&mask->id, 0);
+   if (change) {
+   WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
+   DAG_id_tag_update(&mask->id, 0);
 
-   return OPERATOR_FINISHED;
+   return OPERATOR_FINISHED;
+   }
+   else {
+   return OPERATOR_CANCELLED;
+   }
 }
 
 void MASK_OT_shape_key_insert(wmOperatorType *ot)
@@ -97,6 +104,7 @@
const int frame = CFRA;
Mask *mask = CTX_data_edit_mask(C);
MaskObject *maskobj;
+   int change = FALSE;
 
for (maskobj = mask->maskobjs.first; maskobj; maskobj = maskobj->next) {
MaskObjectShape *maskobj_shape;
@@ -105,13 +113,19 @@
 
if (maskobj_shape) {
BKE_mask_object_shape_unlink(maskobj, maskobj_shape);
+   change = TRUE;
}
}
 
-   WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
-   DAG_id_tag_update(&mask->id, 0);
+   if (change) {
+   WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
+   DAG_id_tag_update(&mask->id, 0);
 
-   return OPERATOR_FINISHED;
+   return OPERATOR_FINISHED;
+   }
+   else {
+   return OPERATOR_CANCELLED;
+   }
 }
 
 void MASK_OT_shape_key_clear(wmOperatorType *ot)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46976] trunk/blender/source/blender: Patch #31570: Implementation of 'Include bone children' Option

2012-05-24 Thread Gaia Clary
Revision: 46976
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46976
Author:   gaiaclary
Date: 2012-05-24 14:56:09 + (Thu, 24 May 2012)
Log Message:
---
Patch #31570: Implementation of 'Include bone children' Option

Modified Paths:
--
trunk/blender/source/blender/collada/ExportSettings.h
trunk/blender/source/blender/collada/SceneExporter.cpp
trunk/blender/source/blender/collada/collada.cpp
trunk/blender/source/blender/collada/collada.h
trunk/blender/source/blender/makesrna/intern/rna_scene_api.c
trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/collada/ExportSettings.h
===
--- trunk/blender/source/blender/collada/ExportSettings.h   2012-05-24 
14:55:39 UTC (rev 46975)
+++ trunk/blender/source/blender/collada/ExportSettings.h   2012-05-24 
14:56:09 UTC (rev 46976)
@@ -32,6 +32,7 @@
  public:
  bool selected;
  bool apply_modifiers;
+ bool include_bone_children;
  bool second_life;
  char *filepath;
 };

Modified: trunk/blender/source/blender/collada/SceneExporter.cpp
===
--- trunk/blender/source/blender/collada/SceneExporter.cpp  2012-05-24 
14:55:39 UTC (rev 46975)
+++ trunk/blender/source/blender/collada/SceneExporter.cpp  2012-05-24 
14:56:09 UTC (rev 46976)
@@ -79,25 +79,28 @@
bool is_skinned_mesh = arm_exporter->is_skinned_mesh(ob);
std::list child_objects;
 
-   // list child objects
-   Base *b = (Base*) sce->base.first;
-   while (b) {
-   // cob - child object
-   Object *cob = b->object;
 
-   if (cob->parent == ob) {
-   switch (cob->type) {
-   case OB_MESH:
-   case OB_CAMERA:
-   case OB_LAMP:
-   case OB_EMPTY:
-   case OB_ARMATURE:
-   child_objects.push_back(cob);
-   break;
+   if (this->export_settings->include_bone_children) {
+   // list child objects
+   Base *b = (Base*) sce->base.first;
+   while (b) {
+   // cob - child object
+   Object *cob = b->object;
+
+   if (cob->parent == ob) {
+   switch (cob->type) {
+   case OB_MESH:
+   case OB_CAMERA:
+   case OB_LAMP:
+   case OB_EMPTY:
+   case OB_ARMATURE:
+   child_objects.push_back(cob);
+   break;
+   }
}
+
+   b = b->next;
}
-
-   b = b->next;
}
 
 

Modified: trunk/blender/source/blender/collada/collada.cpp
===
--- trunk/blender/source/blender/collada/collada.cpp2012-05-24 14:55:39 UTC 
(rev 46975)
+++ trunk/blender/source/blender/collada/collada.cpp2012-05-24 14:56:09 UTC 
(rev 46976)
@@ -49,14 +49,21 @@
return 0;
}
 
-   int collada_export(Scene *sce, const char *filepath, int selected, int 
apply_modifiers, int second_life)
+   int collada_export(
+   Scene *sce, 
+   const char *filepath,
+   int selected,
+   int apply_modifiers,
+   int include_bone_children,
+   int second_life)
{
ExportSettings export_settings;

-   export_settings.selected= selected != 0;
-   export_settings.apply_modifiers = apply_modifiers != 0;
-   export_settings.second_life = second_life != 0;
-   export_settings.filepath= (char *)filepath;
+   export_settings.selected = selected != 0;
+   export_settings.apply_modifiers  = apply_modifiers != 0;
+   export_settings.include_bone_children= 
include_bone_children != 0;
+   export_settings.second_life  = second_life != 0;
+   export_settings.filepath = (char *)filepath;
 
/* annoying, collada crashes if file cant be created! [#27162] 
*/
if (!BLI_exists(filepath)) {

Modified: trunk/blender/source/blender/collada/collada.h
===
--- trunk/blender/source/blender/collada/collada.h  2012-05-24 14:55:39 UTC 
(rev 46975)
+++ trunk/blender/source/b

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46975] branches/soc-2012-bratwurst: svn merge ^/trunk/blender revision 46974

2012-05-24 Thread Antony Riakiotakis
Revision: 46975
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46975
Author:   psy-fi
Date: 2012-05-24 14:55:39 + (Thu, 24 May 2012)
Log Message:
---
svn merge ^/trunk/blender revision 46974

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46974

Modified Paths:
--
branches/soc-2012-bratwurst/CMakeLists.txt
branches/soc-2012-bratwurst/SConstruct
branches/soc-2012-bratwurst/build_files/scons/config/win32-mingw-config.py
branches/soc-2012-bratwurst/build_files/scons/tools/Blender.py
branches/soc-2012-bratwurst/build_files/scons/tools/btools.py
branches/soc-2012-bratwurst/doc/python_api/examples/bpy.types.Mesh.py
branches/soc-2012-bratwurst/doc/python_api/rst/include__bmesh.rst
branches/soc-2012-bratwurst/intern/cycles/blender/blender_object.cpp
branches/soc-2012-bratwurst/intern/cycles/blender/blender_shader.cpp
branches/soc-2012-bratwurst/intern/cycles/kernel/kernel_object.h
branches/soc-2012-bratwurst/intern/cycles/kernel/kernel_shader.h
branches/soc-2012-bratwurst/intern/cycles/kernel/svm/svm.h
branches/soc-2012-bratwurst/intern/cycles/kernel/svm/svm_geometry.h
branches/soc-2012-bratwurst/intern/cycles/kernel/svm/svm_types.h
branches/soc-2012-bratwurst/intern/cycles/render/graph.cpp
branches/soc-2012-bratwurst/intern/cycles/render/nodes.cpp
branches/soc-2012-bratwurst/intern/cycles/render/nodes.h
branches/soc-2012-bratwurst/intern/cycles/render/object.cpp
branches/soc-2012-bratwurst/intern/cycles/render/object.h
branches/soc-2012-bratwurst/intern/cycles/util/util_hash.h
branches/soc-2012-bratwurst/intern/ghost/test/gears/GHOST_C-Test.c
branches/soc-2012-bratwurst/intern/ghost/test/gears/GHOST_Test.cpp
branches/soc-2012-bratwurst/intern/ghost/test/multitest/Basic.c
branches/soc-2012-bratwurst/intern/ghost/test/multitest/MultiTest.c
branches/soc-2012-bratwurst/intern/ghost/test/multitest/ScrollBar.c
branches/soc-2012-bratwurst/intern/ghost/test/multitest/Util.c
branches/soc-2012-bratwurst/intern/ghost/test/multitest/WindowData.c
branches/soc-2012-bratwurst/intern/guardedalloc/intern/mmap_win.c
branches/soc-2012-bratwurst/release/datafiles/blender_icons.png
branches/soc-2012-bratwurst/release/plugins/sequence/blur.c
branches/soc-2012-bratwurst/release/plugins/sequence/scatter.c
branches/soc-2012-bratwurst/release/scripts/startup/bl_operators/object.py
branches/soc-2012-bratwurst/release/scripts/startup/bl_operators/presets.py
branches/soc-2012-bratwurst/release/scripts/startup/bl_operators/wm.py

branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/properties_animviz.py

branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/properties_data_mesh.py

branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_dopesheet.py
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_graph.py
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_node.py

branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2012-bratwurst/source/blender/blenkernel/BKE_blender.h
branches/soc-2012-bratwurst/source/blender/blenkernel/BKE_fcurve.h
branches/soc-2012-bratwurst/source/blender/blenkernel/BKE_key.h
branches/soc-2012-bratwurst/source/blender/blenkernel/BKE_mesh.h
branches/soc-2012-bratwurst/source/blender/blenkernel/BKE_node.h
branches/soc-2012-bratwurst/source/blender/blenkernel/BKE_object.h
branches/soc-2012-bratwurst/source/blender/blenkernel/BKE_screen.h
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/blender.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/brush.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/cloth.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/collision.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/constraint.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/customdata.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/deform.c

branches/soc-2012-bratwurst/source/blender/blenkernel/intern/editderivedmesh.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/fcurve.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/key.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/lattice.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/mesh.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/movieclip.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/node.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/object.c

bran

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46974] trunk/blender/source/blender/ compositor/operations: Fix new compositor color to value/ bw conversion working different than it did

2012-05-24 Thread Brecht Van Lommel
Revision: 46974
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46974
Author:   blendix
Date: 2012-05-24 14:19:20 + (Thu, 24 May 2012)
Log Message:
---
Fix new compositor color to value/bw conversion working different than it did
before. It doesn't make much sense to always multiply with alpha, especially
if it's a premul image that already has it multiplied in.

Patch by Irie Shinsuke.

Modified Paths:
--

trunk/blender/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp

trunk/blender/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp

Modified: 
trunk/blender/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
===
--- 
trunk/blender/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
2012-05-24 14:06:10 UTC (rev 46973)
+++ 
trunk/blender/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp
2012-05-24 14:19:20 UTC (rev 46974)
@@ -38,7 +38,7 @@
 {
float inputColor[4];
inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
-   outputValue[0] = (inputColor[0]*0.35f + inputColor[1]*0.45f + 
inputColor[2]*0.2f)*inputColor[3];
+   outputValue[0] = inputColor[0]*0.35f + inputColor[1]*0.45f + 
inputColor[2]*0.2f;
 }
 
 void ConvertColorToBWOperation::deinitExecution()

Modified: 
trunk/blender/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp
===
--- 
trunk/blender/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp
 2012-05-24 14:06:10 UTC (rev 46973)
+++ 
trunk/blender/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp
 2012-05-24 14:19:20 UTC (rev 46974)
@@ -38,7 +38,7 @@
 {
float inputColor[4];
inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
-   outputValue[0] = ((inputColor[0] + inputColor[1] + 
inputColor[2])/3.0f)*inputColor[3];
+   outputValue[0] = (inputColor[0] + inputColor[1] + inputColor[2])/3.0f;
 }
 
 void ConvertColourToValueProg::deinitExecution()

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46973] branches/soc-2011-tomato/source/ blender/makesrna/intern/rna_mask.c: fix for incorrect range function args.

2012-05-24 Thread Campbell Barton
Revision: 46973
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46973
Author:   campbellbarton
Date: 2012-05-24 14:06:10 + (Thu, 24 May 2012)
Log Message:
---
fix for incorrect range function args.

Modified Paths:
--
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c

Modified: branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c
===
--- branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c  
2012-05-24 14:01:00 UTC (rev 46972)
+++ branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c  
2012-05-24 14:06:10 UTC (rev 46973)
@@ -114,13 +114,16 @@
mask->act_maskobj = value;
 }
 
-static void rna_Mask_object_active_index_range(PointerRNA *ptr, int *min, int 
*max)
+static void rna_Mask_object_active_index_range(PointerRNA *ptr, int *min, int 
*max, int *softmin, int *softmax)
 {
Mask *mask = (Mask *)ptr->id.data;
 
*min = 0;
*max = mask->tot_maskobj - 1;
*max = MAX2(0, *max);
+
+   *softmin = *min;
+   *softmax = *max;
 }
 
 static PointerRNA rna_Mask_object_active_get(PointerRNA *ptr)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46972] branches/soc-2011-tomato/source/ blender: Port mask node to new compositor system

2012-05-24 Thread Sergey Sharybin
Revision: 46972
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46972
Author:   nazgul
Date: 2012-05-24 14:01:00 + (Thu, 24 May 2012)
Log Message:
---
Port mask node to new compositor system

Works in the same way as double edge node -- not actually multithreaded
but currently it's fast enough to be used in such way. In the future it
might be changed in some way.

Move actual mask rasterization code to BKE so it's resued by old compositor
system and new compositor. Also in the future it might be used to display
mask preview in mask editor.

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp
branches/soc-2011-tomato/source/blender/nodes/CMakeLists.txt

branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_mask.c

Added Paths:
---
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MaskNode.cpp
branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MaskNode.h

branches/soc-2011-tomato/source/blender/compositor/operations/COM_MaskOperation.cpp

branches/soc-2011-tomato/source/blender/compositor/operations/COM_MaskOperation.h

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
===
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h   
2012-05-24 13:57:02 UTC (rev 46971)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h   
2012-05-24 14:01:00 UTC (rev 46972)
@@ -110,6 +110,9 @@
 void BKE_mask_object_shape_unlink(struct MaskObject *maskobj, struct 
MaskObjectShape *maskobj_shape);
 void BKE_mask_object_shape_sort(struct MaskObject *maskobj);
 
+/* rasterization */
+void BKE_mask_rasterize(struct Mask *mask, int width, int height, float 
*buffer);
+
 #define MASKPOINT_ISSEL(p)  ( ((p)->bezt.f1 | (p)->bezt.f2 | (p)->bezt.f2) & 
SELECT)
 #define MASKPOINT_SEL(p){ (p)->bezt.f1 |=  SELECT; (p)->bezt.f2 |=  
SELECT; (p)->bezt.f3 |=  SELECT; } (void)0
 #define MASKPOINT_DESEL(p)  { (p)->bezt.f1 &= ~SELECT; (p)->bezt.f2 &= 
~SELECT; (p)->bezt.f3 &= ~SELECT; } (void)0

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 13:57:02 UTC (rev 46971)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 14:01:00 UTC (rev 46972)
@@ -55,6 +55,8 @@
 #include "BKE_movieclip.h"
 #include "BKE_utildefines.h"
 
+#include "raskter.h"
+
 /* mask objects */
 
 MaskObject *BKE_mask_object_new(Mask *mask, const char *name)
@@ -1271,3 +1273,46 @@
 {
BLI_sortlist(&maskobj->splines_shapes, mask_object_shape_sort_cb);
 }
+
+/* rasterization */
+void BKE_mask_rasterize(Mask *mask, int width, int height, float *buffer)
+{
+   MaskObject *maskobj;
+
+   for (maskobj = mask->maskobjs.first; maskobj; maskobj = maskobj->next) {
+   MaskSpline *spline;
+
+   for (spline = maskobj->splines.first; spline; spline = 
spline->next) {
+   float *diff_points;
+   int tot_diff_point;
+
+   diff_points = BKE_mask_spline_differentiate(spline, 
&tot_diff_point);
+
+   /* TODO, make this optional! */
+   if (width != height) {
+   float *fp;
+   int i;
+   float asp;
+
+   if (width < height) {
+   fp = &diff_points[0];
+   asp = (float)width / (float)height;
+   }
+   else {
+   fp = &diff_points[1];
+   asp = (float)height / (float)width;
+   }
+
+   for (i = 0; i < tot_diff_point; i++, fp += 2) {
+   (*fp) = (((*fp) - 0.5f) / asp) + 0.5f;
+   }
+   }
+
+   if (tot_diff_point) {
+   PLX_raskterize(diff_points, tot_diff_point, 
buffer, width, height);
+
+   MEM_freeN(diff_points);
+   }
+   }
+   }
+}

Modified: branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
===
--- branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt   
2012-05-24 13:57:02 UTC (rev 46971)
+++ branch

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46971] branches/soc-2011-tomato/source/ blender: add missing file from previous commit

2012-05-24 Thread Campbell Barton
Revision: 46971
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46971
Author:   campbellbarton
Date: 2012-05-24 13:57:02 + (Thu, 24 May 2012)
Log Message:
---
add missing file from previous commit 

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c

Added Paths:
---
branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 13:52:25 UTC (rev 46970)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 13:57:02 UTC (rev 46971)
@@ -987,8 +987,6 @@
 
/* animation if available */
if (do_newframe) {
-   //MaskObjectShape *maskobj_shape = 
BKE_mask_object_shape_find_frame(maskobj, (int)ctime);
-
MaskObjectShape *maskobj_shape_a;
MaskObjectShape *maskobj_shape_b;
int found;

Added: branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
(rev 0)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
2012-05-24 13:57:02 UTC (rev 46971)
@@ -0,0 +1,130 @@
+/*
+ * * 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.
+ *
+ * The Original Code is Copyright (C) 2012 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation,
+ * Campbell Barton
+ *
+ * * END GPL LICENSE BLOCK *
+ */
+
+/** \file blender/editors/mask/mask_shapekey.c
+ *  \ingroup edmask
+ */
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+
+#include "BKE_context.h"
+#include "BKE_curve.h"
+#include "BKE_depsgraph.h"
+#include "BKE_mask.h"
+
+#include "DNA_mask_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_object_types.h"  /* SELECT */
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "ED_screen.h"
+#include "ED_mask.h"
+#include "ED_clip.h"
+
+#include "RNA_access.h"
+#include "RNA_define.h"
+
+#include "mask_intern.h"  /* own include */
+
+static int mask_shape_key_insert_exec(bContext *C, wmOperator *UNUSED(op))
+{
+   Scene *scene = CTX_data_scene(C);
+   const int frame = CFRA;
+   Mask *mask = CTX_data_edit_mask(C);
+   MaskObject *maskobj;
+
+   for (maskobj = mask->maskobjs.first; maskobj; maskobj = maskobj->next) {
+   MaskObjectShape *maskobj_shape;
+
+   maskobj_shape = BKE_mask_object_shape_varify_frame(maskobj, 
frame);
+   BKE_mask_object_shape_from_mask(maskobj, maskobj_shape);
+   }
+
+   WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
+   DAG_id_tag_update(&mask->id, 0);
+
+   return OPERATOR_FINISHED;
+}
+
+void MASK_OT_shape_key_insert(wmOperatorType *ot)
+{
+   /* identifiers */
+   ot->name = "Insert Shape Key";
+   ot->description = "";
+   ot->idname = "MASK_OT_shape_key_insert";
+
+   /* api callbacks */
+   ot->exec = mask_shape_key_insert_exec;
+   ot->poll = ED_maskediting_mask_poll;
+
+   /* flags */
+   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
+
+static int mask_shape_key_clear_exec(bContext *C, wmOperator *UNUSED(op))
+{
+   Scene *scene = CTX_data_scene(C);
+   const int frame = CFRA;
+   Mask *mask = CTX_data_edit_mask(C);
+   MaskObject *maskobj;
+
+   for (maskobj = mask->maskobjs.first; maskobj; maskobj = maskobj->next) {
+   MaskObjectShape *maskobj_shape;
+
+   maskobj_shape = BKE_mask_object_shape_find_frame(maskobj, 
frame);
+
+   if (maskobj_shape) {
+   BKE_mask_object_shape_unlink(maskobj, maskobj_shape);
+   }
+   }
+
+   WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
+   DAG_id_tag_update(&mask->id, 0);
+
+   return OPERATOR_FINISHED;
+}
+
+voi

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46970] trunk/blender/source/blender: Graph Editor - View All/ Selected now includes handles for calculating extents of

2012-05-24 Thread Joshua Leung
Revision: 46970
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46970
Author:   aligorith
Date: 2012-05-24 13:52:25 + (Thu, 24 May 2012)
Log Message:
---
Graph Editor - View All/Selected now includes handles for calculating extents of
F-Curves

It is possible to get the old behaviour (handles excluded) by bringing up the
Operator Properties (F6) while in the Graph Editor (this doesn't work elsewhere
due to the context requirements of this stuff).

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_fcurve.h
trunk/blender/source/blender/blenkernel/intern/fcurve.c
trunk/blender/source/blender/editors/space_graph/graph_edit.c
trunk/blender/source/blender/editors/space_graph/graph_intern.h
trunk/blender/source/blender/editors/space_graph/space_graph.c

Modified: trunk/blender/source/blender/blenkernel/BKE_fcurve.h
===
--- trunk/blender/source/blender/blenkernel/BKE_fcurve.h2012-05-24 
13:31:36 UTC (rev 46969)
+++ trunk/blender/source/blender/blenkernel/BKE_fcurve.h2012-05-24 
13:52:25 UTC (rev 46970)
@@ -218,7 +218,7 @@
 
 /* get the bounding-box extents for F-Curve */
 void calc_fcurve_bounds(struct FCurve *fcu, float *xmin, float *xmax, float 
*ymin, float *ymax,
-const short do_sel_only);
+const short do_sel_only, const short include_handles);
 
 /* .. */
 

Modified: trunk/blender/source/blender/blenkernel/intern/fcurve.c
===
--- trunk/blender/source/blender/blenkernel/intern/fcurve.c 2012-05-24 
13:31:36 UTC (rev 46969)
+++ trunk/blender/source/blender/blenkernel/intern/fcurve.c 2012-05-24 
13:52:25 UTC (rev 46970)
@@ -477,7 +477,7 @@
 
 /* Calculate the extents of F-Curve's data */
 void calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, 
float *ymax,
-const short do_sel_only)
+const short do_sel_only, const short include_handles)
 {
float xminv = 9.0f, xmaxv = -9.0f;
float yminv = 9.0f, ymaxv = -9.0f;
@@ -495,8 +495,14 @@
if (bezt_first) {
BLI_assert(bezt_last != NULL);

-   xminv = MIN2(xminv, 
bezt_first->vec[1][0]);
-   xmaxv = MAX2(xmaxv, 
bezt_last->vec[1][0]);
+   if (include_handles) {
+   xminv = MIN3(xminv, 
bezt_first->vec[0][0], bezt_first->vec[1][0]);
+   xmaxv = MAX3(xmaxv, 
bezt_last->vec[1][0],  bezt_last->vec[2][0]);
+   }
+   else {
+   xminv = MIN2(xminv, 
bezt_first->vec[1][0]);
+   xmaxv = MAX2(xmaxv, 
bezt_last->vec[1][0]);
+   }
}
}

@@ -506,10 +512,15 @@

for (bezt = fcu->bezt, i = 0; i < fcu->totvert; 
bezt++, i++) {
if ((do_sel_only == FALSE) || 
BEZSELECTED(bezt)) {
-   if (bezt->vec[1][1] < yminv)
-   yminv = bezt->vec[1][1];
-   if (bezt->vec[1][1] > ymaxv)
-   ymaxv = bezt->vec[1][1];
+   if (include_handles) {
+   yminv = MIN4(yminv, 
bezt->vec[1][1], bezt->vec[0][1], bezt->vec[2][1]);
+   ymaxv = MAX4(ymaxv, 
bezt->vec[1][1], bezt->vec[0][1], bezt->vec[2][1]);
+   }
+   else {
+   yminv = MIN2(yminv, 
bezt->vec[1][1]);
+   ymaxv = MAX2(ymaxv, 
bezt->vec[1][1]);
+   }
+   
foundvert = TRUE;
}
}
@@ -531,7 +542,7 @@
yminv = fpt->vec[1];
if (fpt->vec[1] > ymaxv)
ymaxv = fpt->vec[1];
-
+   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46969] branches/soc-2011-tomato/source/ blender: shapekeys for masks - this doesnt use existing shapekey code however.

2012-05-24 Thread Campbell Barton
Revision: 46969
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46969
Author:   campbellbarton
Date: 2012-05-24 13:31:36 + (Thu, 24 May 2012)
Log Message:
---
shapekeys for masks - this doesnt use existing shapekey code however.

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c
branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c
branches/soc-2011-tomato/source/blender/editors/mask/CMakeLists.txt
branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_intern.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
===
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h   
2012-05-24 13:18:53 UTC (rev 46968)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h   
2012-05-24 13:31:36 UTC (rev 46969)
@@ -31,6 +31,7 @@
 struct Mask;
 struct MaskParent;
 struct MaskObject;
+struct MaskObjectShape;
 struct MaskSpline;
 struct MaskSplinePoint;
 struct MaskSplinePointUW;
@@ -83,8 +84,8 @@
 
 /* parenting */
 
-void BKE_mask_evaluate_all_masks(struct Main *bmain, float ctime);
-void BKE_mask_update_scene(struct Main *bmain, struct Scene *scene);
+void BKE_mask_evaluate_all_masks(struct Main *bmain, float ctime, const int 
do_newframe);
+void BKE_mask_update_scene(struct Main *bmain, struct Scene *scene, const int 
do_newframe);
 void BKE_mask_parent_init(struct MaskParent *parent);
 void BKE_mask_calc_handle_adjacent_length(struct Mask *mask, struct MaskSpline 
*spline, struct MaskSplinePoint *point);
 void BKE_mask_calc_handle_point(struct Mask *mask, struct MaskSpline *spline, 
struct MaskSplinePoint *point);
@@ -93,6 +94,22 @@
 struct MaskSplinePoint **r_point_prev, 
struct MaskSplinePoint **r_point_next);
 void BKE_mask_calc_handles(struct Mask *mask);
 
+/* animation */
+int  BKE_mask_object_shape_totvert(struct MaskObject *maskobj);
+void BKE_mask_object_shape_from_mask(struct MaskObject *maskobj, struct 
MaskObjectShape *maskobj_shape);
+void BKE_mask_object_shape_to_mask(struct MaskObject *maskobj, struct 
MaskObjectShape *maskobj_shape);
+void BKE_mask_object_shape_to_mask_interp(struct MaskObject *maskobj,
+  struct MaskObjectShape 
*maskobj_shape_a,
+  struct MaskObjectShape 
*maskobj_shape_b,
+  const float fac);
+struct MaskObjectShape *BKE_mask_object_shape_find_frame(struct MaskObject 
*maskobj, int frame);
+int BKE_mask_object_shape_find_frame_range(struct MaskObject *maskobj, int 
frame,
+   struct MaskObjectShape 
**r_maskobj_shape_a,
+   struct MaskObjectShape 
**r_maskobj_shape_b);
+struct MaskObjectShape *BKE_mask_object_shape_varify_frame(struct MaskObject 
*maskobj, int frame);
+void BKE_mask_object_shape_unlink(struct MaskObject *maskobj, struct 
MaskObjectShape *maskobj_shape);
+void BKE_mask_object_shape_sort(struct MaskObject *maskobj);
+
 #define MASKPOINT_ISSEL(p)  ( ((p)->bezt.f1 | (p)->bezt.f2 | (p)->bezt.f2) & 
SELECT)
 #define MASKPOINT_SEL(p){ (p)->bezt.f1 |=  SELECT; (p)->bezt.f2 |=  
SELECT; (p)->bezt.f3 |=  SELECT; } (void)0
 #define MASKPOINT_DESEL(p)  { (p)->bezt.f1 &= ~SELECT; (p)->bezt.f2 &= 
~SELECT; (p)->bezt.f3 &= ~SELECT; } (void)0

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 13:18:53 UTC (rev 46968)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-24 13:31:36 UTC (rev 46969)
@@ -662,10 +662,20 @@
MEM_freeN(spline);
 }
 
+void BKE_mask_object_shape_free(MaskObjectShape *maskobj_shape)
+{
+   MEM_freeN(maskobj_shape->data);
+
+   MEM_freeN(maskobj_shape);
+}
+
 void BKE_mask_object_free(MaskObject *maskobj)
 {
-   MaskSpline *spline = maskobj->splines.first;
+   MaskSpline *spline;
+   MaskObjectShape *maskobj_shape;
 
+   /* free splines */
+   spline = maskobj->splines.first;
while (spline) {
MaskSpline *next_spline = spline->next;
 
@@ -675,6 +685,17 @@
spline = next_spline;
}
 
+   /* free animation data */
+   maskobj_shape = maskobj->splines_shapes.first;
+   while (maskobj_shape) {
+   MaskObjectShape *next_maskobj_

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46968] trunk/blender: style cleanup

2012-05-24 Thread Campbell Barton
Revision: 46968
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46968
Author:   campbellbarton
Date: 2012-05-24 13:18:53 + (Thu, 24 May 2012)
Log Message:
---
style cleanup

Modified Paths:
--
trunk/blender/intern/ghost/test/gears/GHOST_C-Test.c
trunk/blender/intern/ghost/test/gears/GHOST_Test.cpp
trunk/blender/intern/ghost/test/multitest/Basic.c
trunk/blender/intern/ghost/test/multitest/MultiTest.c
trunk/blender/intern/ghost/test/multitest/ScrollBar.c
trunk/blender/intern/ghost/test/multitest/Util.c
trunk/blender/intern/ghost/test/multitest/WindowData.c
trunk/blender/release/plugins/sequence/blur.c
trunk/blender/release/plugins/sequence/scatter.c

Modified: trunk/blender/intern/ghost/test/gears/GHOST_C-Test.c
===
--- trunk/blender/intern/ghost/test/gears/GHOST_C-Test.c2012-05-24 
10:18:54 UTC (rev 46967)
+++ trunk/blender/intern/ghost/test/gears/GHOST_C-Test.c2012-05-24 
13:18:53 UTC (rev 46968)
@@ -46,22 +46,22 @@
 #include "GHOST_C-api.h"
 
 #if defined(WIN32) || defined(__APPLE__)
-   #ifdef WIN32
-   #include 
-   #include 
-   #else /* WIN32 */
-   /* __APPLE__ is defined */
-   #include 
-   #endif /* WIN32 */
+#  ifdef WIN32
+#include 
+#include 
+#  else /* WIN32 */
+ /* __APPLE__ is defined */
+#include 
+#  endif /* WIN32 */
 #else /* defined(WIN32) || defined(__APPLE__) */
-   #include 
+#  include 
 #endif /* defined(WIN32) || defined(__APPLE__) */
 
 
 static void gearsTimerProc(GHOST_TimerTaskHandle task, GHOST_TUns64 time);
 int processEvent(GHOST_EventHandle hEvent, GHOST_TUserDataPtr userData);
 
-static GLfloat view_rotx=20.0, view_roty=30.0, view_rotz=0.0;
+static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0;
 static GLfloat fAngle = 0.0;
 static int sExitRequested = 0;
 static GHOST_SystemHandle shSystem = NULL;
@@ -87,34 +87,34 @@
const double pi = 3.14159264;

r0 = inner_radius;
-   r1 = (float)(outer_radius - tooth_depth/2.0);
-   r2 = (float)(outer_radius + tooth_depth/2.0);
+   r1 = (float)(outer_radius - tooth_depth / 2.0);
+   r2 = (float)(outer_radius + tooth_depth / 2.0);

-   da = (float)(2.0*pi / teeth / 4.0);
+   da = (float)(2.0 * pi / teeth / 4.0);

glShadeModel(GL_FLAT);
glNormal3f(0.0, 0.0, 1.0);

/* draw front face */
glBegin(GL_QUAD_STRIP);
-   for (i=0;i<=teeth;i++) {
-   angle = (float)(i * 2.0*pi / teeth);
-   glVertex3f((float)(r0*cos(angle)), (float)(r0*sin(angle)), 
(float)(width*0.5));
-   glVertex3f((float)(r1*cos(angle)), (float)(r1*sin(angle)), 
(float)(width*0.5));
-   glVertex3f((float)(r0*cos(angle)), (float)(r0*sin(angle)), 
(float)(width*0.5));
-   glVertex3f((float)(r1*cos(angle+3*da)), 
(float)(r1*sin(angle+3*da)), (float)(width*0.5));
+   for (i = 0; i <= teeth; i++) {
+   angle = (float)(i * 2.0 * pi / teeth);
+   glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), 
(float)(width * 0.5));
+   glVertex3f((float)(r1 * cos(angle)), (float)(r1 * sin(angle)), 
(float)(width * 0.5));
+   glVertex3f((float)(r0 * cos(angle)), (float)(r0 * sin(angle)), 
(float)(width * 0.5));
+   glVertex3f((float)(r1 * cos(angle + 3 * da)), (float)(r1 * 
sin(angle + 3 * da)), (float)(width * 0.5));
}
glEnd();

/* draw front sides of teeth */
glBegin(GL_QUADS);
-   da = (float)(2.0*pi / teeth / 4.0);
-   for (i=0;ihttp://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46967] branches/soc-2011-tomato: svn merge ^/trunk/blender -r46963:46966

2012-05-24 Thread Campbell Barton
Revision: 46967
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46967
Author:   campbellbarton
Date: 2012-05-24 10:18:54 + (Thu, 24 May 2012)
Log Message:
---
svn merge ^/trunk/blender -r46963:46966

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46963

Modified Paths:
--
branches/soc-2011-tomato/source/blender/editors/sound/sound_ops.c

Property Changed:

branches/soc-2011-tomato/
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___
Modified: svn:mergeinfo
   - 
/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/vgroup_modifiers:38694-39989
/trunk/blender:36831-46963
   + 
/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/vgroup_modifiers:38694-39989
/trunk/blender:36831-46966


Property changes on: 
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c: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/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-46963
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c: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/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-46966

Modified: branches/soc-2011-tomato/source/blender/editors/sound/sound_ops.c
===
--- branches/soc-2011-tomato/source/blender/editors/sound/sound_ops.c   
2012-05-24 10:16:42 UTC (rev 46966)
+++ branches/soc-2011-tomato/source/blender/editors/sound/sound_ops.c   
2012-05-24 10:18:54 UTC (rev 46967)
@@ -80,7 +80,7 @@
 static int sound_open_cancel(bContext *UNUSED(C), wmOperator *op)
 {
MEM_freeN(op->customdata);
-   op->customdata= NULL;
+   op->customdata = NULL;
return OPERATOR_CANCELLED;
 }
 
@@ -88,7 +88,7 @@
 {
PropertyPointerRNA *pprop;
 
-   op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), 
"OpenPropertyPointerRNA");
+   op->customdata = pprop = MEM_callocN(sizeof(PropertyPointerRNA), 
"OpenPropertyPointerRNA");
uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
 }
 
@@ -108,7 +108,7 @@
if (!op->customdata)
sound_open_init(C, op);
 
-   if (sound==NULL || sound->playback_handle == NULL) {
+   if (sound == NULL || sound->playback_handle == NULL) {
if (op->customdata) MEM_freeN(op->customdata);
BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
return OPERATOR_CANCELLED;
@@ -133,7 +133,7 @@
}
 
/* hook into UI */
-   pprop= op->customdata;
+   pprop = op->customdata;
 
if (pprop->prop) {
/* when creating new ID blocks, use is already 1, but RNA
@@ -183,10 +183,10 @@
ot->cancel = sound_open_cancel;
 
/* flags */
-   ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
/* properties */
-   WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, 
FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, 
FILE_DEFAULTDISPLAY);
+   WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVI

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46966] trunk/blender/source/blender/ editors/sound/sound_ops.c: style cleanup

2012-05-24 Thread Campbell Barton
Revision: 46966
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46966
Author:   campbellbarton
Date: 2012-05-24 10:16:42 + (Thu, 24 May 2012)
Log Message:
---
style cleanup

Modified Paths:
--
trunk/blender/source/blender/editors/sound/sound_ops.c

Modified: trunk/blender/source/blender/editors/sound/sound_ops.c
===
--- trunk/blender/source/blender/editors/sound/sound_ops.c  2012-05-24 
10:15:38 UTC (rev 46965)
+++ trunk/blender/source/blender/editors/sound/sound_ops.c  2012-05-24 
10:16:42 UTC (rev 46966)
@@ -80,7 +80,7 @@
 static int sound_open_cancel(bContext *UNUSED(C), wmOperator *op)
 {
MEM_freeN(op->customdata);
-   op->customdata= NULL;
+   op->customdata = NULL;
return OPERATOR_CANCELLED;
 }
 
@@ -88,7 +88,7 @@
 {
PropertyPointerRNA *pprop;
 
-   op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), 
"OpenPropertyPointerRNA");
+   op->customdata = pprop = MEM_callocN(sizeof(PropertyPointerRNA), 
"OpenPropertyPointerRNA");
uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
 }
 
@@ -108,7 +108,7 @@
if (!op->customdata)
sound_open_init(C, op);
 
-   if (sound==NULL || sound->playback_handle == NULL) {
+   if (sound == NULL || sound->playback_handle == NULL) {
if (op->customdata) MEM_freeN(op->customdata);
BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
return OPERATOR_CANCELLED;
@@ -133,7 +133,7 @@
}
 
/* hook into UI */
-   pprop= op->customdata;
+   pprop = op->customdata;
 
if (pprop->prop) {
/* when creating new ID blocks, use is already 1, but RNA
@@ -183,10 +183,10 @@
ot->cancel = sound_open_cancel;
 
/* flags */
-   ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
/* properties */
-   WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, 
FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, 
FILE_DEFAULTDISPLAY);
+   WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, 
FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, 
FILE_DEFAULTDISPLAY);
RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in 
memory");
RNA_def_boolean(ot->srna, "mono", FALSE, "Mono", "Mixdown the sound to 
mono");
 }
@@ -204,10 +204,10 @@
ot->cancel = sound_open_cancel;
 
/* flags */
-   ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+   ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
/* properties */
-   WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, 
FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, 
FILE_DEFAULTDISPLAY);
+   WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, 
FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, 
FILE_DEFAULTDISPLAY);
RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in 
memory");
RNA_def_boolean(ot->srna, "mono", TRUE, "Mono", "Mixdown the sound to 
mono");
 }
@@ -216,12 +216,12 @@
 
 static int sound_update_animation_flags_exec(bContext *C, wmOperator 
*UNUSED(op))
 {
-   Sequence* seq;
-   Scene* scene = CTX_data_scene(C);
-   struct FCurve* fcu;
+   Sequence *seq;
+   Scene *scene = CTX_data_scene(C);
+   struct FCurve *fcu;
char driven;
 
-   SEQ_BEGIN (scene->ed, seq)
+   SEQ_BEGIN(scene->ed, seq)
{
fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, 
"volume", 0, &driven);
if (fcu || driven)
@@ -243,7 +243,7 @@
}
SEQ_END
 
-   fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, 
"audio_volume", 0, &driven);
+   fcu = id_data_find_fcurve(&scene->id, scene, &RNA_Scene, 
"audio_volume", 0, &driven);
if (fcu || driven)
scene->audio.flag |= AUDIO_VOLUME_ANIMATED;
else
@@ -277,8 +277,8 @@
 
 static int sound_bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
 {
-   Main* bmain = CTX_data_main(C);
-   Scene* scene = CTX_data_scene(C);
+   Main *bmain = CTX_data_main(C);
+   Scene *scene = CTX_data_scene(C);
int oldfra = scene->r.cfra;
int cfra;
 
@@ -325,7 +325,7 @@
AUD_DeviceSpecs specs;
AUD_Container container;
AUD_Codec codec;
-   const char* result;
+   const char *result;
 
sound_bake_animation_exec(C, op);
 
@@ -393,18 +393,14 @@
 {
AUD_Container container = RNA_enum_get(op->ptr, "container");
 
-   const char* extension = NULL;
+   const char *extension = NULL;
 
-   EnumPropertyItem* item = container_items;
-   while(item->identifier != NULL)
-   {
-   if(item-

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46965] trunk/blender/source/blender/ editors/sound/sound_ops.c: fix for building without audaspace

2012-05-24 Thread Campbell Barton
Revision: 46965
  
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46965
Author:   campbellbarton
Date: 2012-05-24 10:15:38 + (Thu, 24 May 2012)
Log Message:
---
fix for building without audaspace

Modified Paths:
--
trunk/blender/source/blender/editors/sound/sound_ops.c

Modified: trunk/blender/source/blender/editors/sound/sound_ops.c
===
--- trunk/blender/source/blender/editors/sound/sound_ops.c  2012-05-24 
09:47:29 UTC (rev 46964)
+++ trunk/blender/source/blender/editors/sound/sound_ops.c  2012-05-24 
10:15:38 UTC (rev 46965)
@@ -362,6 +362,7 @@
return OPERATOR_FINISHED;
 }
 
+#ifdef WITH_AUDASPACE
 static EnumPropertyItem container_items[] = {
 #ifdef WITH_FFMPEG
{AUD_CONTAINER_AC3, "AC3", 0, "ac3", "Dolby Digital ATRAC 3"},
@@ -374,7 +375,8 @@
 #endif
{AUD_CONTAINER_OGG, "OGG", 0, "ogg", "Xiph.Org Ogg Container"},
{AUD_CONTAINER_WAV, "WAV", 0, "wav", "Waveform Audio File Format"},
-   {0, NULL, 0, NULL, NULL}};
+   {0, NULL, 0, NULL, NULL}
+};
 
 static const char *snd_ext_sound[] = {
".ac3",
@@ -437,6 +439,8 @@
return FALSE;
 }
 
+#endif // WITH_AUDASPACE
+
 static int sound_mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
if (RNA_struct_property_is_set(op->ptr, "filepath"))
@@ -643,9 +647,9 @@
/* api callbacks */
ot->exec = sound_mixdown_exec;
ot->invoke = sound_mixdown_invoke;
-   ot->check = sound_mixdown_check;
 
 #ifdef WITH_AUDASPACE
+   ot->check = sound_mixdown_check;
ot->ui = sound_mixdown_draw;
 #endif
/* flags */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs