Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_image.py
| Context not available. | |||||
| layout.operator("uv.select_split") | layout.operator("uv.select_split") | ||||
| layout.operator("uv.select_overlap") | layout.operator("uv.select_overlap") | ||||
| class IMAGE_MT_trim(Menu): | |||||
| bl_label = "NURBS:" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.operator("uv.nurbsuv_delete_trim", text="Delete Trim") | |||||
| layout.menu("IMAGE_MT_add") | |||||
| class IMAGE_MT_add(Menu): | |||||
| bl_label = "Add" | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| layout.operator("uv.nurbsuv_add_square", text="Square Trim", icon='MESH_PLANE') | |||||
| layout.operator("uv.nurbsuv_add_circle", text="Circular Trim", icon='SURFACE_NCIRCLE') | |||||
| class IMAGE_MT_image(Menu): | class IMAGE_MT_image(Menu): | ||||
| bl_label = "Image" | bl_label = "Image" | ||||
| Context not available. | |||||
| show_uvedit = sima.show_uvedit | show_uvedit = sima.show_uvedit | ||||
| show_maskedit = sima.show_maskedit | show_maskedit = sima.show_maskedit | ||||
| show_nurbsuv = sima.show_nurbsuv | |||||
| layout.menu("IMAGE_MT_view") | layout.menu("IMAGE_MT_view") | ||||
| if show_uvedit: | if show_uvedit: | ||||
| layout.menu("IMAGE_MT_select") | layout.menu("IMAGE_MT_select") | ||||
| if show_nurbsuv: | |||||
| layout.menu("IMAGE_MT_trim") | |||||
| if show_maskedit: | if show_maskedit: | ||||
| layout.menu("MASK_MT_select") | layout.menu("MASK_MT_select") | ||||
| Context not available. | |||||
| layout.template_image(sima, "image", iuser, multiview=True) | layout.template_image(sima, "image", iuser, multiview=True) | ||||
| class IMAGE_PT_view_nurbs(Panel): | |||||
| bl_space_type = 'IMAGE_EDITOR' | |||||
| bl_region_type = 'UI' | |||||
| bl_label = 'NURBS:' | |||||
| @classmethod | |||||
| def poll(cls, context): | |||||
| return context.space_data.show_nurbsuv | |||||
| def draw(self, context): | |||||
| layout = self.layout | |||||
| split = layout.split() | |||||
| col = split.column() | |||||
| cu = context.edit_object.data | |||||
| active_breakpt = cu.active_breakpt | |||||
| active_trim = cu.active_trim | |||||
| active_trim_nurb = cu.active_trim_nurb | |||||
| if active_breakpt: | |||||
| col.label(text="Active Breakpoint:") | |||||
| col.prop(active_breakpt, "loc", text="Location") | |||||
| col.prop(active_breakpt, "multiplicity", text="Multiplicity") | |||||
| if active_trim: | |||||
| col.label(text="Active Trim:") | |||||
| sub = col.column() | |||||
| sub.row().prop(active_trim, "type", expand=True) | |||||
| if active_trim_nurb: | |||||
| col.label(text="Active Trim Geometry:") | |||||
| col.prop(active_trim_nurb, "resolution_u", text="Resolution:") | |||||
| class IMAGE_PT_view_display(Panel): | class IMAGE_PT_view_display(Panel): | ||||
| bl_space_type = 'IMAGE_EDITOR' | bl_space_type = 'IMAGE_EDITOR' | ||||
| Context not available. | |||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| sima = context.space_data | sima = context.space_data | ||||
| return (sima and (sima.image or sima.show_uvedit)) | return (sima and (sima.image or sima.show_uvedit or sima.show_nurbsuv)) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| Context not available. | |||||
| ima = sima.image | ima = sima.image | ||||
| show_uvedit = sima.show_uvedit | show_uvedit = sima.show_uvedit | ||||
| show_nurbsuv = sima.show_nurbsuv | |||||
| uvedit = sima.uv_editor | uvedit = sima.uv_editor | ||||
| col = layout.column() | col = layout.column() | ||||
| Context not available. | |||||
| col.prop(ima, "display_aspect", text="Aspect Ratio") | col.prop(ima, "display_aspect", text="Aspect Ratio") | ||||
| col.prop(sima, "show_repeat", text="Repeat Image") | col.prop(sima, "show_repeat", text="Repeat Image") | ||||
| if show_uvedit: | if show_uvedit or show_nurbsuv: | ||||
| col.prop(uvedit, "show_pixel_coords", text="Pixel Coordinates") | col.prop(uvedit, "show_pixel_coords", text="Pixel Coordinates") | ||||
| Context not available. | |||||
| IMAGE_MT_view, | IMAGE_MT_view, | ||||
| IMAGE_MT_view_zoom, | IMAGE_MT_view_zoom, | ||||
| IMAGE_MT_select, | IMAGE_MT_select, | ||||
| IMAGE_MT_trim, | |||||
| IMAGE_MT_add, | |||||
| IMAGE_MT_image, | IMAGE_MT_image, | ||||
| IMAGE_MT_image_invert, | IMAGE_MT_image_invert, | ||||
| IMAGE_MT_uvs, | IMAGE_MT_uvs, | ||||
| Context not available. | |||||