[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46825] trunk/blender/source/blender/ blenloader/intern/readfile.c: readfile. c Style cleanups Part 2 - More whitespace + replaced most of the while

2012-05-21 Thread Joshua Leung
Revision: 46825
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46825
Author:   aligorith
Date: 2012-05-21 06:33:32 + (Mon, 21 May 2012)
Log Message:
---
readfile.c Style cleanups  Part 2 - More whitespace + replaced most of the while
loops

Modified Paths:
--
trunk/blender/source/blender/blenloader/intern/readfile.c

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2012-05-21 
03:28:22 UTC (rev 46824)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2012-05-21 
06:33:32 UTC (rev 46825)
@@ -1254,9 +1254,9 @@

fd-imamap = oldnewmap_new();

-   for (;ima; ima = ima-id.next) {
+   for (; ima; ima = ima-id.next) {
Link *ibuf = ima-ibufs.first;
-   for (; ibuf; ibuf= ibuf-next)
+   for (; ibuf; ibuf = ibuf-next)
oldnewmap_insert(fd-imamap, ibuf, ibuf, 0);
if (ima-gputexture)
oldnewmap_insert(fd-imamap, ima-gputexture, 
ima-gputexture, 0);
@@ -1264,7 +1264,7 @@
if (ima-renders[a])
oldnewmap_insert(fd-imamap, ima-renders[a], 
ima-renders[a], 0);
}
-   for (; sce; sce= sce-id.next) {
+   for (; sce; sce = sce-id.next) {
if (sce-nodetree) {
bNode *node;
for (node = sce-nodetree-nodes.first; node; node = 
node-next)
@@ -1283,12 +1283,12 @@
int i;

/* used entries were restored, so we put them to zero */
-   for ( i= 0; i  fd-imamap-nentries; i++, entry++) {
+   for (i = 0; i  fd-imamap-nentries; i++, entry++) {
if (entry-nr  0)
entry-newp = NULL;
}

-   for (; ima; ima= ima-id.next) {
+   for (; ima; ima = ima-id.next) {
Link *ibuf, *next;

/* this mirrors direct_link_image */
@@ -1321,7 +1321,7 @@

fd-movieclipmap = oldnewmap_new();

-   for (;clip; clip= clip-id.next) {
+   for (; clip; clip = clip-id.next) {
if (clip-cache)
oldnewmap_insert(fd-movieclipmap, clip-cache, 
clip-cache, 0);

@@ -1535,7 +1535,7 @@
prop-totallen = prop-len;
prop-data.pointer = newdataadr(fd, prop-data.pointer);
 
-   array= (IDProperty*) prop-data.pointer;
+   array = (IDProperty *)prop-data.pointer;

/* note!, idp-arrays didn't exist in 2.4x, so the pointer will be 
cleared
 * theres not really anything we can do to correct this, at least don't 
crash */
@@ -1652,7 +1652,7 @@
/* flag seems to be able to hang? Maybe old files... not bad to clear 
anyway */
cumap-flag = ~CUMA_PREMULLED;

-   for (a=0; aCM_TOT; a++) {
+   for (a = 0; a  CM_TOT; a++) {
cumap-cm[a].curve = newdataadr(fd, cumap-cm[a].curve);
cumap-cm[a].table = NULL;
cumap-cm[a].premultable = NULL;
@@ -1666,7 +1666,7 @@
Brush *brush;

/* only link ID pointers */
-   for (brush= main-brush.first; brush; brush= brush-id.next) {
+   for (brush = main-brush.first; brush; brush = brush-id.next) {
if (brush-id.flag  LIB_NEEDLINK) {
brush-id.flag -= LIB_NEEDLINK;

@@ -1738,8 +1738,7 @@
 {
Ipo *ipo;

-   ipo = main-ipo.first;
-   while (ipo) {
+   for (ipo = main-ipo.first; ipo; ipo = ipo-id.next) {
if (ipo-id.flag  LIB_NEEDLINK) {
IpoCurve *icu;
for (icu = ipo-curve.first; icu; icu = icu-next) {
@@ -1748,7 +1747,6 @@
}
ipo-id.flag -= LIB_NEEDLINK;
}
-   ipo = ipo-id.next;
}
 }
 
@@ -1758,12 +1756,11 @@
IpoCurve *icu;
 
link_list(fd, (ipo-curve));
-   icu = ipo-curve.first;
-   while (icu) {
+   
+   for (icu = ipo-curve.first; icu; icu = icu-next) {
icu-bezt = newdataadr(fd, icu-bezt);
icu-bp = newdataadr(fd, icu-bp);
icu-driver = newdataadr(fd, icu-driver);
-   icu = icu-next;
}
 }
 
@@ -1777,7 +1774,7 @@
strip-object = newlibadr(fd, id-lib, strip-object);
strip-act = newlibadr_us(fd, id-lib, strip-act);
strip-ipo = newlibadr(fd, id-lib, strip-ipo);
-   for (amod= strip-modifiers.first; amod; amod= amod-next)
+   for (amod = strip-modifiers.first; amod; amod = amod-next)
amod-ob = newlibadr(fd, id-lib, amod-ob);
}
 }
@@ -1789,7 +1786,7 @@


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46826] trunk/blender: code cleanup:

2012-05-21 Thread Campbell Barton
Revision: 46826
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46826
Author:   campbellbarton
Date: 2012-05-21 06:33:45 + (Mon, 21 May 2012)
Log Message:
---
code cleanup:
- remove duplicate includes
- blender builds with -Werror in C++ for fluids/smoke

Modified Paths:
--
trunk/blender/intern/elbeem/CMakeLists.txt
trunk/blender/source/blender/blenkernel/intern/mesh.c
trunk/blender/source/blender/blenkernel/intern/smoke.c

Modified: trunk/blender/intern/elbeem/CMakeLists.txt
===
--- trunk/blender/intern/elbeem/CMakeLists.txt  2012-05-21 06:33:32 UTC (rev 
46825)
+++ trunk/blender/intern/elbeem/CMakeLists.txt  2012-05-21 06:33:45 UTC (rev 
46826)
@@ -86,9 +86,12 @@
intern/solver_interface.h
intern/solver_relax.h
intern/utilities.h
-intern/globals.h
+   intern/globals.h
 )
 
+# elbeem has some harmless UNUSED warnings
+remove_strict_flags()
+
 add_definitions(
-DNOGUI
-DELBEEM_BLENDER=1

Modified: trunk/blender/source/blender/blenkernel/intern/mesh.c
===
--- trunk/blender/source/blender/blenkernel/intern/mesh.c   2012-05-21 
06:33:32 UTC (rev 46825)
+++ trunk/blender/source/blender/blenkernel/intern/mesh.c   2012-05-21 
06:33:45 UTC (rev 46826)
@@ -50,6 +50,7 @@
 #include BLI_math.h
 #include BLI_edgehash.h
 #include BLI_scanfill.h
+#include BLI_array.h
 
 #include BKE_animsys.h
 #include BKE_main.h
@@ -70,11 +71,6 @@
 #include BKE_tessmesh.h
 #include BLI_edgehash.h
 
-#include BLI_blenlib.h
-#include BLI_math.h
-#include BLI_array.h
-#include BLI_edgehash.h
-
 #include bmesh.h
 
 enum {
@@ -88,7 +84,7 @@
MESHCMP_POLYMISMATCH,
MESHCMP_EDGEUNKNOWN,
MESHCMP_VERTCOMISMATCH,
-   MESHCMP_CDLAYERS_MISMATCH,
+   MESHCMP_CDLAYERS_MISMATCH
 };
 
 static const char *cmpcode_to_str(int code)

Modified: trunk/blender/source/blender/blenkernel/intern/smoke.c
===
--- trunk/blender/source/blender/blenkernel/intern/smoke.c  2012-05-21 
06:33:32 UTC (rev 46825)
+++ trunk/blender/source/blender/blenkernel/intern/smoke.c  2012-05-21 
06:33:45 UTC (rev 46826)
@@ -103,7 +103,7 @@
 {
QueryPerformanceCounter ( liCurrentTime );
 }
-static double tval( void )
+static double UNUSED_FUNCTION(tval)( void )
 {
return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* 
(double)1000.0/(double)liFrequency.QuadPart ));
 }
@@ -120,7 +120,7 @@
gettimeofday ( _tend,tz );
 }
 
-static double tval( void )
+static double UNUSED_FUNCTION(tval)( void )
 {
double t1, t2;
t1 = ( double ) _tstart.tv_sec*1000 + ( double ) _tstart.tv_usec/ ( 
1000 );

___
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 [46827] branches/soc-2012-bratwurst: svn merge ^/trunk/blender -r46037:46826

2012-05-21 Thread Campbell Barton
Revision: 46827
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46827
Author:   campbellbarton
Date: 2012-05-21 06:37:28 + (Mon, 21 May 2012)
Log Message:
---
svn merge ^/trunk/blender -r46037:46826

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46037

Modified Paths:
--
branches/soc-2012-bratwurst/intern/elbeem/CMakeLists.txt
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_info.py
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2012-bratwurst/source/blender/avi/intern/avi.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/CCGSubSurf.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/blender.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/customdata.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/displist.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/dynamicpaint.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/font.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/image_gen.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/key.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/mesh.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/mesh_validate.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/object.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/ocean.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/particle.c

branches/soc-2012-bratwurst/source/blender/blenkernel/intern/particle_system.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/sequencer.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/smoke.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/softbody.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/text.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/texture.c
branches/soc-2012-bratwurst/source/blender/blenkernel/intern/writeffmpeg.c
branches/soc-2012-bratwurst/source/blender/blenlib/intern/math_rotation.c
branches/soc-2012-bratwurst/source/blender/blenlib/intern/path_util.c
branches/soc-2012-bratwurst/source/blender/blenlib/intern/pbvh.c
branches/soc-2012-bratwurst/source/blender/blenlib/intern/string.c
branches/soc-2012-bratwurst/source/blender/blenloader/intern/readfile.c

branches/soc-2012-bratwurst/source/blender/blenloader/intern/versioning_250.c

branches/soc-2012-bratwurst/source/blender/blenloader/intern/versioning_legacy.c
branches/soc-2012-bratwurst/source/blender/blenloader/intern/writefile.c
branches/soc-2012-bratwurst/source/blender/bmesh/bmesh.h
branches/soc-2012-bratwurst/source/blender/bmesh/intern/bmesh_operators.c
branches/soc-2012-bratwurst/source/blender/bmesh/intern/bmesh_queries.c
branches/soc-2012-bratwurst/source/blender/bmesh/operators/bmo_connect.c
branches/soc-2012-bratwurst/source/blender/bmesh/operators/bmo_utils.c

branches/soc-2012-bratwurst/source/blender/compositor/operations/COM_ImageOperation.cpp

branches/soc-2012-bratwurst/source/blender/compositor/operations/COM_MovieClipOperation.cpp
branches/soc-2012-bratwurst/source/blender/editors/armature/editarmature.c
branches/soc-2012-bratwurst/source/blender/editors/armature/meshlaplacian.c
branches/soc-2012-bratwurst/source/blender/editors/armature/reeb.c
branches/soc-2012-bratwurst/source/blender/editors/curve/editcurve.c

branches/soc-2012-bratwurst/source/blender/editors/interface/interface_draw.c

branches/soc-2012-bratwurst/source/blender/editors/interface/interface_handlers.c

branches/soc-2012-bratwurst/source/blender/editors/interface/interface_widgets.c
branches/soc-2012-bratwurst/source/blender/editors/mesh/editface.c
branches/soc-2012-bratwurst/source/blender/editors/mesh/editmesh_knife.c
branches/soc-2012-bratwurst/source/blender/editors/mesh/editmesh_rip.c
branches/soc-2012-bratwurst/source/blender/editors/mesh/editmesh_select.c
branches/soc-2012-bratwurst/source/blender/editors/mesh/editmesh_tools.c
branches/soc-2012-bratwurst/source/blender/editors/object/object_modifier.c
branches/soc-2012-bratwurst/source/blender/editors/object/object_select.c

branches/soc-2012-bratwurst/source/blender/editors/sculpt_paint/paint_cursor.c

branches/soc-2012-bratwurst/source/blender/editors/sculpt_paint/paint_image.c
branches/soc-2012-bratwurst/source/blender/editors/sculpt_paint/paint_ops.c


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46828] branches/soc-2012-fried_chicken: svn merge ^/trunk/blender -r46037:46827

2012-05-21 Thread Campbell Barton
Revision: 46828
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46828
Author:   campbellbarton
Date: 2012-05-21 06:39:03 + (Mon, 21 May 2012)
Log Message:
---
svn merge ^/trunk/blender -r46037:46827

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46037

Modified Paths:
--
branches/soc-2012-fried_chicken/intern/elbeem/CMakeLists.txt
branches/soc-2012-fried_chicken/release/scripts/startup/bl_ui/space_info.py

branches/soc-2012-fried_chicken/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2012-fried_chicken/source/blender/avi/intern/avi.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/CCGSubSurf.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/blender.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/cdderivedmesh.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/customdata.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/displist.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/dynamicpaint.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/font.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/image_gen.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/key.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/mesh.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/mesh_validate.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/object.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/ocean.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/particle.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/particle_system.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/sequencer.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/smoke.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/softbody.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/text.c
branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/texture.c

branches/soc-2012-fried_chicken/source/blender/blenkernel/intern/writeffmpeg.c

branches/soc-2012-fried_chicken/source/blender/blenlib/intern/math_rotation.c
branches/soc-2012-fried_chicken/source/blender/blenlib/intern/path_util.c
branches/soc-2012-fried_chicken/source/blender/blenlib/intern/pbvh.c
branches/soc-2012-fried_chicken/source/blender/blenlib/intern/string.c
branches/soc-2012-fried_chicken/source/blender/blenloader/intern/readfile.c

branches/soc-2012-fried_chicken/source/blender/blenloader/intern/versioning_250.c

branches/soc-2012-fried_chicken/source/blender/blenloader/intern/versioning_legacy.c
branches/soc-2012-fried_chicken/source/blender/blenloader/intern/writefile.c
branches/soc-2012-fried_chicken/source/blender/bmesh/bmesh.h

branches/soc-2012-fried_chicken/source/blender/bmesh/intern/bmesh_operators.c
branches/soc-2012-fried_chicken/source/blender/bmesh/intern/bmesh_queries.c
branches/soc-2012-fried_chicken/source/blender/bmesh/operators/bmo_connect.c
branches/soc-2012-fried_chicken/source/blender/bmesh/operators/bmo_utils.c

branches/soc-2012-fried_chicken/source/blender/compositor/operations/COM_ImageOperation.cpp

branches/soc-2012-fried_chicken/source/blender/compositor/operations/COM_MovieClipOperation.cpp

branches/soc-2012-fried_chicken/source/blender/editors/armature/editarmature.c

branches/soc-2012-fried_chicken/source/blender/editors/armature/meshlaplacian.c
branches/soc-2012-fried_chicken/source/blender/editors/armature/reeb.c
branches/soc-2012-fried_chicken/source/blender/editors/curve/editcurve.c

branches/soc-2012-fried_chicken/source/blender/editors/interface/interface_draw.c

branches/soc-2012-fried_chicken/source/blender/editors/interface/interface_handlers.c

branches/soc-2012-fried_chicken/source/blender/editors/interface/interface_widgets.c
branches/soc-2012-fried_chicken/source/blender/editors/mesh/editface.c
branches/soc-2012-fried_chicken/source/blender/editors/mesh/editmesh_knife.c
branches/soc-2012-fried_chicken/source/blender/editors/mesh/editmesh_rip.c

branches/soc-2012-fried_chicken/source/blender/editors/mesh/editmesh_select.c
branches/soc-2012-fried_chicken/source/blender/editors/mesh/editmesh_tools.c

branches/soc-2012-fried_chicken/source/blender/editors/object/object_modifier.c

branches/soc-2012-fried_chicken/source/blender/editors/object/object_select.c


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46829] branches/soc-2012-sushi: svn merge ^/trunk/blender -r46037:46828

2012-05-21 Thread Campbell Barton
Revision: 46829
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46829
Author:   campbellbarton
Date: 2012-05-21 06:40:47 + (Mon, 21 May 2012)
Log Message:
---
svn merge ^/trunk/blender -r46037:46828

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46037

Modified Paths:
--
branches/soc-2012-sushi/intern/elbeem/CMakeLists.txt
branches/soc-2012-sushi/release/scripts/startup/bl_ui/space_info.py
branches/soc-2012-sushi/source/blender/avi/intern/avi.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/CCGSubSurf.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/blender.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/customdata.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/displist.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/dynamicpaint.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/font.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/image_gen.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/key.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/mesh.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/mesh_validate.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/object.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/ocean.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/particle.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/particle_system.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/sequencer.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/smoke.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/softbody.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/text.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/texture.c
branches/soc-2012-sushi/source/blender/blenkernel/intern/writeffmpeg.c
branches/soc-2012-sushi/source/blender/blenlib/intern/math_rotation.c
branches/soc-2012-sushi/source/blender/blenlib/intern/path_util.c
branches/soc-2012-sushi/source/blender/blenlib/intern/pbvh.c
branches/soc-2012-sushi/source/blender/blenlib/intern/string.c
branches/soc-2012-sushi/source/blender/blenloader/intern/readfile.c
branches/soc-2012-sushi/source/blender/blenloader/intern/versioning_250.c
branches/soc-2012-sushi/source/blender/blenloader/intern/versioning_legacy.c
branches/soc-2012-sushi/source/blender/blenloader/intern/writefile.c
branches/soc-2012-sushi/source/blender/bmesh/bmesh.h
branches/soc-2012-sushi/source/blender/bmesh/intern/bmesh_operators.c
branches/soc-2012-sushi/source/blender/bmesh/intern/bmesh_queries.c
branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_connect.c
branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_utils.c

branches/soc-2012-sushi/source/blender/compositor/operations/COM_ImageOperation.cpp

branches/soc-2012-sushi/source/blender/compositor/operations/COM_MovieClipOperation.cpp
branches/soc-2012-sushi/source/blender/editors/armature/editarmature.c
branches/soc-2012-sushi/source/blender/editors/armature/meshlaplacian.c
branches/soc-2012-sushi/source/blender/editors/armature/reeb.c
branches/soc-2012-sushi/source/blender/editors/curve/editcurve.c
branches/soc-2012-sushi/source/blender/editors/interface/interface_draw.c

branches/soc-2012-sushi/source/blender/editors/interface/interface_handlers.c
branches/soc-2012-sushi/source/blender/editors/interface/interface_widgets.c
branches/soc-2012-sushi/source/blender/editors/mesh/editface.c
branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_knife.c
branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_rip.c
branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_select.c
branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_tools.c
branches/soc-2012-sushi/source/blender/editors/object/object_modifier.c
branches/soc-2012-sushi/source/blender/editors/object/object_select.c
branches/soc-2012-sushi/source/blender/editors/sculpt_paint/paint_cursor.c
branches/soc-2012-sushi/source/blender/editors/sculpt_paint/paint_image.c
branches/soc-2012-sushi/source/blender/editors/sculpt_paint/paint_ops.c
branches/soc-2012-sushi/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2012-sushi/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2012-sushi/source/blender/editors/space_clip/clip_draw.c
branches/soc-2012-sushi/source/blender/editors/space_clip/clip_ops.c

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46830] trunk/blender/source/blender/bmesh /intern/bmesh_queries.c: fix for error pointed out by Nicholas Bishop, BM_edge_face_pair BM_edge_loop_pai

2012-05-21 Thread Campbell Barton
Revision: 46830
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46830
Author:   campbellbarton
Date: 2012-05-21 06:44:46 + (Mon, 21 May 2012)
Log Message:
---
fix for error pointed out by Nicholas Bishop, BM_edge_face_pair  
BM_edge_loop_pair returned TRUE for single face user edges.

Modified Paths:
--
trunk/blender/source/blender/bmesh/intern/bmesh_queries.c

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_queries.c
===
--- trunk/blender/source/blender/bmesh/intern/bmesh_queries.c   2012-05-21 
06:40:47 UTC (rev 46829)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_queries.c   2012-05-21 
06:44:46 UTC (rev 46830)
@@ -369,6 +369,7 @@
 
if ((la = e-l) 
(lb = la-radial_next) 
+   (la != lb) 
(lb-radial_next == la))
{
*r_fa = la-f;
@@ -394,6 +395,7 @@
 
if ((la = e-l) 
(lb = la-radial_next) 
+   (la != lb) 
(lb-radial_next == la))
{
*r_la = la;

___
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 [46831] trunk/blender/source/blender/ python/generic/bpy_internal_import.c: py api integration: __import__(...

2012-05-21 Thread Campbell Barton
Revision: 46831
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46831
Author:   campbellbarton
Date: 2012-05-21 07:00:23 + (Mon, 21 May 2012)
Log Message:
---
py api integration: __import__(... , level=0)
  default changed to work with python3.3

Modified Paths:
--
trunk/blender/source/blender/python/generic/bpy_internal_import.c

Modified: trunk/blender/source/blender/python/generic/bpy_internal_import.c
===
--- trunk/blender/source/blender/python/generic/bpy_internal_import.c   
2012-05-21 06:44:46 UTC (rev 46830)
+++ trunk/blender/source/blender/python/generic/bpy_internal_import.c   
2012-05-21 07:00:23 UTC (rev 46831)
@@ -226,7 +226,7 @@
char *name;
int found = 0;
PyObject *globals = NULL, *locals = NULL, *fromlist = NULL;
-   int level = -1; /* relative imports */
+   int level = 0; /* relative imports */

PyObject *newmodule;
//PyObject_Print(args, stderr, 0);

___
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 [46832] trunk/blender/source/blender/nodes /intern/node_util.c: Quiet null pointer free warning/error.

2012-05-21 Thread Campbell Barton
Revision: 46832
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46832
Author:   campbellbarton
Date: 2012-05-21 08:10:37 + (Mon, 21 May 2012)
Log Message:
---
Quiet null pointer free warning/error.

Modified Paths:
--
trunk/blender/source/blender/nodes/intern/node_util.c

Modified: trunk/blender/source/blender/nodes/intern/node_util.c
===
--- trunk/blender/source/blender/nodes/intern/node_util.c   2012-05-21 
07:00:23 UTC (rev 46831)
+++ trunk/blender/source/blender/nodes/intern/node_util.c   2012-05-21 
08:10:37 UTC (rev 46832)
@@ -57,7 +57,9 @@
 
 void node_free_standard_storage(bNode *node)
 {
-   MEM_freeN(node-storage);
+   if (node-storage) {
+   MEM_freeN(node-storage);
+   }
 }
 
 void node_copy_curves(bNode *orig_node, bNode *new_node)

___
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 [46833] trunk/blender/source/blender/ windowmanager/intern/wm_files.c: fix for minor annoyance when an operator is called by another - dont add blend

2012-05-21 Thread Campbell Barton
Revision: 46833
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46833
Author:   campbellbarton
Date: 2012-05-21 08:24:03 + (Mon, 21 May 2012)
Log Message:
---
fix for minor annoyance when an operator is called by another - dont add blend 
file to recent history.

this way demo-mode addon doesnt clobber the recent history with demo files its 
operator loads.

Modified Paths:
--
trunk/blender/source/blender/windowmanager/intern/wm_files.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_files.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_files.c
2012-05-21 08:10:37 UTC (rev 46832)
+++ trunk/blender/source/blender/windowmanager/intern/wm_files.c
2012-05-21 08:24:03 UTC (rev 46833)
@@ -373,6 +373,9 @@
int G_f = G.f;
ListBase wmbase;
 
+   /* assume automated tasks with background, don't write recent 
file list */
+   const int do_history = (G.background == FALSE)  
(CTX_wm_manager(C)-op_undo_depth == 0);
+
/* put aside screens to match with persistent windows later */
/* also exit screens and editors */
wm_window_match_init(C, wmbase); 
@@ -400,8 +403,9 @@

if (retval != BKE_READ_FILE_FAIL) {
G.relbase_valid = 1;
-   if (!G.background) /* assume automated tasks with 
background, don't write recent file list */
+   if (do_history) {
write_history();
+   }
}
 
 

___
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 [46834] trunk/blender/source: code cleanup : remove some old comments

2012-05-21 Thread Campbell Barton
Revision: 46834
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46834
Author:   campbellbarton
Date: 2012-05-21 09:00:35 + (Mon, 21 May 2012)
Log Message:
---
code cleanup: remove some old comments

Modified Paths:
--
trunk/blender/source/blender/editors/space_view3d/view3d_fly.c
trunk/blender/source/blender/windowmanager/intern/wm_files.c
trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_fly.c
===
--- trunk/blender/source/blender/editors/space_view3d/view3d_fly.c  
2012-05-21 08:24:03 UTC (rev 46833)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_fly.c  
2012-05-21 09:00:35 UTC (rev 46834)
@@ -580,7 +580,7 @@
fly-pan_view = TRUE;
break;
case FLY_MODAL_PAN_DISABLE:
-//XXX2.5   warp_pointer(cent_orig[0], cent_orig[1]);
+//XXX2.5   WM_cursor_warp(CTX_wm_window(C), 
cent_orig[0], cent_orig[1]);
fly-pan_view = FALSE;
break;
 

Modified: trunk/blender/source/blender/windowmanager/intern/wm_files.c
===
--- trunk/blender/source/blender/windowmanager/intern/wm_files.c
2012-05-21 08:24:03 UTC (rev 46833)
+++ trunk/blender/source/blender/windowmanager/intern/wm_files.c
2012-05-21 09:00:35 UTC (rev 46834)
@@ -333,8 +333,9 @@
retval = BKE_READ_EXOTIC_OK_BLEND;
}
else {
-   //XXX waitcursor(1);
 #if 0   /* historic stuff - no longer used */
+   WM_cursor_wait(TRUE);
+
if (is_foo_format(name)) {
read_foo(name);
retval = BKE_READ_EXOTIC_OK_OTHER;
@@ -344,7 +345,9 @@
{
retval = BKE_READ_EXOTIC_FAIL_FORMAT;
}
-   //XXX waitcursor(0);
+#if 0
+   WM_cursor_wait(FALSE);
+#endif
}
}
}
@@ -393,8 +396,6 @@
/* match the read WM with current WM */
wm_window_match_do(C, wmbase);
WM_check(C); /* opens window(s), checks keymaps */
-   
-// XXX mainwindow_set_filename_to_title(G.main-name);
 
if (retval == BKE_READ_FILE_OK_USERPREFS) {
/* in case a userdef is read from regular .blend */
@@ -453,7 +454,6 @@
}
 #endif
 
-   // XXX  undo_editmode_clear();
BKE_reset_undo();
BKE_write_undo(C, original);  /* save current state */
}
@@ -546,8 +546,7 @@
/* XXX */
G.save_over = 0;// start with save preference untitled.blend
G.fileflags = ~G_FILE_AUTOPLAY;/*  disable autoplay in 
startup.blend... */
-// mainwindow_set_filename_to_title();   // empty string re-initializes 
title to Blender
-   
+
 // refresh_interface_font();

 // undo_editmode_clear();

Modified: trunk/blender/source/creator/creator.c
===
--- trunk/blender/source/creator/creator.c  2012-05-21 08:24:03 UTC (rev 
46833)
+++ trunk/blender/source/creator/creator.c  2012-05-21 09:00:35 UTC (rev 
46834)
@@ -31,18 +31,18 @@
 
 
 #if defined(__linux__)  defined(__GNUC__)
-#define _GNU_SOURCE
-#include fenv.h
+#  define _GNU_SOURCE
+#  include fenv.h
 #endif
 
 #if (defined(__APPLE__)  (defined(__i386__) || defined(__x86_64__)))
-#define OSX_SSE_FPE
-#include xmmintrin.h
+#  define OSX_SSE_FPE
+#  include xmmintrin.h
 #endif
 
 #ifdef WIN32
-#include Windows.h
-#include utfconv.h
+#  include Windows.h
+#  include utfconv.h
 #endif
 
 #include stdlib.h
@@ -105,30 +105,30 @@
 #include BLI_scanfill.h /* for BLI_setErrorCallBack, TODO, move elsewhere */
 
 #ifdef WITH_BUILDINFO_HEADER
-#define BUILD_DATE
+#  define BUILD_DATE
 #endif
 
 /* for passing information between creator and gameengine */
 #ifdef WITH_GAMEENGINE
-#include BL_System.h
+#  include BL_System.h
 #else /* dummy */
-#define SYS_SystemHandle int
+#  define SYS_SystemHandle int
 #endif
 
 #include signal.h
 
 #ifdef __FreeBSD__
-# include sys/types.h
-# include floatingpoint.h
-# include sys/rtprio.h
+#  include sys/types.h
+#  include floatingpoint.h
+#  include sys/rtprio.h
 #endif
 
 #ifdef WITH_BINRELOC
-#include binreloc.h
+#  include binreloc.h
 #endif
 
 #ifdef WITH_LIBMV
-#include libmv-capi.h
+#  include libmv-capi.h
 #endif
 
 /* from buildinfo.c */
@@ -1178,18 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46838] trunk/blender/source/blender: Added switch in dilate/erode between old (Step) and new (Distance)

2012-05-21 Thread Jeroen Bakker
Revision: 46838
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46838
Author:   jbakker
Date: 2012-05-21 10:20:30 + (Mon, 21 May 2012)
Log Message:
---
Added switch in dilate/erode between old (Step) and new (Distance)
algorithm

Connected the Glare Fog Flow to use Fast Gaussian in stead of Bokeh blur

Modified Paths:
--
trunk/blender/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
trunk/blender/source/blender/compositor/nodes/COM_GlareNode.cpp

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

trunk/blender/source/blender/compositor/operations/COM_DilateErodeOperation.h

trunk/blender/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
trunk/blender/source/blender/editors/space_node/drawnode.c
trunk/blender/source/blender/makesdna/DNA_node_types.h
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c

Modified: trunk/blender/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
===
--- trunk/blender/source/blender/compositor/nodes/COM_DilateErodeNode.cpp   
2012-05-21 10:13:43 UTC (rev 46837)
+++ trunk/blender/source/blender/compositor/nodes/COM_DilateErodeNode.cpp   
2012-05-21 10:20:30 UTC (rev 46838)
@@ -33,16 +33,37 @@
 
 void DilateErodeNode::convertToOperations(ExecutionSystem *graph, 
CompositorContext * context)
 {
+   
bNode *editorNode = this-getbNode();
-   DilateErodeOperation *operation = new DilateErodeOperation();
-   operation-setDistance(editorNode-custom2);
-   operation-setInset(2.0f);
+   if (editorNode-custom1 == CMP_NODE_DILATEERODE_DISTANCE) {
+   DilateErodeDistanceOperation *operation = new 
DilateErodeDistanceOperation();
+   operation-setDistance(editorNode-custom2);
+   operation-setInset(editorNode-custom3);
+   
+   
this-getInputSocket(0)-relinkConnections(operation-getInputSocket(0));

-   
this-getInputSocket(0)-relinkConnections(operation-getInputSocket(0));
-
-   AntiAliasOperation * antiAlias = new AntiAliasOperation();
-   addLink(graph, operation-getOutputSocket(), 
antiAlias-getInputSocket(0));
-   
this-getOutputSocket(0)-relinkConnections(antiAlias-getOutputSocket(0));
-   graph-addOperation(operation);
-   graph-addOperation(antiAlias);
+   if (editorNode-custom3  2.0f) {
+   AntiAliasOperation * antiAlias = new 
AntiAliasOperation();
+   addLink(graph, operation-getOutputSocket(), 
antiAlias-getInputSocket(0));
+   
this-getOutputSocket(0)-relinkConnections(antiAlias-getOutputSocket(0));
+   graph-addOperation(antiAlias);
+   } else {
+   
this-getOutputSocket(0)-relinkConnections(operation-getOutputSocket(0));
+   }
+   graph-addOperation(operation);
+   } else {
+   if (editorNode-custom2  0) {
+   DilateStepOperation * operation = new 
DilateStepOperation();
+   operation-setIterations(editorNode-custom2);
+   
this-getInputSocket(0)-relinkConnections(operation-getInputSocket(0));
+   
this-getOutputSocket(0)-relinkConnections(operation-getOutputSocket(0));
+   graph-addOperation(operation);
+   } else {
+   ErodeStepOperation * operation = new 
ErodeStepOperation();
+   operation-setIterations(-editorNode-custom2);
+   
this-getInputSocket(0)-relinkConnections(operation-getInputSocket(0));
+   
this-getOutputSocket(0)-relinkConnections(operation-getOutputSocket(0));
+   graph-addOperation(operation);
+   }
+   }
 }

Modified: trunk/blender/source/blender/compositor/nodes/COM_GlareNode.cpp
===
--- trunk/blender/source/blender/compositor/nodes/COM_GlareNode.cpp 
2012-05-21 10:13:43 UTC (rev 46837)
+++ trunk/blender/source/blender/compositor/nodes/COM_GlareNode.cpp 
2012-05-21 10:20:30 UTC (rev 46838)
@@ -23,12 +23,12 @@
 #include COM_GlareNode.h
 #include DNA_node_types.h
 #include COM_FogGlowImageOperation.h
-#include COM_BokehBlurOperation.h
 #include COM_GlareThresholdOperation.h
 #include COM_GlareSimpleStarOperation.h
 #include COM_GlareStreaksOperation.h
 #include COM_SetValueOperation.h
 #include COM_MixBlendOperation.h
+#include COM_FastGaussianBlurOperation.h
 
 GlareNode::GlareNode(bNode *editorNode): Node(editorNode)
 {
@@ -70,29 +70,31 @@
case 1: // fog glow
{
GlareThresholdOperation *thresholdOperation = new 
GlareThresholdOperation();
-   FogGlowImageOperation * kerneloperation = 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46839] branches/soc-2011-tomato/source/ blender: mask parenting operator, and clear parenting.

2012-05-21 Thread Campbell Barton
Revision: 46839
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46839
Author:   campbellbarton
Date: 2012-05-21 11:09:53 + (Mon, 21 May 2012)
Log Message:
---
mask parenting operator, and clear parenting. (Ctrl+P, Alt+P)

- also use offset now with parenting.
- draw line from point to parent.

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/editors/mask/CMakeLists.txt
branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_intern.h

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

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-21 10:20:30 UTC (rev 46838)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-21 11:09:53 UTC (rev 46839)
@@ -757,7 +757,7 @@
}
 }
 
-static void evaluate_mask_parent(MaskParent *parent, float ctime, float co[2])
+static void evaluate_mask_parent(MaskParent *parent, float ctime, float 
r_co[2])
 {
if (!parent)
return;
@@ -779,7 +779,8 @@
 
if (track) {
MovieTrackingMarker *marker = 
BKE_tracking_get_marker(track, ctime);
-   BKE_mask_coord_from_movieclip(clip, 
user, co, marker-pos);
+   BKE_mask_coord_from_movieclip(clip, 
user, r_co, marker-pos);
+   add_v2_v2(r_co, parent-offset);
}
}
}

Modified: branches/soc-2011-tomato/source/blender/editors/mask/CMakeLists.txt
===
--- branches/soc-2011-tomato/source/blender/editors/mask/CMakeLists.txt 
2012-05-21 10:20:30 UTC (rev 46838)
+++ branches/soc-2011-tomato/source/blender/editors/mask/CMakeLists.txt 
2012-05-21 11:09:53 UTC (rev 46839)
@@ -40,6 +40,7 @@
mask_draw.c
mask_editor.c
mask_ops.c
+   mask_relationships.c
 
mask_intern.h
 )

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
2012-05-21 10:20:30 UTC (rev 46838)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
2012-05-21 11:09:53 UTC (rev 46839)
@@ -62,6 +62,36 @@
}
 }
 
+static void draw_spline_parents(MaskObject *UNUSED(maskobj), MaskSpline 
*spline)
+{
+   int i;
+
+   if (!spline-tot_point)
+   return;
+
+   glColor3ub(0, 0, 0);
+   glEnable(GL_LINE_STIPPLE);
+   glLineStipple(1, 0x);
+
+   glBegin(GL_LINES);
+
+   for (i = 0; i  spline-tot_point; i++) {
+   MaskSplinePoint *point = spline-points[i];
+
+   if (point-parent.flag  MASK_PARENT_ACTIVE) {
+   glVertex2f(point-bezt.vec[1][0],
+  point-bezt.vec[1][1]);
+
+   glVertex2f(point-bezt.vec[1][0] - 
point-parent.offset[0],
+  point-bezt.vec[1][1] - 
point-parent.offset[1]);
+   }
+   }
+
+   glEnd();
+
+   glDisable(GL_LINE_STIPPLE);
+}
+
 /* return non-zero if spline is selected */
 static void draw_spline_points(MaskObject *maskobj, MaskSpline *spline)
 {
@@ -227,6 +257,8 @@
/* draw curve itself first... */
draw_spline_curve(maskobj, spline);
 
+   draw_spline_parents(maskobj, spline);
+
/* ...and then handles over the curve so they're nicely 
visible */
draw_spline_points(maskobj, spline);
}

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c  
2012-05-21 10:20:30 UTC (rev 46838)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c  
2012-05-21 11:09:53 UTC (rev 46839)
@@ -163,6 +163,10 @@
WM_operatortype_append(MASK_OT_slide_point);
WM_operatortype_append(MASK_OT_cyclic_toggle);
WM_operatortype_append(MASK_OT_handle_type_set);
+
+   /* relationships */
+   WM_operatortype_append(MASK_OT_parent_set);
+   WM_operatortype_append(MASK_OT_parent_clear);
 }
 
 void ED_keymap_mask(wmKeyConfig *keyconf)
@@ -196,6 +200,10 @@
WM_keymap_add_item(keymap, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46840] trunk/blender/source/blender/ python/bmesh/bmesh_py_types.c: debugging check for bmesh ( commented since its very slow), but useful for debugg

2012-05-21 Thread Campbell Barton
Revision: 46840
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46840
Author:   campbellbarton
Date: 2012-05-21 12:30:06 + (Mon, 21 May 2012)
Log Message:
---
debugging check for bmesh (commented since its very slow), but useful for 
debugging some scripts.

Modified Paths:
--
trunk/blender/source/blender/python/bmesh/bmesh_py_types.c

Modified: trunk/blender/source/blender/python/bmesh/bmesh_py_types.c
===
--- trunk/blender/source/blender/python/bmesh/bmesh_py_types.c  2012-05-21 
11:09:53 UTC (rev 46839)
+++ trunk/blender/source/blender/python/bmesh/bmesh_py_types.c  2012-05-21 
12:30:06 UTC (rev 46840)
@@ -3115,6 +3115,21 @@
 int bpy_bm_generic_valid_check(BPy_BMGeneric *self)
 {
if (LIKELY(self-bm)) {
+
+   /* far too slow to enable by default but handy
+* to uncomment for debugging tricky errors,
+* note that this will throw error on entering a
+* function where the actual error will be caused by
+* the previous action. */
+#if 0
+   if (BM_mesh_validate(self-bm) == FALSE) {
+   PyErr_Format(PyExc_ReferenceError,
+BMesh used by %.200s has become invalid,
+Py_TYPE(self)-tp_name);
+   return -1;
+   }
+#endif
+
return 0;
}
else {

___
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 [46841] trunk/blender: Cycles: add Object Info node, with outputs object location, object/material

2012-05-21 Thread Brecht Van Lommel
Revision: 46841
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46841
Author:   blendix
Date: 2012-05-21 12:52:28 + (Mon, 21 May 2012)
Log Message:
---
Cycles: add Object Info node, with outputs object location, object/material
pass index, and a random number unique to the instance of the object.

This can be useful to give some variation to a single material assigned to
multiple instances, either manually controlled through the object index, based
on the object location, or randomized for each instance. 

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Object_Info
   

Modified Paths:
--
trunk/blender/intern/cycles/blender/blender_object.cpp
trunk/blender/intern/cycles/blender/blender_shader.cpp
trunk/blender/intern/cycles/kernel/kernel_object.h
trunk/blender/intern/cycles/kernel/kernel_shader.h
trunk/blender/intern/cycles/kernel/svm/svm.h
trunk/blender/intern/cycles/kernel/svm/svm_geometry.h
trunk/blender/intern/cycles/kernel/svm/svm_types.h
trunk/blender/intern/cycles/render/nodes.cpp
trunk/blender/intern/cycles/render/nodes.h
trunk/blender/intern/cycles/render/object.cpp
trunk/blender/intern/cycles/render/object.h
trunk/blender/intern/cycles/util/util_hash.h
trunk/blender/source/blender/blenkernel/BKE_node.h
trunk/blender/source/blender/blenkernel/intern/node.c
trunk/blender/source/blender/gpu/shaders/gpu_shader_material.glsl
trunk/blender/source/blender/gpu/shaders/gpu_shader_material.glsl.c
trunk/blender/source/blender/makesrna/intern/rna_nodetree_types.h
trunk/blender/source/blender/nodes/CMakeLists.txt
trunk/blender/source/blender/nodes/NOD_shader.h

Added Paths:
---
trunk/blender/source/blender/nodes/shader/nodes/node_shader_object_info.c

Modified: trunk/blender/intern/cycles/blender/blender_object.cpp
===
--- trunk/blender/intern/cycles/blender/blender_object.cpp  2012-05-21 
12:30:06 UTC (rev 46840)
+++ trunk/blender/intern/cycles/blender/blender_object.cpp  2012-05-21 
12:52:28 UTC (rev 46841)
@@ -245,6 +245,7 @@
/* object sync */
if(object_updated || (object-mesh  object-mesh-need_update)) {
object-name = b_ob.name().c_str();
+   object-instance_id = b_index;
object-pass_id = b_ob.pass_index();
object-tfm = tfm;
object-motion.pre = tfm;

Modified: trunk/blender/intern/cycles/blender/blender_shader.cpp
===
--- trunk/blender/intern/cycles/blender/blender_shader.cpp  2012-05-21 
12:30:06 UTC (rev 46840)
+++ trunk/blender/intern/cycles/blender/blender_shader.cpp  2012-05-21 
12:52:28 UTC (rev 46841)
@@ -334,6 +334,10 @@
node = new LightFalloffNode();
break;
}
+   case BL::ShaderNode::type_OBJECT_INFO: {
+   node = new ObjectInfoNode();
+   break;
+   }
case BL::ShaderNode::type_TEX_IMAGE: {
BL::ShaderNodeTexImage b_image_node(b_node);
BL::Image b_image(b_image_node.image());

Modified: trunk/blender/intern/cycles/kernel/kernel_object.h
===
--- trunk/blender/intern/cycles/kernel/kernel_object.h  2012-05-21 12:30:06 UTC 
(rev 46840)
+++ trunk/blender/intern/cycles/kernel/kernel_object.h  2012-05-21 12:52:28 UTC 
(rev 46841)
@@ -117,6 +117,16 @@
 #endif
 }
 
+__device_inline float3 object_location(KernelGlobals *kg, ShaderData *sd)
+{
+#ifdef __MOTION__
+   return make_float3(sd-ob_tfm.x.w, sd-ob_tfm.y.w, sd-ob_tfm.z.w);
+#else
+   Transform tfm = object_fetch_transform(kg, sd-object, 0.0f, 
OBJECT_TRANSFORM);
+   return make_float3(tfm.x.w, tfm.y.w, tfm.z.w);
+#endif
+}
+
 __device_inline float object_surface_area(KernelGlobals *kg, int object)
 {
int offset = object*OBJECT_SIZE + OBJECT_PROPERTIES;
@@ -134,5 +144,20 @@
return f.y;
 }
 
+__device_inline float object_random_number(KernelGlobals *kg, int object)
+{
+   if(object == ~0)
+   return 0.0f;
+
+   int offset = object*OBJECT_SIZE + OBJECT_PROPERTIES;
+   float4 f = kernel_tex_fetch(__objects, offset);
+   return f.z;
+}
+
+__device int shader_pass_id(KernelGlobals *kg, ShaderData *sd)
+{
+   return kernel_tex_fetch(__shader_flag, (sd-shader  SHADER_MASK)*2 + 
1);
+}
+
 CCL_NAMESPACE_END
 

Modified: trunk/blender/intern/cycles/kernel/kernel_shader.h
===
--- trunk/blender/intern/cycles/kernel/kernel_shader.h  2012-05-21 12:30:06 UTC 
(rev 46840)
+++ trunk/blender/intern/cycles/kernel/kernel_shader.h  2012-05-21 12:52:28 UTC 
(rev 46841)
@@ -679,11 +679,6 @@
 }

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46842] branches/soc-2011-tomato/source/ blender/editors: clip/mask parenting from previous commit

2012-05-21 Thread Campbell Barton
Revision: 46842
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46842
Author:   campbellbarton
Date: 2012-05-21 13:42:58 + (Mon, 21 May 2012)
Log Message:
---
clip/mask parenting from previous commit
- clear parent wasnt working
- selecting tracks now works when mask editing

Modified Paths:
--
branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c
branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c  
2012-05-21 12:52:28 UTC (rev 46841)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c  
2012-05-21 13:42:58 UTC (rev 46842)
@@ -195,6 +195,12 @@
kmi = WM_keymap_add_item(keymap, MASK_OT_select_all, IKEY, KM_PRESS, 
KM_CTRL, 0);
RNA_enum_set(kmi-ptr, action, SEL_INVERT);
 
+   /* select clip while in maker view,
+* this matches View3D functionality where you can select an
+* object while in editmode to allow vertex parenting */
+   kmi = WM_keymap_add_item(keymap, CLIP_OT_select, SELECTMOUSE, 
KM_PRESS, KM_CTRL, 0);
+   RNA_boolean_set(kmi-ptr, extend, FALSE);
+
/* shape */
WM_keymap_add_item(keymap, MASK_OT_cyclic_toggle, CKEY, KM_PRESS, 
KM_ALT, 0);
WM_keymap_add_item(keymap, MASK_OT_slide_point, LEFTMOUSE, KM_PRESS, 
0, 0);
@@ -202,7 +208,7 @@
 
/* relationships */
WM_keymap_add_item(keymap, MASK_OT_parent_set, PKEY, KM_PRESS, 
KM_CTRL, 0);
-   WM_keymap_add_item(keymap, MASK_OT_parent_set, PKEY, KM_PRESS, 
KM_ALT, 0);
+   WM_keymap_add_item(keymap, MASK_OT_parent_clear, PKEY, KM_PRESS, 
KM_ALT, 0);
 
transform_keymap_for_space(keyconf, keymap, SPACE_CLIP);
 }

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c 
2012-05-21 12:52:28 UTC (rev 46841)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c 
2012-05-21 13:42:58 UTC (rev 46842)
@@ -1001,6 +1001,8 @@
mask_flush_selection(mask);
 
WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask);
+
+   return OPERATOR_FINISHED;
}
else {
MaskSplinePointUW *uw;
@@ -1017,6 +1019,8 @@
mask_flush_selection(mask);
 
WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask);
+
+   return OPERATOR_FINISHED;
}
}
 

Modified: 
branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c   
2012-05-21 12:52:28 UTC (rev 46841)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_relationships.c   
2012-05-21 13:42:58 UTC (rev 46842)
@@ -91,7 +91,6 @@
ot-idname = MASK_OT_parent_clear;
 
/* api callbacks */
-   ot-invoke = WM_menu_invoke;
ot-exec = mask_parent_clear_exec;
 
ot-poll = ED_operator_object_active_editable;

Modified: 
branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
===
--- branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c 
2012-05-21 12:52:28 UTC (rev 46841)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c 
2012-05-21 13:42:58 UTC (rev 46842)
@@ -556,7 +556,7 @@
/*  Hotkeys avalaible for main region only  */
 
keymap = WM_keymap_find(keyconf, Clip Editor, SPACE_CLIP, 0);
-
+// keymap-poll = ED_space_clip_tracking_poll;
/* ** View/navigation ** */
 
WM_keymap_add_item(keymap, CLIP_OT_view_pan, MIDDLEMOUSE, KM_PRESS, 
0, 0);
@@ -1048,14 +1048,14 @@
UI_view2d_region_reinit(ar-v2d, V2D_COMMONVIEW_STANDARD, ar-winx, 
ar-winy);
 
/* own keymap */
+   keymap= WM_keymap_find(wm-defaultconf, Mask Editor, 0, 0);
+   WM_event_add_keymap_handler_bb(ar-handlers, keymap, ar-v2d.mask, 
ar-winrct);
+
keymap = WM_keymap_find(wm-defaultconf, Clip, SPACE_CLIP, 0);
WM_event_add_keymap_handler_bb(ar-handlers, keymap, ar-v2d.mask, 
ar-winrct);
 
keymap = WM_keymap_find(wm-defaultconf, Clip Editor, SPACE_CLIP, 0);
WM_event_add_keymap_handler_bb(ar-handlers, keymap, ar-v2d.mask, 
ar-winrct);
-
-   keymap= WM_keymap_find(wm-defaultconf, Mask 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46843] branches/soc-2012-bratwurst: Maintain image transform tool

2012-05-21 Thread Antony Riakiotakis
Revision: 46843
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46843
Author:   psy-fi
Date: 2012-05-21 14:05:39 + (Mon, 21 May 2012)
Log Message:
---
Maintain image transform tool
===
GUI and RNA options for retain image transform tool. This is known as
preserve UVs in other programs, but I find this terminology deceptive
because UVs are, in fact, modified. It is actually the image that is
maintained on the mesh.

Modified Paths:
--

branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py
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-21 13:42:58 UTC (rev 46842)
+++ 
branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d_toolbar.py
   2012-05-21 14:05:39 UTC (rev 46843)
@@ -207,6 +207,8 @@
 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.label(Double Threshold:)
 col.prop(tool_settings, double_threshold, text=)
 

Modified: branches/soc-2012-bratwurst/source/blender/makesdna/DNA_scene_types.h
===
--- branches/soc-2012-bratwurst/source/blender/makesdna/DNA_scene_types.h   
2012-05-21 13:42:58 UTC (rev 46842)
+++ branches/soc-2012-bratwurst/source/blender/makesdna/DNA_scene_types.h   
2012-05-21 14:05:39 UTC (rev 46843)
@@ -989,7 +989,8 @@
short snap_flag, snap_target;
short proportional, prop_mode;
char proportional_objects; /* proportional edit, object mode */
-   char pad[5];
+   char retain_image_pos;
+   char pad[4];
 
char auto_normalize; /*auto normalizing mode in wpaint*/
char multipaint; /* paint multiple bones in wpaint */

Modified: branches/soc-2012-bratwurst/source/blender/makesrna/intern/rna_scene.c
===
--- branches/soc-2012-bratwurst/source/blender/makesrna/intern/rna_scene.c  
2012-05-21 13:42:58 UTC (rev 46842)
+++ branches/soc-2012-bratwurst/source/blender/makesrna/intern/rna_scene.c  
2012-05-21 14:05:39 UTC (rev 46843)
@@ -1635,7 +1635,11 @@
RNA_def_property_ui_text(prop, Project to Self, Snap onto itself 
(editmode));
RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* 
header redraw */
-   
+
+   prop= RNA_def_property(srna, retain_image_pos, PROP_BOOLEAN, 
PROP_NONE);
+   RNA_def_property_boolean_sdna(prop, NULL, retain_image_pos, 1);
+   RNA_def_property_ui_text(prop, Retain Image, Retain image position 
when transforming a vertex);
+
/* Grease Pencil */
prop = RNA_def_property(srna, use_grease_pencil_sessions, 
PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, gpencil_flags, 
GP_TOOL_FLAG_PAINTSESSIONS_ON);

___
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 [46846] branches/soc-2012-swiss_cheese/ source/tools/GL: Added a BLENDER category to the glreport tool.

2012-05-21 Thread Jason Wilkins
Revision: 46846
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46846
Author:   jwilkins
Date: 2012-05-21 16:02:40 + (Mon, 21 May 2012)
Log Message:
---
Added a BLENDER category to the glreport tool.

This is for internal helper symbols related to OpenGL.  Things in this category 
should be rather abstract and directly related to OpenGL.  e.g., draw_line as 
opposed to draw_positional_indicator_g

Modified Paths:
--
branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py

Added Paths:
---
branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl

Added: branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl
===
--- branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl   
(rev 0)
+++ branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl   2012-05-21 
16:02:40 UTC (rev 46846)
@@ -0,0 +1,45 @@
+'BLENDER': set([
+   'bglBegin',
+   'bglBuffer',
+   'bglEnd',
+   'bglFlush',
+   'bglMats',
+   'bglPointHack',
+   'bglPolygonOffset',
+   'bglVertex2fv',
+   'bglVertex3f',
+   'bglVertex3fv',
+'bgl_get_mats',
+   'bgl_DepthTexture',
+   'bgl_LuminanceTexture',
+   'bgl_RenderedTexture',
+   'bgl_RenderedTextureHeight',
+   'bgl_RenderedTextureWidth',
+   'bgl_TextureCoordinateOffset',
+   'fdrawXORcirc',
+   'fdrawXORellipse',
+   'fdraw_size',
+   'fdrawbezier',
+   'fdrawbox',
+   'fdrawcheckerboard',
+   'fdrawline',
+   'gla2DDrawInfo',
+   'gla2DDrawTranslatePt',
+   'gla2DDrawTranslatePtv',
+   'gla2DGetMap',
+   'gla2DSetMap',
+   'glaBegin2DDraw',
+   'glaDefine2DArea',
+   'glaDrawPixelsSafe',
+   'glaDrawPixelsTex',
+   'glaDrawPixelsTexScaled',
+   'glaEnd2DDraw',
+   'glaGetOneFloat',
+   'glaGetOneInteger',
+   'glaRasterPosSafe2f',
+   'set_inverted_drawing',
+   'setlinestyle',
+   'stipple_diag_stripes_neg',
+   'stipple_diag_stripes_pos',
+   'stipple_halftone',
+   'stipple_quarttone']),


Property changes on: branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl
___
Added: svn:eol-style
   + native

Modified: branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py
===
--- branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py  2012-05-21 
15:14:32 UTC (rev 46845)
+++ branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py  2012-05-21 
16:02:40 UTC (rev 46846)
@@ -41,11 +41,12 @@
 extensions_filepath = extensions.gl
 es11_filepath   = es11.gl
 es20_filepath   = es20.gl
+blender_filepath= blender.gl
 
 # location of source code to be scanned relative to this script
 source_location = ../../../
 report_filepath = report.txt
-
+
 # these files contain practically the entire OpenGL api
 # scraping them spams the resulting report and makes it less useful
 stop_files = [
@@ -147,6 +148,13 @@
 # camel-case types
 (?:(?:AGL|CGL|kCGL|GLX)[a-zA-Z0-9_]*)|
 
+# Blender internal helper functions
+(?:(?:bgl|gla)[_A-Z0-9][a-zA-Z0-9_]*)|
+(?:fdraw[a-zA-Z0-9_]*)|
+(?:stipple_[a-zA-Z0-9_]*)|
+set_inverted_drawing|
+setlinestyle|
+
 # possible fakes
 (?:(?:glx|wgl|WGL|agl|AGL|glew|GLEW|CGL)[a-zA-Z0-9_]+)|
 
@@ -261,8 +269,8 @@
 
 db_out[token].add(label)
 
-
-
+
+
 def read_database():
 global core_filepath
 global deprecated_filepath
@@ -275,6 +283,7 @@
 global extensions_filepath
 global es11_filepath
 global es20_filepath
+global blender_filepath
 
 core_file   = open(core_filepath)
 deprecated_file = open(deprecated_filepath)
@@ -287,6 +296,7 @@
 libraries_file  = open(libraries_filepath)
 es11_file   = open(es11_filepath)
 es20_file   = open(es20_filepath)
+blender_file= open(blender_filepath)
 
 core_str   = core_file.read()
 deprecated_str = deprecated_file.read()
@@ -299,13 +309,14 @@
 libraries_str  = libraries_file.read()
 es11_str   = es11_file.read()
 es20_str   = es20_file.read()
+blender_str= blender_file.read()
 
 # fill the database with all categories
 # database is used to classify tokens
-database_str = '{ %s %s %s %s %s %s %s %s %s }' % (
+database_str = '{ %s %s %s %s %s %s %s %s %s %s }' % (
 core_str, deprecated_str, extensions_str,
 agl_str, cgl_str, egl_str, glX_str, wgl_str,
-libraries_str)
+libraries_str, blender_str)
 
 global database
 pivot_database(database, eval(database_str))
@@ -313,16 +324,16 @@
 # platform_es11 and platform_es20 contain platforms
 # they are used to find tokens that do not 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46847] trunk/blender/source/blender/ compositor/intern/COM_Node.cpp: fix for [#31543] Nodes use array past bounds

2012-05-21 Thread Jeroen Bakker
Revision: 46847
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46847
Author:   jbakker
Date: 2012-05-21 16:05:45 + (Mon, 21 May 2012)
Log Message:
---
fix for [#31543] Nodes use array past bounds

Modified Paths:
--
trunk/blender/source/blender/compositor/intern/COM_Node.cpp

Modified: trunk/blender/source/blender/compositor/intern/COM_Node.cpp
===
--- trunk/blender/source/blender/compositor/intern/COM_Node.cpp 2012-05-21 
16:02:40 UTC (rev 46846)
+++ trunk/blender/source/blender/compositor/intern/COM_Node.cpp 2012-05-21 
16:05:45 UTC (rev 46847)
@@ -138,7 +138,6 @@
operation-setX(val-value[0]);
operation-setY(val-value[1]);
operation-setZ(val-value[2]);
-   operation-setW(val-value[3]);
this-addLink(graph, operation-getOutputSocket(), inputsocket);
graph-addOperation(operation);
 }

___
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 [46848] trunk/blender: change name length from 32 to 64, perhaps we should have some constant here bpy.constants.NAME_MAX ? - but this hardly ever cha

2012-05-21 Thread Campbell Barton
Revision: 46848
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46848
Author:   campbellbarton
Date: 2012-05-21 16:52:04 + (Mon, 21 May 2012)
Log Message:
---
change name length from 32 to 64, perhaps we should have some constant here 
bpy.constants.NAME_MAX ? - but this hardly ever changes.

also hide allow overlap option for adding sequence strips, this was only 
intended for api use

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_operators/object.py
trunk/blender/release/scripts/startup/bl_operators/wm.py
trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c

Modified: trunk/blender/release/scripts/startup/bl_operators/object.py
===
--- trunk/blender/release/scripts/startup/bl_operators/object.py
2012-05-21 16:05:45 UTC (rev 46847)
+++ trunk/blender/release/scripts/startup/bl_operators/object.py
2012-05-21 16:52:04 UTC (rev 46848)
@@ -35,7 +35,7 @@
 pattern = StringProperty(
 name=Pattern,
 description=Name filter using '*' and '?' wildcard chars,
-maxlen=32,
+maxlen=64,
 default=*,
 )
 case_sensitive = BoolProperty(

Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===
--- trunk/blender/release/scripts/startup/bl_operators/wm.py2012-05-21 
16:05:45 UTC (rev 46847)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py2012-05-21 
16:52:04 UTC (rev 46848)
@@ -1077,7 +1077,7 @@
 
 context = StringProperty(
 name=Context,
-maxlen=32,
+maxlen=64,
 )
 
 def execute(self, context):

Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c
===
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c
2012-05-21 16:05:45 UTC (rev 46847)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_add.c
2012-05-21 16:52:04 UTC (rev 46848)
@@ -89,6 +89,8 @@
 
 static void sequencer_generic_props__internal(wmOperatorType *ot, int flag)
 {
+   PropertyRNA *prop;
+
if (flag  SEQPROP_STARTFRAME)
RNA_def_int(ot-srna, frame_start, 0, INT_MIN, INT_MAX, 
Start Frame, Start frame of the sequence strip, INT_MIN, INT_MAX);

@@ -99,7 +101,9 @@

RNA_def_boolean(ot-srna, replace_sel, 1, Replace Selection, 
Replace the current selection);
 
-   RNA_def_boolean(ot-srna, overlap, 0, Allow Overlap, Don't correct 
overlap on new sequence strips);
+   /* only for python scripts which import strips and place them after */
+   prop = RNA_def_boolean(ot-srna, overlap, 0, Allow Overlap, Don't 
correct overlap on new sequence strips);
+   RNA_def_property_flag(prop, PROP_HIDDEN);
 }
 
 static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator 
*op, const char *identifier)

___
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 [46849] branches/meshdata_transfer/source/ blender/editors/object/object_vgroup.c: Added support for replace_selected_weights in all weight transfer f

2012-05-21 Thread Ove Murberg Henriksen
Revision: 46849
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46849
Author:   cyborgmuppet
Date: 2012-05-21 17:00:08 + (Mon, 21 May 2012)
Log Message:
---
Added support for replace_selected_weights in all weight transfer fucntions.

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-21 16:52:04 UTC (rev 46848)
+++ branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
2012-05-21 17:00:08 UTC (rev 46849)
@@ -431,6 +431,8 @@
MDeformVert **dv_array_src;
MDeformVert **dv_array_dst;
MDeformWeight *dw_dst, *dw_src;
+   MVert *mv_src;
+   Mesh *me_src;
int dv_tot_src, dv_tot_dst;
int i, index_src, index_dst;
bDeformGroup *dg_src, *dg_dst;
@@ -448,6 +450,12 @@
ED_vgroup_add_name(ob_dst, dg_src-name);
}
 
+   /*get meshes*/
+   me_src = ob_src-data;
+
+   /*get vertices*/
+   mv_src = me_src-mvert;
+
/*get destination deformgroup*/
dg_dst = defgroup_find_name(ob_dst, dg_src-name);
 
@@ -460,18 +468,18 @@
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) {
+   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++){
+   for(i = 0; i  dv_tot_dst; i++, dv_array_src++, dv_array_dst++, 
mv_src++){
dw_src = defvert_verify_index(*dv_array_src, index_src);
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = dw_src-weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = dw_src-weight;}
-   else if(mode == 3) {if((*dv_array_src)-flag == 1) 
dw_dst-weight = dw_src-weight;}/*This does not work*/
+   else if(mode == 3) {if(mv_src-flag == 1) dw_dst-weight = 
dw_src-weight;}
else return 0;
}
return 1;
@@ -482,8 +490,8 @@
bDeformGroup *dg_src, *dg_dst;
MDeformVert **dv_array_src, **dv_array_dst;
MDeformWeight *dw_dst, *dw_src;
-   MVert *mv_dst;
-   Mesh *me_dst;
+   MVert *mv_dst, *mv_src;
+   Mesh *me_dst, *me_src;
BVHTreeFromMesh tree_mesh_src;
BVHTreeNearest nearest;
DerivedMesh *dmesh_src;
@@ -507,6 +515,7 @@
 
/*get meshes*/
me_dst = ob_dst-data;
+   me_src = ob_src-data;
dmesh_src = ob_src-derivedDeform;
 
/*make node tree*/
@@ -522,6 +531,7 @@
 
/*get vertices*/
mv_dst = me_dst-mvert;
+   mv_src = me_src-mvert;
 
/*prepare transformation matrix*/
/*this can be excluded to make a lazy feature that works better when 
object centers relative to mesh is the same*/
@@ -541,7 +551,7 @@
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = dw_src-weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = dw_src-weight;}
-   else if(mode == 3) {dw_dst-weight= dw_src-weight;}/*TODO fix 
this*/
+   else if(mode == 3) {if(mv_src[nearest.index].flag == 1) 
dw_dst-weight = dw_src-weight;}
else return 0;
}
/*free memory and return*/
@@ -560,7 +570,7 @@
MFace *mface_src;
BVHTreeNearest nearest;
MDeformWeight *dw_dst, *dw_src;
-   int dv_tot_src, dv_tot_dst, i, index_dst, index_src;
+   int dv_tot_src, dv_tot_dst, i, index_dst, index_src, 
index_nearest_vertex;
float dist_v1, dist_v2, dist_v3, dist_v4, tmp_co[3], tmp_mat[4][4];
 
/*remove this:*/
@@ -623,28 +633,21 @@
dist_v1 = len_squared_v3v3(tmp_co, 
mv_src[mface_src[nearest.index].v1].co);
dist_v2 = len_squared_v3v3(tmp_co, 
mv_src[mface_src[nearest.index].v2].co);
dist_v3 = len_squared_v3v3(tmp_co, 
mv_src[mface_src[nearest.index].v3].co);
-   /*get weight from triangle*/
-   if(dist_v1  dist_v2  dist_v1  dist_v3){
-   dw_src = 
defvert_verify_index(dv_array_src[mface_src[nearest.index].v1], index_src);
-   }
-   else if(dist_v2  dist_v3){
- 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46850] branches/meshdata_transfer/source/ blender/editors/object/object_vgroup.c: Fixed SELECT comparisons

2012-05-21 Thread Ove Murberg Henriksen
Revision: 46850
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46850
Author:   cyborgmuppet
Date: 2012-05-21 17:39:56 + (Mon, 21 May 2012)
Log Message:
---
Fixed SELECT comparisons

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-21 17:00:08 UTC (rev 46849)
+++ branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
2012-05-21 17:39:56 UTC (rev 46850)
@@ -479,7 +479,7 @@
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = dw_src-weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = dw_src-weight;}
-   else if(mode == 3) {if(mv_src-flag == 1) dw_dst-weight = 
dw_src-weight;}
+   else if(mode == 3) {if(mv_src-flag  SELECT) dw_dst-weight = 
dw_src-weight;}
else return 0;
}
return 1;
@@ -551,7 +551,7 @@
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = dw_src-weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = dw_src-weight;}
-   else if(mode == 3) {if(mv_src[nearest.index].flag == 1) 
dw_dst-weight = dw_src-weight;}
+   else if(mode == 3) {if(mv_src[nearest.index].flag  SELECT) 
dw_dst-weight = dw_src-weight;}
else return 0;
}
/*free memory and return*/
@@ -646,8 +646,7 @@
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = dw_src-weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = dw_src-weight;}
-   /*ATTENTION: face select in weightpaint mode seems reversed. 
Might create bug when fixed*/
-   else if(mode == 3) {if(mface_src[nearest.index].flag != SELECT) 
dw_dst-weight = dw_src-weight;}
+   else if(mode == 3) {if(mface_src[nearest.index].flag  
ME_FACE_SEL) dw_dst-weight = dw_src-weight;}
else return 0;
}
/*free memory and return*/
@@ -737,8 +736,7 @@
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = weight;}
-   /*ATTENTION: face select in weightpaint mode seems reversed. 
Might create bug when fixed*/
-   else if(mode == 3) {if(mface_src[nearest.index].flag != SELECT) 
dw_dst-weight = weight;}
+   else if(mode == 3) {if(mface_src[nearest.index].flag  
ME_FACE_SEL) dw_dst-weight = weight;}
else return 0;
}
/*free memory and return*/

___
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 [46851] trunk/blender/source/blender/ makesrna/intern/rna_nodetree.c: A few minor UI message fixes...

2012-05-21 Thread Bastien Montagne
Revision: 46851
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46851
Author:   mont29
Date: 2012-05-21 18:06:20 + (Mon, 21 May 2012)
Log Message:
---
A few minor UI message fixes...

Modified Paths:
--
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
17:39:56 UTC (rev 46850)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
18:06:20 UTC (rev 46851)
@@ -3051,7 +3051,7 @@
RNA_def_property_float_sdna(prop, NULL, rotation);
RNA_def_property_float_default(prop, 0.0f);
RNA_def_property_range(prop, -1000.0f, 1000.0f);
-   RNA_def_property_ui_text(prop, Rotation, Rotationangle of the box);
+   RNA_def_property_ui_text(prop, Rotation, Rotation angle of the box);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 }
 
@@ -3182,14 +3182,14 @@
RNA_def_property_float_sdna(prop, NULL, startmidtones);
RNA_def_property_float_default(prop, 0.2f);
RNA_def_property_range(prop, 0, 1);
-   RNA_def_property_ui_text(prop, Start of midtones, Start of 
midtones);
+   RNA_def_property_ui_text(prop, Midtones Start, Start of midtones);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 
prop = RNA_def_property(srna, midtones_end, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, endmidtones);
RNA_def_property_float_default(prop, 0.7f);
RNA_def_property_range(prop, 0, 1);
-   RNA_def_property_ui_text(prop, End of midtones, end of midtones);
+   RNA_def_property_ui_text(prop, Midtones End, End of midtones);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);

prop = RNA_def_property(srna, master_saturation, PROP_FLOAT, 
PROP_NONE);
@@ -3347,7 +3347,7 @@
prop = RNA_def_property(srna, tile_order, PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, custom1);
RNA_def_property_enum_items(prop, tileorder_items);
-   RNA_def_property_ui_text(prop, Tile order, tile order);
+   RNA_def_property_ui_text(prop, Tile order, Tile order);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 
prop = RNA_def_property(srna, center_x, PROP_FLOAT, PROP_NONE);

___
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 [46852] branches/meshdata_transfer/source/ blender/editors/object/object_vgroup.c: Changed functions to check for select on destination instead of sou

2012-05-21 Thread Ove Murberg Henriksen
Revision: 46852
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46852
Author:   cyborgmuppet
Date: 2012-05-21 18:15:12 + (Mon, 21 May 2012)
Log Message:
---
Changed functions to check for select on destination instead of source

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-21 18:06:20 UTC (rev 46851)
+++ branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
2012-05-21 18:15:12 UTC (rev 46852)
@@ -431,8 +431,8 @@
MDeformVert **dv_array_src;
MDeformVert **dv_array_dst;
MDeformWeight *dw_dst, *dw_src;
-   MVert *mv_src;
-   Mesh *me_src;
+   MVert *mv_dst;
+   Mesh *me_dst;
int dv_tot_src, dv_tot_dst;
int i, index_src, index_dst;
bDeformGroup *dg_src, *dg_dst;
@@ -451,10 +451,10 @@
}
 
/*get meshes*/
-   me_src = ob_src-data;
+   me_dst = ob_dst-data;
 
/*get vertices*/
-   mv_src = me_src-mvert;
+   mv_dst = me_dst-mvert;
 
/*get destination deformgroup*/
dg_dst = defgroup_find_name(ob_dst, dg_src-name);
@@ -474,12 +474,12 @@
}
 
/* loop through the vertices and copy weight*/
-   for(i = 0; i  dv_tot_dst; i++, dv_array_src++, dv_array_dst++, 
mv_src++){
+   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(mode == 1) dw_dst-weight = dw_src-weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = dw_src-weight;}
-   else if(mode == 3) {if(mv_src-flag  SELECT) dw_dst-weight = 
dw_src-weight;}
+   else if(mode == 3) {if(mv_dst-flag  SELECT) dw_dst-weight = 
dw_src-weight;}
else return 0;
}
return 1;
@@ -490,8 +490,8 @@
bDeformGroup *dg_src, *dg_dst;
MDeformVert **dv_array_src, **dv_array_dst;
MDeformWeight *dw_dst, *dw_src;
-   MVert *mv_dst, *mv_src;
-   Mesh *me_dst, *me_src;
+   MVert *mv_dst;
+   Mesh *me_dst;
BVHTreeFromMesh tree_mesh_src;
BVHTreeNearest nearest;
DerivedMesh *dmesh_src;
@@ -515,7 +515,6 @@
 
/*get meshes*/
me_dst = ob_dst-data;
-   me_src = ob_src-data;
dmesh_src = ob_src-derivedDeform;
 
/*make node tree*/
@@ -531,7 +530,6 @@
 
/*get vertices*/
mv_dst = me_dst-mvert;
-   mv_src = me_src-mvert;
 
/*prepare transformation matrix*/
/*this can be excluded to make a lazy feature that works better when 
object centers relative to mesh is the same*/
@@ -551,7 +549,7 @@
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = dw_src-weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = dw_src-weight;}
-   else if(mode == 3) {if(mv_src[nearest.index].flag  SELECT) 
dw_dst-weight = dw_src-weight;}
+   else if(mode == 3) {if(mv_dst-flag  SELECT) dw_dst-weight = 
dw_src-weight;}
else return 0;
}
/*free memory and return*/
@@ -646,7 +644,7 @@
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = dw_src-weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = dw_src-weight;}
-   else if(mode == 3) {if(mface_src[nearest.index].flag  
ME_FACE_SEL) dw_dst-weight = dw_src-weight;}
+   else if(mode == 3) {if(mv_dst-flag  SELECT) dw_dst-weight = 
dw_src-weight;}
else return 0;
}
/*free memory and return*/
@@ -736,7 +734,7 @@
dw_dst = defvert_verify_index(*dv_array_dst, index_dst);
if(mode == 1) dw_dst-weight = weight;
else if(mode == 2) {if(!dw_dst-weight || dw_dst-weight == 0) 
dw_dst-weight = weight;}
-   else if(mode == 3) {if(mface_src[nearest.index].flag  
ME_FACE_SEL) dw_dst-weight = weight;}
+   else if(mode == 3) {if(mv_dst-flag  SELECT) dw_dst-weight = 
weight;}
else return 0;
}
/*free memory and return*/

___
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 [46854] trunk/blender/source/blender: [ #31410] Code review testing: The color correction node in particular is

2012-05-21 Thread Jeroen Bakker
Revision: 46854
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46854
Author:   jbakker
Date: 2012-05-21 18:47:55 + (Mon, 21 May 2012)
Log Message:
---
[#31410] Code review testing: The color correction node in particular is
quite problematic in button layout
 * Added first column with labels
 * increased max size of node
 * moved the start/end midtones to the bottom of the node

Modified Paths:
--
trunk/blender/source/blender/editors/space_node/drawnode.c

trunk/blender/source/blender/nodes/composite/nodes/node_composite_colorcorrection.c

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===
--- trunk/blender/source/blender/editors/space_node/drawnode.c  2012-05-21 
18:35:31 UTC (rev 46853)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2012-05-21 
18:47:55 UTC (rev 46854)
@@ -1984,10 +1984,15 @@
uiItemR(row, ptr, blue, 0, NULL, ICON_NONE);
 
row = uiLayoutRow(layout, 0);
-   uiItemR(row, ptr, midtones_start, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, midtones_end, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+   uiItemL(row, , 0);
+   uiItemL(row, Saturation, 0);
+   uiItemL(row, Contrast, 0);
+   uiItemL(row, Gamma, 0);
+   uiItemL(row, Gain, 0);
+   uiItemL(row, Lift, 0);
 
row = uiLayoutRow(layout, 0);
+   uiItemL(row, Master, 0);
uiItemR(row, ptr, master_saturation, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
uiItemR(row, ptr, master_contrast, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, master_gamma, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -1995,13 +2000,7 @@
uiItemR(row, ptr, master_lift, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
row = uiLayoutRow(layout, 0);
-   uiItemL(row, Saturation, 0);
-   uiItemL(row, Contrast, 0);
-   uiItemL(row, Gamma, 0);
-   uiItemL(row, Gain, 0);
-   uiItemL(row, Lift, 0);
-
-   row = uiLayoutRow(layout, 0);
+   uiItemL(row, Highlights, 0);
uiItemR(row, ptr, highlights_saturation, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
uiItemR(row, ptr, highlights_contrast, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
uiItemR(row, ptr, highlights_gamma, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
@@ -2009,6 +2008,7 @@
uiItemR(row, ptr, highlights_lift, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
row = uiLayoutRow(layout, 0);
+   uiItemL(row, Midtones, 0);
uiItemR(row, ptr, midtones_saturation, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
uiItemR(row, ptr, midtones_contrast, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
uiItemR(row, ptr, midtones_gamma, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -2016,11 +2016,16 @@
uiItemR(row, ptr, midtones_lift, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 
row = uiLayoutRow(layout, 0);
+   uiItemL(row, Shadows, 0);
uiItemR(row, ptr, shadows_saturation, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
uiItemR(row, ptr, shadows_contrast, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
uiItemR(row, ptr, shadows_gamma, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, shadows_gain, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, shadows_lift, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+
+   row = uiLayoutRow(layout, 0);
+   uiItemR(row, ptr, midtones_start, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+   uiItemR(row, ptr, midtones_end, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 }
 static void node_composit_buts_colorcorrection_but(uiLayout *layout, bContext 
*UNUSED(C), PointerRNA *ptr) {
uiLayout *row;

Modified: 
trunk/blender/source/blender/nodes/composite/nodes/node_composite_colorcorrection.c
===
--- 
trunk/blender/source/blender/nodes/composite/nodes/node_composite_colorcorrection.c
 2012-05-21 18:35:31 UTC (rev 46853)
+++ 
trunk/blender/source/blender/nodes/composite/nodes/node_composite_colorcorrection.c
 2012-05-21 18:47:55 UTC (rev 46854)
@@ -81,7 +81,7 @@
 
node_type_base(ttype, ntype, CMP_NODE_COLORCORRECTION, Color 
Correction, NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(ntype, cmp_node_colorcorrection_in, 
cmp_node_colorcorrection_out);
-   node_type_size(ntype, 400, 200, 400);
+   node_type_size(ntype, 400, 200, 500);
node_type_init(ntype, node_composit_init_colorcorrection);
node_type_storage(ntype, NodeColorCorrection, 
node_free_standard_storage, node_copy_standard_storage);
 

___
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 [46855] trunk/blender/source: Fix for [ #31418] Code review: OpenCL initialization

2012-05-21 Thread Jeroen Bakker
Revision: 46855
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46855
Author:   jbakker
Date: 2012-05-21 19:31:29 + (Mon, 21 May 2012)
Log Message:
---
Fix for [#31418] Code review: OpenCL initialization
 * Moved OpenCL initialization to first use
 * cleaned up build files
 * display some debug lines only when debugging is enabled.

Modified Paths:
--
trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
trunk/blender/source/blender/compositor/intern/COM_compositor.cpp
trunk/blender/source/creator/CMakeLists.txt

Modified: trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
===
--- trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
2012-05-21 18:47:55 UTC (rev 46854)
+++ trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
2012-05-21 19:31:29 UTC (rev 46855)
@@ -29,6 +29,7 @@
 #include OCL_opencl.h
 #include stdio.h
 #include COM_OpenCLKernels.cl.cpp
+#include BKE_global.h
 
 #if COM_CURRENT_THREADING_MODEL == COM_TM_NOTHREAD
 #warning COM_CURRENT_THREADING_MODEL COM_TM_NOTHREAD is activated. Use only 
for debugging.
@@ -235,7 +236,7 @@
cl_int error;
error = clGetPlatformIDs(0, 0, numberOfPlatforms);
if (error != CL_SUCCESS) { printf(CLERROR[%d]: %s\n, error, 
clewErrorString(error));  }
-   printf(%d number of platforms\n, numberOfPlatforms);
+   if (G.f  G_DEBUG) printf(%d number of platforms\n, 
numberOfPlatforms);
cl_platform_id *platforms = new 
cl_platform_id[numberOfPlatforms];
error = clGetPlatformIDs(numberOfPlatforms, platforms, 0);
unsigned int indexPlatform;
@@ -280,11 +281,13 @@
OpenCLDevice *clDevice = new OpenCLDevice(context, 
device, program);
clDevice-initialize(),
gpudevices.push_back(clDevice);
-   char resultString[32];
-   error = clGetDeviceInfo(device, CL_DEVICE_NAME, 32, 
resultString, 0);
-   printf(OPENCL_DEVICE: %s, , resultString);
-   error = clGetDeviceInfo(device, CL_DEVICE_VENDOR, 32, 
resultString, 0);
-   printf(%s\n, resultString);
+   if (G.f  G_DEBUG) {
+   char resultString[32];
+   error = clGetDeviceInfo(device, CL_DEVICE_NAME, 
32, resultString, 0);
+   printf(OPENCL_DEVICE: %s, , resultString);
+   error = clGetDeviceInfo(device, 
CL_DEVICE_VENDOR, 32, resultString, 0);
+   printf(%s\n, resultString);
+   }
}
delete cldevices;
delete platforms;

Modified: trunk/blender/source/blender/compositor/intern/COM_compositor.cpp
===
--- trunk/blender/source/blender/compositor/intern/COM_compositor.cpp   
2012-05-21 18:47:55 UTC (rev 46854)
+++ trunk/blender/source/blender/compositor/intern/COM_compositor.cpp   
2012-05-21 19:31:29 UTC (rev 46855)
@@ -29,6 +29,7 @@
 #include COM_compositor.h
 #include COM_ExecutionSystem.h
 #include COM_WorkScheduler.h
+#include OCL_opencl.h
 
 static ThreadMutex *compositorMutex;
 void COM_execute(bNodeTree *editingtree, int rendering)
@@ -36,6 +37,7 @@
if (compositorMutex == NULL) { /// TODO: move to blender startup phase
compositorMutex = new ThreadMutex();
BLI_mutex_init(compositorMutex);
+   OCL_init();
WorkScheduler::initialize(); ///TODO: call 
workscheduler.deinitialize somewhere
}
BLI_mutex_lock(compositorMutex);

Modified: trunk/blender/source/creator/CMakeLists.txt
===
--- trunk/blender/source/creator/CMakeLists.txt 2012-05-21 18:47:55 UTC (rev 
46854)
+++ trunk/blender/source/creator/CMakeLists.txt 2012-05-21 19:31:29 UTC (rev 
46855)
@@ -38,7 +38,6 @@
../blender/makesdna
../blender/gpu
../blender/windowmanager
-   ../blender/opencl
 )
 
 if(WIN32)

___
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 [46856] branches/soc-2012-bratwurst/source /blender/editors/transform: Maintain image transform tool

2012-05-21 Thread Antony Riakiotakis
Revision: 46856
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46856
Author:   psy-fi
Date: 2012-05-21 19:52:41 + (Mon, 21 May 2012)
Log Message:
---
Maintain image transform tool
==
Add intermediate function to detect boundary edges that will be
artificially pinned and faces to reunwrap. Still not 100% certain the
reunwrap method will work, still I hope it will do the trick. Still, a
similar function will likely be needed for the second method that I will
use, should the first one fail.

Modified Paths:
--
branches/soc-2012-bratwurst/source/blender/editors/transform/transform.h

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

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

Modified: 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform.h
===
--- branches/soc-2012-bratwurst/source/blender/editors/transform/transform.h
2012-05-21 19:31:29 UTC (rev 46855)
+++ branches/soc-2012-bratwurst/source/blender/editors/transform/transform.h
2012-05-21 19:52:41 UTC (rev 46856)
@@ -324,6 +324,7 @@
void*draw_handle_view;
void*draw_handle_pixel;
void*draw_handle_cursor;
+   struct BMVert **affected_verts; /* stores pointers to bmverts to access 
connectivity data */
 } TransInfo;
 
 
@@ -385,6 +386,9 @@
/* alternative transformation. used to add offset to tracking markers */
 #define T_ALT_TRANSFORM(1  24)
 
+/* calculation of image maintain tool */
+#define T_IMAGE_PRESERVE_CALC (1  25)
+
 /* TransInfo-modifiers */
 #defineMOD_CONSTRAINT_SELECT   0x01
 #defineMOD_PRECISION   0x02
@@ -665,6 +669,7 @@
 
 void calculateCenterCursor2D(TransInfo *t);
 void calculatePropRatio(TransInfo *t);
+void calculateImageMaintainBounds(TransInfo *t);
 
 void getViewVector(TransInfo *t, float coord[3], float vec[3]);
 

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-21 19:31:29 UTC (rev 46855)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_conversions.c
2012-05-21 19:52:41 UTC (rev 46856)
@@ -2029,6 +2029,11 @@
}
else t-total = countsel;
 
+   /* now we need to allocate store for affected verts if we do maintain 
image */
+   if(t-flag  T_IMAGE_PRESERVE_CALC) {
+   t-affected_verts = MEM_mallocN(t-total * 
sizeof(*t-affected_verts), BMVert Map);
+   }
+
tob= t-data= MEM_callocN(t-total*sizeof(TransData), TransObData(Mesh 
EditMode));
 
copy_m3_m4(mtx, t-obedit-obmat);
@@ -2083,6 +2088,9 @@

VertsToTransData(t, tob, em, eve, bweight);
 
+   if(t-flag  T_IMAGE_PRESERVE_CALC)
+   t-affected_verts[a] = eve;
+
/* selected */
if (selstate[a]) tob-flag |= TD_SELECTED;
 

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-21 19:31:29 UTC (rev 46855)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
   2012-05-21 19:52:41 UTC (rev 46856)
@@ -1049,6 +1049,9 @@
v3d-twtype = 0;
}
 
+   if(ts-retain_image_pos)
+   t-flag |= T_IMAGE_PRESERVE_CALC;
+
if (v3d-flag  V3D_ALIGN) t-flag |= T_V3D_ALIGN;
t-around = v3d-around;

@@ -1265,6 +1268,10 @@
if (t-flag  T_MODAL) {
v3d-twtype = t-twtype;
}
+   if(t-flag  T_IMAGE_PRESERVE_CALC) {
+   if(t-affected_verts)
+   MEM_freeN(t-affected_verts);
+   }
}

if (t-mouse.data) {
@@ -1589,6 +1596,91 @@
}
 }
 
+/* this function detects boundary mesh elements that will encompass the faces 
to send to the unwrapper.
+ * These elements will be artificially pinned for this first attempt at the 
algorithm */
+void calculateImageMaintainBounds(TransInfo *t)
+{
+   int i, edge_counter = 0, boundary_edge_counter = 0;
+   BMIter iter;
+   BMFace *f;
+   BMEdge **edge_list, **edge_boundaries;
+   BMEdge *e;
+   GHashIterator *ghiter;
+   GHash *face_hash = 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46857] trunk/blender/source/blender: Fix for

2012-05-21 Thread Monique Dewanchand
Revision: 46857
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46857
Author:   mdewanchand
Date: 2012-05-21 19:58:23 + (Mon, 21 May 2012)
Log Message:
---
Fix for 
[#31408] Code review testing: Button labels are invisible in many nodes

Modified Paths:
--
trunk/blender/source/blender/editors/space_node/drawnode.c
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
trunk/blender/source/blender/nodes/composite/nodes/node_composite_boxmask.c

trunk/blender/source/blender/nodes/composite/nodes/node_composite_ellipsemask.c

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===
--- trunk/blender/source/blender/editors/space_node/drawnode.c  2012-05-21 
19:52:41 UTC (rev 46856)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2012-05-21 
19:58:23 UTC (rev 46857)
@@ -2080,8 +2080,8 @@
uiLayout *row;

row= uiLayoutRow(layout, 1);
-   uiItemR(row, ptr, x, 0, X, ICON_NONE);
-   uiItemR(row, ptr, y, 0, Y, ICON_NONE);
+   uiItemR(row, ptr, x, 0, NULL, ICON_NONE);
+   uiItemR(row, ptr, y, 0, NULL, ICON_NONE);

row= uiLayoutRow(layout, 1);
uiItemR(row, ptr, width, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
@@ -2207,8 +2207,8 @@
 {
uiLayout *row;
row= uiLayoutRow(layout, 1);
-   uiItemR(row, ptr, x, 0, X, ICON_NONE);
-   uiItemR(row, ptr, y, 0, Y, ICON_NONE);
+   uiItemR(row, ptr, x, 0, NULL, ICON_NONE);
+   uiItemR(row, ptr, y, 0, NULL, ICON_NONE);
row= uiLayoutRow(layout, 1);
uiItemR(row, ptr, width, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, height, UI_ITEM_R_SLIDER, NULL, ICON_NONE);

Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
19:52:41 UTC (rev 46856)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
19:58:23 UTC (rev 46857)
@@ -3023,28 +3023,28 @@
RNA_def_property_float_sdna(prop, NULL, x);
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, -1.0f, 2.0f);
-   RNA_def_property_ui_text(prop, X position, X position of the middle 
of the box);
+   RNA_def_property_ui_text(prop, X, X position of the middle of the 
box);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 
prop = RNA_def_property(srna, y, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, y);
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, -1.0f, 2.0f);
-   RNA_def_property_ui_text(prop, Y position, Y position of the middle 
of the box);
+   RNA_def_property_ui_text(prop, Y, Y position of the middle of the 
box);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 
prop = RNA_def_property(srna, width, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, width);
RNA_def_property_float_default(prop, 0.3f);
RNA_def_property_range(prop, 0.0f, 2.0f);
-   RNA_def_property_ui_text(prop, Width of the box, Width of the box);
+   RNA_def_property_ui_text(prop, Width, Width of the box);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 
prop = RNA_def_property(srna, height, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, height);
RNA_def_property_float_default(prop, 0.2f);
RNA_def_property_range(prop, 0.0f, 2.0f);
-   RNA_def_property_ui_text(prop, Height of the box, Height of the 
box);
+   RNA_def_property_ui_text(prop, Height, Height of the box);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 
prop = RNA_def_property(srna, rotation, PROP_FLOAT, PROP_NONE);
@@ -3070,28 +3070,28 @@
RNA_def_property_float_sdna(prop, NULL, x);
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, -1.0f, 2.0f);
-   RNA_def_property_ui_text(prop, X position, X position of the middle 
of the box);
+   RNA_def_property_ui_text(prop, X, X position of the middle of the 
box);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 
prop = RNA_def_property(srna, y, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, y);
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, -1.0f, 2.0f);
-   RNA_def_property_ui_text(prop, Y position, Y position of the middle 
of the box);
+   RNA_def_property_ui_text(prop, Y, Y position of the middle of the 
box);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);
 
prop = RNA_def_property(srna, width, PROP_FLOAT, PROP_NONE);

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46858] trunk/blender/source/blender: UI mafia fix thanks to venomgfx for reporting

2012-05-21 Thread Jeroen Bakker
Revision: 46858
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46858
Author:   jbakker
Date: 2012-05-21 20:10:21 + (Mon, 21 May 2012)
Log Message:
---
UI mafia fix thanks to venomgfx for reporting
 * Color correction node

Modified Paths:
--
trunk/blender/source/blender/editors/space_node/drawnode.c
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===
--- trunk/blender/source/blender/editors/space_node/drawnode.c  2012-05-21 
19:58:23 UTC (rev 46857)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c  2012-05-21 
20:10:21 UTC (rev 46858)
@@ -1993,40 +1993,41 @@
 
row = uiLayoutRow(layout, 0);
uiItemL(row, Master, 0);
-   uiItemR(row, ptr, master_saturation, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
-   uiItemR(row, ptr, master_contrast, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, master_gamma, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, master_gain, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, master_lift, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+   uiItemR(row, ptr, master_saturation, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, master_contrast, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, master_gamma, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, master_gain, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, master_lift, UI_ITEM_R_SLIDER, , ICON_NONE);
 
row = uiLayoutRow(layout, 0);
uiItemL(row, Highlights, 0);
-   uiItemR(row, ptr, highlights_saturation, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
-   uiItemR(row, ptr, highlights_contrast, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
-   uiItemR(row, ptr, highlights_gamma, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
-   uiItemR(row, ptr, highlights_gain, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, highlights_lift, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+   uiItemR(row, ptr, highlights_saturation, UI_ITEM_R_SLIDER, , 
ICON_NONE);
+   uiItemR(row, ptr, highlights_contrast, UI_ITEM_R_SLIDER, , 
ICON_NONE);
+   uiItemR(row, ptr, highlights_gamma, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, highlights_gain, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, highlights_lift, UI_ITEM_R_SLIDER, , ICON_NONE);
 
row = uiLayoutRow(layout, 0);
uiItemL(row, Midtones, 0);
-   uiItemR(row, ptr, midtones_saturation, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
-   uiItemR(row, ptr, midtones_contrast, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
-   uiItemR(row, ptr, midtones_gamma, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, midtones_gain, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, midtones_lift, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+   uiItemR(row, ptr, midtones_saturation, UI_ITEM_R_SLIDER, , 
ICON_NONE);
+   uiItemR(row, ptr, midtones_contrast, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, midtones_gamma, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, midtones_gain, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, midtones_lift, UI_ITEM_R_SLIDER, , ICON_NONE);
 
row = uiLayoutRow(layout, 0);
uiItemL(row, Shadows, 0);
-   uiItemR(row, ptr, shadows_saturation, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
-   uiItemR(row, ptr, shadows_contrast, UI_ITEM_R_SLIDER, NULL, 
ICON_NONE);
-   uiItemR(row, ptr, shadows_gamma, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, shadows_gain, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
-   uiItemR(row, ptr, shadows_lift, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+   uiItemR(row, ptr, shadows_saturation, UI_ITEM_R_SLIDER, , 
ICON_NONE);
+   uiItemR(row, ptr, shadows_contrast, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, shadows_gamma, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, shadows_gain, UI_ITEM_R_SLIDER, , ICON_NONE);
+   uiItemR(row, ptr, shadows_lift, UI_ITEM_R_SLIDER, , ICON_NONE);
 
row = uiLayoutRow(layout, 0);
uiItemR(row, ptr, midtones_start, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
uiItemR(row, ptr, midtones_end, UI_ITEM_R_SLIDER, NULL, ICON_NONE);
 }
+
 static void node_composit_buts_colorcorrection_but(uiLayout *layout, bContext 
*UNUSED(C), PointerRNA *ptr) {
uiLayout *row;


Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
19:58:23 UTC (rev 46857)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
20:10:21 UTC (rev 46858)
@@ -3196,35 +3196,35 @@
RNA_def_property_float_sdna(prop, NULL, master.saturation);

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46859] trunk/blender/source/blender/ makesrna/intern/rna_nodetree.c: Fix for [#31413] Code review testing: Regarding chunksize, could the

2012-05-21 Thread Jeroen Bakker
Revision: 46859
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46859
Author:   jbakker
Date: 2012-05-21 20:21:32 + (Mon, 21 May 2012)
Log Message:
---
Fix for [#31413] Code review testing: Regarding chunksize, could the
tooltip be made more clear

Modified Paths:
--
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
20:10:21 UTC (rev 46858)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
20:21:32 UTC (rev 46859)
@@ -3925,16 +3925,16 @@
prop= RNA_def_property(srna, render_quality, PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, render_quality);
RNA_def_property_enum_items(prop, node_quality_items);
-   RNA_def_property_ui_text(prop, Render quality, Quality when 
rendering);
+   RNA_def_property_ui_text(prop, Render Quality, Quality when 
rendering);
 
prop= RNA_def_property(srna, edit_quality, PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, edit_quality);
RNA_def_property_enum_items(prop, node_quality_items);
-   RNA_def_property_ui_text(prop, Edit quality, Quality when editing);
+   RNA_def_property_ui_text(prop, Edit Quality, Quality when editing);
 
prop= RNA_def_property(srna, chunksize, PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, chunksize);
-   RNA_def_property_ui_text(prop, Chunksize, Max size of a chunk during 
calculation);
+   RNA_def_property_ui_text(prop, Chunksize, Max size of a tile. 
Smaller values gives better distribution of multiple threads, but more 
overhead.);
RNA_def_property_range(prop, 32, 1024);
 
prop= RNA_def_property(srna, use_opencl, PROP_BOOLEAN, PROP_NONE);

___
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 [46860] trunk/blender/source/blender/ makesrna/intern/rna_scene.c: Missing RNA_def_property_update functions for RenderSettings bake properties

2012-05-21 Thread Dan Eicher
Revision: 46860
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46860
Author:   dna
Date: 2012-05-21 20:28:54 + (Mon, 21 May 2012)
Log Message:
---
Missing RNA_def_property_update functions for RenderSettings bake properties

Modified Paths:
--
trunk/blender/source/blender/makesrna/intern/rna_scene.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_scene.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_scene.c2012-05-21 
20:21:32 UTC (rev 46859)
+++ trunk/blender/source/blender/makesrna/intern/rna_scene.c2012-05-21 
20:28:54 UTC (rev 46860)
@@ -3725,65 +3725,78 @@
RNA_def_property_enum_bitflag_sdna(prop, NULL, bake_mode);
RNA_def_property_enum_items(prop, bake_mode_items);
RNA_def_property_ui_text(prop, Bake Mode, Choose shading information 
to bake into the image);
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, bake_normal_space, PROP_ENUM, 
PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, bake_normal_space);
RNA_def_property_enum_items(prop, bake_normal_space_items);
RNA_def_property_ui_text(prop, Normal Space, Choose normal space for 
baking);
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, bake_quad_split, PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, bake_qyad_split_items);
RNA_def_property_ui_text(prop, Quad Split, Choose the method used to 
split a quad into 2 triangles for baking);
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, bake_aa_mode, PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, bake_osa);
RNA_def_property_enum_items(prop, fixed_oversample_items);
RNA_def_property_ui_text(prop, Anti-Aliasing Level, );
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, use_bake_selected_to_active, 
PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, bake_flag, 
R_BAKE_TO_ACTIVE);
RNA_def_property_ui_text(prop, Selected to Active,
 Bake shading on the surface of selected 
objects to the active object);
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, use_bake_normalize, PROP_BOOLEAN, 
PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, bake_flag, 
R_BAKE_NORMALIZE);
RNA_def_property_ui_text(prop, Normalized,
 With displacement normalize to the distance, 
with ambient occlusion 
 normalize without using material settings);
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, use_bake_clear, PROP_BOOLEAN, 
PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, bake_flag, R_BAKE_CLEAR);
RNA_def_property_ui_text(prop, Clear, Clear Images before baking);
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, use_bake_antialiasing, PROP_BOOLEAN, 
PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, bake_flag, R_BAKE_OSA);
RNA_def_property_ui_text(prop, Anti-Aliasing, Enables 
Anti-aliasing);
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, bake_margin, PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, bake_filter);
RNA_def_property_range(prop, 0, 64);
RNA_def_property_ui_text(prop, Margin,
 Amount of pixels to extend the baked result 
with, as post process filter);
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 
prop = RNA_def_property(srna, bake_distance, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, bake_maxdist);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, Distance,
 Maximum distance from active object to other 
object (in blender units));
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, bake_bias, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, bake_biasdist);
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, Bias, Bias towards faces further away 
from the object (in blender units));
-   
+   RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
+
prop = RNA_def_property(srna, use_bake_multires, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46861] trunk/blender/source/blender: fix for

2012-05-21 Thread Monique Dewanchand
Revision: 46861
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46861
Author:   mdewanchand
Date: 2012-05-21 20:36:02 + (Mon, 21 May 2012)
Log Message:
---
fix for 
[#31502] Defocus max radius help tekst

Modified Paths:
--
trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
trunk/blender/source/blender/nodes/composite/nodes/node_composite_defocus.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_nodetree.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
20:28:54 UTC (rev 46860)
+++ trunk/blender/source/blender/makesrna/intern/rna_nodetree.c 2012-05-21 
20:36:02 UTC (rev 46861)
@@ -2427,7 +2427,7 @@
prop = RNA_def_property(srna, blur_max, PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, maxblur);
RNA_def_property_range(prop, 0.0f, 1.0f);
-   RNA_def_property_ui_text(prop, Max Blur, Blur limit, maximum CoC 
radius, 0=no limit);
+   RNA_def_property_ui_text(prop, Max Blur, Blur limit, maximum CoC 
radius);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, rna_Node_update);

prop = RNA_def_property(srna, threshold, PROP_FLOAT, PROP_NONE);

Modified: 
trunk/blender/source/blender/nodes/composite/nodes/node_composite_defocus.c
===
--- trunk/blender/source/blender/nodes/composite/nodes/node_composite_defocus.c 
2012-05-21 20:28:54 UTC (rev 46860)
+++ trunk/blender/source/blender/nodes/composite/nodes/node_composite_defocus.c 
2012-05-21 20:36:02 UTC (rev 46861)
@@ -868,7 +868,7 @@
nbd-gamco = 0;
nbd-samples = 16;
nbd-fstop = 128.f;
-   nbd-maxblur = 0;
+   nbd-maxblur = 16;
nbd-bthresh = 1.f;
nbd-scale = 1.f;
nbd-no_zbuf = 1;

___
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 [46862] trunk/blender: Add input sample averaging to PaintStroke.

2012-05-21 Thread Nicholas Bishop
Revision: 46862
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46862
Author:   nicholasbishop
Date: 2012-05-21 23:32:46 + (Mon, 21 May 2012)
Log Message:
---
Add input sample averaging to PaintStroke.

Averages input samples to make the brush stroke smoother. Only mouse
location is averaged right now, not pressure/tilt/etc.

The DNA is in struct Paint.num_input_samples, RNA is
Paint.input_samples. In combination with PaintStroke usage this change
applies to sculpt, vpaint, and wpaint.

The range of useful values varies quite a bit depending on input
device; mouse needs higher values to match tablet pen, so set max
samples pretty high (64).

Release note section:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Sculpting#Input_Stroke_Averaging

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h
trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
trunk/blender/source/blender/makesdna/DNA_scene_types.h
trunk/blender/source/blender/makesrna/intern/rna_sculpt_paint.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py 
2012-05-21 20:36:02 UTC (rev 46861)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py 
2012-05-21 23:32:46 UTC (rev 46862)
@@ -873,6 +873,8 @@
 layout.prop(sculpt, show_brush)
 layout.prop(sculpt, use_deform_only)
 
+layout.prop(sculpt, input_samples)
+
 self.unified_paint_settings(layout, context)
 
 
@@ -984,6 +986,8 @@
 col.prop(mesh, use_mirror_x)
 col.prop(mesh, use_mirror_topology)
 
+col.prop(wpaint, input_samples)
+
 self.unified_paint_settings(col, context)
 
 # Commented out because the Apply button isn't an operator yet, making these 
settings useless
@@ -1014,6 +1018,8 @@
 col.prop(vpaint, use_normal)
 col.prop(vpaint, use_spray)
 
+col.prop(vpaint, input_samples)
+
 self.unified_paint_settings(col, context)
 
 # Commented out because the Apply button isn't an operator yet, making these 
settings useless

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===
--- trunk/blender/source/blender/blenloader/intern/readfile.c   2012-05-21 
20:36:02 UTC (rev 46861)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2012-05-21 
23:32:46 UTC (rev 46862)
@@ -4897,8 +4897,10 @@
 
 static void direct_link_paint(FileData *fd, Paint **paint)
 {
-/* TODO. is this needed */
+   /* TODO. is this needed */
(*paint) = newdataadr(fd, (*paint));
+   if (*paint  (*paint)-num_input_samples  1)
+   (*paint)-num_input_samples = 1;
 }
 
 static void direct_link_scene(FileData *fd, Scene *sce)

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h
===
--- trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h
2012-05-21 20:36:02 UTC (rev 46861)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h
2012-05-21 23:32:46 UTC (rev 46862)
@@ -52,7 +52,7 @@
 
 /* paint_stroke.c */
 typedef int (*StrokeGetLocation)(struct bContext *C, float location[3], float 
mouse[2]);
-typedef int (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, 
struct wmEvent *event);
+typedef int (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, 
const float mouse[2]);
 typedef void (*StrokeUpdateStep)(struct bContext *C, struct PaintStroke 
*stroke, struct PointerRNA *itemptr);
 typedef void (*StrokeDone)(const struct bContext *C, struct PaintStroke 
*stroke);
 

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
===
--- trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
2012-05-21 20:36:02 UTC (rev 46861)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
2012-05-21 23:32:46 UTC (rev 46862)
@@ -60,6 +60,12 @@
 #include float.h
 #include math.h
 
+typedef struct PaintSample {
+   float mouse[2];
+
+   /* TODO: other input properties, e.g. tablet pressure */
+} PaintSample;
+
 typedef struct PaintStroke {
void *mode_data;
void *smooth_stroke_cursor;
@@ -70,6 +76,12 @@
bglMats mats;
Brush *brush;
 
+   /* Paint stroke can use up to PAINT_MAX_INPUT_SAMPLES prior inputs
+* to smooth the stroke */
+   PaintSample 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46863] trunk/blender/source/blender/nodes /shader/nodes/node_shader_object_info.c: SVN maintenance.

2012-05-21 Thread gsr b3d
Revision: 46863
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46863
Author:   gsrb3d
Date: 2012-05-22 02:24:27 + (Tue, 22 May 2012)
Log Message:
---
SVN maintenance.

Property Changed:

trunk/blender/source/blender/nodes/shader/nodes/node_shader_object_info.c


Property changes on: 
trunk/blender/source/blender/nodes/shader/nodes/node_shader_object_info.c
___
Added: svn:eol-style
   + native

___
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 [46864] branches/soc-2012-swiss_cheese/ source/gameengine: Adding the start to an async option for bge.logic. LibLoad().

2012-05-21 Thread Mitchell Stokes
Revision: 46864
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=46864
Author:   moguri
Date: 2012-05-22 05:18:53 + (Tue, 22 May 2012)
Log Message:
---
Adding the start to an async option for bge.logic.LibLoad(). The basic 
threading works, but there are still some issues that need to be addressed:
  * Memory leaks when canceling a thread. I'll try to fix these with more 
cleanup callbacks like the one used in async_convert().
  * The user has no way of knowing when an asset has been loaded. I'm thinking 
some sort of Future object would work here.
  * Only works for scenes. It will be simple to support Mesh and Action as 
well, but I want to do it in a such a way as to minimize code duplication.

Modified Paths:
--

branches/soc-2012-swiss_cheese/source/gameengine/Converter/KX_BlenderSceneConverter.cpp

branches/soc-2012-swiss_cheese/source/gameengine/Converter/KX_BlenderSceneConverter.h
branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_ISceneConverter.h
branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/KX_PythonInit.cpp

Modified: 
branches/soc-2012-swiss_cheese/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
===
--- 
branches/soc-2012-swiss_cheese/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
 2012-05-22 02:24:27 UTC (rev 46863)
+++ 
branches/soc-2012-swiss_cheese/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
 2012-05-22 05:18:53 UTC (rev 46864)
@@ -112,6 +112,13 @@
#include ../../blender/blenlib/BLI_linklist.h
 }
 
+#include pthread.h
+
+/* This is used to avoid including pthread.h in KX_BlenderSceneConverter.h */
+typedef struct ThreadInfo {
+   vectorpthread_t threads;
+} ThreadInfo;
+
 KX_BlenderSceneConverter::KX_BlenderSceneConverter(
struct Main* maggie,
class KX_KetsjiEngine* 
engine
@@ -125,6 +132,7 @@
 {
tag_main(maggie, 0); /* avoid re-tagging later on */
m_newfilename = ;
+   m_threadinfo = new ThreadInfo();
 }
 
 
@@ -134,6 +142,12 @@
int i;
// delete sumoshapes

+   vectorpthread_t::iterator pit = m_threadinfo-threads.begin();
+   while (pit != m_threadinfo-threads.end()) {
+   pthread_cancel((*pit));
+   pthread_join((*pit), NULL);
+   pit++;
+   }
 
int numAdtLists = m_map_blender_to_gameAdtList.size();
for (i=0; inumAdtLists; i++) {
@@ -913,6 +927,67 @@
return NULL;
 }
 
+void KX_BlenderSceneConverter::MergeAsyncLoads()
+{
+   vectorpairKX_Scene*,KX_Scene* ::iterator sit;
+   for (sit=m_mergequeue.begin(); sit!=m_mergequeue.end(); ++sit)
+   {
+   printf(Merging scene: %s\n, 
(*sit).first-GetName().ReadPtr());
+   (*sit).first-MergeScene((*sit).second);
+   delete (*sit).second;
+   }
+
+   m_mergequeue.clear();
+}
+
+void KX_BlenderSceneConverter::AddScenesToMergeQueue(KX_Scene *merge_scene, 
KX_Scene *other)
+{
+   m_mergequeue.push_back(pairKX_Scene*,KX_Scene*(merge_scene, other));
+}
+
+typedef struct {KX_BlenderSceneConverter *converter; KX_Scene **scene; struct 
Main *maggie;} cleanup_args;
+void async_cleanup(void *ptr)
+{
+   cleanup_args *args = (cleanup_args*)ptr;
+   KX_Scene **scene = args-scene;
+   if (*scene)
+   {
+   delete *scene;
+   *scene = NULL;
+   }
+
+   args-converter-FreeBlendFile(args-maggie);
+
+   delete args;
+   printf(Cleanup called\n);
+}
+
+typedef struct {KX_BlenderSceneConverter *converter; KX_KetsjiEngine *engine; 
Scene *scene; struct Main *maggie; KX_Scene *merge_scene;} async_args;
+void *async_convert(void *ptr)
+{
+   int cleanedup=0;
+   KX_Scene *new_scene=NULL;
+   async_args *args = (async_args*)ptr;
+
+   cleanup_args *cargs = new cleanup_args();
+   cargs-converter = args-converter;
+   cargs-scene = new_scene;
+   cargs-maggie = args-maggie;
+
+   pthread_cleanup_push(async_cleanup, cargs);
+   pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
+   new_scene = args-engine-CreateScene(args-scene);
+
+   pthread_cleanup_pop(cleanedup);
+
+   if (new_scene)
+   args-converter-AddScenesToMergeQueue(args-merge_scene, 
new_scene);
+
+   delete args;
+   delete cargs;
+   return NULL;
+}
+
 bool KX_BlenderSceneConverter::LinkBlendFileMemory(void *data, int length, 
const char *path, char *group, KX_Scene *scene_merge, char **err_str, short 
options)
 {
BlendHandle *bpy_openlib = BLO_blendhandle_from_memory(data, length);
@@ -1037,12 +1112,27 @@
if (options  LIB_LOAD_VERBOSE)