Skip to main content
added 213 characters in body
Source Link
relaxed
  • 2.4k
  • 8
  • 16

The mesh data is accessed in object mode and intended for compact storage, for more flexible mesh editing from python see bmesh. Insert bpy.ops.object.mode_set(mode='OBJECT') in your operator and try again.

def execute(self, context):
    context = bpy.context

    bpy.ops.object.mode_set(mode='OBJECT') #
                     
    ob = context.object
    me = ob.data
    ...

The mesh data is accessed in object mode and intended for compact storage, for more flexible mesh editing from python see bmesh. Insert bpy.ops.object.mode_set(mode='OBJECT') in your operator and try again.

The mesh data is accessed in object mode and intended for compact storage, for more flexible mesh editing from python see bmesh. Insert bpy.ops.object.mode_set(mode='OBJECT') in your operator and try again.

def execute(self, context):
    context = bpy.context

    bpy.ops.object.mode_set(mode='OBJECT') #
                     
    ob = context.object
    me = ob.data
    ...
Source Link
relaxed
  • 2.4k
  • 8
  • 16

The mesh data is accessed in object mode and intended for compact storage, for more flexible mesh editing from python see bmesh. Insert bpy.ops.object.mode_set(mode='OBJECT') in your operator and try again.