[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47203] branches/soc-2011-tomato/source/ blender: mask object hide/reveal - access from H/Alt+H/ Shift+H and eye icon in listview.

2012-05-30 Thread Campbell Barton
Revision: 47203
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47203
Author:   campbellbarton
Date: 2012-05-30 06:07:26 + (Wed, 30 May 2012)
Log Message:
---
mask object hide/reveal - access from H/Alt+H/Shift+H and eye icon in listview.

added alpha setting though its not used for rendering yet.

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

branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
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
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/mask/mask_select.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h
branches/soc-2011-tomato/source/blender/makesrna/RNA_access.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-30 04:48:10 UTC (rev 47202)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-30 06:07:26 UTC (rev 47203)
@@ -94,9 +94,12 @@
 
mask-tot_maskobj++;
 
+   maskobj-alpha = 1.0f;
+
return maskobj;
 }
 
+/* note: may still be hidden, caller needs to check */
 MaskObject *BKE_mask_object_active(Mask *mask)
 {
return BLI_findlink(mask-maskobjs, mask-act_maskobj);
@@ -104,12 +107,7 @@
 
 void BKE_mask_object_active_set(Mask *mask, MaskObject *maskobj)
 {
-   int index = BLI_findindex(mask-maskobjs, maskobj);
-
-   if (index = 0)
-   mask-act_maskobj = index;
-   else
-   mask-act_maskobj = 0;
+   mask-act_maskobj = BLI_findindex(mask-maskobjs, maskobj);
 }
 
 void BKE_mask_object_remove(Mask *mask, MaskObject *maskobj)
@@ -1171,7 +1169,7 @@
spline-points_deform = 
MEM_mallocN(sizeof(*spline-points_deform) * spline-tot_point, __func__);
}
else {
-   printf(alloc spline done\n);
+   // printf(alloc spline done\n);
}
 }
 

Modified: 
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
===
--- 
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c 
2012-05-30 04:48:10 UTC (rev 47202)
+++ 
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c 
2012-05-30 06:07:26 UTC (rev 47203)
@@ -2241,7 +2241,19 @@
uiItemL(split, name, ICON_OBJECT_DATA);
}
}
+   else if (itemptr-type == RNA_MaskObject) {
+   split = uiLayoutSplit(sub, 0.5f, 0);
 
+   uiItemL(split, name, icon);
+
+   uiBlockSetEmboss(block, UI_EMBOSSN);
+   row = uiLayoutRow(split, 1);
+   uiItemR(row, itemptr, alpha, 0, , ICON_NONE);
+   uiItemR(row, itemptr, hide, 0, , 0);
+
+   uiBlockSetEmboss(block, UI_EMBOSS);
+   }
+
/* There is a last chance to display custom controls (in addition to 
the name/label):
 * If the given item property group features a string property named as 
prop_list,
 * this tries to add controls for all properties of the item listed in 
that string property.

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-30 04:48:10 UTC (rev 47202)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
2012-05-30 06:07:26 UTC (rev 47203)
@@ -267,10 +267,12 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskSpline *spline;
 
+   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
+   continue;
+   }
+
for (spline = maskobj-splines.first; spline; spline = 
spline-next) {
 
-// BKE_mask_spline_ensure_deform(spline);
-
/* draw curve itself first... */
draw_spline_curve(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  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47204] branches/soc-2011-tomato/source/ blender: circle select for mask view (Ckey)

2012-05-30 Thread Campbell Barton
Revision: 47204
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47204
Author:   campbellbarton
Date: 2012-05-30 06:33:44 + (Wed, 30 May 2012)
Log Message:
---
circle select for mask view (Ckey)

Modified Paths:
--
branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_select.c
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.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-30 06:07:26 UTC (rev 47203)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c  
2012-05-30 06:33:44 UTC (rev 47204)
@@ -202,6 +202,7 @@
WM_operatortype_append(MASK_OT_select_all);
WM_operatortype_append(MASK_OT_select_border);
WM_operatortype_append(MASK_OT_select_lasso);
+   WM_operatortype_append(MASK_OT_select_circle);
 
/* hide/reveal */
WM_operatortype_append(MASK_OT_hide_view_clear);
@@ -253,6 +254,7 @@
RNA_enum_set(kmi-ptr, action, SEL_INVERT);
 
WM_keymap_add_item(keymap, MASK_OT_select_border, BKEY, KM_PRESS, 0, 
0);
+   WM_keymap_add_item(keymap, MASK_OT_select_circle, CKEY, KM_PRESS, 0, 
0);
 
kmi = WM_keymap_add_item(keymap, MASK_OT_select_lasso, EVT_TWEAK_A, 
KM_ANY, KM_CTRL | KM_ALT, 0);
RNA_boolean_set(kmi-ptr, deselect, FALSE);

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_select.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_select.c  
2012-05-30 06:07:26 UTC (rev 47203)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_select.c  
2012-05-30 06:33:44 UTC (rev 47204)
@@ -145,15 +145,17 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskSpline *spline;
 
-   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
-   continue;
-   }
-
for (spline = maskobj-splines.first; spline; spline = 
spline-next) {
int i;
 
spline-flag = ~SELECT;
 
+   /* intentionally _dont_ do this in the maskobj loop
+* so we clear flags on all splines */
+   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
+   continue;
+   }
+
for (i = 0; i  spline-tot_point; i++) {
MaskSplinePoint *cur_point = spline-points[i];
 
@@ -373,6 +375,10 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskSpline *spline;
 
+   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
+   continue;
+   }
+
for (spline = maskobj-splines.first; spline; spline = 
spline-next) {
for (i = 0; i  spline-tot_point; i++) {
MaskSplinePoint *point = spline-points[i];
@@ -380,18 +386,16 @@
/* TODO: handles? */
/* TODO: uw? */
 
-   if (1) { /* can the point be selected? */
-   if (BLI_in_rctf(rectf, 
point-bezt.vec[1][0], point-bezt.vec[1][1])) {
-   
BKE_mask_point_select_set(point, mode == GESTURE_MODAL_SELECT);
-   
BKE_mask_point_select_set_handle(point, mode == GESTURE_MODAL_SELECT);
-   }
-   else if (!extend) {
-   
BKE_mask_point_select_set(point, FALSE);
-   
BKE_mask_point_select_set_handle(point, FALSE);
-   }
+   if (BLI_in_rctf(rectf, point-bezt.vec[1][0], 
point-bezt.vec[1][1])) {
+   BKE_mask_point_select_set(point, mode 
== GESTURE_MODAL_SELECT);
+   BKE_mask_point_select_set_handle(point, 
mode == GESTURE_MODAL_SELECT);
+   }
+   else if (!extend) {
+   BKE_mask_point_select_set(point, FALSE);
+   BKE_mask_point_select_set_handle(point, 
FALSE);
+   }
 
-   change = TRUE;
-   }
+   change = TRUE;
}
}
}
@@ -443,6 +447,10 @@
for (maskobj 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47205] trunk/blender/source/blender/ editors/object/object_edit.c: clear active object when hiding unselected objects too.

2012-05-30 Thread Campbell Barton
Revision: 47205
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47205
Author:   campbellbarton
Date: 2012-05-30 06:37:40 + (Wed, 30 May 2012)
Log Message:
---
clear active object when hiding unselected objects too.

Modified Paths:
--
trunk/blender/source/blender/editors/object/object_edit.c

Modified: trunk/blender/source/blender/editors/object/object_edit.c
===
--- trunk/blender/source/blender/editors/object/object_edit.c   2012-05-30 
06:33:44 UTC (rev 47204)
+++ trunk/blender/source/blender/editors/object/object_edit.c   2012-05-30 
06:37:40 UTC (rev 47205)
@@ -197,6 +197,9 @@
if (!(base-flag  SELECT)) {
base-object-restrictflag |= OB_RESTRICT_VIEW;
changed = 1;
+   if (base == BASACT) {
+   ED_base_object_activate(C, NULL);
+   }
}
}   
}

___
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 [47206] branches/soc-2011-tomato/source/ blender/editors/transform/transform_conversions.c: transform wasnt ignoring hidden maskobjects

2012-05-30 Thread Campbell Barton
Revision: 47206
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47206
Author:   campbellbarton
Date: 2012-05-30 06:42:03 + (Wed, 30 May 2012)
Log Message:
---
transform wasnt ignoring hidden maskobjects

Modified Paths:
--

branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c

Modified: 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
===
--- 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
   2012-05-30 06:37:40 UTC (rev 47205)
+++ 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
   2012-05-30 06:42:03 UTC (rev 47206)
@@ -5975,7 +5975,11 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskSpline *spline = maskobj-splines.first;
 
-   while (spline) {
+   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
+   continue;
+   }
+
+   for (spline = maskobj-splines.first; spline; spline = 
spline-next) {
int i;
 
for (i = 0; i  spline-tot_point; i++) {
@@ -5988,8 +5992,6 @@
t-total += 1;
}
}
-
-   spline = spline-next;
}
}
 
@@ -6008,7 +6010,11 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskSpline *spline = maskobj-splines.first;
 
-   while (spline) {
+   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
+   continue;
+   }
+
+   for (spline = maskobj-splines.first; spline; spline = 
spline-next) {
int i;
 
for (i = 0; i  spline-tot_point; i++) {
@@ -6029,8 +6035,6 @@
}
}
}
-
-   spline = spline-next;
}
}
 }

___
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 [47207] branches/soc-2011-tomato/source/ blender/editors: proportional editing for mask transform

2012-05-30 Thread Campbell Barton
Revision: 47207
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47207
Author:   campbellbarton
Date: 2012-05-30 07:15:09 + (Wed, 30 May 2012)
Log Message:
---
proportional editing for mask transform

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

branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c

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-30 06:42:03 UTC (rev 47206)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c 
2012-05-30 07:15:09 UTC (rev 47207)
@@ -52,6 +52,7 @@
 #include IMB_imbuf_types.h
 
 #include ED_mask.h
+#include ED_space_api.h
 #include ED_screen.h
 #include ED_clip.h
 #include ED_transform.h
@@ -1137,6 +1138,8 @@
 
ED_mask_draw((bContext *)C);
 
+   ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_VIEW);
+
glPopMatrix();
}
 

Modified: 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
===
--- 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
   2012-05-30 06:42:03 UTC (rev 47206)
+++ 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
   2012-05-30 07:15:09 UTC (rev 47207)
@@ -5885,17 +5885,19 @@
MaskSplinePoint *point;
 } TransDataMasking;
 
-static void MaskPointToTransData(SpaceClip *sc, MaskSplinePoint *point, 
TransData *td, TransData2D *td2d, TransDataMasking *tdm)
+static void MaskPointToTransData(SpaceClip *sc, MaskSplinePoint *point,
+ TransData *td, TransData2D *td2d, 
TransDataMasking *tdm, int propmode)
 {
BezTriple *bezt = point-bezt;
float aspx, aspy;
+   short is_sel_point = MASKPOINT_ISSEL(point);
 
tdm-point = point;
copy_m3_m3(tdm-vec, bezt-vec);
 
ED_space_clip_mask_aspect(sc, aspx, aspy);
 
-   if (MASKPOINT_CV_ISSEL(point)) {
+   if (propmode || is_sel_point) {
int i;
for (i = 0; i  3; i++) {
/* CV coords are scaled by aspects. this is needed for 
rotations and
@@ -5918,7 +5920,9 @@
td-ext= NULL;
td-val= NULL;
 
-   td-flag |= TD_SELECTED;
+   if (is_sel_point) {
+   td-flag |= TD_SELECTED;
+   }
td-dist= 0.0;
 
unit_m3(td-mtx);
@@ -5951,7 +5955,10 @@
td-ext= NULL;
td-val= NULL;
 
-   td-flag |= TD_SELECTED;
+   if (is_sel_point) {
+   td-flag |= TD_SELECTED;
+   }
+
td-dist= 0.0;
 
unit_m3(td-mtx);
@@ -5970,6 +5977,8 @@
TransData *td = NULL;
TransData2D *td2d = NULL;
TransDataMasking *tdm = NULL;
+   int count = 0, countsel = 0;
+   int propmode = t-flag  T_PROP_EDIT;
 
/* count */
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
@@ -5987,17 +5996,21 @@
 
if (MASKPOINT_ISSEL(point)) {
if (MASKPOINT_CV_ISSEL(point))
-   t-total += 3;
+   countsel += 3;
else
-   t-total += 1;
+   countsel += 1;
}
+
+   if (propmode)
+   count += 3;
}
}
}
 
-   if (t-total == 0)
-   return;
+   /* note: in prop mode we need at least 1 selected */
+   if (countsel == 0) return;
 
+   t-total = (propmode) ? count: countsel;
td = t-data = MEM_callocN(t-total*sizeof(TransData), 
TransObData(Mask Editing));
/* for each 2d uv coord a 3d vector is allocated, so that they can be
 * treated just as if they were 3d verts */
@@ -6020,10 +6033,10 @@
for (i = 0; i  spline-tot_point; i++) {
MaskSplinePoint *point = spline-points[i];
 
-   if (MASKPOINT_ISSEL(point)) {
-   MaskPointToTransData(sc, point, td, 
td2d, tdm);
+   if (propmode || MASKPOINT_ISSEL(point)) {
+   MaskPointToTransData(sc, point, td, 
td2d, tdm, propmode);
 
-   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47208] branches/soc-2011-tomato: proportional editing for masks

2012-05-30 Thread Campbell Barton
Revision: 47208
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47208
Author:   campbellbarton
Date: 2012-05-30 07:34:25 + (Wed, 30 May 2012)
Log Message:
---
proportional editing for masks

Modified Paths:
--
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-tomato/source/blender/editors/transform/transform.c

branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_scene_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
===
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
2012-05-30 07:15:09 UTC (rev 47207)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
2012-05-30 07:34:25 UTC (rev 47208)
@@ -75,8 +75,15 @@
 row.template_ID(sc, clip, open='clip.open')
 
 if sc.mode == 'MASKEDITING':
+toolsettings = context.tool_settings
+
 row = layout.row()
 row.template_ID(sc, mask, new=mask.new)
+
+row = layout.row(align=True)
+row.prop(toolsettings, use_proportional_edit_mask, text=, 
icon_only=True)
+if toolsettings.use_proportional_edit_objects:
+row.prop(toolsettings, proportional_edit_falloff, text=, 
icon_only=True)
 
 if clip:
 tracking = clip.tracking

Modified: branches/soc-2011-tomato/source/blender/editors/transform/transform.c
===
--- branches/soc-2011-tomato/source/blender/editors/transform/transform.c   
2012-05-30 07:15:09 UTC (rev 47207)
+++ branches/soc-2011-tomato/source/blender/editors/transform/transform.c   
2012-05-30 07:34:25 UTC (rev 47208)
@@ -1517,6 +1517,8 @@
{
if (t-obedit)
ts-proportional = proportional;
+   else if (t-options  CTX_MASK)
+   ts-proportional_mask = (proportional != 
PROP_EDIT_OFF);
else
ts-proportional_objects = (proportional != 
PROP_EDIT_OFF);
}
@@ -1650,13 +1652,8 @@
t-draw_handle_cursor = 
WM_paint_cursor_activate(CTX_wm_manager(C), helpline_poll, drawHelpline, t);
}
else if (t-spacetype == SPACE_CLIP) {
-   SpaceClip *sc = CTX_wm_space_clip(C);
unit_m3(t-spacemtx);
t-draw_handle_view = ED_region_draw_cb_activate(t-ar-type, 
drawTransformView, t, REGION_DRAW_POST_VIEW);
-   if (ED_space_clip_show_trackedit(sc))
-   t-options |= CTX_MOVIECLIP;
-   else if (ED_space_clip_show_maskedit(sc))
-   t-options |= CTX_MASK;
}
else
unit_m3(t-spacemtx);

Modified: 
branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c
===
--- 
branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c  
2012-05-30 07:15:09 UTC (rev 47207)
+++ 
branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c  
2012-05-30 07:34:25 UTC (rev 47208)
@@ -1127,6 +1127,11 @@
SpaceClip *sclip = sa-spacedata.first;
t-view = ar-v2d;
t-around = sclip-around;
+
+   if (ED_space_clip_show_trackedit(sclip))
+   t-options |= CTX_MOVIECLIP;
+   else if (ED_space_clip_show_maskedit(sclip))
+   t-options |= CTX_MASK;
}
else {
if (ar) {
@@ -1189,6 +1194,15 @@
t-flag |= 
T_PROP_CONNECTED;
}
}
+   else if (t-options  CTX_MASK) {
+   if (ts-proportional_mask) {
+   t-flag |= T_PROP_EDIT;
+
+   if (ts-proportional == 
PROP_EDIT_CONNECTED) {
+   t-flag |= 
T_PROP_CONNECTED;
+   }
+   }
+   }
else if (t-obedit == NULL  
ts-proportional_objects) {
t-flag |= T_PROP_EDIT;
}

Modified: 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47210] trunk/blender/source/blender/ editors: split up proportional editing keymap functions ( adding this in tomato branch was messy)

2012-05-30 Thread Campbell Barton
Revision: 47210
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47210
Author:   campbellbarton
Date: 2012-05-30 08:02:49 + (Wed, 30 May 2012)
Log Message:
---
split up proportional editing keymap functions (adding this in tomato branch 
was messy)

Modified Paths:
--
trunk/blender/source/blender/editors/curve/curve_ops.c
trunk/blender/source/blender/editors/include/ED_object.h
trunk/blender/source/blender/editors/mesh/mesh_ops.c
trunk/blender/source/blender/editors/metaball/mball_ops.c
trunk/blender/source/blender/editors/object/object_ops.c
trunk/blender/source/blender/editors/physics/physics_ops.c
trunk/blender/source/blender/editors/uvedit/uvedit_ops.c

Modified: trunk/blender/source/blender/editors/curve/curve_ops.c
===
--- trunk/blender/source/blender/editors/curve/curve_ops.c  2012-05-30 
07:38:33 UTC (rev 47209)
+++ trunk/blender/source/blender/editors/curve/curve_ops.c  2012-05-30 
08:02:49 UTC (rev 47210)
@@ -264,6 +264,7 @@
/* menus */
WM_keymap_add_menu(keymap, VIEW3D_MT_hook, HKEY, KM_PRESS, KM_CTRL, 
0);
 
-   ED_object_generic_keymap(keyconf, keymap, 3);
+   ED_keymap_proportional_cycle(keyconf, keymap);
+   ED_keymap_proportional_editmode(keyconf, keymap, TRUE);
 }
 

Modified: trunk/blender/source/blender/editors/include/ED_object.h
===
--- trunk/blender/source/blender/editors/include/ED_object.h2012-05-30 
07:38:33 UTC (rev 47209)
+++ trunk/blender/source/blender/editors/include/ED_object.h2012-05-30 
08:02:49 UTC (rev 47210)
@@ -88,14 +88,10 @@
 void ED_object_parent_clear(struct Object *ob, int type);
 struct Base *ED_object_scene_link(struct Scene *scene, struct Object *ob);
 
-/* generic editmode keys like pet
- * do_pet
- *  0: No
- *  1: Object
- *  2: Edit
- *  3: Edit with connected
- * */
-void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap 
*keymap, int do_pet);
+void ED_keymap_proportional_cycle(struct wmKeyConfig *keyconf, struct wmKeyMap 
*keymap);
+void ED_keymap_proportional_obmode(struct wmKeyConfig *keyconf, struct 
wmKeyMap *keymap);
+void ED_keymap_proportional_editmode(struct wmKeyConfig *keyconf, struct 
wmKeyMap *keymap,
+ const short do_connected);
 
 /* send your own notifier for select! */
 void ED_base_object_select(struct Base *base, short mode);

Modified: trunk/blender/source/blender/editors/mesh/mesh_ops.c
===
--- trunk/blender/source/blender/editors/mesh/mesh_ops.c2012-05-30 
07:38:33 UTC (rev 47209)
+++ trunk/blender/source/blender/editors/mesh/mesh_ops.c2012-05-30 
08:02:49 UTC (rev 47210)
@@ -376,7 +376,9 @@
RNA_int_set(kmi-ptr, level, i);
}

-   ED_object_generic_keymap(keyconf, keymap, 3);
+   ED_keymap_proportional_cycle(keyconf, keymap);
+   ED_keymap_proportional_editmode(keyconf, keymap, TRUE);
+
knifetool_modal_keymap(keyconf);
 }
 

Modified: trunk/blender/source/blender/editors/metaball/mball_ops.c
===
--- trunk/blender/source/blender/editors/metaball/mball_ops.c   2012-05-30 
07:38:33 UTC (rev 47209)
+++ trunk/blender/source/blender/editors/metaball/mball_ops.c   2012-05-30 
08:02:49 UTC (rev 47210)
@@ -79,6 +79,7 @@
kmi = WM_keymap_add_item(keymap, MBALL_OT_select_all, IKEY, KM_PRESS, 
KM_CTRL, 0);
RNA_enum_set(kmi-ptr, action, SEL_INVERT);
 
-   ED_object_generic_keymap(keyconf, keymap, 3);
+   ED_keymap_proportional_cycle(keyconf, keymap);
+   ED_keymap_proportional_editmode(keyconf, keymap, TRUE);
 }
 

Modified: trunk/blender/source/blender/editors/object/object_ops.c
===
--- trunk/blender/source/blender/editors/object/object_ops.c2012-05-30 
07:38:33 UTC (rev 47209)
+++ trunk/blender/source/blender/editors/object/object_ops.c2012-05-30 
08:02:49 UTC (rev 47210)
@@ -297,7 +297,8 @@
keymap-poll = object_mode_poll;

/* object mode supports PET now */
-   ED_object_generic_keymap(keyconf, keymap, 1);
+   ED_keymap_proportional_cycle(keyconf, keymap);
+   ED_keymap_proportional_obmode(keyconf, keymap);
 
WM_keymap_add_item(keymap, VIEW3D_OT_game_start, PKEY, KM_PRESS, 0, 
0);
 
@@ -420,41 +421,41 @@
/* menus */
WM_keymap_add_menu(keymap, VIEW3D_MT_hook, HKEY, KM_PRESS, KM_CTRL, 
0);
 
-   ED_object_generic_keymap(keyconf, keymap, 2);
+   ED_keymap_proportional_cycle(keyconf, keymap);
+   ED_keymap_proportional_editmode(keyconf, keymap, FALSE);
 }
 
-void ED_object_generic_keymap(struct wmKeyConfig *UNUSED(keyconf), struct 
wmKeyMap *keymap, int do_pet)
+void 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47211] branches/soc-2011-tomato: svn merge ^/trunk/blender -r47201:47210

2012-05-30 Thread Campbell Barton
Revision: 47211
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47211
Author:   campbellbarton
Date: 2012-05-30 08:04:06 + (Wed, 30 May 2012)
Log Message:
---
svn merge ^/trunk/blender -r47201:47210

Revision Links:
--

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

Modified Paths:
--
branches/soc-2011-tomato/source/blender/editors/curve/curve_ops.c
branches/soc-2011-tomato/source/blender/editors/include/ED_object.h
branches/soc-2011-tomato/source/blender/editors/mesh/mesh_ops.c
branches/soc-2011-tomato/source/blender/editors/metaball/mball_ops.c
branches/soc-2011-tomato/source/blender/editors/object/object_edit.c
branches/soc-2011-tomato/source/blender/editors/object/object_ops.c
branches/soc-2011-tomato/source/blender/editors/physics/physics_ops.c
branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_ops.c

Property Changed:

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


Property changes on: branches/soc-2011-tomato
___
Modified: svn:mergeinfo
   - 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47201
   + 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47210

Modified: branches/soc-2011-tomato/source/blender/editors/curve/curve_ops.c
===
--- branches/soc-2011-tomato/source/blender/editors/curve/curve_ops.c   
2012-05-30 08:02:49 UTC (rev 47210)
+++ branches/soc-2011-tomato/source/blender/editors/curve/curve_ops.c   
2012-05-30 08:04:06 UTC (rev 47211)
@@ -264,6 +264,7 @@
/* menus */
WM_keymap_add_menu(keymap, VIEW3D_MT_hook, HKEY, KM_PRESS, KM_CTRL, 
0);
 
-   ED_object_generic_keymap(keyconf, keymap, 3);
+   ED_keymap_proportional_cycle(keyconf, keymap);
+   ED_keymap_proportional_editmode(keyconf, keymap, TRUE);
 }
 

Modified: branches/soc-2011-tomato/source/blender/editors/include/ED_object.h
===
--- branches/soc-2011-tomato/source/blender/editors/include/ED_object.h 
2012-05-30 08:02:49 UTC (rev 47210)
+++ branches/soc-2011-tomato/source/blender/editors/include/ED_object.h 
2012-05-30 08:04:06 UTC (rev 47211)
@@ -88,14 +88,10 @@
 void ED_object_parent_clear(struct Object *ob, int type);
 struct Base *ED_object_scene_link(struct Scene *scene, struct Object *ob);
 
-/* generic editmode keys like pet
- * do_pet
- *  0: No
- *  1: Object
- *  2: Edit
- *  3: Edit with connected
- * */
-void ED_object_generic_keymap(struct wmKeyConfig *keyconf, struct wmKeyMap 
*keymap, int do_pet);
+void ED_keymap_proportional_cycle(struct wmKeyConfig *keyconf, struct wmKeyMap 
*keymap);
+void ED_keymap_proportional_obmode(struct wmKeyConfig *keyconf, struct 
wmKeyMap *keymap);
+void ED_keymap_proportional_editmode(struct wmKeyConfig *keyconf, struct 
wmKeyMap *keymap,
+ const short do_connected);
 
 /* send your own notifier for select! */
 void ED_base_object_select(struct Base *base, short mode);


Property changes on: 
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-47201
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47212] branches/soc-2011-tomato/source/ blender/editors: proportional editing keys now work when editing masks.

2012-05-30 Thread Campbell Barton
Revision: 47212
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47212
Author:   campbellbarton
Date: 2012-05-30 08:20:20 + (Wed, 30 May 2012)
Log Message:
---
proportional editing keys now work when editing masks.

Modified Paths:
--
branches/soc-2011-tomato/source/blender/editors/include/ED_object.h
branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c
branches/soc-2011-tomato/source/blender/editors/object/object_ops.c
branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c

Modified: branches/soc-2011-tomato/source/blender/editors/include/ED_object.h
===
--- branches/soc-2011-tomato/source/blender/editors/include/ED_object.h 
2012-05-30 08:04:06 UTC (rev 47211)
+++ branches/soc-2011-tomato/source/blender/editors/include/ED_object.h 
2012-05-30 08:20:20 UTC (rev 47212)
@@ -90,6 +90,7 @@
 
 void ED_keymap_proportional_cycle(struct wmKeyConfig *keyconf, struct wmKeyMap 
*keymap);
 void ED_keymap_proportional_obmode(struct wmKeyConfig *keyconf, struct 
wmKeyMap *keymap);
+void ED_keymap_proportional_maskmode(struct wmKeyConfig *keyconf, struct 
wmKeyMap *keymap);
 void ED_keymap_proportional_editmode(struct wmKeyConfig *keyconf, struct 
wmKeyMap *keymap,
  const short do_connected);
 

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-30 08:04:06 UTC (rev 47211)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_editor.c  
2012-05-30 08:20:20 UTC (rev 47212)
@@ -42,6 +42,7 @@
 
 #include ED_screen.h
 #include ED_mask.h
+#include ED_object.h /* ED_keymap_proportional_maskmode only */
 #include ED_clip.h
 #include ED_transform.h
 
@@ -232,6 +233,10 @@
 
WM_keymap_add_item(keymap, MASK_OT_new, NKEY, KM_PRESS, KM_ALT, 0);
 
+   /* mask mode supports PET now */
+   ED_keymap_proportional_cycle(keyconf, keymap);
+   ED_keymap_proportional_maskmode(keyconf, keymap);
+
/* geometry */
WM_keymap_add_item(keymap, MASK_OT_add_vertex_slide, LEFTMOUSE, 
KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, MASK_OT_add_feather_vertex_slide, 
LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);

Modified: branches/soc-2011-tomato/source/blender/editors/object/object_ops.c
===
--- branches/soc-2011-tomato/source/blender/editors/object/object_ops.c 
2012-05-30 08:04:06 UTC (rev 47211)
+++ branches/soc-2011-tomato/source/blender/editors/object/object_ops.c 
2012-05-30 08:20:20 UTC (rev 47212)
@@ -441,6 +441,14 @@
RNA_string_set(kmi-ptr, data_path, 
tool_settings.use_proportional_edit_objects);
 }
 
+void ED_keymap_proportional_maskmode(struct wmKeyConfig *UNUSED(keyconf), 
struct wmKeyMap *keymap)
+{
+   wmKeyMapItem *kmi;
+
+   kmi = WM_keymap_add_item(keymap, WM_OT_context_toggle, OKEY, 
KM_PRESS, 0, 0);
+   RNA_string_set(kmi-ptr, data_path, 
tool_settings.use_proportional_edit_mask);
+}
+
 void ED_keymap_proportional_editmode(struct wmKeyConfig *UNUSED(keyconf), 
struct wmKeyMap *keymap,
  const short do_connected)
 {

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-30 08:04:06 UTC (rev 47211)
+++ branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c 
2012-05-30 08:20:20 UTC (rev 47212)
@@ -1317,6 +1317,26 @@
ED_region_header(C, ar);
 }
 
+static void clip_header_area_listener(ARegion *ar, wmNotifier *wmn)
+{
+   /* context changes */
+   switch (wmn-category) {
+   case NC_SCENE:
+   switch (wmn-data) {
+   /* for proportional editmode only */
+   case ND_TOOLSETTINGS:
+   /* TODO - should do this when in mask 
mode only but no datas available */
+   // if(sc-mode == SC_MODE_MASKEDITING)
+   {
+   ED_region_tag_redraw(ar);
+   }
+   break;
+   }
+   break;
+   }
+}
+
+
 /** tools region **/
 
 /* add handlers, stuff you only do once or on area/region changes */
@@ -1478,6 +1498,7 @@
 
art-init = clip_header_area_init;
art-draw = clip_header_area_draw;
+   art-listener = clip_header_area_listener;
 
BLI_addhead(st-regiontypes, art);
 


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47213] trunk/blender/source/blender/ compositor/intern/COM_MemoryManagerState.cpp: fix incorrect delete usage in the compositor.

2012-05-30 Thread Campbell Barton
Revision: 47213
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47213
Author:   campbellbarton
Date: 2012-05-30 09:15:02 + (Wed, 30 May 2012)
Log Message:
---
fix incorrect delete usage in the compositor.

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

Modified: 
trunk/blender/source/blender/compositor/intern/COM_MemoryManagerState.cpp
===
--- trunk/blender/source/blender/compositor/intern/COM_MemoryManagerState.cpp   
2012-05-30 08:20:20 UTC (rev 47212)
+++ trunk/blender/source/blender/compositor/intern/COM_MemoryManagerState.cpp   
2012-05-30 09:15:02 UTC (rev 47213)
@@ -45,7 +45,7 @@
delete buffer;
}
}
-   delete this-chunkBuffers;
+   delete [] this-chunkBuffers;
BLI_mutex_end(this-mutex);
 }
 

___
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 [47214] trunk/blender/source/blender/ blenloader/intern/readfile.c: workaround for crash when rig library links dont load.

2012-05-30 Thread Campbell Barton
Revision: 47214
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47214
Author:   campbellbarton
Date: 2012-05-30 09:27:16 + (Wed, 30 May 2012)
Log Message:
---
workaround for crash when rig library links dont load. - will leak memory but 
better then crash.

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-30 
09:15:02 UTC (rev 47213)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c   2012-05-30 
09:27:16 UTC (rev 47214)
@@ -4051,7 +4051,16 @@
warn = 1;

if (ob-pose) {
+   /* we can't call #BKE_pose_free() here 
because of library linking
+* freeing will recurse down into every 
pose constraints ID pointers
+* which are not always valid, so for 
now free directly and suffer
+* some leaked memory rather then 
crashing immediately
+* while bad this _is_ an exceptional 
case - campbell */
+#if 0
BKE_pose_free(ob-pose);
+#else
+   MEM_freeN(ob-pose);
+#endif
ob-pose= NULL;
ob-mode = ~OB_MODE_POSE;
}

___
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 [47215] branches/soc-2011-tomato: svn merge ^/trunk/blender -r47210:47214

2012-05-30 Thread Campbell Barton
Revision: 47215
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47215
Author:   campbellbarton
Date: 2012-05-30 09:28:37 + (Wed, 30 May 2012)
Log Message:
---
svn merge ^/trunk/blender -r47210:47214

Revision Links:
--

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

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c

branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryManagerState.cpp

Property Changed:

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


Property changes on: branches/soc-2011-tomato
___
Modified: svn:mergeinfo
   - 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47210
   + 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47214

Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
2012-05-30 09:27:16 UTC (rev 47214)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
2012-05-30 09:28:37 UTC (rev 47215)
@@ -4052,7 +4052,16 @@
warn = 1;

if (ob-pose) {
+   /* we can't call #BKE_pose_free() here 
because of library linking
+* freeing will recurse down into every 
pose constraints ID pointers
+* which are not always valid, so for 
now free directly and suffer
+* some leaked memory rather then 
crashing immediately
+* while bad this _is_ an exceptional 
case - campbell */
+#if 0
BKE_pose_free(ob-pose);
+#else
+   MEM_freeN(ob-pose);
+#endif
ob-pose= NULL;
ob-mode = ~OB_MODE_POSE;
}

Modified: 
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryManagerState.cpp
===
--- 
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryManagerState.cpp
2012-05-30 09:27:16 UTC (rev 47214)
+++ 
branches/soc-2011-tomato/source/blender/compositor/intern/COM_MemoryManagerState.cpp
2012-05-30 09:28:37 UTC (rev 47215)
@@ -45,7 +45,7 @@
delete buffer;
}
}
-   delete this-chunkBuffers;
+   delete [] this-chunkBuffers;
BLI_mutex_end(this-mutex);
 }
 


Property changes on: 
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-47210
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47216] branches/soc-2011-tomato/intern/ raskter/raskter.c: make rasterizer thread safe.

2012-05-30 Thread Campbell Barton
Revision: 47216
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47216
Author:   campbellbarton
Date: 2012-05-30 10:24:34 + (Wed, 30 May 2012)
Log Message:
---
make rasterizer thread safe.

Modified Paths:
--
branches/soc-2011-tomato/intern/raskter/raskter.c

Modified: branches/soc-2011-tomato/intern/raskter/raskter.c
===
--- branches/soc-2011-tomato/intern/raskter/raskter.c   2012-05-30 09:28:37 UTC 
(rev 47215)
+++ branches/soc-2011-tomato/intern/raskter/raskter.c   2012-05-30 10:24:34 UTC 
(rev 47216)
@@ -55,8 +55,11 @@
int sizey;
 };
 
-static struct e_status *all_edges, *possible_edges;
-static struct r_buffer_stats rb;
+struct r_fill_context {
+   struct e_status *all_edges, *possible_edges;
+   struct r_buffer_stats rb;
+};
+
 /*
  * Sort all the edges of the input polygon by Y, then by X, of the first 
vertex encountered.
  * This will ensure we can scan convert the entire poly in one pass.
@@ -65,7 +68,7 @@
  * just the poly. Since the DEM code could end up being coupled with this, 
we'll keep it separate
  * for now.
  */
-static void preprocess_all_edges(struct poly_vert *verts, int num_verts, 
struct e_status *open_edge)
+static void preprocess_all_edges(struct r_fill_context *ctx, struct poly_vert 
*verts, int num_verts, struct e_status *open_edge)
 {
int i;
int xbeg;
@@ -82,7 +85,7 @@
struct poly_vert *v;
/* set up pointers */
v = verts;
-   all_edges = NULL;
+   ctx-all_edges = NULL;
/* loop all verts */
for (i = 0; i  num_verts; i++) {
/* determine beginnings and endings of edges, linking last 
vertex to first vertex */
@@ -148,7 +151,7 @@
e_new-drift_inc = xdist % dy;
e_new-xshift = (xdist / dy) * e_new-xdir;
}
-   next_edge_ref = all_edges;
+   next_edge_ref = ctx-all_edges;
/* link in all the edges, in sorted order */
for (;; ) {
next_edge = *next_edge_ref;
@@ -168,7 +171,7 @@
  * for speed, but waiting on final design choices for curve-data before 
eliminating data the DEM code will need
  * if it ends up being coupled with this function.
  */
-int rast_scan_fill(struct poly_vert *verts, int num_verts)
+int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, int 
num_verts)
 {
int x_curr; /* current pixel position in X */
int y_curr; /* current scan line being drawn */
@@ -208,13 +211,13 @@
 * Do some preprocessing on all edges. This constructs a table 
structure in memory of all
 * the edge properties and can flip some edges so sorting works 
correctly.
 */
-   preprocess_all_edges(verts, num_verts, edgbuf);
+   preprocess_all_edges(ctx, verts, num_verts, edgbuf);
 
/*
 * Set the pointer for tracking the edges currently in processing to 
NULL to make sure
 * we don't get some crazy value after initialization.
 */
-   possible_edges = NULL;
+   ctx-possible_edges = NULL;
 
/*
 * Loop through all scan lines to be drawn. Since we sorted by Y values 
during
@@ -229,7 +232,7 @@
 * TODO: This clips Y to the frame buffer, which should be done in the 
preprocessor, but for now is done here.
 *   Will get changed once DEM code gets in.
 */
-   for (y_curr = MAX2(all_edges-ybeg, 0); (all_edges || possible_edges) 
 (y_curr  rb.sizey); y_curr++) {
+   for (y_curr = MAX2(ctx-all_edges-ybeg, 0); (ctx-all_edges || 
ctx-possible_edges)  (y_curr  ctx-rb.sizey); y_curr++) {
 
/*
 * Link any edges that start on the current scan line into the 
list of
@@ -246,16 +249,16 @@
 *
 * At each iteration, make sure we still have a non-NULL edge.
 */
-   for (edgec = possible_edges; all_edges  (all_edges-ybeg == 
y_curr); ) {
-   x_curr = all_edges-x;   /* Set 
current X position. */
+   for (edgec = ctx-possible_edges; ctx-all_edges  
(ctx-all_edges-ybeg == y_curr); ) {
+   x_curr = ctx-all_edges-x;  /* Set 
current X position. */
for (;; ) {  /* Start 
looping edges. Will break when edges run out. */
e_curr = *edgec; /* Set 
up a current edge pointer. */
if (!e_curr || (e_curr-x = x_curr)) {  /* If 
we have an no edge, or we need to skip some X-span, */
-   e_temp = all_edges-e_next;  /* 
set a temp next edge to test. */
-

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47217] branches/soc-2011-tomato/source/ blender: rename macros for mask point selection - were a bit confusing.

2012-05-30 Thread Campbell Barton
Revision: 47217
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47217
Author:   campbellbarton
Date: 2012-05-30 11:52:44 + (Wed, 30 May 2012)
Log Message:
---
rename macros for mask point selection - were a bit confusing.

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
branches/soc-2011-tomato/source/blender/blenkernel/intern/curve.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.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/mask/mask_select.c

branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
===
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h   
2012-05-30 10:24:34 UTC (rev 47216)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h   
2012-05-30 11:52:44 UTC (rev 47217)
@@ -135,16 +135,16 @@
 /* rasterization */
 void BKE_mask_rasterize(struct Mask *mask, int width, int height, float 
*buffer);
 
-#define MASKPOINT_ISSEL(p)  ( ((p)-bezt.f1 | (p)-bezt.f2 | (p)-bezt.f2)  
SELECT)
-#define MASKPOINT_SEL(p){ (p)-bezt.f1 |=  SELECT; (p)-bezt.f2 |=  
SELECT; (p)-bezt.f3 |=  SELECT; } (void)0
-#define MASKPOINT_DESEL(p)  { (p)-bezt.f1 = ~SELECT; (p)-bezt.f2 = 
~SELECT; (p)-bezt.f3 = ~SELECT; } (void)0
-#define MASKPOINT_INVSEL(p) { (p)-bezt.f1 ^=  SELECT; (p)-bezt.f2 ^=  
SELECT; (p)-bezt.f3 ^=  SELECT; } (void)0
+#define MASKPOINT_ISSEL_ANY(p)  ( ((p)-bezt.f1 | (p)-bezt.f2 | 
(p)-bezt.f2)  SELECT)
+#define MASKPOINT_ISSEL_KNOT(p) ( (p)-bezt.f2  SELECT)
+#define MASKPOINT_ISSEL_HANDLE_ONLY(p)  ( (((p)-bezt.f1 | (p)-bezt.f2)  
SELECT)  (((p)-bezt.f2  SELECT) == 0) )
+#define MASKPOINT_ISSEL_HANDLE(p)   ( (((p)-bezt.f1 | (p)-bezt.f2)  
SELECT) )
 
-#define MASKPOINT_CV_ISSEL(p)   ( (p)-bezt.f2  SELECT)
+#define MASKPOINT_SEL_ALL(p){ (p)-bezt.f1 |=  SELECT; (p)-bezt.f2 |=  
SELECT; (p)-bezt.f3 |=  SELECT; } (void)0
+#define MASKPOINT_DESEL_ALL(p)  { (p)-bezt.f1 = ~SELECT; (p)-bezt.f2 = 
~SELECT; (p)-bezt.f3 = ~SELECT; } (void)0
+#define MASKPOINT_INVSEL_ALL(p) { (p)-bezt.f1 ^=  SELECT; (p)-bezt.f2 ^=  
SELECT; (p)-bezt.f3 ^=  SELECT; } (void)0
 
-#define MASKPOINT_HANDLE_ONLY_ISSEL(p)  ( (((p)-bezt.f1 | (p)-bezt.f2)  
SELECT)  (((p)-bezt.f2  SELECT) == 0) )
-#define MASKPOINT_HANDLE_ISSEL(p)   ( (((p)-bezt.f1 | (p)-bezt.f2)  SELECT) 
)
-#define MASKPOINT_HANDLE_SEL(p) { (p)-bezt.f1 |=  SELECT; (p)-bezt.f3 |= 
 SELECT; } (void)0
-#define MASKPOINT_HANDLE_DESEL(p)   { (p)-bezt.f1 = ~SELECT; (p)-bezt.f3 = 
~SELECT; } (void)0
+#define MASKPOINT_SEL_HANDLE(p) { (p)-bezt.f1 |=  SELECT; (p)-bezt.f3 |= 
 SELECT; } (void)0
+#define MASKPOINT_DESEL_HANDLE(p)   { (p)-bezt.f1 = ~SELECT; (p)-bezt.f3 = 
~SELECT; } (void)0
 
 #endif

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/curve.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/curve.c   
2012-05-30 10:24:34 UTC (rev 47216)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/curve.c   
2012-05-30 11:52:44 UTC (rev 47217)
@@ -3200,8 +3200,7 @@
else {
BPoint *bp = nu-bp;
 
-   for (i = 0; i  nu-pntsu * nu-pntsv; i++, bp++) {
-   copy_v3_v3(co, bp-vec); co += 3;
+   for (i = 0; i  nu-pntsu * nu-pntsv; i++, bp++) { 
copy_v3_v3(co, bp-vec); co += 3;
}
}
}

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-30 10:24:34 UTC (rev 47216)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-30 11:52:44 UTC (rev 47217)
@@ -655,10 +655,10 @@
int i;
 
if (select) {
-   MASKPOINT_SEL(point);
+   MASKPOINT_SEL_ALL(point);
}
else {
-   MASKPOINT_DESEL(point);
+   MASKPOINT_DESEL_ALL(point);
}
 
for (i = 0; i  point-tot_uw; i++) {
@@ -674,10 +674,10 @@
 void BKE_mask_point_select_set_handle(MaskSplinePoint *point, int select)
 {
if (select) {
-   MASKPOINT_HANDLE_SEL(point);
+   MASKPOINT_SEL_HANDLE(point);
}
else {
-   MASKPOINT_HANDLE_DESEL(point);
+   MASKPOINT_DESEL_HANDLE(point);
}
 }
 

Modified: 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47218] branches/soc-2011-tomato/source/ blender/editors/transform/transform_conversions.c: fix for mask transform in non proportional mode.

2012-05-30 Thread Campbell Barton
Revision: 47218
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47218
Author:   campbellbarton
Date: 2012-05-30 12:08:08 + (Wed, 30 May 2012)
Log Message:
---
fix for mask transform in non proportional mode.

Modified Paths:
--

branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c

Modified: 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
===
--- 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
   2012-05-30 11:52:44 UTC (rev 47217)
+++ 
branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
   2012-05-30 12:08:08 UTC (rev 47218)
@@ -5890,7 +5890,8 @@
 {
BezTriple *bezt = point-bezt;
float aspx, aspy;
-   short is_sel_point = MASKPOINT_ISSEL_ANY(point);
+   short is_sel_point = MASKPOINT_ISSEL_KNOT(point);
+   short is_sel_any = MASKPOINT_ISSEL_ANY(point);
 
tdm-point = point;
copy_m3_m3(tdm-vec, bezt-vec);
@@ -5920,7 +5921,7 @@
td-ext= NULL;
td-val= NULL;
 
-   if (is_sel_point) {
+   if (is_sel_any) {
td-flag |= TD_SELECTED;
}
td-dist= 0.0;
@@ -5955,7 +5956,7 @@
td-ext= NULL;
td-val= NULL;
 
-   if (is_sel_point) {
+   if (is_sel_any) {
td-flag |= TD_SELECTED;
}
 

___
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 [47219] trunk/blender/source/blender: Provide ray hit/nearest information on which side of the quad the ray hit.

2012-05-30 Thread Daniel Genrich
Revision: 47219
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47219
Author:   genscher
Date: 2012-05-30 12:53:13 + (Wed, 30 May 2012)
Log Message:
---
Provide ray hit/nearest information on which side of the quad the ray hit.

Patch by MiikaH.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/bvhutils.c
trunk/blender/source/blender/blenlib/BLI_kdopbvh.h

Modified: trunk/blender/source/blender/blenkernel/intern/bvhutils.c
===
--- trunk/blender/source/blender/blenkernel/intern/bvhutils.c   2012-05-30 
12:08:08 UTC (rev 47218)
+++ trunk/blender/source/blender/blenkernel/intern/bvhutils.c   2012-05-30 
12:53:13 UTC (rev 47219)
@@ -383,6 +383,9 @@
nearest-dist = dist;
copy_v3_v3(nearest-co, nearest_tmp);
normal_tri_v3(nearest-no, t0, t1, t2);
+
+   if (t1 == vert[face-v3].co)
+   nearest-flags |= BVH_ONQUAD;
}
 
t1 = t2;
@@ -420,6 +423,9 @@
madd_v3_v3v3fl(hit-co, ray-origin, ray-direction, 
dist);
 
normal_tri_v3(hit-no, t0, t1, t2);
+
+   if (t1 == vert[face-v3].co)
+   hit-flags |= BVH_ONQUAD;
}
 
t1 = t2;

Modified: trunk/blender/source/blender/blenlib/BLI_kdopbvh.h
===
--- trunk/blender/source/blender/blenlib/BLI_kdopbvh.h  2012-05-30 12:08:08 UTC 
(rev 47218)
+++ trunk/blender/source/blender/blenlib/BLI_kdopbvh.h  2012-05-30 12:53:13 UTC 
(rev 47219)
@@ -49,11 +49,15 @@
int indexB;
 } BVHTreeOverlap;
 
+/* flags */
+#define BVH_ONQUAD (10)
+
 typedef struct BVHTreeNearest {
int index;  /* the index of the nearest found (untouched if 
none is found within a dist radius from the given coordinates) */
float co[3];/* nearest coordinates (untouched it none is found 
within a dist radius from the given coordinates) */
float no[3];/* normal at nearest coordinates (untouched it none 
is found within a dist radius from the given coordinates) */
float dist; /* squared distance to search arround */
+   int flags;
 } BVHTreeNearest;
 
 typedef struct BVHTreeRay {
@@ -67,6 +71,7 @@
float co[3];/* coordinates of the hit point */
float no[3];/* normal on hit point */
float dist; /* distance to the hit point */
+   int flags;
 } BVHTreeRayHit;
 
 /* callback must update nearest in case it finds a nearest result */

___
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 [47220] branches/soc-2011-tomato/source/ blender/editors: impliment restrict select option.

2012-05-30 Thread Campbell Barton
Revision: 47220
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47220
Author:   campbellbarton
Date: 2012-05-30 12:54:50 + (Wed, 30 May 2012)
Log Message:
---
impliment restrict select option.

Modified Paths:
--

branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.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/mask/mask_select.c
branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c

branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c

Modified: 
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
===
--- 
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c 
2012-05-30 12:53:13 UTC (rev 47219)
+++ 
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c 
2012-05-30 12:54:50 UTC (rev 47220)
@@ -2242,14 +2242,15 @@
}
}
else if (itemptr-type == RNA_MaskObject) {
-   split = uiLayoutSplit(sub, 0.5f, 0);
+   split = uiLayoutSplit(sub, 0.66f, 0);
 
uiItemL(split, name, icon);
 
uiBlockSetEmboss(block, UI_EMBOSSN);
row = uiLayoutRow(split, 1);
-   uiItemR(row, itemptr, alpha, 0, , ICON_NONE);
+   // uiItemR(row, itemptr, alpha, 0, , ICON_NONE); // enable 
when used
uiItemR(row, itemptr, hide, 0, , 0);
+   uiItemR(row, itemptr, hide_select, 0, , 0);
 
uiBlockSetEmboss(block, UI_EMBOSS);
}

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-30 12:53:13 UTC (rev 47219)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
2012-05-30 12:54:50 UTC (rev 47220)
@@ -51,7 +51,7 @@
 
 static void set_spline_color(MaskObject *maskobj, MaskSpline *spline)
 {
-   if (spline-flag  SELECT) {
+   if ((spline-flag  SELECT)  (maskobj-restrictflag  
MASK_RESTRICT_SELECT) == 0) {
if (maskobj-act_spline == spline)
glColor3f(1.0f, 1.0f, 1.0f);
else
@@ -246,7 +246,7 @@
feather_points = BKE_mask_spline_feather_differentiated_points(spline, 
tot_feather_point);
 
/* draw feather */
-   if (spline-flag  SELECT)
+   if ((spline-flag  SELECT)  (maskobj-restrictflag  
MASK_RESTRICT_SELECT) == 0)
glColor3f(0.0f, 1.0f, 0.0f);
else
glColor3f(0.0f, 0.5f, 0.0f);
@@ -278,8 +278,10 @@
 
 // draw_spline_parents(maskobj, spline);
 
-   /* ...and then handles over the curve so they're nicely 
visible */
-   draw_spline_points(maskobj, spline);
+   if (!(maskobj-restrictflag  MASK_RESTRICT_SELECT)) {
+   /* ...and then handles over the curve so 
they're nicely visible */
+   draw_spline_points(maskobj, spline);
+   }
 
/* show undeform for testing */
if (0) {

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-30 12:53:13 UTC (rev 47219)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c 
2012-05-30 12:54:50 UTC (rev 47220)
@@ -143,7 +143,7 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskSpline *spline;
 
-   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
+   if (maskobj-restrictflag  (MASK_RESTRICT_VIEW | 
MASK_RESTRICT_SELECT)) {
continue;
}
 
@@ -245,7 +245,7 @@
int i, tot_feather_point;
float *feather_points, *fp;
 
-   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
+   if (maskobj-restrictflag  (MASK_RESTRICT_VIEW | 
MASK_RESTRICT_SELECT)) {
continue;
}
 
@@ -336,7 +336,7 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskSpline *spline;
 
-   if (maskobj-restrictflag  MASK_RESTRICT_VIEW) {
+   if (maskobj-restrictflag  (MASK_RESTRICT_VIEW | 
MASK_RESTRICT_SELECT)) {
continue;
}
 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47221] trunk/blender/source/blender/ compositor/operations/COM_CompositorOperation.cpp: * fixed memory leak in compositor operation.

2012-05-30 Thread Jeroen Bakker
Revision: 47221
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47221
Author:   jbakker
Date: 2012-05-30 13:07:55 + (Wed, 30 May 2012)
Log Message:
---
 * fixed memory leak in compositor operation.
   - leaked when render result could not be received.

Modified Paths:
--

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

Modified: 
trunk/blender/source/blender/compositor/operations/COM_CompositorOperation.cpp
===
--- 
trunk/blender/source/blender/compositor/operations/COM_CompositorOperation.cpp  
2012-05-30 12:54:50 UTC (rev 47220)
+++ 
trunk/blender/source/blender/compositor/operations/COM_CompositorOperation.cpp  
2012-05-30 13:07:55 UTC (rev 47221)
@@ -68,6 +68,10 @@
MEM_freeN(rr-rectf);
}
rr-rectf = outputBuffer;
+   } else {
+   if (this-outputBuffer) {
+   MEM_freeN(this-outputBuffer);
+   }
}
if (re) {
RE_ReleaseResult(re);

___
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 [47222] branches/soc-2011-tomato/source/ blender/editors/mask/mask_ops.c: fix for own mistake

2012-05-30 Thread Campbell Barton
Revision: 47222
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47222
Author:   campbellbarton
Date: 2012-05-30 13:21:13 + (Wed, 30 May 2012)
Log Message:
---
fix for own mistake

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

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-30 13:07:55 UTC (rev 47221)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c 
2012-05-30 13:21:13 UTC (rev 47222)
@@ -1210,7 +1210,7 @@
 
maskobj = BKE_mask_object_active(mask);
 
-   if (maskobj-restrictflag  (MASK_RESTRICT_VIEW | 
MASK_RESTRICT_SELECT)) {
+   if (maskobj  maskobj-restrictflag  (MASK_RESTRICT_VIEW | 
MASK_RESTRICT_SELECT)) {
maskobj = NULL;
}
 

___
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 [47223] branches/soc-2012-bratwurst/source /blender/editors/transform: UV transform correction tool

2012-05-30 Thread Antony Riakiotakis
Revision: 47223
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47223
Author:   psy-fi
Date: 2012-05-30 13:22:51 + (Wed, 30 May 2012)
Log Message:
---
UV transform correction tool
=
Commit work so far to have a stable backup where I
can diff against. The first part of the tool should be finished but
the code is disabled because i get crashes. I expect that when I resolve
the crashes I will at least have a working tool for uvs that do not
reside on stitches. Due to my misdesigning the tool I didn't account for
that but it will be added later, plus it will be a good test to see if
the principle works.

Modified Paths:
--
branches/soc-2012-bratwurst/source/blender/editors/transform/transform.c
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.c
===
--- branches/soc-2012-bratwurst/source/blender/editors/transform/transform.c
2012-05-30 13:21:13 UTC (rev 47222)
+++ branches/soc-2012-bratwurst/source/blender/editors/transform/transform.c
2012-05-30 13:22:51 UTC (rev 47223)
@@ -1820,10 +1820,8 @@
 * apply funtion */
if(t-flag  T_IMAGE_PRESERVE_CALC) {
/* can be invalidated if for instance we change the radius of 
proportional editing */
-   if(!t-uvtc-init)
-   calculateUVTransformCorrection(t);
-
-   //ED
+   //if(!t-uvtc-init)
+   //calculateUVTransformCorrection(t);
}
 
/* If auto confirm is on, break after one pass */

Modified: 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform.h
===
--- branches/soc-2012-bratwurst/source/blender/editors/transform/transform.h
2012-05-30 13:21:13 UTC (rev 47222)
+++ branches/soc-2012-bratwurst/source/blender/editors/transform/transform.h
2012-05-30 13:22:51 UTC (rev 47223)
@@ -221,13 +221,23 @@
int curr_sv_index;
 } SlideData;
 
+
+typedef struct UVTransCorrInfoUV {
+   float init_uv[2]; /* initial uv value */
+   float *uv; /* pointer to the corresponding luv-uv */
+   struct UVTransCorrInfoUV *next; /* next uv for same vertex */
+}UVTransCorrInfoUV;
+
 /* unwrap transform correction structure, will contain mesh elements that will 
be used for unwrapping */
 typedef struct UVTransCorrect {
-   struct BMEdge **boundary_edges;
-   struct BMFace **unwrapped_faces;
+// struct BMEdge **boundary_edges;
+// struct BMFace **unwrapped_faces;
struct BMVert **affected_verts;
-   int num_boundary_edges;
-   int num_unwrapped_faces;
+   UVTransCorrInfoUV **initial_uvs;
+   int *vert_indices;
+// int total_boundary_edges;
+// int total_unwrapped_faces;
+   int total_verts;
char init;
 } UVTransCorrect;
 

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-30 13:21:13 UTC (rev 47222)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_conversions.c
2012-05-30 13:22:51 UTC (rev 47223)
@@ -1940,7 +1940,10 @@
BMEditMesh *em = BMEdit_FromObject(t-obedit);
BMesh *bm = em-bm;
BMVert *eve, **affected_verts;
+   UVTransCorrect *uvtc;
+   UVTransCorrInfoUV **initial_uvs;
BMIter iter;
+   BMLoop *l;
BMVert *eve_act = NULL;
float *mappedcos = NULL, *quats= NULL;
float mtx[3][3], smtx[3][3], (*defmats)[3][3] = NULL, (*defcos)[3] = 
NULL;
@@ -2043,8 +2046,17 @@
 
/* now we need to allocate store for affected verts if we do maintain 
image */
if(t-flag  T_IMAGE_PRESERVE_CALC) {
-   t-uvtc = MEM_callocN(sizeof(*t-uvtc), UVTransformCorrect);
-   t-uvtc-affected_verts = affected_verts = MEM_mallocN(t-total 
* sizeof(*t-uvtc-affected_verts), BMVert Map);
+   int duck;
+   uvtc = t-uvtc = MEM_callocN(sizeof(*t-uvtc), 
UVTransformCorrect);
+   uvtc-affected_verts = affected_verts = MEM_mallocN(t-total * 
sizeof(*t-uvtc-affected_verts), uvtc_verts);
+   uvtc-initial_uvs = initial_uvs = MEM_mallocN(bm-totvert * 
sizeof(*t-uvtc-initial_uvs), uvtc_inituvs);
+   uvtc-vert_indices = MEM_mallocN(bm-totvert * 
sizeof(*t-uvtc-vert_indices), uvtc_indices);
+   uvtc-total_verts = bm-totvert;
+   duck = bm-totvert * 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47224] branches/soc-2011-tomato/source/ blender/editors/mask/mask_shapekey.c: only keyframe selected maskobjects

2012-05-30 Thread Campbell Barton
Revision: 47224
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47224
Author:   campbellbarton
Date: 2012-05-30 13:46:44 + (Wed, 30 May 2012)
Log Message:
---
only keyframe selected maskobjects

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

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
===
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
2012-05-30 13:22:51 UTC (rev 47223)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_shapekey.c
2012-05-30 13:46:44 UTC (rev 47224)
@@ -67,7 +67,7 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskObjectShape *maskobj_shape;
 
-   if (maskobj-restrictflag  (MASK_RESTRICT_VIEW | 
MASK_RESTRICT_SELECT)) {
+   if (!ED_mask_object_select_check(maskobj)) {
continue;
}
 
@@ -113,7 +113,7 @@
for (maskobj = mask-maskobjs.first; maskobj; maskobj = maskobj-next) {
MaskObjectShape *maskobj_shape;
 
-   if (maskobj-restrictflag  (MASK_RESTRICT_VIEW | 
MASK_RESTRICT_SELECT)) {
+   if (!ED_mask_object_select_check(maskobj)) {
continue;
}
 

___
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 [47225] branches/soc-2012-bratwurst/source /blender/editors/transform: UV transform correction tool

2012-05-30 Thread Antony Riakiotakis
Revision: 47225
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47225
Author:   psy-fi
Date: 2012-05-30 14:24:33 + (Wed, 30 May 2012)
Log Message:
---
UV transform correction tool

*Fixed crashers due to wrong indices (been there, done that) and enabled
tool.
*Uvs get modified but result is wrong. Investigating.

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

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.c
===
--- branches/soc-2012-bratwurst/source/blender/editors/transform/transform.c
2012-05-30 13:46:44 UTC (rev 47224)
+++ branches/soc-2012-bratwurst/source/blender/editors/transform/transform.c
2012-05-30 14:24:33 UTC (rev 47225)
@@ -1821,7 +1821,7 @@
if(t-flag  T_IMAGE_PRESERVE_CALC) {
/* can be invalidated if for instance we change the radius of 
proportional editing */
//if(!t-uvtc-init)
-   //calculateUVTransformCorrection(t);
+   calculateUVTransformCorrection(t);
}
 
/* If auto confirm is on, break after one pass */

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-30 13:46:44 UTC (rev 47224)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_conversions.c
2012-05-30 14:24:33 UTC (rev 47225)
@@ -2046,17 +2046,12 @@
 
/* now we need to allocate store for affected verts if we do maintain 
image */
if(t-flag  T_IMAGE_PRESERVE_CALC) {
-   int duck;
uvtc = t-uvtc = MEM_callocN(sizeof(*t-uvtc), 
UVTransformCorrect);
uvtc-affected_verts = affected_verts = MEM_mallocN(t-total * 
sizeof(*t-uvtc-affected_verts), uvtc_verts);
uvtc-initial_uvs = initial_uvs = MEM_mallocN(bm-totvert * 
sizeof(*t-uvtc-initial_uvs), uvtc_inituvs);
uvtc-vert_indices = MEM_mallocN(bm-totvert * 
sizeof(*t-uvtc-vert_indices), uvtc_indices);
uvtc-total_verts = bm-totvert;
-   duck = bm-totvert * sizeof(*t-uvtc-initial_uvs);
BM_mesh_elem_index_ensure(bm, BM_VERT);
-
-   if(!uvtc-initial_uvs || !uvtc-vert_indices)
-   printf(skata sta moutra sou);
}
 
tob= t-data= MEM_callocN(t-total*sizeof(TransData), TransObData(Mesh 
EditMode));

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-30 13:46:44 UTC (rev 47224)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
   2012-05-30 14:24:33 UTC (rev 47225)
@@ -1687,10 +1687,10 @@
if(index_other == -1) {
/* get BMvert coords since the vertex 
hasn't changed */
sub_v3_v3v3(edge_vec_init, 
l_other-v-co, td[i].iloc);
-   sub_v2_v2v2(edge_uv_init, 
luv_other-uv, uvtc-initial_uvs[index]-init_uv);
+   sub_v2_v2v2(edge_uv_init, 
luv_other-uv, uvtc-initial_uvs[BM_elem_index_get(v)]-init_uv);
} else {
sub_v3_v3v3(edge_vec_init, 
td[index_other].iloc, td[i].iloc);
-   sub_v2_v2v2(edge_uv_init, 
uvtc-initial_uvs[index_other]-init_uv, uvtc-initial_uvs[index]-init_uv);
+   sub_v2_v2v2(edge_uv_init, 
uvtc-initial_uvs[BM_elem_index_get(l_other-v)]-init_uv, 
uvtc-initial_uvs[BM_elem_index_get(v)]-init_uv);
}
sub_v3_v3v3(edge_vec_final, l_other-v-co, 
v-co);
 
@@ -1708,7 +1708,7 @@
 
}
mul_v2_fl(uv_tot, 1.0/uv_counter);
-   copy_v2_v2(uvtc-initial_uvs[index]-uv, uv_tot);
+   copy_v2_v2(uvtc-initial_uvs[BM_elem_index_get(v)]-uv, 
uv_tot);
}
}
 }

___
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 [47226] branches/soc-2011-tomato/source/ blender/compositor/operations/COM_MaskOperation.cpp: Fixed crash of mask node when mask is not set

2012-05-30 Thread Sergey Sharybin
Revision: 47226
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47226
Author:   nazgul
Date: 2012-05-30 14:30:28 + (Wed, 30 May 2012)
Log Message:
---
Fixed crash of mask node when mask is not set

Modified Paths:
--

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

Modified: 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_MaskOperation.cpp
===
--- 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_MaskOperation.cpp
 2012-05-30 14:24:33 UTC (rev 47225)
+++ 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_MaskOperation.cpp
 2012-05-30 14:30:28 UTC (rev 47226)
@@ -65,6 +65,9 @@
if (this-rasterizedMask)
return this-rasterizedMask;
 
+   if (!this-mask)
+   return NULL;
+
BLI_mutex_lock(getMutex());
if (this-rasterizedMask == NULL) {
int width = this-getWidth();
@@ -101,13 +104,21 @@
 
 void MaskOperation::executePixel(float *color, int x, int y, MemoryBuffer 
*inputBuffers[], void *data)
 {
-   float *buffer = (float*) data;
-   int index = (y * this-getWidth() + x);
+   if (!data) {
+   color[0] = 0;
+   color[1] = 0;
+   color[2] = 0;
+   color[3] = 1.0f;
+   }
+   else {
+   float *buffer = (float*) data;
+   int index = (y * this-getWidth() + x);
 
-   color[0] = buffer[index];
-   color[1] = buffer[index];
-   color[2] = buffer[index];
-   color[3] = 1.0f;
+   color[0] = buffer[index];
+   color[1] = buffer[index];
+   color[2] = buffer[index];
+   color[3] = 1.0f;
+   }
 }
 
 

___
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 [47227] branches/soc-2011-tomato: Merging r47215 through r47226 from trunk into soc-2011-tomato

2012-05-30 Thread Sergey Sharybin
Revision: 47227
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47227
Author:   nazgul
Date: 2012-05-30 14:33:24 + (Wed, 30 May 2012)
Log Message:
---
Merging r47215 through r47226 from trunk into soc-2011-tomato

Revision Links:
--

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

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

Modified Paths:
--
branches/soc-2011-tomato/source/blender/blenkernel/intern/bvhutils.c
branches/soc-2011-tomato/source/blender/blenlib/BLI_kdopbvh.h

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

Property Changed:

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


Property changes on: branches/soc-2011-tomato
___
Modified: svn:mergeinfo
   - 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47214
   + 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47226

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/bvhutils.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/bvhutils.c
2012-05-30 14:30:28 UTC (rev 47226)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/bvhutils.c
2012-05-30 14:33:24 UTC (rev 47227)
@@ -383,6 +383,9 @@
nearest-dist = dist;
copy_v3_v3(nearest-co, nearest_tmp);
normal_tri_v3(nearest-no, t0, t1, t2);
+
+   if (t1 == vert[face-v3].co)
+   nearest-flags |= BVH_ONQUAD;
}
 
t1 = t2;
@@ -420,6 +423,9 @@
madd_v3_v3v3fl(hit-co, ray-origin, ray-direction, 
dist);
 
normal_tri_v3(hit-no, t0, t1, t2);
+
+   if (t1 == vert[face-v3].co)
+   hit-flags |= BVH_ONQUAD;
}
 
t1 = t2;

Modified: branches/soc-2011-tomato/source/blender/blenlib/BLI_kdopbvh.h
===
--- branches/soc-2011-tomato/source/blender/blenlib/BLI_kdopbvh.h   
2012-05-30 14:30:28 UTC (rev 47226)
+++ branches/soc-2011-tomato/source/blender/blenlib/BLI_kdopbvh.h   
2012-05-30 14:33:24 UTC (rev 47227)
@@ -49,11 +49,15 @@
int indexB;
 } BVHTreeOverlap;
 
+/* flags */
+#define BVH_ONQUAD (10)
+
 typedef struct BVHTreeNearest {
int index;  /* the index of the nearest found (untouched if 
none is found within a dist radius from the given coordinates) */
float co[3];/* nearest coordinates (untouched it none is found 
within a dist radius from the given coordinates) */
float no[3];/* normal at nearest coordinates (untouched it none 
is found within a dist radius from the given coordinates) */
float dist; /* squared distance to search arround */
+   int flags;
 } BVHTreeNearest;
 
 typedef struct BVHTreeRay {
@@ -67,6 +71,7 @@
float co[3];/* coordinates of the hit point */
float no[3];/* normal on hit point */
float dist; /* distance to the hit point */
+   int flags;
 } BVHTreeRayHit;
 
 /* callback must update nearest in case it finds a nearest result */

Modified: 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_CompositorOperation.cpp
===
--- 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_CompositorOperation.cpp
   2012-05-30 14:30:28 UTC (rev 47226)
+++ 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_CompositorOperation.cpp
   2012-05-30 14:33:24 UTC (rev 47227)
@@ -68,6 +68,10 @@
MEM_freeN(rr-rectf);
}
rr-rectf = outputBuffer;
+   } else {
+   if (this-outputBuffer) {
+   MEM_freeN(this-outputBuffer);
+   }
}
 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47228] branches/soc-2011-tomato/source/ blender/compositor/operations: Several small fixes to nodes:

2012-05-30 Thread Sergey Sharybin
Revision: 47228
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47228
Author:   nazgul
Date: 2012-05-30 14:39:20 + (Wed, 30 May 2012)
Log Message:
---
Several small fixes to nodes:

- Code formation fix in keying node
- Fixed crash when creating keying screen for frame where there's no movie
- Attempt to improve keying node to handle alpha on hair better

Modified Paths:
--

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

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

Modified: 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingOperation.cpp
===
--- 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingOperation.cpp
   2012-05-30 14:33:24 UTC (rev 47227)
+++ 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingOperation.cpp
   2012-05-30 14:39:20 UTC (rev 47228)
@@ -47,7 +47,7 @@
float mid = pixel[0] + pixel[1] + pixel[2] - min - max;
float val = (1.0f - screen_balance) * min + screen_balance * mid;
 
-   return max - val;
+   return (max - val) * (1.0f - val) * (1.0f - val);
 }
 
 KeyingOperation::KeyingOperation(): NodeOperation()
@@ -92,7 +92,7 @@
if (primary_channel != screen_primary_channel) {
/* different main channel means pixel is on foreground */
color[0] = 1.0f;
-}
+   }
 else if (saturation = screen_saturation) {
/* saturation of main channel is more than screen, definitely a 
background */
color[0] = 0.0f;
@@ -102,7 +102,7 @@
 
distance = 1.0f - saturation / screen_saturation;
 
-   color[0] = distance;
+   color[0] = distance * distance;
 
if (color[0]  this-clipBlack)
color[0] = 0.0f;
@@ -110,5 +110,5 @@
color[0] = 1.0f;
else
color[0] = (color[0] - this-clipBlack) / 
(this-clipWhite - this-clipBlack);
-}
+   }
 }

Modified: 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
===
--- 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
 2012-05-30 14:33:24 UTC (rev 47227)
+++ 
branches/soc-2011-tomato/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
 2012-05-30 14:39:20 UTC (rev 47228)
@@ -102,11 +102,14 @@
if (!sites_total)
return NULL;
 
-   triangulation = (TriangulationData *) 
MEM_callocN(sizeof(TriangulationData), keying screen triangulation data);
-
BKE_movieclip_user_set_frame(user, framenumber);
ibuf = BKE_movieclip_get_ibuf(movieClip, user);
 
+   if (!ibuf)
+   return NULL;
+
+   triangulation = (TriangulationData *) 
MEM_callocN(sizeof(TriangulationData), keying screen triangulation data);
+
sites = (VoronoiSite *) MEM_callocN(sizeof(VoronoiSite) * sites_total, 
keyingscreen voronoi sites);
track = (MovieTrackingTrack *) tracksbase-first;
i = 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 [47229] trunk/blender/source/blender/ editors/space_node/node_edit.c: Viewer linking operator has to flag the node tree for update, to ensure the depe

2012-05-30 Thread Lukas Toenne
Revision: 47229
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47229
Author:   lukastoenne
Date: 2012-05-30 14:42:40 + (Wed, 30 May 2012)
Log Message:
---
Viewer linking operator has to flag the node tree for update, to ensure the 
dependency sorting is correct (avoid red links).

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

Modified: trunk/blender/source/blender/editors/space_node/node_edit.c
===
--- trunk/blender/source/blender/editors/space_node/node_edit.c 2012-05-30 
14:39:20 UTC (rev 47228)
+++ trunk/blender/source/blender/editors/space_node/node_edit.c 2012-05-30 
14:42:40 UTC (rev 47229)
@@ -1785,6 +1785,8 @@
else {
link-fromnode= tonode;
link-fromsock= sock;
+   /* make sure the dependency sorting is updated */
+   snode-edittree-update |= NTREE_UPDATE_LINKS;
}
ntreeUpdateTree(snode-edittree);
snode_update(snode, 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 [47230] branches/soc-2011-tomato: svn merge ^/trunk/blender -r47214:47229

2012-05-30 Thread Campbell Barton
Revision: 47230
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47230
Author:   campbellbarton
Date: 2012-05-30 14:46:30 + (Wed, 30 May 2012)
Log Message:
---
svn merge ^/trunk/blender -r47214:47229

Revision Links:
--

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

Modified Paths:
--
branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c

Property Changed:

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


Property changes on: branches/soc-2011-tomato
___
Modified: svn:mergeinfo
   - 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47226
   + 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-47229


Property changes on: 
branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-47226
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-47229

Modified: branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
===
--- branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c  
2012-05-30 14:42:40 UTC (rev 47229)
+++ branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c  
2012-05-30 14:46:30 UTC (rev 47230)
@@ -1785,6 +1785,8 @@
else {
link-fromnode= tonode;
link-fromsock= sock;
+   /* make sure the dependency sorting is updated */
+   snode-edittree-update |= NTREE_UPDATE_LINKS;
}
ntreeUpdateTree(snode-edittree);
snode_update(snode, node);


Property changes on: 
branches/soc-2011-tomato/source/blender/editors/space_outliner
___
Modified: svn:mergeinfo
   - 
/branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-47226
   + 
/branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-47229

___
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 [47232] branches/soc-2011-tomato/source/ blender/editors/mask/mask_draw.c: minor mask draw code refactor

2012-05-30 Thread Campbell Barton
Revision: 47232
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47232
Author:   campbellbarton
Date: 2012-05-30 15:23:17 + (Wed, 30 May 2012)
Log Message:
---
minor mask draw code refactor

Modified Paths:
--
branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c

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-30 15:14:18 UTC (rev 47231)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
2012-05-30 15:23:17 UTC (rev 47232)
@@ -49,19 +49,41 @@
 
 #include mask_intern.h  /* own include */
 
-static void set_spline_color(MaskObject *maskobj, MaskSpline *spline)
+static void mask_spline_color_get(MaskObject *maskobj, MaskSpline *spline, 
const int is_sel,
+  unsigned char r_rgb[4])
 {
-   if ((spline-flag  SELECT)  (maskobj-restrictflag  
MASK_RESTRICT_SELECT) == 0) {
-   if (maskobj-act_spline == spline)
-   glColor3f(1.0f, 1.0f, 1.0f);
-   else
-   glColor3f(1.0f, 0.0f, 0.0f);
+   if (is_sel) {
+   if (maskobj-act_spline == spline) {
+   r_rgb[0] = r_rgb[1] = r_rgb[2] = 255;
+   }
+   else {
+   r_rgb[0] = 255;
+   r_rgb[1] = r_rgb[2] = 0;
+   }
}
else {
-   glColor3f(0.5f, 0.0f, 0.0f);
+   r_rgb[0] = 128;
+   r_rgb[1] = r_rgb[2] = 0;
}
+
+   r_rgb[3] = 255;
 }
 
+static void mask_spline_feather_color_get(MaskObject *UNUSED(maskobj), 
MaskSpline *UNUSED(spline), const int is_sel,
+  unsigned char r_rgb[4])
+{
+   if (is_sel) {
+   r_rgb[1] = 255;
+   r_rgb[0] = r_rgb[2] = 0;
+   }
+   else {
+   r_rgb[1] = 128;
+   r_rgb[0] = r_rgb[2] = 0;
+   }
+
+   r_rgb[3] = 255;
+}
+
 #if 0
 static void draw_spline_parents(MaskObject *UNUSED(maskobj), MaskSpline 
*spline)
 {
@@ -99,6 +121,8 @@
 /* return non-zero if spline is selected */
 static void draw_spline_points(MaskObject *maskobj, MaskSpline *spline)
 {
+   const int is_spline_sel = (spline-flag  SELECT)  
(maskobj-restrictflag  MASK_RESTRICT_SELECT) == 0;
+   unsigned char rgb_spline[4];
MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline);
 
int i, hsize, tot_feather_point;
@@ -111,6 +135,8 @@
 
glPointSize(hsize);
 
+   mask_spline_color_get(maskobj, spline, is_spline_sel, rgb_spline);
+
/* feather points */
feather_points = fp = BKE_mask_spline_feather_points(spline, 
tot_feather_point);
for (i = 0; i  spline-tot_point; i++) {
@@ -165,7 +191,7 @@
 
/* draw handle segment */
if (has_handle) {
-   set_spline_color(maskobj, spline);
+   glColor3ubv(rgb_spline);
 
glBegin(GL_LINES);
glVertex3fv(vert);
@@ -208,33 +234,43 @@
glPointSize(1.0f);
 }
 
-static void draw_spline_curve_lines(const float *points, int tot_point, int 
closed)
+/* #define USE_XOR */
+
+static void draw_curve_dashed(MaskSpline *spline, float *points, int 
tot_point, const unsigned char rgb_sel[4])
 {
-   glEnableClientState(GL_VERTEX_ARRAY);
-   glVertexPointer(2, GL_FLOAT, 0, points);
-   glDrawArrays(closed ? GL_LINE_LOOP : GL_LINE_STRIP, 0, tot_point);
-   glDisableClientState(GL_VERTEX_ARRAY);
-}
+   const int draw_method = (spline-flag  MASK_SPLINE_CYCLIC) ? 
GL_LINE_LOOP : GL_LINE_STRIP;
 
-static void draw_dashed_curve(MaskSpline *spline, float *points, int tot_point)
-{
+   glEnable(GL_LINE_STIPPLE);
+
+#ifdef USE_XOR
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp(GL_OR);
+#endif
 
-   draw_spline_curve_lines(points, tot_point, spline-flag  
MASK_SPLINE_CYCLIC);
+   glColor4ubv(rgb_sel);
+   glLineStipple(3, 0x);
+   glEnableClientState(GL_VERTEX_ARRAY);
+   glVertexPointer(2, GL_FLOAT, 0, points);
+   glDrawArrays(draw_method, 0, tot_point);
 
+#ifdef USE_XOR
glDisable(GL_COLOR_LOGIC_OP);
-   glLineStipple(3, 0x);
-   glEnable(GL_LINE_STIPPLE);
+#endif
 
-   glColor3f(0.0f, 0.0f, 0.0f);
-   draw_spline_curve_lines(points, tot_point, spline-flag  
MASK_SPLINE_CYCLIC);
+   glColor4ub(0, 0, 0, 255);
+   glLineStipple(3, 0x);
+   glDrawArrays(draw_method, 0, tot_point);
+   glDisableClientState(GL_VERTEX_ARRAY);
 
glDisable(GL_LINE_STIPPLE);
 }
 
-static void draw_spline_curve(MaskObject *maskobj, MaskSpline *spline)
+static void draw_spline_curve(MaskObject *maskobj, MaskSpline *spline,
+  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47233] trunk/blender/intern/cycles/render /graph.cpp: Fix #31645, mix node results in crash upon render.

2012-05-30 Thread Lukas Toenne
Revision: 47233
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47233
Author:   lukastoenne
Date: 2012-05-30 15:47:12 + (Wed, 30 May 2012)
Log Message:
---
Fix #31645, mix node results in crash upon render. This happens when unused mix 
nodes are removed from the cycles graph. In case the inputs are both 
unconnected it still tried to reconnect them.

Modified Paths:
--
trunk/blender/intern/cycles/render/graph.cpp

Modified: trunk/blender/intern/cycles/render/graph.cpp
===
--- trunk/blender/intern/cycles/render/graph.cpp2012-05-30 15:23:17 UTC 
(rev 47232)
+++ trunk/blender/intern/cycles/render/graph.cpp2012-05-30 15:47:12 UTC 
(rev 47233)
@@ -340,7 +340,8 @@
 
foreach(ShaderInput *input, inputs) {
disconnect(input);
-   connect(output, input);
+   if (output)
+   connect(output, input);
}
}
}

___
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 [47234] branches/soc-2011-tomato: draw options for mask spline matching the UV view

2012-05-30 Thread Campbell Barton
Revision: 47234
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47234
Author:   campbellbarton
Date: 2012-05-30 16:22:33 + (Wed, 30 May 2012)
Log Message:
---
draw options for mask spline matching the UV view

Modified Paths:
--
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-tomato/source/blender/editors/include/ED_mask.h
branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h
branches/soc-2011-tomato/source/blender/makesdna/DNA_space_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
===
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
2012-05-30 15:47:12 UTC (rev 47233)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
2012-05-30 16:22:33 UTC (rev 47234)
@@ -711,6 +711,12 @@
 col.label(text=Display Aspect Ratio:)
 row = col.row()
 row.prop(clip, display_aspect, text=)
+
+if sc.mode == 'MASKEDITING':
+col = layout.column()
+col.prop(sc, mask_draw_type, text=)
+col.prop(sc, show_mask_smooth)
+
 
 
 class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel):

Modified: branches/soc-2011-tomato/source/blender/editors/include/ED_mask.h
===
--- branches/soc-2011-tomato/source/blender/editors/include/ED_mask.h   
2012-05-30 15:47:12 UTC (rev 47233)
+++ branches/soc-2011-tomato/source/blender/editors/include/ED_mask.h   
2012-05-30 16:22:33 UTC (rev 47234)
@@ -39,7 +39,7 @@
 void ED_operatormacros_mask(void);
 
 /* mask_draw.c */
-void ED_mask_draw(const bContext *C);
+void ED_mask_draw(const bContext *C, const char draw_flag, const char 
draw_type);
 
 /* mask_shapekey.c */
 int ED_mask_object_shape_auto_key_all(struct Mask *mask, const int frame);

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-30 15:47:12 UTC (rev 47233)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
2012-05-30 16:22:33 UTC (rev 47234)
@@ -236,41 +236,99 @@
 
 /* #define USE_XOR */
 
-static void draw_curve_dashed(MaskSpline *spline, float *points, int 
tot_point, const unsigned char rgb_sel[4])
+static void mask_draw_curve_type(MaskSpline *spline, float *points, int 
tot_point,
+ const short is_feather, const short is_smooth,
+ const unsigned char rgb_spline[4], const char 
draw_type)
 {
const int draw_method = (spline-flag  MASK_SPLINE_CYCLIC) ? 
GL_LINE_LOOP : GL_LINE_STRIP;
+   unsigned char rgb_tmp[4];
 
-   glEnable(GL_LINE_STIPPLE);
+   glEnableClientState(GL_VERTEX_ARRAY);
+   glVertexPointer(2, GL_FLOAT, 0, points);
 
+   switch (draw_type) {
+
+   case MASK_DT_OUTLINE:
+   glLineWidth(3);
+   cpack(0x0);
+
+   glDrawArrays(draw_method, 0, tot_point);
+
+   glLineWidth(1);
+   glColor4ubv(rgb_spline);
+   glDrawArrays(draw_method, 0, tot_point);
+
+   break;
+
+   case MASK_DT_DASH:
+   default:
+   glEnable(GL_LINE_STIPPLE);
+
 #ifdef USE_XOR
-   glEnable(GL_COLOR_LOGIC_OP);
-   glLogicOp(GL_OR);
+   glEnable(GL_COLOR_LOGIC_OP);
+   glLogicOp(GL_OR);
 #endif
+   glColor4ubv(rgb_spline);
+   glLineStipple(3, 0x);
+   glEnableClientState(GL_VERTEX_ARRAY);
+   glVertexPointer(2, GL_FLOAT, 0, points);
+   glDrawArrays(draw_method, 0, tot_point);
 
-   glColor4ubv(rgb_sel);
-   glLineStipple(3, 0x);
-   glEnableClientState(GL_VERTEX_ARRAY);
-   glVertexPointer(2, GL_FLOAT, 0, points);
-   glDrawArrays(draw_method, 0, tot_point);
-
 #ifdef USE_XOR
-   glDisable(GL_COLOR_LOGIC_OP);
+   glDisable(GL_COLOR_LOGIC_OP);
 #endif
+   glColor4ub(0, 0, 0, 255);
+   glLineStipple(3, 0x);
+   glDrawArrays(draw_method, 0, tot_point);
 
-   glColor4ub(0, 0, 0, 255);
-   glLineStipple(3, 0x);
-   glDrawArrays(draw_method, 0, tot_point);
+   glDisable(GL_LINE_STIPPLE);
+   break;
+
+
+

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47238] branches/soc-2012-bratwurst/source /blender/editors/transform/transform_generics.c: UV Transform Correction tool

2012-05-30 Thread Antony Riakiotakis
Revision: 47238
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47238
Author:   psy-fi
Date: 2012-05-30 17:57:13 + (Wed, 30 May 2012)
Log Message:
---
UV Transform Correction tool
==
* First functional tool. Looks that since we count each edge twice, we
need to count the loops only once instead of twice. This is weird to me
but it works.

TODOS:
* support for cancel. Right now uvs stay in their modified state when
cancelling the transform.
* support for uvs on stitches.
* Check how this plays with edge slide

Modified Paths:
--

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

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-30 17:18:50 UTC (rev 47237)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
   2012-05-30 17:57:13 UTC (rev 47238)
@@ -1716,23 +1716,23 @@
edge_uv_len_init = len_v2(edge_uv_init);
edge_uv_len_init2 = len_v2(edge_uv_init2);
 
-   printf(\nedge_uv_init %f %f\n, 
edge_uv_init[0], edge_uv_init[1]);
-   printf(edge_uv_init2 %f %f\n, 
edge_uv_init2[0], edge_uv_init2[1]);
+   //printf(\nedge_uv_init %f %f\n, 
edge_uv_init[0], edge_uv_init[1]);
+   //printf(edge_uv_init2 %f %f\n, 
edge_uv_init2[0], edge_uv_init2[1]);
 
-   mul_v2_v2fl(uvdiff, edge_uv_init, 
(edge_len_final - edge_len_init)/edge_len_init);
-   mul_v2_v2fl(uvdiff2, edge_uv_init2, 
(edge_len_final2 - edge_len_init2)/edge_len_init2);
+   mul_v2_v2fl(uvdiff, edge_uv_init, 
-(edge_len_final - edge_len_init)/edge_len_init);
+   mul_v2_v2fl(uvdiff2, edge_uv_init2, 
-(edge_len_final2 - edge_len_init2)/edge_len_init2);
 
-   printf(uv_diff %f %f\n, uvdiff[0], uvdiff[1]);
-   printf(uv_diff2 %f %f\n, uvdiff2[0], 
uvdiff2[1]);
+   //printf(uv_diff %f %f\n, uvdiff[0], 
uvdiff[1]);
+   //printf(uv_diff2 %f %f\n, uvdiff2[0], 
uvdiff2[1]);
add_v2_v2(uv_tot, uvdiff);
add_v2_v2(uv_tot, uvdiff2);
 
-   uv_counter += 2;
+   uv_counter++;
/* transform the edge difference in screen 
space and do perspective correct transform in uv space */
//mul_m4_v3(modelviewprojmat, diff);
}
 
-   printf(total loops %d\n, uv_counter);
+   //printf(total loops %d\n, uv_counter);
mul_v2_fl(uv_tot, 1.0/uv_counter);
add_v2_v2(uv_tot, 
uvtc-initial_uvs[BM_elem_index_get(v)]-init_uv);
 

___
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 [47239] branches/soc-2012-bratwurst/source /blender/editors/transform/transform_generics.c: Fix crash when not in edit mode and correct uvs is on

2012-05-30 Thread Antony Riakiotakis
Revision: 47239
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47239
Author:   psy-fi
Date: 2012-05-30 18:21:54 + (Wed, 30 May 2012)
Log Message:
---
Fix crash when not in edit mode and correct uvs is on

Modified Paths:
--

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

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-30 17:57:13 UTC (rev 47238)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
   2012-05-30 18:21:54 UTC (rev 47239)
@@ -1049,7 +1049,7 @@
v3d-twtype = 0;
}
 
-   if(ts-uvcalc_flag  UVCALC_TRANSFORM_CORRECT  
EDBM_mtexpoly_check(BMEdit_FromObject(obedit))) {
+   if(ts-uvcalc_flag  UVCALC_TRANSFORM_CORRECT  obedit  
EDBM_mtexpoly_check(BMEdit_FromObject(obedit))) {
t-flag |= T_IMAGE_PRESERVE_CALC;
}
 

___
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 [47240] branches/soc-2011-tomato/intern/ raskter/raskter.c: Mask out of bounds fix for mask rasterizer

2012-05-30 Thread Peter Larabell
Revision: 47240
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47240
Author:   xglasyliax
Date: 2012-05-30 18:39:42 + (Wed, 30 May 2012)
Log Message:
---
Mask out of bounds fix for mask rasterizer

Modified Paths:
--
branches/soc-2011-tomato/intern/raskter/raskter.c

Modified: branches/soc-2011-tomato/intern/raskter/raskter.c
===
--- branches/soc-2011-tomato/intern/raskter/raskter.c   2012-05-30 18:21:54 UTC 
(rev 47239)
+++ branches/soc-2011-tomato/intern/raskter/raskter.c   2012-05-30 18:39:42 UTC 
(rev 47240)
@@ -232,7 +232,7 @@
 * TODO: This clips Y to the frame buffer, which should be done in the 
preprocessor, but for now is done here.
 *   Will get changed once DEM code gets in.
 */
-   for (y_curr = MAX2(ctx-all_edges-ybeg, 0); (ctx-all_edges || 
ctx-possible_edges)  (y_curr  ctx-rb.sizey); y_curr++) {
+   for (y_curr = ctx-all_edges-ybeg; (ctx-all_edges || 
ctx-possible_edges); y_curr++) {
 
/*
 * Link any edges that start on the current scan line into the 
list of
@@ -305,12 +305,14 @@
e_curr = e_curr-e_next;
mpxl = spxl + MIN2(e_curr-x, ctx-rb.sizex) - 1;
 
-   /* draw the pixels. */
-   for (; cpxl = mpxl; cpxl++){
-   if(*cpxl  0.5f){
-   *cpxl = 1.0f;
-   }else{
-   *cpxl = 0.0f;
+   if((y_curr = 0)  (y_curr  ctx-rb.sizey)){
+   /* draw the pixels. */
+   for (; cpxl = mpxl; cpxl++){
+   if(*cpxl  0.5f){
+   *cpxl = 1.0f;
+   }else{
+   *cpxl = 0.0f;
+   }
}
}
}

___
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 [47241] branches/soc-2012-bratwurst/source /blender/editors/transform/transform_generics.c: UV Transform Correction tool

2012-05-30 Thread Antony Riakiotakis
Revision: 47241
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47241
Author:   psy-fi
Date: 2012-05-30 18:40:35 + (Wed, 30 May 2012)
Log Message:
---
UV Transform Correction tool
=
*support for cancel that restores uvs of vertices

Modified Paths:
--

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

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-30 18:39:42 UTC (rev 47240)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
   2012-05-30 18:40:35 UTC (rev 47241)
@@ -1382,6 +1382,23 @@
restoreElement(td);
}

+   if(t-flag  T_IMAGE_PRESERVE_CALC) {
+   int i;
+   for(i = 0; i  t-total; i++) {
+   BMVert *eve;
+   UVTransCorrInfoUV *uvtcuv;
+
+   eve = t-uvtc-affected_verts[i];
+
+   uvtcuv = t-uvtc-initial_uvs[BM_elem_index_get(eve)];
+
+   while(uvtcuv) {
+   copy_v2_v2(uvtcuv-uv, uvtcuv-init_uv);
+   uvtcuv = uvtcuv-next;
+   }
+   }
+   }
+
for (td2d=t-data2d; t-data2d  td2d  t-data2d + t-total; td2d++) {
if (td2d-h1) {
td2d-h1[0] = td2d-ih1[0];
@@ -1669,7 +1686,7 @@
index =  uvtc-vert_indices[BM_elem_index_get(v)];
uv_tot[0] = uv_tot[1] = 0.0;
 
-   printf(disc loops %d\n,  
bmesh_disk_facevert_count(v));
+   //printf(disc loops %d\n,  
bmesh_disk_facevert_count(v));
BM_ITER_ELEM(l, iter, v, BM_LOOPS_OF_VERT) {
float edge_len_init, edge_len_init2;
float edge_len_final, edge_len_final2;

___
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 [47242] branches/soc-2012-sushi/source/ blender: Ready methods to calculate the Laplacian Matrix.

2012-05-30 Thread Alexander Pinzon
Revision: 47242
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47242
Author:   apinzonf
Date: 2012-05-30 18:49:45 + (Wed, 30 May 2012)
Log Message:
---
Ready methods to calculate the Laplacian Matrix.
The OpenNL was use for solve sparse syste,.
Ready method which constructs the system of equations.
Ready method to solve the sparse linear system.

Modified Paths:
--
branches/soc-2012-sushi/source/blender/bmesh/CMakeLists.txt
branches/soc-2012-sushi/source/blender/bmesh/intern/bmesh_opdefines.c

branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_smooth_laplacian.c
branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_tools.c

Modified: branches/soc-2012-sushi/source/blender/bmesh/CMakeLists.txt
===
--- branches/soc-2012-sushi/source/blender/bmesh/CMakeLists.txt 2012-05-30 
18:40:35 UTC (rev 47241)
+++ branches/soc-2012-sushi/source/blender/bmesh/CMakeLists.txt 2012-05-30 
18:49:45 UTC (rev 47242)
@@ -30,6 +30,7 @@
../blenlib
../makesdna
../../../intern/guardedalloc
+   ../../../intern/opennl/extern
 )
 
 set(SRC

Modified: branches/soc-2012-sushi/source/blender/bmesh/intern/bmesh_opdefines.c
===
--- branches/soc-2012-sushi/source/blender/bmesh/intern/bmesh_opdefines.c   
2012-05-30 18:40:35 UTC (rev 47241)
+++ branches/soc-2012-sushi/source/blender/bmesh/intern/bmesh_opdefines.c   
2012-05-30 18:49:45 UTC (rev 47242)
@@ -118,6 +118,7 @@
 static BMOpDefine bmo_vertexsmoothlaplacian_def = {
vertexsmoothlaplacian,
{{BMO_OP_SLOT_ELEMENT_BUF, verts}, //input vertices
+{BMO_OP_SLOT_FLT, lambda}, //lambda param
 {BMO_OP_SLOT_BOOL, mirror_clip_x}, //set vertices close to the x 
axis before the operation to 0
 {BMO_OP_SLOT_BOOL, mirror_clip_y}, //set vertices close to the y 
axis before the operation to 0
 {BMO_OP_SLOT_BOOL, mirror_clip_z}, //set vertices close to the z 
axis before the operation to 0

Modified: 
branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_smooth_laplacian.c
===
--- 
branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_smooth_laplacian.c   
2012-05-30 18:40:35 UTC (rev 47241)
+++ 
branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_smooth_laplacian.c   
2012-05-30 18:49:45 UTC (rev 47242)
@@ -31,65 +31,166 @@
 #include BLI_array.h
 #include BLI_heap.h
 #include BLI_math.h
+#include BLI_math_geom.h
 #include BLI_smallhash.h
 
 #include BKE_customdata.h
+#include BKE_mesh.h
 
 #include bmesh.h
 
+#include ONL_opennl.h
+
 #include intern/bmesh_operators_private.h /* own include */
 
+void init_index(BMesh *bm);
+void compute_weight(BMFace *f, int vid, float lambda);
+float compute_weight_return( BMFace *f, int vid, float lambda);
+static float cotan_weight(float *v1, float *v2, float *v3);
+
 void bmo_vertexsmoothlaplacian_exec(BMesh *bm, BMOperator *op)
 {
BMOIter siter;
BMIter iter;
BMVert *v;
-   BMEdge *e;
-   BLI_array_declare(cos);
-   float (*cos)[3] = NULL;
-   float *co, *co2, clipdist = BMO_slot_float_get(op, clipdist);
-   int i, j, clipx, clipy, clipz;
-   
-   clipx = BMO_slot_bool_get(op, mirror_clip_x);
-   clipy = BMO_slot_bool_get(op, mirror_clip_y);
-   clipz = BMO_slot_bool_get(op, mirror_clip_z);
+   BMFace *f;
+   int m_vertex_id;
+   NLContext *context;
+   float lambda = BMO_slot_float_get(op, lambda);
+   float we;
 
-   i = 0;
-   BMO_ITER (v, siter, bm, op, verts, BM_VERT) {
-   BLI_array_grow_one(cos);
-   co = cos[i];
+   init_index(bm);
+
+   nlNewContext();
+   context = nlGetCurrent();
+   nlSolverParameteri(NL_NB_VARIABLES, bm-totvert);
+   nlSolverParameteri(NL_LEAST_SQUARES, NL_TRUE);
+   nlSolverParameteri(NL_NB_ROWS, bm-totvert);
+   nlSolverParameteri(NL_NB_RIGHT_HAND_SIDES, 3);
+   nlBegin(NL_SYSTEM);
+   BMO_ITER (v, siter, bm, op, verts, BM_VERT) {
+   m_vertex_id = BM_elem_index_get(v);
+   nlSetVariable(0,m_vertex_id, v-co[0]);
+   nlSetVariable(1,m_vertex_id, v-co[1]);
+   nlSetVariable(2,m_vertex_id, v-co[2]);
+   }
+   nlBegin(NL_MATRIX);
+   BMO_ITER (v, siter, bm, op, verts, BM_VERT) {
+   m_vertex_id = BM_elem_index_get(v);
+   nlRightHandSideAdd(0, m_vertex_id, v-co[0]);
+   nlRightHandSideAdd(1, m_vertex_id, v-co[1]);
+   nlRightHandSideAdd(2, m_vertex_id, v-co[2]);
+   
+   nlMatrixAdd(m_vertex_id, m_vertex_id, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47243] branches/soc-2012-bratwurst/source /blender/editors/interface/interface_regions.c: Fix color wheel not closing when the mouse moves away.

2012-05-30 Thread Jorge Rodriguez
Revision: 47243
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47243
Author:   vino
Date: 2012-05-30 18:50:16 + (Wed, 30 May 2012)
Log Message:
---
Fix color wheel not closing when the mouse moves away. Looks like this was 
caused by an oversight in r24808.

Revision Links:
--

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

Modified Paths:
--

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

Modified: 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_regions.c
===
--- 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_regions.c
2012-05-30 18:49:45 UTC (rev 47242)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_regions.c
2012-05-30 18:50:16 UTC (rev 47243)
@@ -2213,13 +2213,12 @@
}
}

-   uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT);
+   uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT | UI_BLOCK_REDRAW | 
UI_BLOCK_KEEP_OPEN | UI_BLOCK_OUT_1);

copy_v3_v3(handle-retvec, but-editvec);

uiBlockPicker(block, handle-retvec, but-rnapoin, but-rnaprop);

-   block-flag = UI_BLOCK_LOOP | UI_BLOCK_REDRAW | UI_BLOCK_KEEP_OPEN | 
UI_BLOCK_OUT_1;
uiBoundsBlock(block, 10);

block-block_event_func = ui_picker_small_wheel_cb;

___
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 [47244] branches/soc-2012-swiss_cheese/ source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp: Removing some debug code that was accidentally co

2012-05-30 Thread Mitchell Stokes
Revision: 47244
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47244
Author:   moguri
Date: 2012-05-30 19:21:22 + (Wed, 30 May 2012)
Log Message:
---
Removing some debug code that was accidentally committed.

Modified Paths:
--

branches/soc-2012-swiss_cheese/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp

Modified: 
branches/soc-2012-swiss_cheese/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
===
--- 
branches/soc-2012-swiss_cheese/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
  2012-05-30 18:50:16 UTC (rev 47243)
+++ 
branches/soc-2012-swiss_cheese/source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
  2012-05-30 19:21:22 UTC (rev 47244)
@@ -50,7 +50,6 @@
 #include STR_String.h
 
 #include GPU_draw.h
-#include GPU_utility.h
 
 #include KX_BlenderGL.h // for text printing
 #include KX_BlenderRenderTools.h
@@ -298,7 +297,6 @@

 int width,

 int height)
 {
-   GPU_STRING_MARKER(RenderText2D);
if (mode == RAS_IRenderTools::RAS_TEXT_PADDED)
BL_print_gamedebug_line_padded(text, xco, yco, width, height);
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 [47245] trunk/blender/source/blender/ compositor/intern/COM_WorkScheduler.cpp: Fix for

2012-05-30 Thread Monique Dewanchand
Revision: 47245
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47245
Author:   mdewanchand
Date: 2012-05-30 21:09:50 + (Wed, 30 May 2012)
Log Message:
---
Fix for 
[#31562] New compositor crashes due to incorrect opencl initialization

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

Modified: trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
===
--- trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
2012-05-30 19:21:22 UTC (rev 47244)
+++ trunk/blender/source/blender/compositor/intern/COM_WorkScheduler.cpp
2012-05-30 21:09:50 UTC (rev 47245)
@@ -232,11 +232,10 @@
context = NULL;
program = NULL;
if (clCreateContextFromType) {
-   cl_uint numberOfPlatforms;
+   cl_uint numberOfPlatforms = 0;
cl_int error;
error = clGetPlatformIDs(0, 0, numberOfPlatforms);
if (error != CL_SUCCESS) { printf(CLERROR[%d]: %s\n, error, 
clewErrorString(error));  }
-   numberOfPlatforms = 0;
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);
@@ -265,7 +264,7 @@
error = clBuildProgram(program, totalNumberOfDevices, 
cldevices, 0, 0, 0);
if (error != CL_SUCCESS) { 
cl_int error2;
-   size_t ret_val_size;
+   size_t ret_val_size = 0;
printf(CLERROR[%d]: %s\n, error, 
clewErrorString(error)); 
error2 = clGetProgramBuildInfo(program, 
cldevices[0], CL_PROGRAM_BUILD_LOG, 0, NULL, ret_val_size);
if (error2 != CL_SUCCESS) { 
printf(CLERROR[%d]: %s\n, error, clewErrorString(error)); }
@@ -276,19 +275,20 @@
printf(%s, build_log);
delete build_log;

-   }
-   unsigned int indexDevices;
-   for (indexDevices = 0 ; indexDevices  
totalNumberOfDevices ; indexDevices ++) {
-   cl_device_id device = cldevices[indexDevices];
-   OpenCLDevice *clDevice = new 
OpenCLDevice(context, device, program);
-   clDevice-initialize(),
-   gpudevices.push_back(clDevice);
-   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);
+   } else {
+   unsigned int indexDevices;
+   for (indexDevices = 0 ; indexDevices  
totalNumberOfDevices ; indexDevices ++) {
+   cl_device_id device = 
cldevices[indexDevices];
+   OpenCLDevice *clDevice = new 
OpenCLDevice(context, device, program);
+   clDevice-initialize(),
+   gpudevices.push_back(clDevice);
+   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);
+   }
}
}
}

___
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 [47246] branches/soc-2011-tomato: Adds property to mask splines to allow them to be negated (black masks), still needs work in tracking.c

2012-05-30 Thread Peter Larabell
Revision: 47246
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47246
Author:   xglasyliax
Date: 2012-05-30 21:15:17 + (Wed, 30 May 2012)
Log Message:
---
Adds property to mask splines to allow them to be negated (black masks), still 
needs work in tracking.c

Modified Paths:
--
branches/soc-2011-tomato/intern/raskter/raskter.c
branches/soc-2011-tomato/intern/raskter/raskter.h
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c

Modified: branches/soc-2011-tomato/intern/raskter/raskter.c
===
--- branches/soc-2011-tomato/intern/raskter/raskter.c   2012-05-30 21:09:50 UTC 
(rev 47245)
+++ branches/soc-2011-tomato/intern/raskter/raskter.c   2012-05-30 21:15:17 UTC 
(rev 47246)
@@ -171,7 +171,7 @@
  * for speed, but waiting on final design choices for curve-data before 
eliminating data the DEM code will need
  * if it ends up being coupled with this function.
  */
-int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, int 
num_verts)
+int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, int 
num_verts, float fill_color)
 {
int x_curr; /* current pixel position in X */
int y_curr; /* current scan line being drawn */
@@ -308,11 +308,7 @@
if((y_curr = 0)  (y_curr  ctx-rb.sizey)){
/* draw the pixels. */
for (; cpxl = mpxl; cpxl++){
-   if(*cpxl  0.5f){
-   *cpxl = 1.0f;
-   }else{
-   *cpxl = 0.0f;
-   }
+   *cpxl = fill_color;
}
}
}
@@ -388,7 +384,7 @@
return 1;
 }
 
-int PLX_raskterize(float *verts, int num, float *buf, int buf_x, int buf_y) {
+int PLX_raskterize(float *verts, int num, float *buf, int buf_x, int buf_y, 
float fill_color) {
int i;   /* i: Loop counter. */
struct poly_vert *ply;   /* ply: Pointer to a list 
of integer buffer-space vertex coordinates. */
struct r_fill_context ctx = {0};
@@ -421,7 +417,7 @@
ctx.rb.sizex = buf_x;/* Set the output buffer 
size in X. (width) */
ctx.rb.sizey = buf_y;/* Set the output buffer 
size in Y. (height) */
 
-   i = rast_scan_fill(ctx, ply, num);/* Call our 
rasterizer, passing in the integer coords for each vert. */
+   i = rast_scan_fill(ctx, ply, num, fill_color);/* Call 
our rasterizer, passing in the integer coords for each vert. */
free(ply);   /* Free the memory 
allocated for the integer coordinate table. */
return(i);   /* Return the value 
returned by the rasterizer. */
 }

Modified: branches/soc-2011-tomato/intern/raskter/raskter.h
===
--- branches/soc-2011-tomato/intern/raskter/raskter.h   2012-05-30 21:09:50 UTC 
(rev 47245)
+++ branches/soc-2011-tomato/intern/raskter/raskter.h   2012-05-30 21:15:17 UTC 
(rev 47246)
@@ -48,7 +48,7 @@
 extern C {
 #endif
 
-int PLX_raskterize(float *verts, int num, float *buf, int buf_x, int buf_y);
+int PLX_raskterize(float *verts, int num, float *buf, int buf_x, int buf_y, 
float fill_color);
 
 #ifdef __cplusplus
 }

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
===
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
2012-05-30 21:09:50 UTC (rev 47245)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
2012-05-30 21:15:17 UTC (rev 47246)
@@ -618,6 +618,7 @@
 col = layout.column()
 col.prop(spline, weight_interpolation)
 col.prop(spline, use_cyclic)
+col.prop(spline, mask_negate)
 
 
 class CLIP_PT_active_mask_point(Panel):

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-30 21:09:50 UTC (rev 47245)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
2012-05-30 21:15:17 UTC (rev 47246)
@@ -1754,7 +1754,7 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47247] branches/soc-2012-swiss_cheese: Adds recognition for Windows 7 Touch Events and a CMake WITH_INPUT_TOUCH ( default off).

2012-05-30 Thread Nicholas Rishel
Revision: 47247
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47247
Author:   nicholas_rishel
Date: 2012-05-30 22:08:01 + (Wed, 30 May 2012)
Log Message:
---
Adds recognition for Windows 7 Touch Events and a CMake WITH_INPUT_TOUCH 
(default off).

When INPUT_TOUCH is on, it defines _WIN32_WINNT as 0x601 (Windows 7). This is a 
short-term solution to enable usage for the Windows Touch API.

Modified Paths:
--
branches/soc-2012-swiss_cheese/CMakeLists.txt
branches/soc-2012-swiss_cheese/intern/ghost/CMakeLists.txt
branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_SystemWin32.h
branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_TaskbarWin32.h
branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_WindowWin32.cpp
branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_WindowWin32.h

Modified: branches/soc-2012-swiss_cheese/CMakeLists.txt
===
--- branches/soc-2012-swiss_cheese/CMakeLists.txt   2012-05-30 21:15:17 UTC 
(rev 47246)
+++ branches/soc-2012-swiss_cheese/CMakeLists.txt   2012-05-30 22:08:01 UTC 
(rev 47247)
@@ -219,6 +219,9 @@
 
 # Misc
 option(WITH_INPUT_NDOF Enable NDOF input devices (SpaceNavigator and 
friends) ON)
+if(WIN32)
+   option(WITH_INPUT_TOUCH Enable Touch input (Windows 7 only) OFF)
+endif()
 option(WITH_RAYOPTIMIZATIONEnable use of SIMD (SSE) optimizations for the 
raytracer ON)
 if(UNIX AND NOT APPLE)
option(WITH_INSTALL_PORTABLE Install redistributeable runtime, 
otherwise install into CMAKE_INSTALL_PREFIX ON)
@@ -1849,6 +1852,7 @@
info_cfg_option(WITH_FFTW3)
info_cfg_option(WITH_INTERNATIONAL)
info_cfg_option(WITH_INPUT_NDOF)
+   info_cfg_option(WITH_INPUT_TOUCH)
info_cfg_option(WITH_CYCLES)
 
info_cfg_text(Compiler Options:)

Modified: branches/soc-2012-swiss_cheese/intern/ghost/CMakeLists.txt
===
--- branches/soc-2012-swiss_cheese/intern/ghost/CMakeLists.txt  2012-05-30 
21:15:17 UTC (rev 47246)
+++ branches/soc-2012-swiss_cheese/intern/ghost/CMakeLists.txt  2012-05-30 
22:08:01 UTC (rev 47247)
@@ -108,6 +108,10 @@
)
 endif()
 
+if(WITH_INPUT_TOUCH)
+   add_definitions(-DWITH_INPUT_TOUCH)
+endif()
+
 if(WITH_HEADLESS OR WITH_GHOST_SDL)
if(WITH_HEADLESS)
list(APPEND SRC

Modified: 
branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_SystemWin32.cpp
===
--- branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_SystemWin32.cpp
2012-05-30 21:15:17 UTC (rev 47246)
+++ branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_SystemWin32.cpp
2012-05-30 22:08:01 UTC (rev 47247)
@@ -37,7 +37,7 @@
  * @date   May 7, 2001
  */
 
-#ifdef BF_GHOST_DEBUG
+#ifdef WITH_GHOST_DEBUG
 #include iostream
 #endif
 
@@ -986,6 +986,15 @@
((GHOST_WindowWin32 
*)window)-processWin32TabletInitEvent();
break;


+   // Touch events, processed
+   

+#ifdef WITH_INPUT_TOUCH
+   case WM_TOUCHDOWN:
+   case WM_TOUCHUP:
+   case WM_TOUCHMOVE:
+   break;
+#endif
+   

// Mouse events, processed


case WM_LBUTTONDOWN:

Modified: branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_SystemWin32.h
===
--- branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_SystemWin32.h  
2012-05-30 21:15:17 UTC (rev 47246)
+++ branches/soc-2012-swiss_cheese/intern/ghost/intern/GHOST_SystemWin32.h  
2012-05-30 22:08:01 UTC (rev 47247)
@@ -37,11 +37,42 @@
 #error WIN32 only!
 #endif // WIN32
 
-#define _WIN32_WINNT 0x501 // require Windows XP or newer
+#ifdef WITH_INPUT_TOUCH
+#  define _WIN32_WINNT 0x0601 // require Windows 7 or newer
+#else
+#  define _WIN32_WINNT 0x501 // require Windows XP or newer
+#endif
 #define WIN32_LEAN_AND_MEAN
 #include windows.h
 #include ole2.h // for drag-n-drop
 
+#ifdef WITH_INPUT_TOUCH
+#  ifndef SM_DIGITIZER
+#  define SM_DIGITIZER 94
+#  endif // SM_DIGITIZER
+#  ifndef TABLET_CONFIG_NONE
+#  define 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47248] branches/soc-2012-bratwurst/source /blender/editors/interface/interface_regions.c: Two buttons on the color picker to choose black and white.

2012-05-30 Thread Jorge Rodriguez
Revision: 47248
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47248
Author:   vino
Date: 2012-05-30 23:00:03 + (Wed, 30 May 2012)
Log Message:
---
Two buttons on the color picker to choose black and white. No icons exist yet 
and I can't figure how to set the color, so I marked the buttons with W and B 
for now.

Modified Paths:
--

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

Modified: 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_regions.c
===
--- 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_regions.c
2012-05-30 22:08:01 UTC (rev 47247)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_regions.c
2012-05-30 23:00:03 UTC (rev 47248)
@@ -1980,6 +1980,40 @@
popup-menuretval = UI_RETURN_OK;
 }
 
+static void do_white_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
+{
+   uiBut *but = (uiBut *)bt1;
+   uiPopupBlockHandle *popup = but-block-handle;
+   PropertyRNA *prop = but-rnaprop;
+   PointerRNA ptr = but-rnapoin;
+   float rgb[3];
+
+   rgb[0] = 1;
+   rgb[1] = 1;
+   rgb[2] = 1;
+   RNA_property_float_set_array(ptr, prop, rgb);
+
+   if (popup)
+   popup-menuretval = UI_RETURN_UPDATE;
+}
+
+static void do_black_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg))
+{
+   uiBut *but = (uiBut *)bt1;
+   uiPopupBlockHandle *popup = but-block-handle;
+   PropertyRNA *prop = but-rnaprop;
+   PointerRNA ptr = but-rnapoin;
+   float rgb[3];
+
+   rgb[0] = 0;
+   rgb[1] = 0;
+   rgb[2] = 0;
+   RNA_property_float_set_array(ptr, prop, rgb);
+
+   if (popup)
+   popup-menuretval = UI_RETURN_UPDATE;
+}
+
 static void picker_new_hide_reveal(uiBlock *block, short colormode)
 {
uiBut *bt;
@@ -2120,6 +2154,11 @@
 
bt = uiDefIconButO(block, BUT, UI_OT_eyedropper, 
WM_OP_INVOKE_DEFAULT, ICON_EYEDROPPER, butwidth + 10, -60, UI_UNIT_X, 
UI_UNIT_Y, NULL);
uiButSetFunc(bt, close_popup_cb, bt, NULL);
+
+   bt = uiDefButR_prop(block, BUT, 0, W, butwidth + 10, -80, UI_UNIT_X, 
UI_UNIT_Y, ptr, prop, 0, 0.0, 0.0, 0, 0, TIP_(Set to white));
+   uiButSetFunc(bt, do_white_cb, bt, NULL);
+   bt = uiDefButR_prop(block, BUT, 0, B, butwidth + 10, -100, UI_UNIT_X, 
UI_UNIT_Y, ptr, prop, 0, 0.0, 0.0, 0, 0, TIP_(Set to black));
+   uiButSetFunc(bt, do_black_cb, bt, NULL);

/* RGB values */
uiBlockBeginAlign(block);

___
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 [47249] branches/soc-2012-sushi/source/ blender: Add area to normalized laplacian weight.

2012-05-30 Thread Alexander Pinzon
Revision: 47249
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47249
Author:   apinzonf
Date: 2012-05-31 00:54:54 + (Thu, 31 May 2012)
Log Message:
---
Add area to normalized laplacian weight.

Modified Paths:
--

branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_smooth_laplacian.c
branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_tools.c

Modified: 
branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_smooth_laplacian.c
===
--- 
branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_smooth_laplacian.c   
2012-05-30 23:00:03 UTC (rev 47248)
+++ 
branches/soc-2012-sushi/source/blender/bmesh/operators/bmo_smooth_laplacian.c   
2012-05-31 00:54:54 UTC (rev 47249)
@@ -47,6 +47,7 @@
 void compute_weight(BMFace *f, int vid, float lambda);
 float compute_weight_return( BMFace *f, int vid, float lambda);
 static float cotan_weight(float *v1, float *v2, float *v3);
+float area_ring(BMVert *v);
 
 void bmo_vertexsmoothlaplacian_exec(BMesh *bm, BMOperator *op)
 {
@@ -83,17 +84,22 @@

nlMatrixAdd(m_vertex_id, m_vertex_id, 1.0f);

+   we = 0.0f;
BM_ITER_ELEM (f, iter, v, BM_FACES_OF_VERT) {
-   we = compute_weight_return(f,m_vertex_id,  
lambda);
+   we = we + compute_weight_return(f,m_vertex_id,  
lambda);
}
-
+   we = lambda/(we*4.0f*area_ring(v));
BM_ITER_ELEM (f, iter, v, BM_FACES_OF_VERT) {
-   compute_weight(f,m_vertex_id,  lambda/we);
+   compute_weight(f,m_vertex_id,  we);
}
+   nlMatrixAdd(m_vertex_id, m_vertex_id, 
lambda/(4.0f*area_ring(v)));
}

nlEnd(NL_MATRIX);
nlEnd(NL_SYSTEM);
+   if(bm-totvert 32){
+   nlPrintMatrix();
+   }
nlSolveAdvanced(NULL, NL_TRUE);
BMO_ITER (v, siter, bm, op, verts, BM_VERT) {
m_vertex_id = BM_elem_index_get(v);
@@ -142,10 +148,10 @@
int vc_id = BM_elem_index_get(vf[vc]);
wa = lambda*cotan_weight(vf[vb]-co, vf[vc]-co, 
vf[va]-co);
nlMatrixAdd(vid, vc_id, -wa);
-   nlMatrixAdd(vid, vid, wa);
+   //nlMatrixAdd(vid, vid, wa);
wa = lambda*cotan_weight(vf[vc]-co, vf[va]-co, 
vf[vb]-co);
nlMatrixAdd(vid, vb_id, -wa);
-   nlMatrixAdd(vid, vid, wa);
+   //nlMatrixAdd(vid, vid, wa);
}
}
 }
@@ -194,3 +200,25 @@

return dot_v3v3(a, b) / clen;
 }
+
+float area_ring(BMVert *v){
+   BMIter fiter;
+   BMIter viter;
+   BMVert *vn;
+   BMFace *f;
+   BMVert *vf[3];
+   int i;
+   float area = 0.0f;
+   BM_ITER_ELEM (f, fiter, v, BM_FACES_OF_VERT) {
+   i = 0;
+   BM_ITER_ELEM (vn, viter, f, BM_VERTS_OF_FACE) {
+   vf[i] = vn;
+   i = i + 1;
+   }
+   if(i == 3){
+   area = area + area_tri_v3(vf[0]-co, vf[1]-co, 
vf[2]-co);
+   }
+   }
+   return area;
+
+}
\ No newline at end of file

Modified: branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_tools.c
===
--- branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_tools.c
2012-05-30 23:00:03 UTC (rev 47248)
+++ branches/soc-2012-sushi/source/blender/editors/mesh/editmesh_tools.c
2012-05-31 00:54:54 UTC (rev 47249)
@@ -1670,7 +1670,7 @@
ot-flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
RNA_def_int(ot-srna, repeat, 1, 1, 50, Number of iterations to 
smooth the mesh, , 1, 50);
-   RNA_def_float(ot-srna, lambda, 0.1f, 0.001f, 100.0f, Lambda 
factor, , 0.001, 100.0f);
+   RNA_def_float(ot-srna, lambda, 0.5f, 0.001f, 100.0f, Lambda 
factor, , 0.001f, 100.0f);
 
 }
 

___
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 [47250] branches/soc-2012-swiss_cheese/ source/blender: BLF_draw_font calling gpuEnd too many times in some situations.

2012-05-30 Thread Jason Wilkins
Revision: 47250
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47250
Author:   jwilkins
Date: 2012-05-31 03:57:52 + (Thu, 31 May 2012)
Log Message:
---
BLF_draw_font calling gpuEnd too many times in some situations.  BLF_draw_font 
does not always need a color array.

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

Modified: branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
===
--- branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
2012-05-31 00:54:54 UTC (rev 47249)
+++ branches/soc-2012-swiss_cheese/source/blender/blenfont/BLF_api.h
2012-05-31 03:57:52 UTC (rev 47250)
@@ -78,7 +78,7 @@
 
 /* Draw large blocks of text more efficiently by
explicitely reserving OpenGL for that purpose*/
-void BLF_draw_lock(void);
+void BLF_draw_lock(int fontid);
 void BLF_draw_unlock(void);
 
 /* This function return the bounding box of the string

Modified: branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c
===
--- branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c 
2012-05-31 00:54:54 UTC (rev 47249)
+++ branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf.c 
2012-05-31 03:57:52 UTC (rev 47250)
@@ -481,31 +481,43 @@
}
 }
 
-void BLF_draw_lock(void)
+static void draw_lock(FontBLF *font)
 {
if (gpuImmediateLockCount() == 0) {
GLint texCoordSizes[1] = { 2 };
-   GLint texUnitMap[1];
+   GLint texUnitMap[1]= { GL_TEXTURE0 };
 
-   glGetIntegerv(GL_ACTIVE_TEXTURE, texUnitMap);
+   if (font-shadow || font-blur) {
+   gpuImmediateElementSizes(2, 0, 4); //-V112
+   }
+   else {
+   gpuImmediateElementSizes(2, 0, 0);
+   }
 
-   gpuImmediateElementSizes(2, 0, 4); //-V112
gpuImmediateTextureUnitCount(1);
gpuImmediateTexCoordSizes(texCoordSizes);
gpuImmediateTextureUnitMap(texUnitMap);
-   gpuImmediateFloatAttribCount(0);
-   gpuImmediateUbyteAttribCount(0);
 
/* one time GL setup */
 
+   glEnable(GL_TEXTURE_2D);
+
glEnable(GL_BLEND);
-   glEnable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
 
gpuImmediateLock();
 }
 
+void BLF_draw_lock(int fontid)
+{
+   FontBLF *font = BLF_get(fontid);
+
+   if (font) {
+   draw_lock(font);
+   }
+}
+
 void BLF_draw_unlock(void)
 {
gpuImmediateUnlock();
@@ -555,13 +567,11 @@
if (*param != GL_MODULATE)
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 
-   BLF_draw_lock();
-   /* gpuBegin not called here because texture still needs binding */
+   draw_lock(font);
 }
 
 static void blf_draw__end(GLint mode, GLint param)
 {
-   gpuEnd();
BLF_draw_unlock();
 
/* and restore the original value. */

Modified: 
branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_font.c
===
--- branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_font.c
2012-05-31 00:54:54 UTC (rev 47249)
+++ branches/soc-2012-swiss_cheese/source/blender/blenfont/intern/blf_font.c
2012-05-31 03:57:52 UTC (rev 47250)
@@ -54,7 +54,9 @@
 #include blf_internal_types.h
 #include blf_internal.h
 
+#include GPU_compatibility.h
 
+
 /* freetype2 handle ONLY for this file!. */
 static FT_Library ft_lib;
 
@@ -165,6 +167,7 @@
int pen_x = 0, pen_y = 0;
size_t i = 0;
GlyphBLF **glyph_ascii_table = font-glyph_cache-glyph_ascii_table;
+   int needs_end = FALSE;
 
BLF_KERNING_VARS(font, has_kerning, kern_mode);
 
@@ -181,11 +184,16 @@
BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, 
pen_x);
 
/* do not return this loop if clipped, we want every character 
tested */
-   blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
+   /* blf_glyph_render calls gpuBegin */
+   blf_glyph_render(font, g, (float)pen_x, (float)pen_y, 
needs_end);
 
pen_x += g-advance;
g_prev = g;
}
+
+   if (needs_end) {
+   gpuEnd();
+   }
 }
 
 /* faster version 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47251] branches/soc-2012-bratwurst/source /blender/editors/interface/interface_handlers.c: This is an experimental patch to remove the modality of me

2012-05-30 Thread Jorge Rodriguez
Revision: 47251
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47251
Author:   vino
Date: 2012-05-31 04:43:25 + (Thu, 31 May 2012)
Log Message:
---
This is an experimental patch to remove the modality of menus and other popup 
regions. It also activates and presses any button under the mouse cursor even 
though a menu is up. One effect of this is that the user can open one menu and 
then click to open a second without closing the first.

Modified Paths:
--

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

Modified: 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_handlers.c
===
--- 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_handlers.c
   2012-05-31 03:57:52 UTC (rev 47250)
+++ 
branches/soc-2012-bratwurst/source/blender/editors/interface/interface_handlers.c
   2012-05-31 04:43:25 UTC (rev 47251)
@@ -5522,6 +5522,7 @@
 static int ui_handle_button_over(bContext *C, wmEvent *event, ARegion *ar)
 {
uiBut *but;
+   int retval = WM_UI_HANDLER_CONTINUE;
 
if (event-type == MOUSEMOVE) {
but = ui_but_find_mouse_over(ar, event-x, event-y);
@@ -5535,8 +5536,17 @@
ui_do_button(C, but-block, but, event);
}
}
+   else if (event-type == LEFTMOUSE) {
+   but = ui_but_find_mouse_over(ar, event-x, event-y);
+   /* If the user clicked a button, quickly activate it and then 
run its ui stuff */
+   if (but)
+   {
+   button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER);
+   retval = ui_do_button(C, but-block, but, event);
+   }
+   }
 
-   return WM_UI_HANDLER_CONTINUE;
+   return retval;
 }
 
 /* exported to interface.c: uiButActiveOnly() */
@@ -6497,7 +6507,7 @@
ARegion *ar;
uiBut *but;
uiHandleButtonData *data;
-   int retval;
+   int retval = WM_UI_HANDLER_CONTINUE;
 
/* here we handle buttons at the window level, modal, for example
 * while number sliding, text editing, or when a menu block is open */
@@ -6537,8 +6547,7 @@
/* delayed apply callbacks */
ui_apply_but_funcs_after(C);
 
-   /* we block all events, this is modal interaction */
-   return WM_UI_HANDLER_BREAK;
+   return retval;
 }
 
 /* two types of popups, one with operator + enum, other with regular callbacks 
*/

___
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 [47252] branches/soc-2012-swiss_cheese/ source/gameengine: Changing the mesh converter to stop using BL_Material as a temporary place holder for rgb a

2012-05-30 Thread Mitchell Stokes
Revision: 47252
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=47252
Author:   moguri
Date: 2012-05-31 04:54:56 + (Thu, 31 May 2012)
Log Message:
---
Changing the mesh converter to stop using BL_Material as a temporary place 
holder for rgb and uv data. This is the first step in getting rid of per face 
material conversions, which are taking up a lot of time.

Modified Paths:
--

branches/soc-2012-swiss_cheese/source/gameengine/Converter/BL_BlenderDataConversion.cpp
branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/BL_Material.cpp
branches/soc-2012-swiss_cheese/source/gameengine/Ketsji/BL_Material.h

Modified: 
branches/soc-2012-swiss_cheese/source/gameengine/Converter/BL_BlenderDataConversion.cpp
===
--- 
branches/soc-2012-swiss_cheese/source/gameengine/Converter/BL_BlenderDataConversion.cpp
 2012-05-31 04:43:25 UTC (rev 47251)
+++ 
branches/soc-2012-swiss_cheese/source/gameengine/Converter/BL_BlenderDataConversion.cpp
 2012-05-31 04:54:56 UTC (rev 47252)
@@ -430,10 +430,7 @@
MFace* mface,
MCol* mmcol,
Material *mat,
-   unsigned int c0, 
-   unsigned int c1, 
-   unsigned int c2, 
-   unsigned int c3)
+   unsigned int c[4])
 {
unsigned int color = 0xL;
switch(type)
@@ -441,18 +438,18 @@
case 0: // vertex colors
{
if (mmcol) {
-   c0 = KX_Mcol2uint_new(mmcol[0]);
-   c1 = KX_Mcol2uint_new(mmcol[1]);
-   c2 = KX_Mcol2uint_new(mmcol[2]);
+   c[0] = KX_Mcol2uint_new(mmcol[0]);
+   c[1] = KX_Mcol2uint_new(mmcol[1]);
+   c[2] = KX_Mcol2uint_new(mmcol[2]);
if (mface-v4)
-   c3 = KX_Mcol2uint_new(mmcol[3]);
+   c[3] = KX_Mcol2uint_new(mmcol[3]);
}else // backup white
{
-   c0 = KX_rgbaint2uint_new(color);
-   c1 = KX_rgbaint2uint_new(color);
-   c2 = KX_rgbaint2uint_new(color);
+   c[0] = KX_rgbaint2uint_new(color);
+   c[1] = KX_rgbaint2uint_new(color);
+   c[2] = KX_rgbaint2uint_new(color);  
if (mface-v4)
-   c3 = KX_rgbaint2uint_new( color );
+   c[3] = KX_rgbaint2uint_new( color );
}
} break;

@@ -470,20 +467,20 @@
col_converter.cp[0] = (unsigned char) 
(mat-alpha*255.0);
color = col_converter.integer;
}
-   c0 = KX_rgbaint2uint_new(color);
-   c1 = KX_rgbaint2uint_new(color);
-   c2 = KX_rgbaint2uint_new(color);
+   c[0] = KX_rgbaint2uint_new(color);
+   c[1] = KX_rgbaint2uint_new(color);
+   c[2] = KX_rgbaint2uint_new(color);  
if (mface-v4)
-   c3 = KX_rgbaint2uint_new(color);
+   c[3] = KX_rgbaint2uint_new(color);
} break;

default: // white
{
-   c0 = KX_rgbaint2uint_new(color);
-   c1 = KX_rgbaint2uint_new(color);
-   c2 = KX_rgbaint2uint_new(color);
+   c[0] = KX_rgbaint2uint_new(color);
+   c[1] = KX_rgbaint2uint_new(color);
+   c[2] = KX_rgbaint2uint_new(color);  
if (mface-v4)
-   c3 = KX_rgbaint2uint_new(color);
+   c[3] = KX_rgbaint2uint_new(color);
} break;
}
 }
@@ -494,6 +491,65 @@
const char *name;
 }MTF_localLayer;
 
+static void GetUVs(BL_Material *material, MTF_localLayer *layers, MFace 
*mface, MTFace *tface, MT_Point2 uvs[4][MAXTEX])
+{
+   if (tface)
+   {
+   
+   uvs[0][0].setValue(tface-uv[0]);
+   uvs[1][0].setValue(tface-uv[1]);
+   uvs[2][0].setValue(tface-uv[2]);
+
+   if (mface-v4) 
+   uvs[3][0].setValue(tface-uv[3]);
+   }
+   else
+   {
+   uvs[0][0] = uvs[1][0] = uvs[2][0] = uvs[3][0] = MT_Point2(0.f, 
0.f);
+   }
+   
+   for (int vind = 0; vindmaterial-num_enabled; vind++)
+   {
+   BL_Mapping map =