Blender Asked by Retrax on December 30, 2021
Im trying to enable or disable a class by this polling method which detects the object type and mode of the object but Im trying add detection of any selected edges to the polling
@classmethod
def poll( self, context ):
return context.object and context.object.type == 'MESH' and context.active_object.mode == 'EDIT'
@classmethod
def poll( self, context ):
#Get active object
act_obj = context.active_object
#Check for edit mode and mesh type
if act_obj.mode == 'EDIT' and act_obj.type == 'MESH':
#Get selected edges from bmesh
me = act_obj.data
bm = bmesh.from_edit_mesh(me)
edges_selected = [e for e in bm.edges if e.select]
return edges_selected
Answered by AFWS on December 30, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP