Error in last commit, disable cycles when not enabled
Would only disable when loading old preferences.
This commit is contained in:
		@@ -2148,18 +2148,8 @@ void init_userdef_do_versions(void)
 | 
				
			|||||||
				rgba_char_args_set(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
 | 
									rgba_char_args_set(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef WITH_CYCLES
 | 
					 | 
				
			||||||
		/* enable (Cycles) addon by default */
 | 
							/* enable (Cycles) addon by default */
 | 
				
			||||||
		BKE_addon_ensure(&U.addons, "cycles");
 | 
							BKE_addon_ensure(&U.addons, "cycles");
 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			bAddon *addon = BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module));
 | 
					 | 
				
			||||||
			if (addon) {
 | 
					 | 
				
			||||||
				BKE_addon_free(addon);
 | 
					 | 
				
			||||||
				BLI_remlink(&U.addons, addon);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	if (!USER_VERSION_ATLEAST(260, 5)) {
 | 
						if (!USER_VERSION_ATLEAST(260, 5)) {
 | 
				
			||||||
@@ -2804,6 +2794,15 @@ void init_userdef_do_versions(void)
 | 
				
			|||||||
	U.audiodevice = 0;
 | 
						U.audiodevice = 0;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Not versioning, just avoid errors. */
 | 
				
			||||||
 | 
					#ifndef WITH_CYCLES
 | 
				
			||||||
 | 
						bAddon *addon = BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module));
 | 
				
			||||||
 | 
						if (addon) {
 | 
				
			||||||
 | 
							BLI_remlink(&U.addons, addon);
 | 
				
			||||||
 | 
							BKE_addon_free(addon);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* funny name, but it is GE stuff, moves userdef stuff to engine */
 | 
						/* funny name, but it is GE stuff, moves userdef stuff to engine */
 | 
				
			||||||
// XXX	space_set_commmandline_options();
 | 
					// XXX	space_set_commmandline_options();
 | 
				
			||||||
	/* this timer uses U */
 | 
						/* this timer uses U */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user