Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(572)

Unified Diff: source/blender/blenkernel/intern/image.c

Issue 4289041: BGE: Material replacement for texface options (Closed) Base URL: https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Patch Set: Final patch - to be committed tomorrow morning Created 12 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/blender/blenkernel/intern/customdata.c ('k') | source/blender/blenkernel/intern/material.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/blender/blenkernel/intern/image.c
===================================================================
--- source/blender/blenkernel/intern/image.c (revision 40340)
+++ source/blender/blenkernel/intern/image.c (working copy)
@@ -2290,3 +2290,20 @@
iuser->framenr= framenr;
if(iuser->ok==0) iuser->ok= 1;
}
+
+int BKE_image_has_alpha(struct Image *image)
+{
+ ImBuf *ibuf;
+ void *lock;
+ int depth;
+
+ ibuf= BKE_image_acquire_ibuf(image, NULL, &lock);
+ depth = (ibuf?ibuf->depth:0);
+ BKE_image_release_ibuf(image, lock);
+
+ if (depth == 32)
+ return 1;
+ else
+ return 0;
+}
+
« no previous file with comments | « source/blender/blenkernel/intern/customdata.c ('k') | source/blender/blenkernel/intern/material.c » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b