Fix bone-size crash
Own regression from multi-object transform.
This commit is contained in:
		@@ -551,6 +551,7 @@ typedef struct TransInfo {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* transinfo->flag */
 | 
					/* transinfo->flag */
 | 
				
			||||||
#define T_OBJECT		(1 << 0)
 | 
					#define T_OBJECT		(1 << 0)
 | 
				
			||||||
 | 
					/** \note We could remove 'T_EDIT' and use 'obedit_type', for now ensure they're in sync. */
 | 
				
			||||||
#define T_EDIT			(1 << 1)
 | 
					#define T_EDIT			(1 << 1)
 | 
				
			||||||
#define T_POSE			(1 << 2)
 | 
					#define T_POSE			(1 << 2)
 | 
				
			||||||
#define T_TEXTURE		(1 << 3)
 | 
					#define T_TEXTURE		(1 << 3)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8504,6 +8504,7 @@ void createTransData(bContext *C, TransInfo *t)
 | 
				
			|||||||
		if (t->mode == TFM_BONESIZE) {
 | 
							if (t->mode == TFM_BONESIZE) {
 | 
				
			||||||
			t->flag &= ~(T_EDIT | T_POINTS);
 | 
								t->flag &= ~(T_EDIT | T_POINTS);
 | 
				
			||||||
			t->flag |= T_POSE;
 | 
								t->flag |= T_POSE;
 | 
				
			||||||
 | 
								t->obedit_type = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			FOREACH_TRANS_DATA_CONTAINER (t, tc) {
 | 
								FOREACH_TRANS_DATA_CONTAINER (t, tc) {
 | 
				
			||||||
				tc->poseobj = tc->obedit;
 | 
									tc->poseobj = tc->obedit;
 | 
				
			||||||
@@ -8582,4 +8583,6 @@ void createTransData(bContext *C, TransInfo *t)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	/* Check that 'countAndCleanTransDataContainer' ran. */
 | 
						/* Check that 'countAndCleanTransDataContainer' ran. */
 | 
				
			||||||
	BLI_assert(t->data_len_all != -1);
 | 
						BLI_assert(t->data_len_all != -1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						BLI_assert((!(t->flag & T_EDIT)) == (!(t->obedit_type != -1)));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user