bpy.ops.armature.hide()
是 Blender Python API 中的一个操作,用于隐藏选定的骨架或骨骼。
该操作没有任何参数。
该操作没有返回值。
import bpy
# 选定一个对象
obj = bpy.context.active_object
# 选定对象的骨架
if obj.type == 'ARMATURE':
armature = obj.data
# 隐藏选定骨架
bpy.ops.armature.hide()
# 或者隐藏选定的骨骼
for bone in armature.bones:
if bone.select:
bone.hide = True