﻿<?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=%E5%88%A9%E7%94%A8%E8%80%85%3AEnjalot%2FCreating_a_custom_modifier</id>
	<title>利用者:Enjalot/Creating a custom modifier - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=%E5%88%A9%E7%94%A8%E8%80%85%3AEnjalot%2FCreating_a_custom_modifier"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Enjalot/Creating_a_custom_modifier&amp;action=history"/>
	<updated>2026-07-31T07:51:24Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Enjalot/Creating_a_custom_modifier&amp;diff=97809&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Enjalot/Creating_a_custom_modifier&amp;diff=97809&amp;oldid=prev"/>
		<updated>2018-06-28T19:37:34Z</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:37時点における版&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=%E5%88%A9%E7%94%A8%E8%80%85:Enjalot/Creating_a_custom_modifier&amp;diff=97808&amp;oldid=prev</id>
		<title>wiki&gt;Ilent2: /* Modifying the files */ Updated properties_data_modifier.py path and surrounding text.</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Enjalot/Creating_a_custom_modifier&amp;diff=97808&amp;oldid=prev"/>
		<updated>2014-01-25T10:57:34Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Modifying the files: &lt;/span&gt; Updated properties_data_modifier.py path and surrounding text.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Creating a custom modifier =&lt;br /&gt;
&lt;br /&gt;
Here is a tutorial to make a custom modifier that does nothing but printf its existence! I figured this out by copying the SoftBody modifier and scouring the source code for all references to it. I called my modifier Enja, so just replace any instance of Enja in this post with your own chosen name.&lt;br /&gt;
&lt;br /&gt;
== Preparing the files ==&lt;br /&gt;
&lt;br /&gt;
First we want to create our main modifier code file.&lt;br /&gt;
&lt;br /&gt;
Let's create &amp;lt;code&amp;gt;blender/modifiers/intern/MOD_enja.c&amp;lt;/code&amp;gt; (all paths start in the source folder):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp blender/modifiers/intern/MOD_softbody.c blender/modifiers/intern/MOD_enja.c&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In here you will add functionality and of course replace all instances of &amp;lt;code&amp;gt;SoftBody&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;Enja&amp;lt;/code&amp;gt;. Have a look at [[User:Enjalot/Creating_a_custom_modifier/MOD_enja.c|my modified MOD_enja.c]]&lt;br /&gt;
&lt;br /&gt;
== Modifying the files ==&lt;br /&gt;
&lt;br /&gt;
The rest of the instructions are just modifying files (if you are confused about where things go, just look at Softbody!&lt;br /&gt;
&lt;br /&gt;
At line 184 of &amp;lt;code&amp;gt;blender/modifiers/intern/MOD_util.c&amp;lt;/code&amp;gt; add&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    INIT_TYPE(Enja);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At line 70 of &amp;lt;code&amp;gt;blender/modifiers/MOD_modifiertypes.h&amp;lt;/code&amp;gt; add&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;    extern ModifierTypeInfo modifierType_Enja;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At line 564 of: &amp;lt;code&amp;gt;blender/makesrna/RNA_access.h&amp;lt;/code&amp;gt; add&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    extern StructRNA RNA_EnjaModifier;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At line 303 of: &amp;lt;code&amp;gt;blender/blenkernel/BKE_modifier.h&amp;lt;/code&amp;gt; add&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    int modifiers_isEnjaEnabled(struct Object *ob);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We need to edit &amp;lt;code&amp;gt;blender/makesdna/DNA_modifier_types.h&amp;lt;/code&amp;gt; in a couple places:&lt;br /&gt;
* on line 69, just after ''eModifierType_Screw'' and before ''NUM_MODIFIER_TYPES'' add&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    eModifierType_Enja&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*on line 441, after the ''SoftbodyModifierData'' struct, add&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    typedef struct EnjaModifierData {&lt;br /&gt;
        ModifierData modifier;&lt;br /&gt;
    } EnjaModifierData;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally on line 85 of &amp;lt;code&amp;gt;blender/makesrna/intern/rna_modifier.c&amp;lt;/code&amp;gt; (before the {0,NULL,0,NULL,NULL} entry:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    {eModifierType_Enja, &amp;quot;ENJA&amp;quot;, ICON_MOD_SOFT, &amp;quot;Enja&amp;quot;, &amp;quot;&amp;quot;}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that I didn't change the icon to ICON_MOD_ENJA because I didn't take the time to figure out making a new icon yet.&lt;br /&gt;
&lt;br /&gt;
To declare the User Interface for our new modifier, we need to edit one last file &amp;lt;code&amp;gt;../release/scripts/startup/bl_ui/properties_data_modifier.py&amp;lt;/code&amp;gt; around line 624&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
    def ENJA(self, layout, ob, md, wide_ui):&lt;br /&gt;
        layout.label(text=&amp;quot;Coming soon.&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This should build and give you a modifier under the Simulate header that does nothing but print out a message when you add it.&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;/div&gt;</summary>
		<author><name>wiki&gt;Ilent2</name></author>
		
	</entry>
</feed>