Fix for multiple modifier stack calculations per frame.
Since 2.5x blender has been using CD_MASK_BAREMESH for updating objects since object_handle_update() no longer has access to G.curscreen to calculate the mask from viewports. The problem with this is after an initial calculation, CD_MASK_MTFACE may be required on draw, so it would recalculate the modifier stack multiple times per frame. One case which caused this is armature animated mesh with texface in a dupligroup. Fix this by having customdata_mask member in the scene, this isn't great design but at least fixes the bug and only changes a few files.
This commit is contained in:
		@@ -56,6 +56,7 @@
 | 
			
		||||
#include "ED_fileselect.h"
 | 
			
		||||
#include "ED_info.h"
 | 
			
		||||
#include "ED_screen.h"
 | 
			
		||||
#include "ED_view3d.h"
 | 
			
		||||
#include "ED_util.h"
 | 
			
		||||
 | 
			
		||||
#include "RNA_access.h"
 | 
			
		||||
@@ -296,6 +297,10 @@ void wm_event_do_notifiers(bContext *C)
 | 
			
		||||
		/* XXX make lock in future, or separated derivedmesh users in scene */
 | 
			
		||||
		if(!G.rendering)
 | 
			
		||||
			/* depsgraph & animation: update tagged datablocks */
 | 
			
		||||
 | 
			
		||||
			/* copied to set's in scene_update_tagged_recursive() */
 | 
			
		||||
			win->screen->scene->customdata_mask= ED_viewedit_datamask(win->screen);
 | 
			
		||||
 | 
			
		||||
			scene_update_tagged(CTX_data_main(C), win->screen->scene);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user