[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49223] branches/soc-2011-tomato: Merging r49212 through r49222 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Wed Jul 25 21:46:23 CEST 2012


Revision: 49223
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49223
Author:   nazgul
Date:     2012-07-25 19:46:23 +0000 (Wed, 25 Jul 2012)
Log Message:
-----------
Merging r49212 through r49222 from trunk into soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49212
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49222

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenlib/intern/math_rotation.c
    branches/soc-2011-tomato/source/blender/editors/include/ED_image.h
    branches/soc-2011-tomato/source/blender/editors/include/ED_object.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c
    branches/soc-2011-tomato/source/blender/editors/object/object_select.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/paint_image.c
    branches/soc-2011-tomato/source/blender/editors/sculpt_paint/sculpt_uv.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_image/space_image.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/outliner_tools.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_constraints.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_snap.c
    branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_buttons.c
    branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_draw.c
    branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_ops.c
    branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_unwrap_ops.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_space_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Quaternion.c
    branches/soc-2011-tomato/source/blenderplayer/bad_level_call_stubs/stubs.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-49211
   + /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-49222

Modified: branches/soc-2011-tomato/source/blender/blenlib/intern/math_rotation.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenlib/intern/math_rotation.c	2012-07-25 19:45:34 UTC (rev 49222)
+++ branches/soc-2011-tomato/source/blender/blenlib/intern/math_rotation.c	2012-07-25 19:46:23 UTC (rev 49223)
@@ -662,15 +662,16 @@
 /* Axis angle to Quaternions */
 void axis_angle_to_quat(float q[4], const float axis[3], const float angle)
 {
+	float nor[3];
 
-	if (LIKELY(normalize_v3_v3(q + 1, axis) != 0.0f)) {
+	if (LIKELY(normalize_v3_v3(nor, axis) != 0.0f)) {
 		const float phi = angle / 2.0f;
 		float si;
 		si   = sinf(phi);
 		q[0] = cosf(phi);
-		q[1] *= si;
-		q[2] *= si;
-		q[3] *= si;
+		q[1] = nor[0] * si;
+		q[2] = nor[1] * si;
+		q[3] = nor[2] * si;
 	}
 	else {
 		unit_qt(q);

Modified: branches/soc-2011-tomato/source/blender/editors/include/ED_image.h
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/include/ED_image.h	2012-07-25 19:45:34 UTC (rev 49222)
+++ branches/soc-2011-tomato/source/blender/editors/include/ED_image.h	2012-07-25 19:46:23 UTC (rev 49223)
@@ -50,17 +50,17 @@
 void ED_space_image_release_buffer(struct SpaceImage *sima, void *lock);
 int ED_space_image_has_buffer(struct SpaceImage *sima);
 
-void ED_space_image_size(struct SpaceImage *sima, int *width, int *height);
-void ED_space_image_aspect(struct SpaceImage *sima, float *aspx, float *aspy);
-void ED_space_image_zoom(struct SpaceImage *sima, struct ARegion *ar, float *zoomx, float *zoomy);
-void ED_space_image_uv_aspect(struct SpaceImage *sima, float *aspx, float *aspy);
+void ED_space_image_get_size(struct SpaceImage *sima, int *width, int *height);
+void ED_space_image_get_aspect(struct SpaceImage *sima, float *aspx, float *aspy);
+void ED_space_image_get_zoom(struct SpaceImage *sima, struct ARegion *ar, float *zoomx, float *zoomy);
+void ED_space_image_get_uv_aspect(struct SpaceImage *sima, float *aspx, float *aspy);
 
 void ED_space_image_paint_update(struct wmWindowManager *wm, struct ToolSettings *settings);
 void ED_space_image_uv_sculpt_update(struct wmWindowManager *wm, struct ToolSettings *settings);
 
-void ED_image_size(struct Image *ima, int *width, int *height);
-void ED_image_aspect(struct Image *ima, float *aspx, float *aspy);
-void ED_image_uv_aspect(struct Image *ima, float *aspx, float *aspy);
+void ED_image_get_size(struct Image *ima, int *width, int *height);
+void ED_image_get_aspect(struct Image *ima, float *aspx, float *aspy);
+void ED_image_get_uv_aspect(struct Image *ima, float *aspx, float *aspy);
 
 int ED_space_image_show_render(struct SpaceImage *sima);
 int ED_space_image_show_paint(struct SpaceImage *sima);

Modified: branches/soc-2011-tomato/source/blender/editors/include/ED_object.h
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/include/ED_object.h	2012-07-25 19:45:34 UTC (rev 49222)
+++ branches/soc-2011-tomato/source/blender/editors/include/ED_object.h	2012-07-25 19:46:23 UTC (rev 49223)
@@ -41,6 +41,7 @@
 struct bPoseChannel;
 struct Curve;
 struct EnumPropertyItem;
+struct ID;
 struct KeyBlock;
 struct Lattice;
 struct Main;
@@ -183,6 +184,9 @@
 
 int ED_object_multires_update_totlevels_cb(struct Object *ob, void *totlevel_v);
 
+/* ibject_select.c */
+void ED_object_select_linked_by_id(struct bContext *C, struct ID *id);
+
 #ifdef __cplusplus
 }
 #endif


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-49211
   + /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-49222

Modified: branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c	2012-07-25 19:45:34 UTC (rev 49222)
+++ branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c	2012-07-25 19:46:23 UTC (rev 49223)
@@ -5845,6 +5845,8 @@
 			else
 				value++;
 
+			CLAMP(value, 0, pa->list_last_len - 1);
+
 			if (value < pa->list_scroll)
 				pa->list_scroll = value;
 			else if (value >= pa->list_scroll + pa->list_size)

Modified: branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c	2012-07-25 19:45:34 UTC (rev 49222)
+++ branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c	2012-07-25 19:46:23 UTC (rev 49223)
@@ -48,6 +48,8 @@
 #include "ED_sequencer.h"
 #include "ED_transform.h"
 
+#include "UI_view2d.h"
+
 #include "RNA_access.h"
 
 #include "mask_intern.h"  /* own include */
@@ -101,11 +103,17 @@
 				break;
 			}
 			case SPACE_SEQ:
-				zero_v2(co); /* MASKTODO */
+			{
+				ARegion *ar = CTX_wm_region(C);
+				UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]);
 				break;
+			}
 			case SPACE_IMAGE:
-				zero_v2(co); /* MASKTODO */
+			{
+				ARegion *ar = CTX_wm_region(C);
+				UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]);
 				break;
+			}
 			default:
 				/* possible other spaces from which mask editing is available */
 				BLI_assert(0);
@@ -139,8 +147,11 @@
 				zero_v2(co); /* MASKTODO */
 				break;
 			case SPACE_IMAGE:
+			{
+				//SpaceImage *sima = sa->spacedata.first;
 				zero_v2(co); /* MASKTODO */
 				break;
+			}
 			default:
 				/* possible other spaces from which mask editing is available */
 				BLI_assert(0);
@@ -215,7 +226,7 @@
 			case SPACE_IMAGE:
 			{
 				SpaceImage *sima = sa->spacedata.first;
-				ED_space_image_size(sima, width, height);
+				ED_space_image_get_size(sima, width, height);
 				break;
 			}
 			default:
@@ -251,8 +262,8 @@
 			}
 			case SPACE_IMAGE:
 			{
-				// SpaceImage *sima = sa->spacedata.first;
-				*aspx = *aspy = 1.0f;  /* MASKTODO - image aspect? */
+				SpaceImage *sima = sa->spacedata.first;
+				ED_space_image_get_aspect(sima, aspx, aspy);
 				break;
 			}
 			default:
@@ -270,25 +281,53 @@
 
 void ED_mask_pixelspace_factor(const bContext *C, float *scalex, float *scaley)
 {
-	SpaceClip *sc = CTX_wm_space_clip(C);
+	ScrArea *sa = CTX_wm_area(C);
+	if (sa && sa->spacedata.first) {
+		switch (sa->spacetype) {
+			case SPACE_CLIP:
+			{
+				SpaceClip *sc = sa->spacedata.first;
+				int width, height;
+				float zoomx, zoomy, aspx, aspy;
 
-	/* MASKTODO */
+				ED_space_clip_get_size(C, &width, &height);
+				ED_space_clip_get_zoom(C, &zoomx, &zoomy);
+				ED_space_clip_get_aspect(sc, &aspx, &aspy);
 
-	if (sc) {
-		int width, height;
-		float zoomx, zoomy, aspx, aspy;
+				*scalex = ((float)width * aspx) * zoomx;
+				*scaley = ((float)height * aspy) * zoomy;
+				break;
+			}
+			case SPACE_SEQ:
+			{
+				*scalex = *scaley = 1.0f;  /* MASKTODO? */
+				break;
+			}
+			case SPACE_IMAGE:
+			{
+				SpaceImage *sima = sa->spacedata.first;
+				ARegion *ar = CTX_wm_region(C);
+				int width, height;
+				float zoomx, zoomy, aspx, aspy;
 
-		ED_space_clip_get_size(C, &width, &height);
-		ED_space_clip_get_zoom(C, &zoomx, &zoomy);
-		ED_space_clip_get_aspect(sc, &aspx, &aspy);
+				ED_space_image_get_size(sima, &width, &height);
+				ED_space_image_get_zoom(sima, ar, &zoomx, &zoomy);
+				ED_space_image_get_aspect(sima, &aspx, &aspy);
 
-		*scalex = ((float)width * aspx) * zoomx;
-		*scaley = ((float)height * aspy) * zoomy;
+				*scalex = ((float)width * aspx) * zoomx;
+				*scaley = ((float)height * aspy) * zoomy;
+				break;
+			}
+			default:
+				/* possible other spaces from which mask editing is available */
+				BLI_assert(0);
+				*scalex = *scaley = 1.0f;
+				break;
+		}
 	}
 	else {
-		/* possible other spaces from which mask editing is available */
-		*scalex = 1.0f;
-		*scaley = 1.0f;
+		BLI_assert(0);
+		*scalex = *scaley = 1.0f;
 	}
 }
 

Modified: branches/soc-2011-tomato/source/blender/editors/object/object_select.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/object/object_select.c	2012-07-25 19:45:34 UTC (rev 49222)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list