Skip to content

Instantly share code, notes, and snippets.

@liyonghelpme
liyonghelpme / ogre_import.py
Last active August 29, 2015 14:06
兼容导入ogre静态模型和有动画骨骼模型
#!BPY
""" Registration info for Blender menus:
Name: 'OGRE (.mesh.xml)...'
Blender: 236
Group: 'Import'
Tip: 'Import an Ogre-Mesh (.mesh.xml) file.'
"""
'''
@liyonghelpme
liyonghelpme / ogre_import.py
Last active August 29, 2015 14:07
before support vertexcolours
#!BPY
""" Registration info for Blender menus:
Name: 'OGRE (.mesh.xml)...'
Blender: 236
Group: 'Import'
Tip: 'Import an Ogre-Mesh (.mesh.xml) file.'
"""
'''
@liyonghelpme
liyonghelpme / ogre_import.py
Created December 29, 2014 08:51
ogre import into blender
#!BPY
""" Registration info for Blender menus:
Name: 'OGRE (.mesh.xml)...'
Blender: 236
Group: 'Import'
Tip: 'Import an Ogre-Mesh (.mesh.xml) file.'
"""
'''
@liyonghelpme
liyonghelpme / convertToRss.py
Created February 4, 2015 17:45
将oschina导出的html转化为 rss文件
#coding:utf8
#将oschina导出的html 转化为rss格式
import re, sys, codecs, types
import htmlentitydefs
import urlparse
import HTMLParser
import urllib
rssheader = '''<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" title="XSL Formatting" href="/rss.xsl" media="all" ?>
#!BPY
""" Registration info for Blender menus:
Name: 'OGRE (.mesh.xml)...'
Blender: 236
Group: 'Import'
Tip: 'Import an Ogre-Mesh (.mesh.xml) file.'
"""
'''
@liyonghelpme
liyonghelpme / layout_import.py
Last active August 29, 2015 14:16
根据火炬之光的 levelsets中的 dat文件,导出相关场景所需要的所有的场景组件,转化为 fbx文件
#!BPY
'''
从火炬之光 mine.dat 文件中导入 矿洞 所需要的所有的 场景组件
'''
bl_info = {
"name" : "torchlight tileset import",
"author" : "liyonghelpme",
"version" : {1, 0, 0},
"blender": (2, 70, 0),
"location": "File > Import > layout (.dat)",
@liyonghelpme
liyonghelpme / ConvertMineDataToJson.py
Created February 25, 2015 23:23
将Mine.dat 文件转化为json文件用于Unity 中使用这些 场景组件的信息
#coding:utf8
'''
生成mine.dat 所有的地图组成块 组件信息转化为 json 文件, 用于unity中加载使用
'''
import json
import re
import codecs
import os
import json
import sys
@liyonghelpme
liyonghelpme / ConvertLayoutToJson.py
Created February 25, 2015 23:25
用于将火炬之光 关卡布局 layout中 特定Layout文件导出为json文件, 用于unity中加载使用
#coding:utf8
'''
用于将火炬之光 关卡布局 layout中 特定Layout文件导出为json文件, 用于unity中加载使用
'''
import os
import sys
import json
import re
import codecs
@liyonghelpme
liyonghelpme / cutImageSet.py
Created March 19, 2015 01:51
切割火炬之光 ogre cegui的 图集为单张图片
import PIL
from PIL import Image
import xml
import xml.sax
import xml.sax.handler
import os
#filename = "itemicons5.imageset"
#expName = "export13"
@liyonghelpme
liyonghelpme / packItem.py
Created March 19, 2015 01:53
将 ogre 火炬之光 cegui的 九宫格 图片 拼接为一个 大图 给 ngui使用
import PIL
from PIL import Image
import xml
import xml.sax
import xml.sax.handler
import os
imname = ["TopLeft", "TopEdge", "TopRight",
"LeftEdge", "Middle", "RightEdge",
"BottomLeft", "BottomEdge", "BottomRight",