fix [#28096] Custom gradient for weightpainting in mask mode not working properly.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 28 Jul 2011 12:17:24 +0000 (12:17 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 28 Jul 2011 12:17:24 +0000 (12:17 +0000)
source/blender/editors/interface/resources.c

index 3f825762d74b41fba94dc0e78e47b0d5ac63aa61..56ef5e9e8cc15ed26c17faab1da0a804210d0295 100644 (file)
@@ -1115,10 +1115,11 @@ void init_userdef_do_versions(void)
        }
        if(U.pad_rot_angle==0)
                U.pad_rot_angle= 15;
-       
-       if(U.flag & USER_CUSTOM_RANGE) 
-               vDM_ColorBand_store(&U.coba_weight); /* signal for derivedmesh to use colorband */
-       
+
+       /* signal for derivedmesh to use colorband */
+       /* run incase this was on and is now off in the user prefs [#28096] */
+       vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight):NULL);
+
        if (bmain->versionfile <= 191) {
                strcpy(U.plugtexdir, U.textudir);
                strcpy(U.sounddir, "/");