1 # ##### BEGIN GPL LICENSE BLOCK #####
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # ##### END GPL LICENSE BLOCK #####
21 from bpy.types import Header, Menu, Panel
22 from bl_ui.properties_paint_common import UnifiedPaintPanel
25 class ImagePaintPanel(UnifiedPaintPanel):
26 bl_space_type = 'IMAGE_EDITOR'
30 class BrushButtonsPanel:
31 bl_space_type = 'IMAGE_EDITOR'
35 def poll(cls, context):
36 sima = context.space_data
37 toolsettings = context.tool_settings.image_paint
38 return sima.show_paint and toolsettings.brush
41 class IMAGE_MT_view(Menu):
44 def draw(self, context):
47 sima = context.space_data
49 toolsettings = context.tool_settings
51 show_uvedit = sima.show_uvedit
53 layout.operator("image.properties", icon='MENU_PANEL')
54 layout.operator("image.scopes", icon='MENU_PANEL')
58 layout.prop(sima, "use_realtime_update")
60 layout.prop(toolsettings, "show_uv_local_view")
62 layout.prop(uv, "show_other_objects")
66 layout.operator("image.view_zoom_in")
67 layout.operator("image.view_zoom_out")
71 ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
74 layout.operator("image.view_zoom_ratio", text="Zoom" + " %d:%d" % (a, b)).ratio = a / b
79 layout.operator("image.view_selected")
81 layout.operator("image.view_all")
85 layout.operator("screen.area_dupli")
86 layout.operator("screen.screen_full_area")
89 class IMAGE_MT_select(Menu):
92 def draw(self, context):
95 layout.operator("uv.select_border").pinned = False
96 layout.operator("uv.select_border", text="Border Select Pinned").pinned = True
100 layout.operator("uv.select_all").action = 'TOGGLE'
101 layout.operator("uv.select_all", text="Inverse").action = 'INVERT'
102 layout.operator("uv.unlink_selected")
106 layout.operator("uv.select_pinned")
107 layout.operator("uv.select_linked")
110 class IMAGE_MT_image(Menu):
113 def draw(self, context):
116 sima = context.space_data
119 layout.operator("image.new")
120 layout.operator("image.open")
122 show_render = sima.show_render
126 layout.operator("image.replace")
127 layout.operator("image.reload")
129 layout.operator("image.save")
130 layout.operator("image.save_as")
131 layout.operator("image.save_as", text="Save a Copy").copy = True
133 if ima.source == 'SEQUENCE':
134 layout.operator("image.save_sequence")
136 layout.operator("image.external_edit", "Edit Externally")
140 layout.menu("IMAGE_MT_image_invert")
146 layout.operator("image.unpack")
148 layout.operator("image.pack")
150 # only for dirty && specific image types, perhaps
151 # this could be done in operator poll too
153 if ima.source in {'FILE', 'GENERATED'} and ima.type != 'OPEN_EXR_MULTILAYER':
154 layout.operator("image.pack", text="Pack As PNG").as_png = True
159 class IMAGE_MT_image_invert(Menu):
162 def draw(self, context):
165 props = layout.operator("image.invert", text="Invert Image Colors")
166 props.invert_r = True
167 props.invert_g = True
168 props.invert_b = True
172 props = layout.operator("image.invert", text="Invert Red Channel")
173 props.invert_r = True
175 props = layout.operator("image.invert", text="Invert Green Channel")
176 props.invert_g = True
178 props = layout.operator("image.invert", text="Invert Blue Channel")
179 props.invert_b = True
181 props = layout.operator("image.invert", text="Invert Alpha Channel")
182 props.invert_a = True
185 class IMAGE_MT_uvs_showhide(Menu):
186 bl_label = "Show/Hide Faces"
188 def draw(self, context):
191 layout.operator("uv.reveal")
192 layout.operator("uv.hide", text="Hide Selected").unselected = False
193 layout.operator("uv.hide", text="Hide Unselected").unselected = True
196 class IMAGE_MT_uvs_transform(Menu):
197 bl_label = "Transform"
199 def draw(self, context):
202 layout.operator("transform.translate")
203 layout.operator("transform.rotate")
204 layout.operator("transform.resize")
208 layout.operator("transform.shear")
211 class IMAGE_MT_uvs_snap(Menu):
214 def draw(self, context):
216 layout.operator_context = 'EXEC_REGION_WIN'
218 layout.operator("uv.snap_selected", text="Selected to Pixels").target = 'PIXELS'
219 layout.operator("uv.snap_selected", text="Selected to Cursor").target = 'CURSOR'
220 layout.operator("uv.snap_selected", text="Selected to Adjacent Unselected").target = 'ADJACENT_UNSELECTED'
224 layout.operator("uv.snap_cursor", text="Cursor to Pixels").target = 'PIXELS'
225 layout.operator("uv.snap_cursor", text="Cursor to Selected").target = 'SELECTED'
228 class IMAGE_MT_uvs_mirror(Menu):
231 def draw(self, context):
233 layout.operator_context = 'EXEC_REGION_WIN'
235 layout.operator("transform.mirror", text="X Axis").constraint_axis[0] = True
236 layout.operator("transform.mirror", text="Y Axis").constraint_axis[1] = True
239 class IMAGE_MT_uvs_weldalign(Menu):
240 bl_label = "Weld/Align"
242 def draw(self, context):
245 layout.operator("uv.weld") # W, 1
246 layout.operator_enum("uv.align", "axis") # W, 2/3/4
249 class IMAGE_MT_uvs(Menu):
252 def draw(self, context):
255 sima = context.space_data
257 toolsettings = context.tool_settings
259 layout.prop(uv, "use_snap_to_pixels")
260 layout.prop(uv, "lock_bounds")
264 layout.prop(toolsettings, "use_uv_sculpt")
268 layout.prop(uv, "use_live_unwrap")
269 layout.operator("uv.unwrap")
270 layout.operator("uv.pin", text="Unpin").clear = True
271 layout.operator("uv.pin")
275 layout.operator("uv.pack_islands")
276 layout.operator("uv.average_islands_scale")
277 layout.operator("uv.minimize_stretch")
278 layout.operator("uv.stitch")
279 layout.operator("uv.mark_seam")
280 layout.operator("uv.seams_from_islands")
281 layout.operator("mesh.faces_mirror_uv")
285 layout.menu("IMAGE_MT_uvs_transform")
286 layout.menu("IMAGE_MT_uvs_mirror")
287 layout.menu("IMAGE_MT_uvs_snap")
288 layout.menu("IMAGE_MT_uvs_weldalign")
292 layout.prop_menu_enum(toolsettings, "proportional_edit")
293 layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
297 layout.menu("IMAGE_MT_uvs_showhide")
300 class IMAGE_MT_uvs_select_mode(Menu):
301 bl_label = "UV Select Mode"
303 def draw(self, context):
306 layout.operator_context = 'INVOKE_REGION_WIN'
307 toolsettings = context.tool_settings
309 # do smart things depending on whether uv_select_sync is on
311 if toolsettings.use_uv_select_sync:
312 props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
313 props.value = "(True, False, False)"
314 props.data_path = "tool_settings.mesh_select_mode"
316 props = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
317 props.value = "(False, True, False)"
318 props.data_path = "tool_settings.mesh_select_mode"
320 props = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
321 props.value = "(False, False, True)"
322 props.data_path = "tool_settings.mesh_select_mode"
325 props = layout.operator("wm.context_set_string", text="Vertex", icon='UV_VERTEXSEL')
326 props.value = 'VERTEX'
327 props.data_path = "tool_settings.uv_select_mode"
329 props = layout.operator("wm.context_set_string", text="Edge", icon='UV_EDGESEL')
331 props.data_path = "tool_settings.uv_select_mode"
333 props = layout.operator("wm.context_set_string", text="Face", icon='UV_FACESEL')
335 props.data_path = "tool_settings.uv_select_mode"
337 props = layout.operator("wm.context_set_string", text="Island", icon='UV_ISLANDSEL')
338 props.value = 'ISLAND'
339 props.data_path = "tool_settings.uv_select_mode"
342 class IMAGE_HT_header(Header):
343 bl_space_type = 'IMAGE_EDITOR'
345 def draw(self, context):
348 sima = context.space_data
350 iuser = sima.image_user
351 toolsettings = context.tool_settings
354 show_render = sima.show_render
355 # show_paint = sima.show_paint
356 show_uvedit = sima.show_uvedit
358 row = layout.row(align=True)
359 row.template_header()
362 if context.area.show_menus:
363 sub = row.row(align=True)
364 sub.menu("IMAGE_MT_view")
367 sub.menu("IMAGE_MT_select")
369 if ima and ima.is_dirty:
370 sub.menu("IMAGE_MT_image", text="Image*")
372 sub.menu("IMAGE_MT_image", text="Image")
375 sub.menu("IMAGE_MT_uvs")
377 layout.template_ID(sima, "image", new="image.new")
379 layout.prop(sima, "use_image_pin", text="")
383 uvedit = sima.uv_editor
385 layout.prop(uvedit, "pivot_point", text="", icon_only=True)
386 layout.prop(toolsettings, "use_uv_select_sync", text="")
388 if toolsettings.use_uv_select_sync:
389 layout.template_edit_mode_selection()
391 layout.prop(toolsettings, "uv_select_mode", text="", expand=True)
392 layout.prop(uvedit, "sticky_select_mode", text="", icon_only=True)
394 row = layout.row(align=True)
395 row.prop(toolsettings, "proportional_edit", text="", icon_only=True)
396 if toolsettings.proportional_edit != 'DISABLED':
397 row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
399 row = layout.row(align=True)
400 row.prop(toolsettings, "use_snap", text="")
401 row.prop(toolsettings, "snap_target", text="")
403 mesh = context.edit_object.data
404 layout.prop_search(mesh.uv_textures, "active", mesh, "uv_textures", text="")
406 layout.prop(sima, "mode", text="")
410 row.template_ID(sima, "mask", new="mask.new")
413 uvedit = sima.uv_editor
414 layout.prop(uvedit, "pivot_point", text="", icon_only=True)
418 layout.template_image_layers(ima, iuser)
421 row = layout.row(align=True)
422 row.prop(sima, "draw_channels", text="", expand=True)
424 row = layout.row(align=True)
425 if ima.type == 'COMPOSITE':
426 row.operator("image.record_composite", icon='REC')
427 if ima.type == 'COMPOSITE' and ima.source in {'MOVIE', 'SEQUENCE'}:
428 row.operator("image.play_composite", icon='PLAY')
430 if show_uvedit or mode == 'PAINT':
431 layout.prop(sima, "use_realtime_update", text="", icon_only=True, icon='LOCKED')
434 class IMAGE_PT_image_properties(Panel):
435 bl_space_type = 'IMAGE_EDITOR'
436 bl_region_type = 'UI'
440 def poll(cls, context):
441 sima = context.space_data
444 def draw(self, context):
447 sima = context.space_data
448 iuser = sima.image_user
450 layout.template_image(sima, "image", iuser)
453 class IMAGE_PT_game_properties(Panel):
454 bl_space_type = 'IMAGE_EDITOR'
455 bl_region_type = 'UI'
456 bl_label = "Game Properties"
459 def poll(cls, context):
460 sima = context.space_data
461 # display even when not in game mode because these settings effect the 3d view
462 return (sima and sima.image) # and (rd.engine == 'BLENDER_GAME')
464 def draw(self, context):
467 sima = context.space_data
470 split = layout.split()
474 col.prop(ima, "use_animation")
475 sub = col.column(align=True)
476 sub.active = ima.use_animation
477 sub.prop(ima, "frame_start", text="Start")
478 sub.prop(ima, "frame_end", text="End")
479 sub.prop(ima, "fps", text="Speed")
481 col.prop(ima, "use_tiles")
482 sub = col.column(align=True)
483 sub.active = ima.use_tiles or ima.use_animation
484 sub.prop(ima, "tiles_x", text="X")
485 sub.prop(ima, "tiles_y", text="Y")
488 col.label(text="Clamp:")
489 col.prop(ima, "use_clamp_x", text="X")
490 col.prop(ima, "use_clamp_y", text="Y")
492 col.prop(ima, "mapping", expand=True)
495 class IMAGE_PT_view_histogram(Panel):
496 bl_space_type = 'IMAGE_EDITOR'
497 bl_region_type = 'PREVIEW'
498 bl_label = "Histogram"
501 def poll(cls, context):
502 sima = context.space_data
503 return (sima and sima.image)
505 def draw(self, context):
508 sima = context.space_data
509 hist = sima.scopes.histogram
511 layout.template_histogram(sima.scopes, "histogram")
512 row = layout.row(align=True)
513 row.prop(hist, "mode", icon_only=True, expand=True)
514 row.prop(hist, "show_line", text="")
517 class IMAGE_PT_view_waveform(Panel):
518 bl_space_type = 'IMAGE_EDITOR'
519 bl_region_type = 'PREVIEW'
520 bl_label = "Waveform"
523 def poll(cls, context):
524 sima = context.space_data
525 return (sima and sima.image)
527 def draw(self, context):
530 sima = context.space_data
532 layout.template_waveform(sima, "scopes")
533 row = layout.split(percentage=0.75)
534 row.prop(sima.scopes, "waveform_alpha")
535 row.prop(sima.scopes, "waveform_mode", text="", icon_only=True)
538 class IMAGE_PT_view_vectorscope(Panel):
539 bl_space_type = 'IMAGE_EDITOR'
540 bl_region_type = 'PREVIEW'
541 bl_label = "Vectorscope"
544 def poll(cls, context):
545 sima = context.space_data
546 return (sima and sima.image)
548 def draw(self, context):
551 sima = context.space_data
552 layout.template_vectorscope(sima, "scopes")
553 layout.prop(sima.scopes, "vectorscope_alpha")
556 class IMAGE_PT_sample_line(Panel):
557 bl_space_type = 'IMAGE_EDITOR'
558 bl_region_type = 'PREVIEW'
559 bl_label = "Sample Line"
562 def poll(cls, context):
563 sima = context.space_data
564 return (sima and sima.image)
566 def draw(self, context):
569 sima = context.space_data
570 hist = sima.sample_histogram
572 layout.operator("image.sample_line")
573 layout.template_histogram(sima, "sample_histogram")
574 row = layout.row(align=True)
575 row.prop(hist, "mode", expand=True)
576 row.prop(hist, "show_line", text="")
579 class IMAGE_PT_scope_sample(Panel):
580 bl_space_type = 'IMAGE_EDITOR'
581 bl_region_type = 'PREVIEW'
582 bl_label = "Scope Samples"
585 def poll(cls, context):
586 sima = context.space_data
589 def draw(self, context):
592 sima = context.space_data
595 row.prop(sima.scopes, "use_full_resolution")
597 sub.active = not sima.scopes.use_full_resolution
598 sub.prop(sima.scopes, "accuracy")
601 class IMAGE_PT_view_properties(Panel):
602 bl_space_type = 'IMAGE_EDITOR'
603 bl_region_type = 'UI'
607 def poll(cls, context):
608 sima = context.space_data
609 return (sima and (sima.image or sima.show_uvedit))
611 def draw(self, context):
614 sima = context.space_data
616 show_uvedit = sima.show_uvedit
617 uvedit = sima.uv_editor
619 split = layout.split()
623 col.prop(ima, "display_aspect", text="Aspect Ratio")
626 col.label(text="Coordinates:")
627 col.prop(sima, "show_repeat", text="Repeat")
629 col.prop(uvedit, "show_normalized_coords", text="Normalized")
632 col.label(text="Coordinates:")
633 col.prop(uvedit, "show_normalized_coords", text="Normalized")
637 col = layout.column()
638 col.label("Cursor Location:")
639 col.row().prop(uvedit, "cursor_location", text="")
643 col.label(text="UVs:")
644 col.row().prop(uvedit, "edge_draw_type", expand=True)
646 split = layout.split()
649 col.prop(uvedit, "show_faces")
650 col.prop(uvedit, "show_smooth_edges", text="Smooth")
651 col.prop(uvedit, "show_modified_edges", text="Modified")
654 col.prop(uvedit, "show_stretch", text="Stretch")
656 sub.active = uvedit.show_stretch
657 sub.row().prop(uvedit, "draw_stretch_type", expand=True)
660 class IMAGE_PT_paint(Panel, ImagePaintPanel):
661 bl_space_type = 'IMAGE_EDITOR'
662 bl_region_type = 'UI'
666 def poll(cls, context):
667 sima = context.space_data
668 return sima.show_paint
670 def draw(self, context):
673 toolsettings = context.tool_settings.image_paint
674 brush = toolsettings.brush
676 col = layout.column()
677 col.template_ID_preview(toolsettings, "brush", new="brush.add", rows=2, cols=6)
680 col = layout.column()
681 col.template_color_wheel(brush, "color", value_slider=True)
682 col.prop(brush, "color", text="")
684 row = col.row(align=True)
685 self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
686 self.prop_unified_size(row, context, brush, "use_pressure_size")
688 row = col.row(align=True)
689 self.prop_unified_strength(row, context, brush, "strength", slider=True, text="Strength")
690 self.prop_unified_strength(row, context, brush, "use_pressure_strength")
692 row = col.row(align=True)
693 row.prop(brush, "jitter", slider=True)
694 row.prop(brush, "use_pressure_jitter", toggle=True, text="")
696 col.prop(brush, "blend", text="Blend")
698 if brush.image_tool == 'CLONE':
700 col.prop(brush, "clone_image", text="Image")
701 col.prop(brush, "clone_alpha", text="Alpha")
704 class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
706 bl_options = {'DEFAULT_CLOSED'}
708 def draw(self, context):
711 toolsettings = context.tool_settings.image_paint
712 brush = toolsettings.brush
714 col = layout.column()
715 col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
716 col.prop(brush, "use_fixed_texture")
719 class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
721 bl_options = {'DEFAULT_CLOSED'}
723 def draw(self, context):
725 toolsettings = context.tool_settings.image_paint
726 brush = toolsettings.brush
728 layout.prop(brush, "image_tool", text="")
730 row = layout.row(align=True)
731 row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
732 row.prop(brush, "use_paint_vertex", text="", icon='VPAINT_HLT')
733 row.prop(brush, "use_paint_weight", text="", icon='WPAINT_HLT')
734 row.prop(brush, "use_paint_image", text="", icon='TPAINT_HLT')
737 class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
738 bl_label = "Paint Stroke"
739 bl_options = {'DEFAULT_CLOSED'}
741 def draw(self, context):
744 toolsettings = context.tool_settings.image_paint
745 brush = toolsettings.brush
747 layout.prop(brush, "use_airbrush")
749 row.active = brush.use_airbrush
750 row.prop(brush, "rate", slider=True)
752 layout.prop(brush, "use_space")
753 row = layout.row(align=True)
754 row.active = brush.use_space
755 row.prop(brush, "spacing", text="Distance", slider=True)
756 row.prop(brush, "use_pressure_spacing", toggle=True, text="")
758 layout.prop(brush, "use_wrap")
761 class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
762 bl_label = "Paint Curve"
763 bl_options = {'DEFAULT_CLOSED'}
765 def draw(self, context):
768 toolsettings = context.tool_settings.image_paint
769 brush = toolsettings.brush
771 layout.template_curve_mapping(brush, "curve")
773 row = layout.row(align=True)
774 row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
775 row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
776 row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
777 row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
778 row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE'
779 row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
782 class IMAGE_UV_sculpt_curve(Panel):
783 bl_space_type = 'IMAGE_EDITOR'
784 bl_region_type = 'UI'
785 bl_label = "UV Sculpt Curve"
786 bl_options = {'DEFAULT_CLOSED'}
789 def poll(cls, context):
790 sima = context.space_data
791 toolsettings = context.tool_settings.image_paint
792 return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and toolsettings.brush)
794 def draw(self, context):
797 toolsettings = context.tool_settings
798 uvsculpt = toolsettings.uv_sculpt
799 brush = uvsculpt.brush
801 layout.template_curve_mapping(brush, "curve")
803 row = layout.row(align=True)
804 row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
805 row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
806 row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
807 row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
808 row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE'
809 row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
812 class IMAGE_UV_sculpt(Panel, ImagePaintPanel):
813 bl_space_type = 'IMAGE_EDITOR'
814 bl_region_type = 'UI'
815 bl_label = "UV Sculpt"
818 def poll(cls, context):
819 sima = context.space_data
820 toolsettings = context.tool_settings.image_paint
821 return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and toolsettings.brush)
823 def draw(self, context):
826 toolsettings = context.tool_settings
827 uvsculpt = toolsettings.uv_sculpt
828 brush = uvsculpt.brush
831 col = layout.column()
833 row = col.row(align=True)
834 self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
835 self.prop_unified_size(row, context, brush, "use_pressure_size")
837 row = col.row(align=True)
838 self.prop_unified_strength(row, context, brush, "strength", slider=True, text="Strength")
839 self.prop_unified_strength(row, context, brush, "use_pressure_strength")
841 split = layout.split()
844 col.prop(toolsettings, "uv_sculpt_lock_borders")
845 col.prop(toolsettings, "uv_sculpt_all_islands")
847 split = layout.split()
850 col.prop(toolsettings, "uv_sculpt_tool")
852 if toolsettings.uv_sculpt_tool == 'RELAX':
853 col.prop(toolsettings, "uv_relax_method")
857 # -----------------------------------------------------------------------------
858 # Mask (similar code in space_clip.py, keep in sync)
859 # note! - panel placement does _not_ fit well with image panels... need to fix
861 from bl_ui.properties_mask_common import (MASK_PT_mask,
869 class IMAGE_PT_mask(MASK_PT_mask, Panel):
870 bl_space_type = 'IMAGE_EDITOR'
871 bl_region_type = 'PREVIEW'
874 class IMAGE_PT_mask_layers(MASK_PT_layers, Panel):
875 bl_space_type = 'IMAGE_EDITOR'
876 bl_region_type = 'PREVIEW'
879 class IMAGE_PT_mask_display(MASK_PT_display, Panel):
880 bl_space_type = 'IMAGE_EDITOR'
881 bl_region_type = 'PREVIEW'
884 class IMAGE_PT_active_mask_spline(MASK_PT_spline, Panel):
885 bl_space_type = 'IMAGE_EDITOR'
886 bl_region_type = 'PREVIEW'
889 class IMAGE_PT_active_mask_point(MASK_PT_point, Panel):
890 bl_space_type = 'IMAGE_EDITOR'
891 bl_region_type = 'PREVIEW'
893 class IMAGE_PT_tools_mask(MASK_PT_tools, Panel):
894 bl_space_type = 'IMAGE_EDITOR'
895 bl_region_type = 'UI' # is 'TOOLS' in the clip editor
899 if __name__ == "__main__": # only for live edit.
900 bpy.utils.register_module(__name__)