| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # ##### BEGIN GPL LICENSE BLOCK ##### | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #  This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | #  modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | #  as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | #  of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | #  but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | #  GNU General Public License for more details. | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | #  along with this program; if not, write to the Free Software Foundation, | 
					
						
							| 
									
										
										
										
											2010-02-12 13:34:04 +00:00
										 |  |  | #  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # ##### END GPL LICENSE BLOCK ##### | 
					
						
							| 
									
										
										
										
											2009-10-31 20:16:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | # <pep8 compliant> | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | import bpy | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-05-16 10:21:00 +00:00
										 |  |  | narrowui = bpy.context.user_preferences.view.properties_width_check | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_MT_view(bpy.types.Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "View" | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sima = context.space_data | 
					
						
							| 
									
										
										
											
												Add the option to show also the UVs of other selected objects in image 
space / uv edit. The code was already there, and the option as a rna 
bool, but no ui to set it. Matt figured that the View menu in image 
space next to other uv stuff, which only shows when UVs are edited, is 
the right place. 
Works so that when entering editmode for an object to edit UVs, when 
have also other objects selected and this option on, also the UVs of 
those other objects are shown in the image view.
Liquidape asked this on IRC, and we thought the feat doesn't exist, so I 
looked out of curiosity in the code as was thinking it would be easy to 
add. Was surprised to find it there already :)
First time that did anything with 2.5, was sure fun enough to search 
thru the code to figure out how things work. Adding this ui thing proved 
to be exactly as trivial and nice as it should, and the things under the 
hood seemed nice, yay!
											
										 
											2010-05-06 23:47:25 +00:00
										 |  |  |         uv = sima.uv_editor | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         show_uvedit = sima.show_uvedit | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |         layout.operator("image.properties", icon='MENU_PANEL') | 
					
						
							| 
									
										
										
										
											2010-01-19 01:32:06 +00:00
										 |  |  |         layout.operator("image.scopes", icon='MENU_PANEL') | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(sima, "update_automatically") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if show_uvedit: | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |             layout.prop(toolsettings, "uv_local_view") # Numpad / | 
					
						
							| 
									
										
										
											
												Add the option to show also the UVs of other selected objects in image 
space / uv edit. The code was already there, and the option as a rna 
bool, but no ui to set it. Matt figured that the View menu in image 
space next to other uv stuff, which only shows when UVs are edited, is 
the right place. 
Works so that when entering editmode for an object to edit UVs, when 
have also other objects selected and this option on, also the UVs of 
those other objects are shown in the image view.
Liquidape asked this on IRC, and we thought the feat doesn't exist, so I 
looked out of curiosity in the code as was thinking it would be easy to 
add. Was surprised to find it there already :)
First time that did anything with 2.5, was sure fun enough to search 
thru the code to figure out how things work. Adding this ui thing proved 
to be exactly as trivial and nice as it should, and the things under the 
hood seemed nice, yay!
											
										 
											2010-05-06 23:47:25 +00:00
										 |  |  |             layout.prop(uv, "draw_other_objects") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("image.view_zoom_in") | 
					
						
							|  |  |  |         layout.operator("image.view_zoom_out") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  |         ratios = [[1, 8], [1, 4], [1, 2], [1, 1], [2, 1], [4, 1], [8, 1]] | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         for a, b in ratios: | 
					
						
							|  |  |  |             text = "Zoom %d:%d" % (a, b) | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |             layout.operator("image.view_zoom_ratio", text=text).ratio = a / b | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if show_uvedit: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.operator("image.view_selected") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("image.view_all") | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-03 16:28:50 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-12-04 17:54:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-03 16:28:50 +00:00
										 |  |  |         layout.operator("screen.area_dupli") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("screen.screen_full_area") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_MT_select(bpy.types.Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Select" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.select_border") | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |         layout.operator("uv.select_border").pinned = True | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-29 22:16:29 +00:00
										 |  |  |         layout.operator("uv.select_all") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.select_inverse") | 
					
						
							|  |  |  |         layout.operator("uv.unlink_selection") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.select_pinned") | 
					
						
							|  |  |  |         layout.operator("uv.select_linked") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_MT_image(bpy.types.Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Image" | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-09-01 00:33:39 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         ima = sima.image | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("image.new") | 
					
						
							|  |  |  |         layout.operator("image.open") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         show_render = sima.show_render | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if ima: | 
					
						
							|  |  |  |             if not show_render: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.operator("image.replace") | 
					
						
							|  |  |  |                 layout.operator("image.reload") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.operator("image.save") | 
					
						
							|  |  |  |             layout.operator("image.save_as") | 
					
						
							| 
									
										
										
										
											2010-04-21 19:14:20 +00:00
										 |  |  |             layout.operator("image.save_as", text="Save a Copy").copy = True | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if ima.source == 'SEQUENCE': | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.operator("image.save_sequence") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
											
												merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
											
										 
											2010-03-20 16:41:01 +00:00
										 |  |  |             layout.operator("image.external_edit", "Edit Externally") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if not show_render: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 if ima.packed_file: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     layout.operator("image.unpack") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                     layout.operator("image.pack") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 # only for dirty && specific image types, perhaps | 
					
						
							|  |  |  |                 # this could be done in operator poll too | 
					
						
							|  |  |  |                 if ima.dirty: | 
					
						
							|  |  |  |                     if ima.source in ('FILE', 'GENERATED') and ima.type != 'MULTILAYER': | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |                         layout.operator("image.pack", text="Pack As PNG").as_png = True | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(sima, "image_painting") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_MT_uvs_showhide(bpy.types.Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Show/Hide Faces" | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.reveal") | 
					
						
							| 
									
										
										
										
											2010-07-10 15:44:27 +00:00
										 |  |  |         layout.operator("uv.hide", text="Hide Selected") | 
					
						
							|  |  |  |         layout.operator("uv.hide", text="Hide Unselected").unselected = True | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_MT_uvs_transform(bpy.types.Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Transform" | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 |  |  |         layout.operator("transform.translate") | 
					
						
							|  |  |  |         layout.operator("transform.rotate") | 
					
						
							|  |  |  |         layout.operator("transform.resize") | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 23:20:31 +00:00
										 |  |  | class IMAGE_MT_uvs_snap(bpy.types.Menu): | 
					
						
							|  |  |  |     bl_label = "Snap" | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							| 
									
										
										
										
											2009-11-26 23:20:31 +00:00
										 |  |  |         layout = self.layout | 
					
						
							|  |  |  |         layout.operator_context = 'EXEC_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-26 23:20:31 +00:00
										 |  |  |         layout.operator("uv.snap_selection", text="Selected to Pixels").target = 'PIXELS' | 
					
						
							|  |  |  |         layout.operator("uv.snap_selection", text="Selected to Cursor").target = 'CURSOR' | 
					
						
							|  |  |  |         layout.operator("uv.snap_selection", text="Selected to Adjacent Unselected").target = 'ADJACENT_UNSELECTED' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.separator() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         layout.operator("uv.snap_cursor", text="Cursor to Pixels").target = 'PIXELS' | 
					
						
							|  |  |  |         layout.operator("uv.snap_cursor", text="Cursor to Selection").target = 'SELECTION' | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-28 23:37:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_MT_uvs_mirror(bpy.types.Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Mirror" | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-11-16 13:59:27 +00:00
										 |  |  |         layout.operator_context = 'EXEC_REGION_WIN' | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-10 10:36:32 +00:00
										 |  |  |         layout.operator("transform.mirror", text="X Axis").constraint_axis[0] = True | 
					
						
							|  |  |  |         layout.operator("transform.mirror", text="Y Axis").constraint_axis[1] = True | 
					
						
							| 
									
										
										
										
											2009-09-10 14:20:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class IMAGE_MT_uvs_weldalign(bpy.types.Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Weld/Align" | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.weld") # W, 1 | 
					
						
							|  |  |  |         layout.operator_enums("uv.align", "axis") # W, 2/3/4 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_MT_uvs(bpy.types.Menu): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "UVs" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         uv = sima.uv_editor | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(uv, "snap_to_pixels") | 
					
						
							|  |  |  |         layout.prop(uv, "constrain_to_image_bounds") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(uv, "live_unwrap") | 
					
						
							|  |  |  |         layout.operator("uv.unwrap") | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |         layout.operator("uv.pin", text="Unpin").clear = True | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.pin") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.operator("uv.pack_islands") | 
					
						
							|  |  |  |         layout.operator("uv.average_islands_scale") | 
					
						
							|  |  |  |         layout.operator("uv.minimize_stretch") | 
					
						
							|  |  |  |         layout.operator("uv.stitch") | 
					
						
							| 
									
										
										
										
											2010-01-13 17:58:26 +00:00
										 |  |  |         layout.operator("mesh.faces_miror_uv") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("IMAGE_MT_uvs_transform") | 
					
						
							|  |  |  |         layout.menu("IMAGE_MT_uvs_mirror") | 
					
						
							| 
									
										
										
										
											2009-11-26 23:20:31 +00:00
										 |  |  |         layout.menu("IMAGE_MT_uvs_snap") | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("IMAGE_MT_uvs_weldalign") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         layout.prop_menu_enum(toolsettings, "proportional_editing") | 
					
						
							|  |  |  |         layout.prop_menu_enum(toolsettings, "proportional_editing_falloff") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.separator() | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.menu("IMAGE_MT_uvs_showhide") | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_HT_header(bpy.types.Header): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         ima = sima.image | 
					
						
							|  |  |  |         iuser = sima.image_user | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-01 12:53:38 +00:00
										 |  |  |         show_render = sima.show_render | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  |         # show_paint = sima.show_paint | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         show_uvedit = sima.show_uvedit | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row(align=True) | 
					
						
							|  |  |  |         row.template_header() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         # menus | 
					
						
							|  |  |  |         if context.area.show_menus: | 
					
						
							|  |  |  |             sub = row.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.menu("IMAGE_MT_view") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if show_uvedit: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 sub.menu("IMAGE_MT_select") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if ima and ima.dirty: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 sub.menu("IMAGE_MT_image", text="Image*") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 sub.menu("IMAGE_MT_image", text="Image") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if show_uvedit: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 sub.menu("IMAGE_MT_uvs") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.template_ID(sima, "image", new="image.new") | 
					
						
							| 
									
										
										
										
											2010-04-01 12:53:38 +00:00
										 |  |  |         if not show_render: | 
					
						
							|  |  |  |             layout.prop(sima, "image_pin", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         # uv editing | 
					
						
							|  |  |  |         if show_uvedit: | 
					
						
							|  |  |  |             uvedit = sima.uv_editor | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(uvedit, "pivot", text="", icon_only=True) | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |             layout.prop(toolsettings, "uv_sync_selection", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |             if toolsettings.uv_sync_selection: | 
					
						
							|  |  |  |                 row = layout.row(align=True) | 
					
						
							|  |  |  |                 row.prop(toolsettings, "mesh_selection_mode", text="", index=0, icon='VERTEXSEL') | 
					
						
							|  |  |  |                 row.prop(toolsettings, "mesh_selection_mode", text="", index=1, icon='EDGESEL') | 
					
						
							|  |  |  |                 row.prop(toolsettings, "mesh_selection_mode", text="", index=2, icon='FACESEL') | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |                 layout.prop(toolsettings, "uv_selection_mode", text="", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 layout.prop(uvedit, "sticky_selection_mode", text="", icon_only=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-12-11 14:34:21 +00:00
										 |  |  |             row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |             row.prop(toolsettings, "proportional_editing", text="", icon_only=True) | 
					
						
							|  |  |  |             if toolsettings.proportional_editing != 'DISABLED': | 
					
						
							|  |  |  |                 row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True) | 
					
						
							| 
									
										
										
										
											2009-12-11 14:34:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |             row.prop(toolsettings, "snap", text="") | 
					
						
							|  |  |  |             row.prop(toolsettings, "snap_element", text="", icon_only=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  |             # mesh = context.edit_object.data | 
					
						
							| 
									
										
										
										
											2009-11-23 11:43:38 +00:00
										 |  |  |             # row.prop_object(mesh, "active_uv_layer", mesh, "uv_textures") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if ima: | 
					
						
							|  |  |  |             # layers | 
					
						
							|  |  |  |             layout.template_image_layers(ima, iuser) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             # painting | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             layout.prop(sima, "image_painting", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # draw options | 
					
						
							|  |  |  |             row = layout.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(sima, "draw_channels", text="", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = layout.row(align=True) | 
					
						
							|  |  |  |             if ima.type == 'COMPOSITE': | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |                 row.operator("image.record_composite", icon='REC') | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if ima.type == 'COMPOSITE' and ima.source in ('MOVIE', 'SEQUENCE'): | 
					
						
							| 
									
										
										
										
											2009-12-10 10:23:53 +00:00
										 |  |  |                 row.operator("image.play_composite", icon='PLAY') | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if show_uvedit or sima.image_painting: | 
					
						
							| 
									
										
										
										
											2009-12-11 01:12:22 +00:00
										 |  |  |             layout.prop(sima, "update_automatically", text="", icon_only=True, icon='LOCKED') | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | class IMAGE_PT_image_properties(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Image" | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         return (sima.image) | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sima = context.space_data | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  |         # ima = sima.image | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         iuser = sima.image_user | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-26 01:31:43 +00:00
										 |  |  |         layout.template_image(sima, "image", iuser) | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-16 01:22:56 +00:00
										 |  |  | class IMAGE_PT_game_properties(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Game Properties" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							| 
									
										
										
										
											2010-02-23 12:48:35 +00:00
										 |  |  |         rd = context.scene.render | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         return (sima and sima.image) and (rd.engine == 'BLENDER_GAME') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         ima = sima.image | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = col.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(ima, "animated") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         subsub = sub.column() | 
					
						
							|  |  |  |         subsub.active = ima.animated | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         subsub.prop(ima, "animation_start", text="Start") | 
					
						
							|  |  |  |         subsub.prop(ima, "animation_end", text="End") | 
					
						
							|  |  |  |         subsub.prop(ima, "animation_speed", text="Speed") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(ima, "tiles") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         sub = col.column(align=True) | 
					
						
							|  |  |  |         sub.active = ima.tiles or ima.animated | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         sub.prop(ima, "tiles_x", text="X") | 
					
						
							|  |  |  |         sub.prop(ima, "tiles_y", text="Y") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 18:53:53 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.label(text="Clamp:") | 
					
						
							|  |  |  |         col.prop(ima, "clamp_x", text="X") | 
					
						
							|  |  |  |         col.prop(ima, "clamp_y", text="Y") | 
					
						
							|  |  |  |         col.separator() | 
					
						
							|  |  |  |         col.prop(ima, "mapping", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-19 01:32:06 +00:00
										 |  |  | class IMAGE_PT_view_histogram(bpy.types.Panel): | 
					
						
							|  |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'PREVIEW' | 
					
						
							|  |  |  |     bl_label = "Histogram" | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-19 01:32:06 +00:00
										 |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         return (sima and sima.image) | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-19 01:32:06 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-06 02:05:54 +00:00
										 |  |  |         layout.template_histogram(sima.scopes, "histogram") | 
					
						
							|  |  |  |         layout.prop(sima.scopes.histogram, "mode", icon_only=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-17 19:05:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-06 02:05:54 +00:00
										 |  |  | class IMAGE_PT_view_waveform(bpy.types.Panel): | 
					
						
							|  |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'PREVIEW' | 
					
						
							|  |  |  |     bl_label = "Waveform" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         return (sima and sima.image) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         layout.template_waveform(sima, "scopes") | 
					
						
							|  |  |  |         sub = layout.row().split(percentage=0.75) | 
					
						
							|  |  |  |         sub.prop(sima.scopes, "waveform_alpha") | 
					
						
							|  |  |  |         sub.prop(sima.scopes, "waveform_mode", text="", icon_only=True) | 
					
						
							| 
									
										
										
										
											2010-04-17 19:05:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-06 02:05:54 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class IMAGE_PT_view_vectorscope(bpy.types.Panel): | 
					
						
							|  |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'PREVIEW' | 
					
						
							|  |  |  |     bl_label = "Vectorscope" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         return (sima and sima.image) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         layout.template_vectorscope(sima, "scopes") | 
					
						
							|  |  |  |         layout.prop(sima.scopes, "vectorscope_alpha") | 
					
						
							| 
									
										
										
										
											2010-04-04 14:52:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-17 19:05:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-23 23:36:24 +00:00
										 |  |  | class IMAGE_PT_sample_line(bpy.types.Panel): | 
					
						
							|  |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'PREVIEW' | 
					
						
							|  |  |  |     bl_label = "Sample Line" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         return (sima and sima.image) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         layout.operator("image.sample_line") | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         layout.template_histogram(sima, "sample_histogram") | 
					
						
							| 
									
										
										
										
											2010-04-06 02:05:54 +00:00
										 |  |  |         layout.prop(sima.sample_histogram, "mode") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-17 19:05:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-06 02:05:54 +00:00
										 |  |  | class IMAGE_PT_scope_sample(bpy.types.Panel): | 
					
						
							|  |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'PREVIEW' | 
					
						
							|  |  |  |     bl_label = "Scope Samples" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							| 
									
										
										
										
											2010-05-03 16:00:42 +00:00
										 |  |  |         return sima | 
					
						
							| 
									
										
										
										
											2010-01-31 14:46:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-06 02:05:54 +00:00
										 |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  |         row = split.row() | 
					
						
							|  |  |  |         row.prop(sima.scopes, "use_full_resolution") | 
					
						
							|  |  |  |         row = split.row() | 
					
						
							|  |  |  |         row.active = not sima.scopes.use_full_resolution | 
					
						
							|  |  |  |         row.prop(sima.scopes, "accuracy") | 
					
						
							| 
									
										
										
										
											2010-04-04 14:52:15 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-04-17 19:05:53 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-06-23 00:45:41 +00:00
										 |  |  | class IMAGE_PT_view_properties(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Display" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         return (sima and (sima.image or sima.show_uvedit)) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         ima = sima.image | 
					
						
							|  |  |  |         show_uvedit = sima.show_uvedit | 
					
						
							|  |  |  |         uvedit = sima.uv_editor | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         if ima: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(ima, "display_aspect", text="Aspect Ratio") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 18:53:53 +00:00
										 |  |  |                 col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Coordinates:") | 
					
						
							|  |  |  |             col.prop(sima, "draw_repeated", text="Repeat") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if show_uvedit: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 col.prop(uvedit, "normalized_coordinates", text="Normalized") | 
					
						
							| 
									
										
										
										
											2010-01-19 01:32:06 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         elif show_uvedit: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="Coordinates:") | 
					
						
							|  |  |  |             col.prop(uvedit, "normalized_coordinates", text="Normalized") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if show_uvedit: | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-03-30 05:52:05 +00:00
										 |  |  |             col = layout.column() | 
					
						
							|  |  |  |             col.prop(uvedit, "cursor_location") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             col = layout.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.label(text="UVs:") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             row = col.row() | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(uvedit, "edge_draw_type", expand=True) | 
					
						
							| 
									
										
										
										
											2009-11-17 18:53:53 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |                 row.prop(uvedit, "edge_draw_type", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(uvedit, "draw_smooth_edges", text="Smooth") | 
					
						
							|  |  |  |             col.prop(uvedit, "draw_modified_edges", text="Modified") | 
					
						
							|  |  |  |             #col.prop(uvedit, "draw_edges") | 
					
						
							|  |  |  |             #col.prop(uvedit, "draw_faces") | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-17 18:53:53 +00:00
										 |  |  |                 col = split.column() | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(uvedit, "draw_stretch", text="Stretch") | 
					
						
							| 
									
										
										
										
											2009-11-17 18:53:53 +00:00
										 |  |  |             sub = col.column() | 
					
						
							|  |  |  |             sub.active = uvedit.draw_stretch | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             sub.row().prop(uvedit, "draw_stretch_type", expand=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-21 00:05:43 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | class IMAGE_PT_paint(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Paint" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         return sima.show_paint | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings.image_paint | 
					
						
							|  |  |  |         brush = toolsettings.brush | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = layout.split().column() | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							| 
									
										
										
										
											2010-07-21 08:23:57 +00:00
										 |  |  |         col.template_ID_preview(toolsettings, "brush", new="brush.add", filter="is_imapaint_brush", rows=3, cols=8) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         if brush: | 
					
						
							|  |  |  |             col = layout.column() | 
					
						
							| 
									
										
										
										
											2010-01-07 09:55:11 +00:00
										 |  |  |             col.template_color_wheel(brush, "color", value_slider=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(brush, "color", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = col.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(brush, "size", slider=True) | 
					
						
							|  |  |  |             row.prop(brush, "use_size_pressure", toggle=True, text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = col.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(brush, "strength", slider=True) | 
					
						
							|  |  |  |             row.prop(brush, "use_strength_pressure", toggle=True, text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |             row = col.row(align=True) | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             row.prop(brush, "jitter", slider=True) | 
					
						
							|  |  |  |             row.prop(brush, "use_jitter_pressure", toggle=True, text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |             col.prop(brush, "blend", text="Blend") | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-02 17:41:32 +00:00
										 |  |  |             if brush.imagepaint_tool == 'CLONE': | 
					
						
							|  |  |  |                 col.separator() | 
					
						
							|  |  |  |                 col.prop(brush, "clone_image", text="Image") | 
					
						
							|  |  |  |                 col.prop(brush, "clone_alpha", text="Alpha") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-07-22 05:59:50 +00:00
										 |  |  | class IMAGE_PT_tools_brush_texture(bpy.types.Panel): | 
					
						
							|  |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Texture" | 
					
						
							|  |  |  |     bl_default_closed = True | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							|  |  |  |         toolsettings = context.tool_settings.image_paint | 
					
						
							|  |  |  |         return sima.show_paint and toolsettings.brush | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         toolsettings = context.tool_settings.image_paint | 
					
						
							|  |  |  |         brush = toolsettings.brush | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #        tex_slot = brush.texture_slot | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = layout.column() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | class IMAGE_PT_paint_stroke(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Paint Stroke" | 
					
						
							|  |  |  |     bl_default_closed = True | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings.image_paint | 
					
						
							|  |  |  |         return sima.show_paint and toolsettings.brush | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings.image_paint | 
					
						
							|  |  |  |         brush = toolsettings.brush | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(brush, "use_airbrush") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         col = layout.column() | 
					
						
							|  |  |  |         col.active = brush.use_airbrush | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         col.prop(brush, "rate", slider=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         layout.prop(brush, "use_space") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = layout.row(align=True) | 
					
						
							|  |  |  |         row.active = brush.use_space | 
					
						
							| 
									
										
										
										
											2009-11-23 00:27:30 +00:00
										 |  |  |         row.prop(brush, "spacing", text="Distance", slider=True) | 
					
						
							|  |  |  |         row.prop(brush, "use_spacing_pressure", toggle=True, text="") | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-02 17:41:32 +00:00
										 |  |  |         layout.prop(brush, "use_wrap") | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | class IMAGE_PT_paint_curve(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'IMAGE_EDITOR' | 
					
						
							|  |  |  |     bl_region_type = 'UI' | 
					
						
							|  |  |  |     bl_label = "Paint Curve" | 
					
						
							|  |  |  |     bl_default_closed = True | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def poll(self, context): | 
					
						
							|  |  |  |         sima = context.space_data | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings.image_paint | 
					
						
							|  |  |  |         return sima.show_paint and toolsettings.brush | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-01-16 14:31:21 +00:00
										 |  |  |         toolsettings = context.tool_settings.image_paint | 
					
						
							|  |  |  |         brush = toolsettings.brush | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         layout.template_curve_mapping(brush, "curve") | 
					
						
							| 
									
										
										
										
											2010-03-24 15:08:15 +00:00
										 |  |  |         layout.operator_menu_enum("brush.curve_preset", "shape") | 
					
						
							| 
									
										
										
										
											2009-09-16 19:27:08 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | classes = [ | 
					
						
							|  |  |  |     IMAGE_MT_view, | 
					
						
							|  |  |  |     IMAGE_MT_select, | 
					
						
							|  |  |  |     IMAGE_MT_image, | 
					
						
							|  |  |  |     IMAGE_MT_uvs_showhide, | 
					
						
							|  |  |  |     IMAGE_MT_uvs_transform, | 
					
						
							|  |  |  |     IMAGE_MT_uvs_snap, | 
					
						
							|  |  |  |     IMAGE_MT_uvs_mirror, | 
					
						
							|  |  |  |     IMAGE_MT_uvs_weldalign, | 
					
						
							|  |  |  |     IMAGE_MT_uvs, | 
					
						
							|  |  |  |     IMAGE_HT_header, | 
					
						
							|  |  |  |     IMAGE_PT_image_properties, | 
					
						
							|  |  |  |     IMAGE_PT_paint, | 
					
						
							| 
									
										
										
										
											2010-07-22 05:59:50 +00:00
										 |  |  |     IMAGE_PT_tools_brush_texture, | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  |     IMAGE_PT_paint_stroke, | 
					
						
							|  |  |  |     IMAGE_PT_paint_curve, | 
					
						
							|  |  |  |     IMAGE_PT_game_properties, | 
					
						
							|  |  |  |     IMAGE_PT_view_properties, | 
					
						
							| 
									
										
										
										
											2010-03-23 23:36:24 +00:00
										 |  |  |     IMAGE_PT_view_histogram, | 
					
						
							| 
									
										
										
										
											2010-04-06 02:05:54 +00:00
										 |  |  |     IMAGE_PT_view_waveform, | 
					
						
							|  |  |  |     IMAGE_PT_view_vectorscope, | 
					
						
							|  |  |  |     IMAGE_PT_sample_line, | 
					
						
							|  |  |  |     IMAGE_PT_scope_sample] | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | def register(): | 
					
						
							|  |  |  |     register = bpy.types.register | 
					
						
							|  |  |  |     for cls in classes: | 
					
						
							|  |  |  |         register(cls) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-22 23:32:58 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-02-14 11:21:21 +00:00
										 |  |  | def unregister(): | 
					
						
							|  |  |  |     unregister = bpy.types.unregister | 
					
						
							|  |  |  |     for cls in classes: | 
					
						
							|  |  |  |         unregister(cls) | 
					
						
							| 
									
										
										
										
											2010-02-16 09:55:07 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | if __name__ == "__main__": | 
					
						
							|  |  |  |     register() |