go edit mode func
This commit is contained in:
		
							parent
							
								
									a021535b3f
								
							
						
					
					
						commit
						ef566c494f
					
				
							
								
								
									
										10
									
								
								utils.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								utils.py
									
									
									
									
									
								
							@ -1101,3 +1101,13 @@ def create_follow_path_constraint(ob, curve, follow_curve=False):
 | 
				
			|||||||
    # print('const.forward_axis: ', const.forward_axis)
 | 
					    # print('const.forward_axis: ', const.forward_axis)
 | 
				
			||||||
    # const.use_curve_follow = True
 | 
					    # const.use_curve_follow = True
 | 
				
			||||||
    # return curve, const
 | 
					    # return curve, const
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def go_edit_mode(ob, context=None):
 | 
				
			||||||
 | 
					    '''set mode to object, set passed obhject as active and go Edit'''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    context = context or bpy.context
 | 
				
			||||||
 | 
					    bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
 | 
				
			||||||
 | 
					    ob.select_set(True)
 | 
				
			||||||
 | 
					    context.view_layer.objects.active = ob
 | 
				
			||||||
 | 
					    bpy.ops.object.mode_set(mode='EDIT', toggle=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user