Added Image.GetCurrent()
Previously the only way to get the current image was flaky and relyd on the image being assigned to a mesh. try: me = Scene.GetCurrent().getAttiveObject().getData(mesh=1) image = me.faces[me.activeFace].image except: image = None ...Can new be replaced by the following, and works even when there is no mesh. image = Image.GetCurrent() epydocs: Get the currently displayed Image from Blenders UV/Image window. When multiple images are displayed, the last active UV/Image windows image is used.
This commit is contained in:
		@@ -52,6 +52,13 @@ def Get (name = None):
 | 
			
		||||
      - (): A list with all Image objects in the current scene.
 | 
			
		||||
  """
 | 
			
		||||
 | 
			
		||||
def GetCurrent ():
 | 
			
		||||
  """
 | 
			
		||||
  Get the currently displayed Image from Blenders UV/Image window.
 | 
			
		||||
  When multiple images are displayed, the last active UV/Image windows image is used.
 | 
			
		||||
  @rtype: Blender Image
 | 
			
		||||
  @return: The Current Blender Image, If there is no current image it returns None.
 | 
			
		||||
  """
 | 
			
		||||
 | 
			
		||||
class Image:
 | 
			
		||||
  """
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user