summaryrefslogtreecommitdiff
path: root/tools/editor/icons/make_icons.py
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-08-02 19:11:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-08-02 19:11:47 -0300
commit3d1d190dcd2993f87d5804de8a60e8bf5fc2cf49 (patch)
treeaa2c814b744ab970ae79931b419908ff7ebc850e /tools/editor/icons/make_icons.py
parentad313097ebcb2a0c02c956fdf74a6610c3f7c9a8 (diff)
parentcea949180688add09eb9e69f5e405f361dc96d40 (diff)
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'tools/editor/icons/make_icons.py')
-rw-r--r--tools/editor/icons/make_icons.py48
1 files changed, 0 insertions, 48 deletions
diff --git a/tools/editor/icons/make_icons.py b/tools/editor/icons/make_icons.py
deleted file mode 100644
index e06cbac720..0000000000
--- a/tools/editor/icons/make_icons.py
+++ /dev/null
@@ -1,48 +0,0 @@
-
-import glob
-
-pixmaps = glob.glob("*.png")
-
-f = open("../editor_icons.cpp","wb")
-
-
-f.write("#include \"editor_icons.h\"\n\n")
-f.write("#include \"scene/resources/theme.h\"\n\n")
-
-for x in pixmaps:
-
- var_str=x[:-4]+"_png";
-
- f.write("static const unsigned char "+ var_str +"[]={\n");
-
- pngf=open(x,"rb");
-
- b=pngf.read(1);
- while(len(b)==1):
- f.write(hex(ord(b)))
- b=pngf.read(1);
- if (len(b)==1):
- f.write(",")
-
- f.write("\n};\n\n\n");
- pngf.close();
-
-f.write("static Ref<ImageTexture> make_icon(const uint8_t* p_png) {\n")
-f.write("\tRef<ImageTexture> texture( memnew( ImageTexture ) );\n")
-f.write("\ttexture->create_from_image( Image(p_png),ImageTexture::FLAG_FILTER );\n")
-f.write("\treturn texture;\n")
-f.write("}\n\n")
-
-f.write("void editor_register_icons(Ref<Theme> p_theme) {\n\n")
-
-
-for x in pixmaps:
-
- type=x[5:-4].title().replace("_","");
- var_str=x[:-4]+"_png";
- f.write("\tp_theme->set_icon(\""+type+"\",\"EditorIcons\",make_icon("+var_str+"));\n");
-
-f.write("\n\n}\n\n");
-f.close()
-
-