python helper方法_Python io_utils.ImportHelper方法代碼示例
# 需要導入模塊: from bpy_extras import io_utils [as 別名]
# 或者: from bpy_extras.io_utils import ImportHelper [as 別名]
def execute(self,context):
scn = bpy.context.scene
selected = bpy.context.selected_objects
shippart = selected.pop(0)
bpy.ops.object.select_all(action = 'DESELECT')
shippart.select = True
shipname = shippart["ship"]
mergelist = []
for obj in scn.objects:
if obj.type == 'MESH' and obj["ship"] == shipname and not obj.hide:
mergelist.append(obj)
bpy.ops.object.select_all(action = 'DESELECT')
for obj in mergelist:
obj.select = True
bpy.ops.object.join()
bpy.ops.object.parent_clear(type='CLEAR')
result = bpy.context.active_object
result.name = "RESULT"
#result.scale = (10,10,10)
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.remove_doubles(threshold = 0.001)
bpy.ops.mesh.normals_make_consistent(inside = False)
bpy.ops.object.mode_set(mode='OBJECT')
return {'FINISHED'}
##class LoadFlagPartOperator(bpy.types.Operator, ImportHelper):
## bl_idname = "object.loadflag"
## bl_label = "Load Flag"
##
## filename_ext = "Image file"
## filter_glob = StringProperty(default="*.jpg;*.JPG;*.jpeg;*.JPEG;*.png;*.PNG;*.bmp;*.BMP;*.tiff;*.TIFF", options={'HIDDEN'})
## #Add more file types if necessary, I guess
##
## def execute(self, context):
## from . import load_flag
##
##
python helper方法_Python io_utils.ImportHelper方法代碼示例相关推荐
- python keyboard backspace_Python curses.KEY_BACKSPACE屬性代碼示例
本文整理匯總了Python中curses.KEY_BACKSPACE屬性的典型用法代碼示例.如果您正苦於以下問題:Python curses.KEY_BACKSPACE屬性的具體用法?Python c ...
- python calendar.isleap_Python calendar isleap()用法及代碼示例
日曆模塊允許輸出類似於程序的日曆,並提供與日曆相關的其他有用功能. "日曆"模塊中定義的函數和類使用理想化的日曆,當前的公曆日曆在兩個方向上都無限期擴展. 在Python中,cal ...
- python中fmod什么意思_Python fmod()用法及代碼示例
fmod()函數是Python中的標準數學庫函數之一,用於計算指定給定參數的模塊. 用法: math.fmod( x, y ) 參數: x任何有效數字(正數或負數). y任何有效數字(正數或負數). ...
- python里turtle.circle什么意思_Python turtle.circle方法代碼示例
本文整理匯總了Python中turtle.circle方法的典型用法代碼示例.如果您正苦於以下問題:Python turtle.circle方法的具體用法?Python turtle.circle怎麽 ...
- python的from_bytes属性_Python parse.quote_from_bytes方法代碼示例
本文整理匯總了Python中urllib.parse.quote_from_bytes方法的典型用法代碼示例.如果您正苦於以下問題:Python parse.quote_from_bytes方法的具體 ...
- python中startout是什么意思_Python socket.timeout方法代碼示例
本文整理匯總了Python中gevent.socket.timeout方法的典型用法代碼示例.如果您正苦於以下問題:Python socket.timeout方法的具體用法?Python socket ...
- python markdown2 样式_Python markdown2.markdown方法代碼示例
本文整理匯總了Python中markdown2.markdown方法的典型用法代碼示例.如果您正苦於以下問題:Python markdown2.markdown方法的具體用法?Python markd ...
- python socketio例子_Python socket.SocketIO方法代碼示例
本文整理匯總了Python中socket.SocketIO方法的典型用法代碼示例.如果您正苦於以下問題:Python socket.SocketIO方法的具體用法?Python socket.Sock ...
- python unescape函数_Python escape.url_unescape方法代碼示例
本文整理匯總了Python中tornado.escape.url_unescape方法的典型用法代碼示例.如果您正苦於以下問題:Python escape.url_unescape方法的具體用法?Py ...
最新文章
- intel服务器修复两个漏洞,游戏厂商:修复Intel处理器漏洞后 服务器超卡
- fprintf与fwrite的区别
- win8.1计算机开启远程桌面连接不上,启动Win8.1远程桌面不得不知的方案
- android socket 服务,android 创建socket 通信型service
- 手把手教用XNA开发winphone7游戏(四)
- 力扣904-水果成篮(C++,总结别人的思路)
- Spring MVC JSON数据交互(附带实例)
- MATLAB产生线性等分量函数 linspace
- LuckyFrame执行Web自动化用例
- 11gpath失败 oracle_win10安装oracle11g提示path长度不够,该怎样解决?
- fft与fftshift的维度
- 怎样从下载的MP4视频中将音乐提取出来?
- 妻子,情人,玫瑰花,刺木花(转载)
- 解决高分辨率下远程桌面连接服务器,字体图标太小的问题
- Jvectormap中文帮助文档(API)
- Tomcat启动内存设置
- Vue结合element-ui实现导航菜单展开收缩小功能
- Learning a Deep Compact Image Representation for Visual Tracking 学习用于视觉跟踪的深度紧凑图像表示
- 离岸公司注册在英国的优势
- 安装时提示错误1402的解决办法