如何通过BlenderPythonAPI从脚本访问blender活动对象:
活动窗口(在其中发生当前操作):bpy.context.area.spaces.active
活动场景:bpy.context.screen.scene
活动(选定)网格:bpy.context.active_object
活动(选定)材质节点(在NODE_EDITOR窗口中):bpy.context.active_object.active_material.node_tree.nodes.active
活动(选定)材料节点(在合成窗口中):bpy.context.scene.node_tree.nodes.active
窗口中的当前TEXT_EDITOR文本:bpy.context.area.spaces.active.text.as_string()
活动(选定)UV贴图:bpy.context.active_object.data.uv_layers.active
用户首选项窗口中的当前页面:bpy.context.user_preferences.active_section
当前世界:bpy.context.scene.world
当前世界节点树(环境):bpy.context.scene.world.node_tree