﻿<?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%3AKjym3%2FFreestyleAPIReorganization</id>
	<title>利用者:Kjym3/FreestyleAPIReorganization - 版の履歴</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%3AKjym3%2FFreestyleAPIReorganization"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kjym3/FreestyleAPIReorganization&amp;action=history"/>
	<updated>2026-07-30T04:45:58Z</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:Kjym3/FreestyleAPIReorganization&amp;diff=145917&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:Kjym3/FreestyleAPIReorganization&amp;diff=145917&amp;oldid=prev"/>
		<updated>2018-06-28T21:07:01Z</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日 (木) 21:07時点における版&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:Kjym3/FreestyleAPIReorganization&amp;diff=145916&amp;oldid=prev</id>
		<title>wiki&gt;Kjym3: /* Acknowledgement */</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kjym3/FreestyleAPIReorganization&amp;diff=145916&amp;oldid=prev"/>
		<updated>2014-01-28T15:57:10Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Acknowledgement&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Freestyle Python API Reorganization=&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
In the Blender 2.70 release, the Freestyle Python API is updated in a backward incompatible manner ([https://developer.blender.org/T37565 T37565]).  The basic idea of the API revision is to reorganize Freestyle-related Python modules in line with the bpy module and its submodules, now that some breakage of backwards compatibility is allowed with the 2.7x series.  The API updates aim to address the following issues observed in the present Freestyle implementation:&lt;br /&gt;
&lt;br /&gt;
# Freestyle API constructs for style module writing in Python were not logically organized. The API modules were partly organized in terms of implementation languages (C and Python) and partly based on implemented roles (predicates, chaining iterators, and so on).&lt;br /&gt;
# All Python scripts for Freestyle, i.e., both API modules and application programs (style modules), were stored in the same 'release/scripts/freestyle/style_modules' directory. This made it difficult for new users to find style modules.&lt;br /&gt;
&lt;br /&gt;
==New Python module organization==&lt;br /&gt;
&lt;br /&gt;
The new Python module directory structure is organized as follows:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;release/scripts/freestyle/modules&amp;lt;/code&amp;gt; - Freestyle API modules&lt;br /&gt;
* &amp;lt;code&amp;gt;release/scripts/freestyle/styles&amp;lt;/code&amp;gt; - predefined style modules&lt;br /&gt;
&lt;br /&gt;
In Python, the Freestyle API modules are reorganized as follows:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;freestyle&amp;lt;/code&amp;gt; - top-level package just containing the following submodules.&lt;br /&gt;
* &amp;lt;code&amp;gt;freestyle.types&amp;lt;/code&amp;gt; - classes for core data structures, and base classes for user-defined stylization rules (i.e., chaining iterators, predicates, functions, and shaders).&lt;br /&gt;
* &amp;lt;code&amp;gt;freestyle.chainingiterators&amp;lt;/code&amp;gt; - predefined chaining iterators.&lt;br /&gt;
* &amp;lt;code&amp;gt;freestyle.predicates&amp;lt;/code&amp;gt; - predefined 0D and 1D predicates.&lt;br /&gt;
* &amp;lt;code&amp;gt;freestyle.functions&amp;lt;/code&amp;gt; - predefined 0D and 1D functions.&lt;br /&gt;
* &amp;lt;code&amp;gt;freestyle.shaders&amp;lt;/code&amp;gt; - predefined stroke shaders.&lt;br /&gt;
* &amp;lt;code&amp;gt;freestyle.utils&amp;lt;/code&amp;gt; - utility functions for style module writing.&lt;br /&gt;
&lt;br /&gt;
==Code examples before/after the API revision==&lt;br /&gt;
&lt;br /&gt;
The effects of the API changes are illustrated below by taking the japanese_bigbrush.py style module as example.  With the previous API organization (before the API updates), the import statements in the beginning of the style module were written as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from freestyle import BezierCurveShader, ChainSilhouetteIterator, ConstantColorShader, \&lt;br /&gt;
    ConstantThicknessShader, IntegrationType, Operators, QuantitativeInvisibilityUP1D, \&lt;br /&gt;
    SamplingShader, TextureAssignerShader, TipRemoverShader&lt;br /&gt;
from Functions0D import pyInverseCurvature2DAngleF0D&lt;br /&gt;
from PredicatesB1D import pyLengthBP1D&lt;br /&gt;
from PredicatesU0D import pyParameterUP0D&lt;br /&gt;
from PredicatesU1D import pyDensityUP1D, pyHigherLengthUP1D, pyHigherNumberOfTurnsUP1D&lt;br /&gt;
from logical_operators import NotUP1D&lt;br /&gt;
from shaders import pyNonLinearVaryingThicknessShader, pySamplingShader&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the updated Python API, these import statements are written as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
from freestyle.chainingiterators import ChainSilhouetteIterator&lt;br /&gt;
from freestyle.functions import pyInverseCurvature2DAngleF0D&lt;br /&gt;
from freestyle.predicates import (&lt;br /&gt;
    NotUP1D,&lt;br /&gt;
    QuantitativeInvisibilityUP1D,&lt;br /&gt;
    pyDensityUP1D,&lt;br /&gt;
    pyHigherLengthUP1D,&lt;br /&gt;
    pyHigherNumberOfTurnsUP1D,&lt;br /&gt;
    pyLengthBP1D,&lt;br /&gt;
    pyParameterUP0D,&lt;br /&gt;
    )&lt;br /&gt;
from freestyle.shaders import (&lt;br /&gt;
    BezierCurveShader,&lt;br /&gt;
    ConstantColorShader,&lt;br /&gt;
    ConstantThicknessShader,&lt;br /&gt;
    SamplingShader,&lt;br /&gt;
    TextureAssignerShader,&lt;br /&gt;
    TipRemoverShader,&lt;br /&gt;
    pyNonLinearVaryingThicknessShader,&lt;br /&gt;
    pySamplingShader,&lt;br /&gt;
    )&lt;br /&gt;
from freestyle.types import IntegrationType, Operators&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the applicative perspective, the new organization will be much easier for style module writers to find relevant Python constructs from the freestyle.* submodules.  It is remarked that there is no functional difference (no visual effects in rendering results) between the present and new module organizations.&lt;br /&gt;
&lt;br /&gt;
==Acknowledgement==&lt;br /&gt;
Many thanks to Folkert Vries (flokkievids) and Campbell Barton for careful discussions, code review and patches through the task [http://developer.blender.org/T37565 T37565].&lt;/div&gt;</summary>
		<author><name>wiki&gt;Kjym3</name></author>
		
	</entry>
</feed>