Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>VScode Blender Python 综合开发工具New to Visual Studio Code? Get it now.
VScode Blender Python 综合开发工具

VScode Blender Python 综合开发工具

daohaodesign

|
7,056 installs
| (0) | Free
本插件包裹了blender-python-code-templates的活动代码模板,并在此基础上做了自己使用Blender插件开发会用到的功能(尚未完成!!!)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

blender-python-addontool-cn-byten

Blender python代码的代码段

GitHub repository link

Addon at VScode Marketplace

Blender addon for turning files/blender texteditor content into .json snippets

Snippets

TEN修改版特别说明:统一前缀blender,然后接下面的前缀,增加了自己搞的代码片段

Prefixes输入前缀 Description描述
bl_info Blender addon info>>>Blender插件声明信息
license gnu GNU license发布许可证
license mit MIT license发布许可证
keymap item keymap item 快捷键映射more info更多参阅信息
keymaps Register and unregister keymaps>>>注册和取消注册键盘映射
menu Menu>>>菜单类
operator Operator function class, without any imports or added functions>>>Operator函数类模板,没有任何import或其他函数代码
operator modal Modal operator function, without any imports or added functions>>>Modal Operator函数模板,没有任何import或其他函数代码
operator modal draw Modal operator draw function, without any imports or added functions>>>Modal operator draw函数代码模板,没有任何import或其他函数代码
operator filebrowser operator with file browse dialog, for your save/load/export/import operators>>>带文件浏览对话框的operator函数模板,供您的保存/加载/导出/导入操作
panel Panel>>>面板类
pie menu Pie Menu>>>Blender的饼菜单
register Register and Unregister Module>>>注册和卸载插件代码模板
template addon Example of addon for adding object>>>用插件添加对象的示例
template background job Example of script that shows how you can run blender from the command line (in background mode with no interface) to automate tasks, in this example it creates a text object, camera and light, then renders and/or saves it. This example also shows how you can parse command line options to scripts.>>>脚本示例显示了如何从命令行(在没有界面的后台模式下)运行Blender来自动执行任务,在此示例中,它创建了一个文本对象,相机和灯光,然后进行渲染和/或保存。此示例还显示了如何将命令行选项解析为脚本。
template batch Example of exporting each selected object into its own file>>>批量将每个选定对象导出到其独自的文件中的示例
template bmesh Example of to get mesh representation for bmesh from edit-mode and updating it back after bmesh operation.>>>从编辑模式获取bmesh的网格表示并在bmesh操作后更新它的示例。
template bmesh Example of to get mesh representation for bmesh from active object and updating it back after bmesh operation.>>>从活动对象获取bmesh的网格表示并在bmesh操作之后更新它的示例。
template keyingset Example of generating Keying Set>>>生成键设置的示例
template nodes Example of Implementation of custom nodes from Python>>>从Python实现自定义节点的示例
template driver Example of script defining functions to be used directly in drivers expressions to extend the builtin set of python functions.>>>脚本定义函数的示例,这些函数可直接在驱动程序表达式中使用,以扩展内置的python函数集。
template script Example of loading script relative to current blend file. This stub runs a python script relative to the currently open blend file, useful when editing scripts externally.>>>相对于当前blender文件加载脚本的示例。关联到当前打开的Blender文件运行python脚本,在外部编辑脚本时很有用。
template gamelogic Example of gamelogic module. This module can be accessed by a python controller with its execution method set to 'Module'>>>gamelogic模块示例。可以通过python控制器访问该模块,并将其执行方法设置为“Module”
template gamelogic Example of Simple gamelogic python script.>>>简单的gamelogic python脚本示例。
template gamelogic Example of gamelogic script this must be assigned to a python controller where it can access the object that owns it and the sensors/actuators that it connects to.>>>在gamelogic脚本的示例中,必须将其分配给python控制器,在该控制器中,它可以访问拥有该对象的对象以及与其连接的传感器/执行器。
template operator Example of Template for file export operator, operator exports data from blender to .txt file>>>文件导出操作的模板示例,操作将数据从Blender导出到.txt文件
template operator Example of Template for file import operator, operator imports data from .txt to blender data>>>文件导入操作的模板示例,操作将数据从.txt文件导入到blender数据块
template operator Example of operator involving bmesh for creating and adding object to scene>>>涉及bmesh的操作示例,用于创建场景并将对象添加到场景
template operator Example of Operator template for editing mesh UV's with bmesh>>>使用bmesh编辑网格UV的Operator模板示例
template operator Example of Blender modal operator function with imports, main function, register, unregister and testcall>>>Blender operator函数示例imports,main函数,register, unregister和测试调用函数
template ui list Example of ui list template with adding it to blender with example panel>>>增加侧边栏面板到Blender的界面的示例
template ui list Example of simple ui list class with some filtering and bpy import>>>具有一些过滤和bpy导入的简单ui列表类的示例
template ui menu Example of ui menu>>>界面菜单的示例
template ui simple panel Example of ui panel class with import and register>>>带有import和注册的ui面板类示例
template ui panel Example of ui panel class ui panel is created with examples of columns, buttons, rows, properties, with import and register,>>>ui面板类示例ui面板具有columns列,buttons按钮,rows行,properties属性,导入和注册代码模板
template ui pie menu Example of 3d viewport pie menu>>>3D视口饼图菜单示例
template dynamic enum This example script demonstrates a dynamic EnumProperty with custom icons.>>>此示例脚本演示了带有自定义图标的动态EnumProperty
template ui previews This example script demonstrates how to place a custom icon on a button menu entry>>>此示例脚本演示了如何在按钮菜单项上放置自定义图标
blender_TEN子菜单操作类 具备子菜单功能的操作类模板, 可以用于写pie-menu和命令子菜单
blender_TEN普通操作类 普通操作类模板
qt5.1 PyQt5手工代码基本模板
qt5.2 PyQt5 Designer配合的main.py基本模板

Contribution Notes贡献说明

If adding or editing a snippet's prefix or description, to keep from having to edit the above table, you can generate it using the documentation_helper script, just npm run table and it will write a TABLE.md file with the above table so you can just copy and paste it to here. The TABLE.md file has been added to the .gitignore so it won't get accidently committed. 如果添加或编辑代码段的前缀或描述,则不必编辑上面的表,可以使用documentation_helper脚本(仅使用“npm run table”)生成该表,并将使用上面的表编写一个“TABLE.md”文件因此您只需将其复制并粘贴到此处即可。 TABLE.md文件已添加到.gitignore中,因此不会意外提交。


Thanks感谢

Alan for his Blender VS Code Debugger addon, it's awesome!

Ideasman42 and others who have contributed to the Blender Wiki for providing instructions on how to build Blender as python module. Now my linter understands Blender.

Jacques Lucke's awesome Blender addon: Code Autocomplete.

Blender developers! for providing the awesome package known as Blender and the python code templates.>>>Blender开发人员!用于提供称为Blender的出色软件包和python代码模板。

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft