def draw(self, context): layout = self.layout maplus_data_ptr = bpy.types.AnyType(bpy.context.scene.maplus_data) addon_data = bpy.context.scene.maplus_data prims = addon_data.prim_list sme_top = layout.row() sme_gui = layout.box() sme_top.label(text="Match Edge Scale", icon="FULLSCREEN_ENTER") sme_grab_col = sme_gui.column() sme_grab_col.prop(addon_data, 'quick_scale_match_edge_auto_grab_src', text='Auto Grab Source from Selected Vertices') sme_src_geom_top = sme_grab_col.row(align=True) if not addon_data.quick_scale_match_edge_auto_grab_src: if not addon_data.quick_sme_show_src_geom: sme_src_geom_top.operator("maplus.showhidequicksmesrcgeom", icon='TRIA_RIGHT', text="", emboss=False) preserve_button_roundedge = sme_src_geom_top.row() preserve_button_roundedge.operator( "maplus.quickscalematchedgegrabsrc", icon='LIGHT_SUN', text="Grab Source") else: sme_src_geom_top.operator("maplus.showhidequicksmesrcgeom", icon='TRIA_DOWN', text="", emboss=False) sme_src_geom_top.label(text="Source Coordinates", icon="LIGHT_SUN") sme_src_geom_editor = sme_grab_col.box() ln_grab_all = sme_src_geom_editor.row(align=True) ln_grab_all.operator("maplus.quickscalematchedgegrabsrcloc", icon='VERTEXSEL', text="Grab All Local") ln_grab_all.operator("maplus.quickscalematchedgegrabsrc", icon='WORLD', text="Grab All Global") special_grabs = sme_src_geom_editor.row(align=True) special_grabs.operator("maplus.quicksmegrabnormalsrc", icon='LIGHT_HEMI', text="Grab Normal") special_grabs_extra = sme_src_geom_editor.row(align=True) special_grabs_extra.operator("maplus.copyfromsmesrc", icon='COPYDOWN', text="Copy (To Clipboard)") special_grabs_extra.operator("maplus.pasteintosmesrc", icon='PASTEDOWN', text="Paste (From Clipboard)") modifier_header = sme_src_geom_editor.row() modifier_header.label(text="Line Modifiers:") apply_mods = modifier_header.row() apply_mods.alignment = 'RIGHT' item_mods_box = sme_src_geom_editor.box() mods_row_1 = item_mods_box.row() mods_row_1.prop(bpy.types.AnyType( addon_data.quick_scale_match_edge_src), 'ln_make_unit_vec', text="Set Length Equal to One") mods_row_1.prop(bpy.types.AnyType( addon_data.quick_scale_match_edge_src), 'ln_flip_direction', text="Flip Direction") mods_row_2 = item_mods_box.row() mods_row_2.prop(bpy.types.AnyType( addon_data.quick_scale_match_edge_src), 'ln_multiplier', text="Multiplier") maplus_guitools.layout_coordvec( parent_layout=sme_src_geom_editor, coordvec_label="Start:", op_id_cursor_grab=( "maplus.quicksmesrcgrablinestartfromcursor"), op_id_avg_grab=("maplus.quicksmegrabavgsrclinestart"), op_id_local_grab=( "maplus.quicksmesrcgrablinestartfromactivelocal"), op_id_global_grab=( "maplus.quicksmesrcgrablinestartfromactiveglobal"), coord_container=addon_data.quick_scale_match_edge_src, coord_attribute="line_start", op_id_cursor_send=( "maplus.quicksmesrcsendlinestarttocursor"), op_id_text_tuple_swap_first=( "maplus.quicksmesrcswaplinepoints", "End")) maplus_guitools.layout_coordvec( parent_layout=sme_src_geom_editor, coordvec_label="End:", op_id_cursor_grab=( "maplus.quicksmesrcgrablineendfromcursor"), op_id_avg_grab=("maplus.quicksmegrabavgsrclineend"), op_id_local_grab=( "maplus.quicksmesrcgrablineendfromactivelocal"), op_id_global_grab=( "maplus.quicksmesrcgrablineendfromactiveglobal"), coord_container=addon_data.quick_scale_match_edge_src, coord_attribute="line_end", op_id_cursor_send=( "maplus.quicksmesrcsendlineendtocursor"), op_id_text_tuple_swap_first=( "maplus.quicksmesrcswaplinepoints", "Start")) if addon_data.quick_sme_show_src_geom: sme_grab_col.separator() sme_dest_geom_top = sme_grab_col.row(align=True) if not addon_data.quick_sme_show_dest_geom: sme_dest_geom_top.operator("maplus.showhidequicksmedestgeom", icon='TRIA_RIGHT', text="", emboss=False) preserve_button_roundedge = sme_dest_geom_top.row() preserve_button_roundedge.operator( "maplus.quickscalematchedgegrabdest", icon='LIGHT_SUN', text="Grab Destination") else: sme_dest_geom_top.operator("maplus.showhidequicksmedestgeom", icon='TRIA_DOWN', text="", emboss=False) sme_dest_geom_top.label(text="Destination Coordinates", icon="LIGHT_SUN") sme_dest_geom_editor = sme_grab_col.box() ln_grab_all = sme_dest_geom_editor.row(align=True) ln_grab_all.operator("maplus.quickscalematchedgegrabdestloc", icon='VERTEXSEL', text="Grab All Local") ln_grab_all.operator("maplus.quickscalematchedgegrabdest", icon='WORLD', text="Grab All Global") special_grabs = sme_dest_geom_editor.row(align=True) special_grabs.operator("maplus.quicksmegrabnormaldest", icon='LIGHT_HEMI', text="Grab Normal") special_grabs_extra = sme_dest_geom_editor.row(align=True) special_grabs_extra.operator("maplus.copyfromsmedest", icon='COPYDOWN', text="Copy (To Clipboard)") special_grabs_extra.operator("maplus.pasteintosmedest", icon='PASTEDOWN', text="Paste (From Clipboard)") modifier_header = sme_dest_geom_editor.row() modifier_header.label(text="Line Modifiers:") apply_mods = modifier_header.row() apply_mods.alignment = 'RIGHT' item_mods_box = sme_dest_geom_editor.box() mods_row_1 = item_mods_box.row() mods_row_1.prop(bpy.types.AnyType( addon_data.quick_scale_match_edge_dest), 'ln_make_unit_vec', text="Set Length Equal to One") mods_row_1.prop(bpy.types.AnyType( addon_data.quick_scale_match_edge_dest), 'ln_flip_direction', text="Flip Direction") mods_row_2 = item_mods_box.row() mods_row_2.prop(bpy.types.AnyType( addon_data.quick_scale_match_edge_dest), 'ln_multiplier', text="Multiplier") maplus_guitools.layout_coordvec( parent_layout=sme_dest_geom_editor, coordvec_label="Start:", op_id_cursor_grab=( "maplus.quicksmedestgrablinestartfromcursor"), op_id_avg_grab=("maplus.quicksmegrabavgdestlinestart"), op_id_local_grab=( "maplus.quicksmedestgrablinestartfromactivelocal"), op_id_global_grab=( "maplus.quicksmedestgrablinestartfromactiveglobal"), coord_container=addon_data.quick_scale_match_edge_dest, coord_attribute="line_start", op_id_cursor_send=("maplus.quicksmedestsendlinestarttocursor"), op_id_text_tuple_swap_first=( "maplus.quicksmedestswaplinepoints", "End")) maplus_guitools.layout_coordvec( parent_layout=sme_dest_geom_editor, coordvec_label="End:", op_id_cursor_grab=("maplus.quicksmedestgrablineendfromcursor"), op_id_avg_grab=("maplus.quicksmegrabavgdestlineend"), op_id_local_grab=( "maplus.quicksmedestgrablineendfromactivelocal"), op_id_global_grab=( "maplus.quicksmedestgrablineendfromactiveglobal"), coord_container=addon_data.quick_scale_match_edge_dest, coord_attribute="line_end", op_id_cursor_send=("maplus.quicksmedestsendlineendtocursor"), op_id_text_tuple_swap_first=( "maplus.quicksmedestswaplinepoints", "Start")) numeric_gui = sme_gui.column() numeric_gui.prop(addon_data, 'quick_sme_numeric_mode', text='Numeric Input Mode') numeric_settings = numeric_gui.box() numeric_grabs = numeric_settings.row() numeric_grabs.prop(addon_data, 'quick_sme_numeric_auto', text='Auto Grab Target') if not addon_data.quick_sme_numeric_auto: numeric_grabs.operator("maplus.grabsmenumeric") numeric_settings.prop(addon_data, 'quick_sme_numeric_length', text='Target Length') # Disable relevant items depending on whether numeric mode # is enabled or not if addon_data.quick_sme_numeric_mode: sme_grab_col.enabled = False else: numeric_settings.enabled = False sme_apply_header = sme_gui.row() sme_apply_header.label(text="Apply to:") sme_apply_header.prop(addon_data, 'use_experimental', text='Enable Experimental Mesh Ops.') sme_apply_items = sme_gui.split(factor=.33) sme_apply_items.operator("maplus.quickscalematchedgeobject", text="Object") sme_mesh_apply_items = sme_apply_items.row(align=True) sme_mesh_apply_items.operator("maplus.quickscalematchedgemeshselected", text="Mesh Piece") sme_mesh_apply_items.operator("maplus.quickscalematchedgewholemesh", text="Whole Mesh")
def draw(self, context): layout = self.layout maplus_data_ptr = bpy.types.AnyType(bpy.context.scene.maplus_data) addon_data = bpy.context.scene.maplus_data prims = addon_data.prim_list apl_top = layout.row() apl_gui = layout.box() apl_top.label( text="Align Planes", icon="MOD_ARRAY" ) apl_grab_col = apl_gui.column() apl_grab_col.prop( addon_data, 'quick_align_planes_auto_grab_src', text='Auto Grab Source from Selected Vertices' ) apl_src_geom_top = apl_grab_col.row(align=True) if not addon_data.quick_align_planes_auto_grab_src: if not addon_data.quick_apl_show_src_geom: apl_src_geom_top.operator( "maplus.showhidequickaplsrcgeom", icon='TRIA_RIGHT', text="", emboss=False ) preserve_button_roundedge = apl_src_geom_top.row() preserve_button_roundedge.operator( "maplus.quickalignplanesgrabsrc", icon='OUTLINER_OB_MESH', text="Grab Source" ) else: apl_src_geom_top.operator( "maplus.showhidequickaplsrcgeom", icon='TRIA_DOWN', text="", emboss=False ) apl_src_geom_top.label( text="Source Coordinates", icon="OUTLINER_OB_MESH" ) apl_src_geom_editor = apl_grab_col.box() plane_grab_all = apl_src_geom_editor.row(align=True) plane_grab_all.operator( "maplus.quickalignplanesgrabsrcloc", icon='VERTEXSEL', text="Grab All Local" ) plane_grab_all.operator( "maplus.quickalignplanesgrabsrc", icon='WORLD', text="Grab All Global" ) special_grabs = apl_src_geom_editor.row(align=True) special_grabs.operator( "maplus.copyfromaplsrc", icon='COPYDOWN', text="Copy (To Clipboard)" ) special_grabs.operator( "maplus.pasteintoaplsrc", icon='PASTEDOWN', text="Paste (From Clipboard)" ) maplus_guitools.layout_coordvec( parent_layout=apl_src_geom_editor, coordvec_label="Pt. A:", op_id_cursor_grab=( "maplus.quickaplsrcgrabplaneafromcursor" ), op_id_avg_grab=( "maplus.quickaplgrabavgsrcplanea" ), op_id_local_grab=( "maplus.quickaplsrcgrabplaneafromactivelocal" ), op_id_global_grab=( "maplus.quickaplsrcgrabplaneafromactiveglobal" ), coord_container=addon_data.quick_align_planes_src, coord_attribute="plane_pt_a", op_id_cursor_send=( "maplus.quickaplsrcsendplaneatocursor" ), op_id_text_tuple_swap_first=( "maplus.quickaplsrcswapplaneaplaneb", "B" ), op_id_text_tuple_swap_second=( "maplus.quickaplsrcswapplaneaplanec", "C" ) ) maplus_guitools.layout_coordvec( parent_layout=apl_src_geom_editor, coordvec_label="Pt. B:", op_id_cursor_grab=( "maplus.quickaplsrcgrabplanebfromcursor" ), op_id_avg_grab=( "maplus.quickaplgrabavgsrcplaneb" ), op_id_local_grab=( "maplus.quickaplsrcgrabplanebfromactivelocal" ), op_id_global_grab=( "maplus.quickaplsrcgrabplanebfromactiveglobal" ), coord_container=addon_data.quick_align_planes_src, coord_attribute="plane_pt_b", op_id_cursor_send=( "maplus.quickaplsrcsendplanebtocursor" ), op_id_text_tuple_swap_first=( "maplus.quickaplsrcswapplaneaplaneb", "A" ), op_id_text_tuple_swap_second=( "maplus.quickaplsrcswapplanebplanec", "C" ) ) maplus_guitools.layout_coordvec( parent_layout=apl_src_geom_editor, coordvec_label="Pt. C:", op_id_cursor_grab=( "maplus.quickaplsrcgrabplanecfromcursor" ), op_id_avg_grab=( "maplus.quickaplgrabavgsrcplanec" ), op_id_local_grab=( "maplus.quickaplsrcgrabplanecfromactivelocal" ), op_id_global_grab=( "maplus.quickaplsrcgrabplanecfromactiveglobal" ), coord_container=addon_data.quick_align_planes_src, coord_attribute="plane_pt_c", op_id_cursor_send=( "maplus.quickaplsrcsendplanectocursor" ), op_id_text_tuple_swap_first=( "maplus.quickaplsrcswapplaneaplanec", "A" ), op_id_text_tuple_swap_second=( "maplus.quickaplsrcswapplanebplanec", "B" ) ) if addon_data.quick_apl_show_src_geom: apl_grab_col.separator() apl_dest_geom_top = apl_grab_col.row(align=True) if not addon_data.quick_apl_show_dest_geom: apl_dest_geom_top.operator( "maplus.showhidequickapldestgeom", icon='TRIA_RIGHT', text="", emboss=False ) preserve_button_roundedge = apl_dest_geom_top.row() preserve_button_roundedge.operator( "maplus.quickalignplanesgrabdest", icon='OUTLINER_OB_MESH', text="Grab Destination" ) else: apl_dest_geom_top.operator( "maplus.showhidequickapldestgeom", icon='TRIA_DOWN', text="", emboss=False ) apl_dest_geom_top.label( text="Destination Coordinates", icon="OUTLINER_OB_MESH" ) apl_dest_geom_editor = apl_grab_col.box() plane_grab_all = apl_dest_geom_editor.row(align=True) plane_grab_all.operator( "maplus.quickalignplanesgrabdestloc", icon='VERTEXSEL', text="Grab All Local" ) plane_grab_all.operator( "maplus.quickalignplanesgrabdest", icon='WORLD', text="Grab All Global" ) special_grabs = apl_dest_geom_editor.row(align=True) special_grabs.operator( "maplus.copyfromapldest", icon='COPYDOWN', text="Copy (To Clipboard)" ) special_grabs.operator( "maplus.pasteintoapldest", icon='PASTEDOWN', text="Paste (From Clipboard)" ) maplus_guitools.layout_coordvec( parent_layout=apl_dest_geom_editor, coordvec_label="Pt. A:", op_id_cursor_grab=( "maplus.quickapldestgrabplaneafromcursor" ), op_id_avg_grab=( "maplus.quickaplgrabavgdestplanea" ), op_id_local_grab=( "maplus.quickapldestgrabplaneafromactivelocal" ), op_id_global_grab=( "maplus.quickapldestgrabplaneafromactiveglobal" ), coord_container=addon_data.quick_align_planes_dest, coord_attribute="plane_pt_a", op_id_cursor_send=( "maplus.quickapldestsendplaneatocursor" ), op_id_text_tuple_swap_first=( "maplus.quickapldestswapplaneaplaneb", "B" ), op_id_text_tuple_swap_second=( "maplus.quickapldestswapplaneaplanec", "C" ) ) maplus_guitools.layout_coordvec( parent_layout=apl_dest_geom_editor, coordvec_label="Pt. B:", op_id_cursor_grab=( "maplus.quickapldestgrabplanebfromcursor" ), op_id_avg_grab=( "maplus.quickaplgrabavgdestplaneb" ), op_id_local_grab=( "maplus.quickapldestgrabplanebfromactivelocal" ), op_id_global_grab=( "maplus.quickapldestgrabplanebfromactiveglobal" ), coord_container=addon_data.quick_align_planes_dest, coord_attribute="plane_pt_b", op_id_cursor_send=( "maplus.quickapldestsendplanebtocursor" ), op_id_text_tuple_swap_first=( "maplus.quickapldestswapplaneaplaneb", "A" ), op_id_text_tuple_swap_second=( "maplus.quickapldestswapplanebplanec", "C" ) ) maplus_guitools.layout_coordvec( parent_layout=apl_dest_geom_editor, coordvec_label="Pt. C:", op_id_cursor_grab=( "maplus.quickapldestgrabplanecfromcursor" ), op_id_avg_grab=( "maplus.quickaplgrabavgdestplanec" ), op_id_local_grab=( "maplus.quickapldestgrabplanecfromactivelocal" ), op_id_global_grab=( "maplus.quickapldestgrabplanecfromactiveglobal" ), coord_container=addon_data.quick_align_planes_dest, coord_attribute="plane_pt_c", op_id_cursor_send=( "maplus.quickapldestsendplanectocursor" ), op_id_text_tuple_swap_first=( "maplus.quickapldestswapplaneaplanec", "A" ), op_id_text_tuple_swap_second=( "maplus.quickapldestswapplanebplanec", "B" ) ) apl_gui.label(text="Operator settings:", icon="PREFERENCES") apl_mods = apl_gui.box() apl_mods_row1 = apl_mods.row() apl_mods_row1.prop( addon_data.quick_align_planes_transf, 'apl_flip_normal', text='Flip Normal' ) apl_mods_row1.prop( addon_data.quick_align_planes_transf, 'apl_use_custom_orientation', text='Use Transf. Orientation' ) apl_mods_row2 = apl_mods.row() apl_mods_row2.prop( addon_data.quick_align_planes_transf, 'apl_alternate_pivot', text='Pivot is A' ) apl_apply_header = apl_gui.row() apl_apply_header.label(text="Apply to:") apl_apply_header.prop( addon_data, 'use_experimental', text='Enable Experimental Mesh Ops.' ) apl_apply_items = apl_gui.split(factor=.33) apl_apply_items.operator( "maplus.quickalignplanesobject", text="Object" ) apl_mesh_apply_items = apl_apply_items.row(align=True) apl_mesh_apply_items.operator( "maplus.quickalignplanesmeshselected", text="Mesh Piece" ) apl_mesh_apply_items.operator( "maplus.quickalignplaneswholemesh", text="Whole Mesh" )
def draw(self, context): layout = self.layout maplus_data_ptr = bpy.types.AnyType(bpy.context.scene.maplus_data) addon_data = bpy.context.scene.maplus_data prims = addon_data.prim_list ds_top = layout.row() ds_gui = layout.box() ds_top.label(text= "Directional Slide", icon="CURVE_PATH" ) ds_grab_col = ds_gui.column() ds_grab_col.prop( addon_data, 'quick_directional_slide_auto_grab_src', text='Auto Grab Source from Selected Vertices' ) ds_src_geom_top = ds_grab_col.row(align=True) if not addon_data.quick_directional_slide_auto_grab_src: if not addon_data.quick_ds_show_src_geom: ds_src_geom_top.operator( "maplus.showhidequickdssrcgeom", icon='TRIA_RIGHT', text="", emboss=False ) preserve_button_roundedge = ds_src_geom_top.row() preserve_button_roundedge.operator( "maplus.quickdirectionalslidegrabsrc", icon='LIGHT_SUN', text="Grab Source" ) preserve_button_roundedge.operator( "maplus.quickdsgrabnormalsrc", icon='LIGHT_HEMI', text="" ) else: ds_src_geom_top.operator( "maplus.showhidequickdssrcgeom", icon='TRIA_DOWN', text="", emboss=False ) ds_src_geom_top.label( text="Source Coordinates", icon="LIGHT_SUN" ) ds_src_geom_editor = ds_grab_col.box() ln_grab_all = ds_src_geom_editor.row(align=True) ln_grab_all.operator( "maplus.quickdirectionalslidegrabsrcloc", icon='VERTEXSEL', text="Grab All Local" ) ln_grab_all.operator( "maplus.quickdirectionalslidegrabsrc", icon='WORLD', text="Grab All Global" ) special_grabs = ds_src_geom_editor.row(align=True) special_grabs.operator( "maplus.quickdsgrabnormalsrc", icon='LIGHT_HEMI', text="Grab Normal" ) special_grabs_extra = ds_src_geom_editor.row(align=True) special_grabs_extra.operator( "maplus.copyfromdssrc", icon='COPYDOWN', text="Copy (To Clipboard)" ) special_grabs_extra.operator( "maplus.pasteintodssrc", icon='PASTEDOWN', text="Paste (From Clipboard)" ) modifier_header = ds_src_geom_editor.row() modifier_header.label(text="Line Modifiers:") apply_mods = modifier_header.row() apply_mods.alignment = 'RIGHT' item_mods_box = ds_src_geom_editor.box() mods_row_1 = item_mods_box.row() mods_row_1.prop( bpy.types.AnyType(addon_data.quick_directional_slide_src), 'ln_make_unit_vec', text="Set Length Equal to One" ) mods_row_1.prop( bpy.types.AnyType(addon_data.quick_directional_slide_src), 'ln_flip_direction', text="Flip Direction" ) mods_row_2 = item_mods_box.row() mods_row_2.prop( bpy.types.AnyType(addon_data.quick_directional_slide_src), 'ln_multiplier', text="Multiplier" ) maplus_guitools.layout_coordvec( parent_layout=ds_src_geom_editor, coordvec_label="Start:", op_id_cursor_grab=( "maplus.quickdssrcgrablinestartfromcursor" ), op_id_avg_grab=( "maplus.quickdsgrabavgsrclinestart" ), op_id_local_grab=( "maplus.quickdssrcgrablinestartfromactivelocal" ), op_id_global_grab=( "maplus.quickdssrcgrablinestartfromactiveglobal" ), coord_container=addon_data.quick_directional_slide_src, coord_attribute="line_start", op_id_cursor_send=( "maplus.quickdssrcsendlinestarttocursor" ), op_id_text_tuple_swap_first=( "maplus.quickdssrcswaplinepoints", "End" ) ) maplus_guitools.layout_coordvec( parent_layout=ds_src_geom_editor, coordvec_label="End:", op_id_cursor_grab=( "maplus.quickdssrcgrablineendfromcursor" ), op_id_avg_grab=( "maplus.quickdsgrabavgsrclineend" ), op_id_local_grab=( "maplus.quickdssrcgrablineendfromactivelocal" ), op_id_global_grab=( "maplus.quickdssrcgrablineendfromactiveglobal" ), coord_container=addon_data.quick_directional_slide_src, coord_attribute="line_end", op_id_cursor_send=( "maplus.quickdssrcsendlineendtocursor" ), op_id_text_tuple_swap_first=( "maplus.quickdssrcswaplinepoints", "Start" ) ) if addon_data.quick_ds_show_src_geom: ds_grab_col.separator() ds_gui.label(text="Operator settings:", icon="PREFERENCES") ds_mods = ds_gui.box() ds_box_row1 = ds_mods.row() ds_box_row1.prop( addon_data.quick_directional_slide_transf, 'ds_make_unit_vec', text='Set Length to 1' ) ds_box_row1.prop( addon_data.quick_directional_slide_transf, 'ds_flip_direction', text='Flip Direction' ) ds_box_row2 = ds_mods.row() ds_box_row2.prop( addon_data.quick_directional_slide_transf, 'ds_multiplier', text='Multiplier' ) ds_apply_header = ds_gui.row() ds_apply_header.label(text="Apply to:") ds_apply_header.prop( addon_data, 'use_experimental', text='Enable Experimental Mesh Ops.' ) ds_apply_items = ds_gui.split(factor=.33) ds_apply_items.operator( "maplus.quickdirectionalslideobject", text="Object" ) ds_mesh_apply_items = ds_apply_items.row(align=True) ds_mesh_apply_items.operator( "maplus.quickdirectionalslidemeshselected", text="Mesh Piece" ) ds_mesh_apply_items.operator( "maplus.quickdirectionalslidewholemesh", text="Whole Mesh" )
def draw(self, context): layout = self.layout maplus_data_ptr = bpy.types.AnyType(bpy.context.scene.maplus_data) addon_data = bpy.context.scene.maplus_data prims = addon_data.prim_list apg_top = layout.row() align_pts_gui = layout.box() apg_top.label(text="Align Points", icon="PIVOT_INDIVIDUAL") apt_grab_col = align_pts_gui.column() apt_grab_col.prop(addon_data, 'quick_align_pts_auto_grab_src', text='Auto Grab Source from Selected Vertices') apt_src_geom_top = apt_grab_col.row(align=True) if not addon_data.quick_align_pts_auto_grab_src: if not addon_data.quick_apt_show_src_geom: apt_src_geom_top.operator("maplus.showhidequickaptsrcgeom", icon='TRIA_RIGHT', text="", emboss=False) preserve_button_roundedge = apt_src_geom_top.row() preserve_button_roundedge.operator( "maplus.quickalignpointsgrabsrc", icon='LAYER_ACTIVE', text="Grab Source") preserve_button_roundedge.operator("maplus.quickaptgrabavgsrc", icon='GROUP_VERTEX', text="") else: apt_src_geom_top.operator("maplus.showhidequickaptsrcgeom", icon='TRIA_DOWN', text="", emboss=False) apt_src_geom_top.label(text="Source Coordinates", icon="LAYER_ACTIVE") apt_src_geom_editor = apt_grab_col.box() pt_grab_all = apt_src_geom_editor.row(align=True) pt_grab_all.operator("maplus.quickalignpointsgrabsrcloc", icon='VERTEXSEL', text="Grab All Local") pt_grab_all.operator("maplus.quickalignpointsgrabsrc", icon='WORLD', text="Grab All Global") special_grabs = apt_src_geom_editor.row(align=True) special_grabs.operator("maplus.copyfromaptsrc", icon='COPYDOWN', text="Copy (To Clipboard)") special_grabs.operator("maplus.pasteintoaptsrc", icon='PASTEDOWN', text="Paste (From Clipboard)") modifier_header = apt_src_geom_editor.row() modifier_header.label(text="Point Modifiers:") apply_mods = modifier_header.row() apply_mods.alignment = 'RIGHT' item_mods_box = apt_src_geom_editor.box() mods_row_1 = item_mods_box.row() mods_row_1.prop(bpy.types.AnyType( addon_data.quick_align_pts_src), 'pt_make_unit_vec', text="Set Length Equal to One") mods_row_1.prop(bpy.types.AnyType( addon_data.quick_align_pts_src), 'pt_flip_direction', text="Flip Direction") mods_row_2 = item_mods_box.row() mods_row_2.prop(bpy.types.AnyType( addon_data.quick_align_pts_src), 'pt_multiplier', text="Multiplier") maplus_guitools.layout_coordvec( parent_layout=apt_src_geom_editor, coordvec_label="Pt. Origin:", op_id_cursor_grab=( "maplus.quickaptsrcgrabpointfromcursor"), op_id_avg_grab=("maplus.quickaptgrabavgsrc"), op_id_local_grab=("maplus.quickalignpointsgrabsrcloc"), op_id_global_grab=("maplus.quickalignpointsgrabsrc"), coord_container=addon_data.quick_align_pts_src, coord_attribute="point", op_id_cursor_send=("maplus.quickaptsrcsendpointtocursor")) if addon_data.quick_apt_show_src_geom: apt_grab_col.separator() apt_dest_geom_top = apt_grab_col.row(align=True) if not addon_data.quick_apt_show_dest_geom: apt_dest_geom_top.operator("maplus.showhidequickaptdestgeom", icon='TRIA_RIGHT', text="", emboss=False) preserve_button_roundedge = apt_dest_geom_top.row() preserve_button_roundedge.operator( "maplus.quickalignpointsgrabdest", icon='LAYER_ACTIVE', text="Grab Destination") preserve_button_roundedge.operator("maplus.quickaptgrabavgdest", icon='GROUP_VERTEX', text="") else: apt_dest_geom_top.operator("maplus.showhidequickaptdestgeom", icon='TRIA_DOWN', text="", emboss=False) apt_dest_geom_top.label(text="Destination Coordinates", icon="LAYER_ACTIVE") apt_dest_geom_editor = apt_grab_col.box() pt_grab_all = apt_dest_geom_editor.row(align=True) pt_grab_all.operator("maplus.quickalignpointsgrabdestloc", icon='VERTEXSEL', text="Grab All Local") pt_grab_all.operator("maplus.quickalignpointsgrabdest", icon='WORLD', text="Grab All Global") special_grabs = apt_dest_geom_editor.row(align=True) special_grabs.operator("maplus.copyfromaptdest", icon='COPYDOWN', text="Copy (To Clipboard)") special_grabs.operator("maplus.pasteintoaptdest", icon='PASTEDOWN', text="Paste (From Clipboard)") modifier_header = apt_dest_geom_editor.row() modifier_header.label(text="Point Modifiers:") apply_mods = modifier_header.row() apply_mods.alignment = 'RIGHT' item_mods_box = apt_dest_geom_editor.box() mods_row_1 = item_mods_box.row() mods_row_1.prop(bpy.types.AnyType(addon_data.quick_align_pts_dest), 'pt_make_unit_vec', text="Set Length Equal to One") mods_row_1.prop(bpy.types.AnyType(addon_data.quick_align_pts_dest), 'pt_flip_direction', text="Flip Direction") mods_row_2 = item_mods_box.row() mods_row_2.prop(bpy.types.AnyType(addon_data.quick_align_pts_dest), 'pt_multiplier', text="Multiplier") maplus_guitools.layout_coordvec( parent_layout=apt_dest_geom_editor, coordvec_label="Pt. Origin:", op_id_cursor_grab=("maplus.quickaptdestgrabpointfromcursor"), op_id_avg_grab=("maplus.quickaptgrabavgdest"), op_id_local_grab=("maplus.quickalignpointsgrabdestloc"), op_id_global_grab=("maplus.quickalignpointsgrabdest"), coord_container=addon_data.quick_align_pts_dest, coord_attribute="point", op_id_cursor_send=("maplus.quickaptdestsendpointtocursor")) align_pts_gui.label(text="Operator settings:", icon="PREFERENCES") apt_mods = align_pts_gui.box() apt_box_row1 = apt_mods.row() apt_box_row1.prop(addon_data.quick_align_pts_transf, 'apt_make_unit_vector', text='Set Length to 1') apt_box_row1.prop(addon_data.quick_align_pts_transf, 'apt_flip_direction', text='Flip Direction') apt_box_row2 = apt_mods.row() apt_box_row2.prop(addon_data.quick_align_pts_transf, 'apt_multiplier', text='Multiplier') apt_apply_header = align_pts_gui.row() apt_apply_header.label(text="Apply to:") apt_apply_header.prop(addon_data, 'use_experimental', text='Enable Experimental Mesh Ops.') apt_apply_items = align_pts_gui.split(factor=.33) apt_apply_items.operator("maplus.quickalignpointsobject", text="Object") apt_mesh_apply_items = apt_apply_items.row(align=True) apt_mesh_apply_items.operator("maplus.quickalignpointsmeshselected", text="Mesh Piece") apt_mesh_apply_items.operator("maplus.quickalignpointswholemesh", text="Whole Mesh")