feat: hide some operators in edit mode and add some notify for grouping oper.

- now grouping, ungrouping clear groups operators will show a report at the bottom of blender to indicate their work have done.
- disable fix material, 3ds max align, select by virtools group operators in edit mode to prevent any possible undefined behavior.
This commit is contained in:
2024-04-22 21:03:57 +08:00
parent c58af8ce48
commit 84e7e8380f
4 changed files with 38 additions and 15 deletions

View File

@ -80,6 +80,16 @@ def select_certain_objects(objs: tuple[bpy.types.Object, ...]) -> None:
# select first object as active object
bpy.context.view_layer.objects.active = objs[0]
def is_in_object_mode() -> bool:
# get active object from context
obj = bpy.context.active_object
# if there is no active object, we think it is in object mode
if obj is None: return True
# simply check active object mode
return obj.mode == 'OBJECT'
class EnumPropHelper():
"""
These class contain all functions related to EnumProperty, including generating `items`,