[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48490] branches/soc-2011-tomato: Merging r48470 through r48489 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Mon Jul 2 13:30:12 CEST 2012


Revision: 48490
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48490
Author:   nazgul
Date:     2012-07-02 11:29:55 +0000 (Mon, 02 Jul 2012)
Log Message:
-----------
Merging r48470 through r48489 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mesh_validate.c
    branches/soc-2011-tomato/source/blender/blenlib/BLI_fileops.h
    branches/soc-2011-tomato/source/blender/blenlib/intern/storage.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/editors/object/object_bake.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/anim_movie.c
    branches/soc-2011-tomato/source/blender/windowmanager/wm_window.h

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-48469
   + /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-48489

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mesh_validate.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mesh_validate.c	2012-07-02 10:41:56 UTC (rev 48489)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mesh_validate.c	2012-07-02 11:29:55 UTC (rev 48490)
@@ -211,6 +211,7 @@
 
 	short verts_fixed = FALSE;
 	short vert_weights_fixed = FALSE;
+	int msel_fixed = FALSE;
 
 	int do_edge_recalc = FALSE;
 
@@ -754,8 +755,6 @@
 		}
 	}
 
-	PRINT("BKE_mesh_validate: finished\n\n");
-
 #   undef REMOVE_EDGE_TAG
 #   undef IS_REMOVED_EDGE
 #   undef REMOVE_LOOP_TAG
@@ -779,7 +778,51 @@
 		}
 	}
 
-	return (verts_fixed || vert_weights_fixed || do_polyloop_free || do_edge_free || do_edge_recalc);
+	if (mesh && mesh->mselect) {
+		MSelect *msel;
+		int free_msel = FALSE;
+
+		for (i = 0, msel = mesh->mselect; i < mesh->totselect; i++, msel++) {
+			int tot_elem;
+
+			if (msel->index < 0) {
+				PRINT("Mesh select element %d type %d index is negative, "
+				      "resetting selection stack.\n", i, msel->type);
+				free_msel = TRUE;
+				break;
+			}
+
+			switch (msel->type) {
+				case ME_VSEL:
+					tot_elem = mesh->totvert;
+					break;
+				case ME_ESEL:
+					tot_elem = mesh->totedge;
+					break;
+				case ME_FSEL:
+					tot_elem = mesh->totface;
+					break;
+			}
+
+			if (msel->index > tot_elem) {
+				PRINT("Mesh select element %d type %d index %d is larger than data array size %d, "
+				      "resetting selection stack.\n", i, msel->type, msel->index, tot_elem);
+
+				free_msel = TRUE;
+				break;
+			}
+		}
+
+		if (free_msel) {
+			MEM_freeN(mesh->mselect);
+			mesh->mselect = NULL;
+			mesh->totselect = 0;
+		}
+	}
+
+	PRINT("BKE_mesh_validate: finished\n\n");
+
+	return (verts_fixed || vert_weights_fixed || do_polyloop_free || do_edge_free || do_edge_recalc || msel_fixed);
 }
 
 static int mesh_validate_customdata(CustomData *data, short do_verbose, const short do_fixes)

Modified: branches/soc-2011-tomato/source/blender/blenlib/BLI_fileops.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenlib/BLI_fileops.h	2012-07-02 10:41:56 UTC (rev 48489)
+++ branches/soc-2011-tomato/source/blender/blenlib/BLI_fileops.h	2012-07-02 11:29:55 UTC (rev 48490)
@@ -65,7 +65,7 @@
 int    BLI_is_file(const char *path);
 void   BLI_dir_create_recursive(const char *dir);
 double BLI_dir_free_space(const char *dir);
-char  *BLI_current_working_dir(char *dir, const int maxlen);
+char  *BLI_current_working_dir(char *dir, const size_t maxlen);
 
 unsigned int BLI_dir_contents(const char *dir, struct direntry **filelist);
 

Modified: branches/soc-2011-tomato/source/blender/blenlib/intern/storage.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenlib/intern/storage.c	2012-07-02 10:41:56 UTC (rev 48489)
+++ branches/soc-2011-tomato/source/blender/blenlib/intern/storage.c	2012-07-02 11:29:55 UTC (rev 48490)
@@ -102,7 +102,7 @@
 static struct ListBase *dirbase = &dirbase_;
 
 /* can return NULL when the size is not big enough */
-char *BLI_current_working_dir(char *dir, const int maxncpy)
+char *BLI_current_working_dir(char *dir, const size_t maxncpy)
 {
 	const char *pwd = getenv("PWD");
 	if (pwd) {

Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c	2012-07-02 10:41:56 UTC (rev 48489)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c	2012-07-02 11:29:55 UTC (rev 48490)
@@ -5909,11 +5909,20 @@
 				}
 			}
 			else if (sl->spacetype == SPACE_SEQ) {
+				/* grease pencil data is not a direct data and can't be linked from direct_link*
+				 * functions, it should be linked from lib_link* funcrions instead
+				 *
+				 * otherwise it'll lead to lost grease data on open because it'll likely be
+				 * read from file after all other users of grease pencil and newdataadr would
+				 * simple return NULL here (sergey)
+				 */
+#if 0
 				SpaceSeq *sseq = (SpaceSeq *)sl;
 				if (sseq->gpd) {
 					sseq->gpd = newdataadr(fd, sseq->gpd);
 					direct_link_gpencil(fd, sseq->gpd);
 				}
+#endif
 			}
 			else if (sl->spacetype == SPACE_BUTS) {
 				SpaceButs *sbuts = (SpaceButs *)sl;


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-48469
   + /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-48489

Modified: branches/soc-2011-tomato/source/blender/editors/object/object_bake.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/object/object_bake.c	2012-07-02 10:41:56 UTC (rev 48489)
+++ branches/soc-2011-tomato/source/blender/editors/object/object_bake.c	2012-07-02 11:29:55 UTC (rev 48490)
@@ -616,13 +616,15 @@
 
 		CLAMP(ss_lvl, 0, 6);
 
-		smd.levels = smd.renderLevels = ss_lvl;
-		smd.flags |= eSubsurfModifierFlag_SubsurfUv;
+		if (ss_lvl > 0) {
+			smd.levels = smd.renderLevels = ss_lvl;
+			smd.flags |= eSubsurfModifierFlag_SubsurfUv;
 
-		if (bkr->simple)
-			smd.subdivType = ME_SIMPLE_SUBSURF;
+			if (bkr->simple)
+				smd.subdivType = ME_SIMPLE_SUBSURF;
 
-		height_data->ssdm = subsurf_make_derived_from_derived(bkr->lores_dm, &smd, NULL, 0);
+			height_data->ssdm = subsurf_make_derived_from_derived(bkr->lores_dm, &smd, NULL, 0);
+		}
 	}
 
 	height_data->origindex = lodm->getTessFaceDataArray(lodm, CD_ORIGINDEX);


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-48469
   + /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-48489

Modified: branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c	2012-07-02 10:41:56 UTC (rev 48489)
+++ branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c	2012-07-02 11:29:55 UTC (rev 48490)
@@ -2694,9 +2694,12 @@
 		return OPERATOR_CANCELLED;
 	}
 
-	sound_remove_scene_sound(scene, seq_act->scene_sound);
-	sound_remove_scene_sound(scene, seq_other->scene_sound);
+	if (seq_act->scene_sound)
+		sound_remove_scene_sound(scene, seq_act->scene_sound);
 
+	if (seq_other->scene_sound)
+		sound_remove_scene_sound(scene, seq_other->scene_sound);
+
 	seq_act->scene_sound = NULL;
 	seq_other->scene_sound = NULL;
 

Modified: branches/soc-2011-tomato/source/blender/imbuf/intern/anim_movie.c
===================================================================
--- branches/soc-2011-tomato/source/blender/imbuf/intern/anim_movie.c	2012-07-02 10:41:56 UTC (rev 48489)
+++ branches/soc-2011-tomato/source/blender/imbuf/intern/anim_movie.c	2012-07-02 11:29:55 UTC (rev 48490)
@@ -64,7 +64,7 @@
 #include <io.h>
 #endif
 
-#include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail
+#include "BLI_blenlib.h" /* BLI_remlink BLI_file_descriptor_size BLI_addtail
                           * BLI_countlist BLI_stringdec */
 #include "BLI_utildefines.h"
 #include "BLI_math_base.h"

Modified: branches/soc-2011-tomato/source/blender/windowmanager/wm_window.h
===================================================================
--- branches/soc-2011-tomato/source/blender/windowmanager/wm_window.h	2012-07-02 10:41:56 UTC (rev 48489)
+++ branches/soc-2011-tomato/source/blender/windowmanager/wm_window.h	2012-07-02 11:29:55 UTC (rev 48490)
@@ -56,7 +56,7 @@
 void		wm_window_lower			(wmWindow *win);
 void		wm_window_set_size		(wmWindow *win, int width, int height);

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list