tooltip for operator
parent
ee03c36c01
commit
2303d32c29
17
picker.py
17
picker.py
|
@ -254,9 +254,9 @@ class BoneShape(Shape):
|
|||
border_tri2 = border[2], border[3], border[0]
|
||||
|
||||
if (not intersect_tri_tri_2d(*border_tri1, *bound_tri1) and
|
||||
not intersect_tri_tri_2d(*border_tri1, *border_tri2) and
|
||||
not intersect_tri_tri_2d(*border_tri2, *border_tri2) and
|
||||
not intersect_tri_tri_2d(*border_tri2, *border_tri2)):
|
||||
not intersect_tri_tri_2d(*border_tri1, *bound_tri2) and
|
||||
not intersect_tri_tri_2d(*border_tri2, *bound_tri1) and
|
||||
not intersect_tri_tri_2d(*border_tri2, *bound_tri2)):
|
||||
return
|
||||
|
||||
select = True
|
||||
|
@ -297,6 +297,9 @@ class OperatorShape(Shape):
|
|||
#self.arguments = arguments#{k:eval(v)}
|
||||
#self.operator = get_operator_from_id(self.operator)
|
||||
|
||||
if not tooltip:
|
||||
self.tooltip = self.operator.replace('bpy.ops.', '').replace("'INVOKE_DEFAULT', ", '')
|
||||
|
||||
#self.reg_args = re.compile(r'(\w+)=')
|
||||
'''
|
||||
def parse_args(self):
|
||||
|
@ -421,12 +424,14 @@ class Picker:
|
|||
|
||||
|
||||
def tooltip_event(self):
|
||||
print('Tooltip Event', self)
|
||||
#print('Tooltip Event', self)
|
||||
|
||||
if self.hover_shape:
|
||||
if self.hover_shape and self.hover_shape.type != 'display':
|
||||
if self.hover_shape.type == 'bone':
|
||||
self.tooltip = self.hover_shape.bone.name
|
||||
self.tooltip_shape = self.hover_shape
|
||||
else:
|
||||
self.tooltip = self.hover_shape.tooltip
|
||||
self.tooltip_shape = self.hover_shape
|
||||
else:
|
||||
self.tooltip = ''
|
||||
self.tooltip_shape = None
|
||||
|
|
Loading…
Reference in New Issue