﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3A2.5%2FDoc%2FHow_to%2FAdd_an_icon</id>
	<title>Dev:2.5/Doc/How to/Add an icon - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3A2.5%2FDoc%2FHow_to%2FAdd_an_icon"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.5/Doc/How_to/Add_an_icon&amp;action=history"/>
	<updated>2026-06-10T12:02:48Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:2.5/Doc/How_to/Add_an_icon&amp;diff=102073&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.5/Doc/How_to/Add_an_icon&amp;diff=102073&amp;oldid=prev"/>
		<updated>2018-06-28T19:40:50Z</updated>

		<summary type="html">&lt;p&gt;1版 をインポートしました&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;2018年6月28日 (木) 19:40時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ja&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(相違点なし)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Yamyam</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:2.5/Doc/How_to/Add_an_icon&amp;diff=102072&amp;oldid=prev</id>
		<title>wiki&gt;Ideasman42: /* Add the Icon Graphic */</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.5/Doc/How_to/Add_an_icon&amp;diff=102072&amp;oldid=prev"/>
		<updated>2014-01-13T13:22:54Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Add the Icon Graphic&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Understanding the needed files =&lt;br /&gt;
&lt;br /&gt;
== The icon files ==&lt;br /&gt;
&lt;br /&gt;
[[File:Blenderbuttons.png|center]]&lt;br /&gt;
&lt;br /&gt;
In the ''release/datafiles/'' folder you can find Blender's icon files:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;blender_icons.svg&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;blender_icons16/*.dat&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;blender_icons32/*.dat&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When opening the SVG file, make sure to use '''Inkscape'''. Other popular software such as Adobe Illustrator might not display all of the icons.&lt;br /&gt;
{{clr}}&lt;br /&gt;
&lt;br /&gt;
== Groups of icons ==&lt;br /&gt;
&lt;br /&gt;
As you see, icons are disposed in rows, which are grouped in a logical way and marked with the labels on the right.&lt;br /&gt;
&lt;br /&gt;
== Icons names ==&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;code&amp;gt;[http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/source/blender/editors/include/UI_icons.h source/blender/editors/include/UI_icons.h]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Apart from the GPL license and comments, you will find a big list starting with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
DEF_ICON(BLENDER)&lt;br /&gt;
DEF_ICON(QUESTION)&lt;br /&gt;
DEF_ICON(ERROR)&lt;br /&gt;
DEF_ICON(CANCEL)&lt;br /&gt;
DEF_ICON(TRIA_RIGHT)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see in &amp;lt;code&amp;gt;[http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/source/blender/editors/include/UI_resources.h source/blender/editors/include/UI_resources.h]&amp;lt;/code&amp;gt;, the macro '''&amp;lt;code&amp;gt;DEF_ICON&amp;lt;/code&amp;gt;''' is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
#define DEF_ICON(name) ICON_##name,&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
hence it takes the name in parentheses and defines  ICON_&amp;lt;name-in-parentheses&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is, in &amp;lt;code&amp;gt;[http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/source/blender/editors/include/UI_icons.h source/blender/editors/include/UI_icons.h]&amp;lt;/code&amp;gt; we define a list of names like &lt;br /&gt;
* &amp;lt;code&amp;gt;ICON_BLENDER&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ICON_QUESTION&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ICON_ERROR&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ICON_CANCEL&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ICON_TRIA_RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Icons disposal ==&lt;br /&gt;
&lt;br /&gt;
=== Using the &amp;quot;Icons&amp;quot; addons ===&lt;br /&gt;
&lt;br /&gt;
Now to help you understand how this works, enable the [[Extensions:2.5/Py/Scripts/Development/Display_All_Icons|Icons addon]].&lt;br /&gt;
&lt;br /&gt;
[[File:2.5-scripts-addons-system-display_all_icons.png|thumb|left|615px|Display All Icons panels]]&lt;br /&gt;
&lt;br /&gt;
Go in the console space and in the view menu enable the icon viewer: you will get a nice list of icons to scrub in Console or in the Text Editor.&lt;br /&gt;
&lt;br /&gt;
=== Icons order ===&lt;br /&gt;
&lt;br /&gt;
[[File:Blenderbuttons-detail.png|frame|''blender_icons.svg'' file bottom-left detail]]&lt;br /&gt;
&lt;br /&gt;
By scrolling the slider in the console header, you'll see that these icons appear:&lt;br /&gt;
# in the same order they are defined in &amp;lt;code&amp;gt;[http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/source/blender/editors/include/UI_icons.h source/blender/editors/include/UI_icons.h]&amp;lt;/code&amp;gt;.&lt;br /&gt;
# in the same order they are in the &amp;lt;code&amp;gt;blender_icons*&amp;lt;/code&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
Precisely:&lt;br /&gt;
* the first icon in the icons viewer (''ICON_QUESTION'') is the second icon at the bottom-left in the &amp;lt;code&amp;gt;blender_icons*&amp;lt;/code&amp;gt; files, &lt;br /&gt;
* the second icon in the icons viewer (''ICON_ERROR'') is the third icon at the bottom-left in the &amp;lt;code&amp;gt;blender_icons*&amp;lt;/code&amp;gt; files, &lt;br /&gt;
* and so on...&lt;br /&gt;
&lt;br /&gt;
Their order is in rows, from left to right, and reading rows from the bottom to the top of the &amp;lt;code&amp;gt;blender_icons*&amp;lt;/code&amp;gt; files.&lt;br /&gt;
&lt;br /&gt;
{{Note|Note|For some reason, the first one is not available in Blender's buttons (will investigate).}}&lt;br /&gt;
&lt;br /&gt;
=== Empty slots ===&lt;br /&gt;
&lt;br /&gt;
You may have noticed that there are empty slots in the &amp;lt;code&amp;gt;blender_icons*&amp;lt;/code&amp;gt; files, for example in the first line the slots '''16''' and '''17''', which are preceded by the ''MENU_PANEL'' icon and followed by the ''DOT'' icon. &lt;br /&gt;
&lt;br /&gt;
These empty slots have a correspondant code in &amp;lt;code&amp;gt;[http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/source/blender/editors/include/UI_icons.h source/blender/editors/include/UI_icons.h]&amp;lt;/code&amp;gt; as shown below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
DEF_ICON(MENU_PANEL)&lt;br /&gt;
#ifndef DEF_ICON_BLANK_SKIP&lt;br /&gt;
	DEF_ICON(BLANK002)&lt;br /&gt;
	DEF_ICON(BLANK003)&lt;br /&gt;
#endif&lt;br /&gt;
DEF_ICON(DOT)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Adding an icon =&lt;br /&gt;
&lt;br /&gt;
== Add the icon image ==&lt;br /&gt;
&lt;br /&gt;
Find an empty slot where to put your icon in the &amp;lt;code&amp;gt;blender_icons*&amp;lt;/code&amp;gt; files, putting it in the right group.&lt;br /&gt;
&lt;br /&gt;
Add the icon in the image, for example the first free slot, number '''16'''.&lt;br /&gt;
&lt;br /&gt;
This corresponds to '''&amp;lt;code&amp;gt;DEF_ICON(BLANK002)&amp;lt;/code&amp;gt;''' in the source code.&lt;br /&gt;
&lt;br /&gt;
== Add your icon name ==&lt;br /&gt;
&lt;br /&gt;
Choose a name which won't clash with existing names, for example '''&amp;lt;code&amp;gt;MYICON&amp;lt;/code&amp;gt;'''.&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;[http://git.blender.org/gitweb/gitweb.cgi/blender.git/blob_plain/HEAD:/source/blender/editors/include/UI_icons.h source/blender/editors/include/UI_icons.h]&amp;lt;/code&amp;gt;:&lt;br /&gt;
* move '''&amp;lt;code&amp;gt;DEF_ICON(BLANK002)&amp;lt;/code&amp;gt;''' correspondant to the blank slot you have chosen out of the '''&amp;lt;code&amp;gt;#ifndef&amp;lt;/code&amp;gt;'''&lt;br /&gt;
* change it to '''&amp;lt;code&amp;gt;DEF_ICON(MYICON)&amp;lt;/code&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
DEF_ICON(MENU_PANEL)&lt;br /&gt;
DEF_ICON(MYICON)&lt;br /&gt;
#ifndef DEF_ICON_BLANK_SKIP&lt;br /&gt;
	DEF_ICON(BLANK003)&lt;br /&gt;
#endif&lt;br /&gt;
DEF_ICON(DOT)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Add the Icon Graphic ==&lt;br /&gt;
&lt;br /&gt;
For testing you can edit &amp;lt;tt&amp;gt;blender_icons16.png/blender_icons32.png&amp;lt;/tt&amp;gt;,&amp;lt;br&amp;gt;but if you want this to make its way back into Blender you should edit the SVG source: &amp;lt;tt&amp;gt;blender_icons.svg&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have done this you can re-generate the images by running inkscape from the command-line:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
python3 blender_icons_update.py&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Unix systems you can simply run:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make icons&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note that both inkscape and blender must be in the system PATH for this command to execute properly.''&lt;br /&gt;
&lt;br /&gt;
== Compile! ==&lt;br /&gt;
&lt;br /&gt;
Finally, compiling blender you should see your icon '''&amp;lt;code&amp;gt;MYICON&amp;lt;/code&amp;gt;''' in Blender!&lt;br /&gt;
Enable the Icon addon again and search for it at number '''16'''.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
&lt;br /&gt;
* [[Extensions:2.5/Py/Scripts/Development/Display_All_Icons|Icons script's wiki page]]&lt;br /&gt;
* [http://projects.blender.org/tracker/index.php?func=detail&amp;amp;aid=22011 Icon script's tracker page]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Ideasman42</name></author>
		
	</entry>
</feed>