Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_vertex.c
| Context not available. | |||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| #include "IMB_colormanagement.h" | |||||
| #include "DNA_armature_types.h" | #include "DNA_armature_types.h" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| Context not available. | |||||
| return col; | return col; | ||||
| } | } | ||||
| BLI_INLINE unsigned int mcol_lighten(unsigned int col1, unsigned int col2, int fac) | unsigned int mcol_lighten(unsigned int col1, unsigned int col2, int fac) | ||||
sergey: That is usually not a great idea to un-inline function which was explicitly marked for force… | |||||
Not Done Inline ActionsSee above. Open to options. sobotka: See above. Open to options. | |||||
psy-fiAuthorUnsubmitted Not Done Inline Actionssame psy-fi: same | |||||
| { | { | ||||
| unsigned char *cp1, *cp2, *cp; | unsigned char *cp1, *cp2, *cp; | ||||
| int mfac; | int mfac; | ||||
| Context not available. | |||||
| /* See if are lighter, if so mix, else don't do anything. | /* See if are lighter, if so mix, else don't do anything. | ||||
| * if the paint col is darker then the original, then ignore */ | * if the paint col is darker then the original, then ignore */ | ||||
| if (rgb_to_grayscale_byte(cp1) > rgb_to_grayscale_byte(cp2)) { | if (IMB_colormanagement_get_luminance_byte(cp1) > | ||||
| IMB_colormanagement_get_luminance_byte(cp2)) { | |||||
| return col1; | return col1; | ||||
| } | } | ||||
| Context not available. | |||||
| return col; | return col; | ||||
| } | } | ||||
| BLI_INLINE unsigned int mcol_darken(unsigned int col1, unsigned int col2, int fac) | unsigned int mcol_darken(unsigned int col1, unsigned int col2, int fac) | ||||
psy-fiAuthorUnsubmitted Not Done Inline Actionssame psy-fi: same | |||||
| { | { | ||||
| unsigned char *cp1, *cp2, *cp; | unsigned char *cp1, *cp2, *cp; | ||||
| int mfac; | int mfac; | ||||
| Context not available. | |||||
| /* See if were darker, if so mix, else don't do anything. | /* See if were darker, if so mix, else don't do anything. | ||||
| * if the paint col is brighter then the original, then ignore */ | * if the paint col is brighter then the original, then ignore */ | ||||
| if (rgb_to_grayscale_byte(cp1) < rgb_to_grayscale_byte(cp2)) { | if (IMB_colormanagement_get_luminance_byte(cp1) < | ||||
| IMB_colormanagement_get_luminance_byte(cp2)) { | |||||
| return col1; | return col1; | ||||
| } | } | ||||
| Context not available. | |||||
That is usually not a great idea to un-inline function which was explicitly marked for force-inline. What's the reason for that?