﻿<?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%3ASource%2FRender%2FAPI</id>
	<title>Dev:Source/Render/API - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3ASource%2FRender%2FAPI"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Render/API&amp;action=history"/>
	<updated>2026-05-11T14:24:07Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:Source/Render/API&amp;diff=48476&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Render/API&amp;diff=48476&amp;oldid=prev"/>
		<updated>2018-06-28T17:48:18Z</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日 (木) 17:48時点における版&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:Source/Render/API&amp;diff=48475&amp;oldid=prev</id>
		<title>2010年4月3日 (土) 13:08にwiki&gt;Terrywallworkによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:Source/Render/API&amp;diff=48475&amp;oldid=prev"/>
		<updated>2010-04-03T13:08:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page is a proposal and set of ideas for an external render API, using XML, python and C in tandem.  Implementing it would obvously be a major task, yet ultimately a worthwhile one.&lt;br /&gt;
&lt;br /&gt;
This proposal is not in any way complete (as it's lack of content should make obvious :) ).&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
Any render api must have three parts: &lt;br /&gt;
* A facility to save custom data in materials objects and meshes.&lt;br /&gt;
* A flexible way to handle the UI for defining that data, of which python may be the best choice.&lt;br /&gt;
* A C api for getting any custom data, processing the render scene, and outputting to the target renderer.&lt;br /&gt;
&lt;br /&gt;
It is my belief that XML would be the best choice for saving custom data.  I also think that Python would be the ideal to handle defining UIs.  Obviously this would have to interface with the custom blob data project somehow.&lt;br /&gt;
&lt;br /&gt;
=The Structure of the API=&lt;br /&gt;
&lt;br /&gt;
The render API's entry point would be a python script that would register UI and rendering functions with Blender.  The script might look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#RENDER.INTERFACE&lt;br /&gt;
from Blender import Render, BPyDataBlob, RenderUI&lt;br /&gt;
Render.Register(&amp;quot;Aqsis&amp;quot;, &amp;quot;C-shared&amp;quot;, &amp;quot;Aqsis.DLL&amp;quot;, &amp;quot;entry_aqsis&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
def draw_scene_ui(self, xmlobj):&lt;br /&gt;
  panel code of some sort, using a python-implemented module&lt;br /&gt;
  for acessing the xml data.&lt;br /&gt;
  BPyDataBlob.DrawPanel(xmlobj)&lt;br /&gt;
&lt;br /&gt;
def event_scene_ui(self, xmlobj, evt, val):&lt;br /&gt;
  BPyDataBlob.EventInPanel(xmlobj)&lt;br /&gt;
&lt;br /&gt;
#I don't know schema, so here's a simple idea for making duplicates of preset&lt;br /&gt;
#xml trees&lt;br /&gt;
xmldef = &amp;quot;&amp;lt;SceneData&amp;gt;&amp;lt;GlobalIllum mode=&amp;quot;int&amp;quot; samples=&amp;quot;int&amp;quot; enabled=&amp;quot;int:tog&amp;quot;/&amp;gt;&amp;lt;/SceneData&amp;gt;&amp;quot;&lt;br /&gt;
Render.RegisterPanel(&amp;quot;Scene.Aqsis&amp;quot;, xmldef, draw_scene_ui, event_scene_ui)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Why XML=&lt;br /&gt;
&lt;br /&gt;
For some people, XML can be difficult to use.  It doesn't diff as well as fixed-formatted formats, as the human-readable requirements tends to cause differing parsers to lay waste to the whitespace (this is, by the way, all second-hand reports I've gotten).&lt;br /&gt;
&lt;br /&gt;
However, there are advantages to using XML.  From a programming point of view, using a tree structure such as XML works very well (and there's no need to use something as complicated as DOM).  The fact that it's human-readable also helps to speed up the development process, as it's easy to find problems in the output (and you can always switch to a more fixed binary format later on if you wish).  I believe that XML would work well to help prevent a badly-written render wrapper from accumulating data in a .blend.  Authors can use a simple python script (written as part of the python side of the API) to monitor all attached XML data, and spot any leaks or errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=How the Renderer Interface is Communicated With=&lt;br /&gt;
&lt;br /&gt;
All data sent to the renderer will be sent in a tree format similar to XML, yet fully binary and very compact (perhaps a special version of sdna).  The data will be sent according to a specific protocal, which can perhaps be transformed to maintain compatibility with older render extensions.&lt;br /&gt;
&lt;br /&gt;
The actual implementation of the renderer can be written as a C shared library or a python script.  Regardless, the protocal for transferring data would be the same.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Terrywallwork</name></author>
		
	</entry>
</feed>