Post #670: ![](https://blenderartists.org/user_avatar/blenderartists.org/leafar/48/661663_2

📋 Metadata

  • Author: roaoao
  • Date: 2017-05-20 07:54:54
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_00669

🏷️ Tags

macro scripting intermediate solved

  • Macro Editor
  • Python Scripting
  • Command tab

💬 Content

Leafar:

Hi everyone! I have this script:
Now I want to select the separated mesh and go to edit mode of that mesh but I do not know how I can do that! Any help? XD

Cool tool. Try this code in Command tab:

from .bl_utils import uname; new_name = uname(D.objects, C.active_object.name); bpy.ops.mesh.separate(type='SELECTED'); bpy.ops.object.mode_set(mode='OBJECT'); bpy.ops.object.select_all(action='DESELECT'); C.scene.objects.active = D.objects[new_name]; D.objects[new_name].select = True; bpy.ops.object.mode_set(mode='EDIT')

🔗 View on Blender Artists