﻿<?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.4%2FSource%2FPython%2FAPI%2Fbpy_api</id>
	<title>Dev:2.4/Source/Python/API/bpy api - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.blender.jp/index.php?action=history&amp;feed=atom&amp;title=Dev%3A2.4%2FSource%2FPython%2FAPI%2Fbpy_api"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Python/API/bpy_api&amp;action=history"/>
	<updated>2026-07-31T02:13:44Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Python/API/bpy_api&amp;diff=54150&amp;oldid=prev</id>
		<title>Yamyam: 1版 をインポートしました</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Python/API/bpy_api&amp;diff=54150&amp;oldid=prev"/>
		<updated>2018-06-28T17:51:13Z</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:51時点における版&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.4/Source/Python/API/bpy_api&amp;diff=54149&amp;oldid=prev</id>
		<title>wiki&gt;Mindrones: moved Dev:Source/BPython/API/bpy api to Dev:2.4/Source/Python/API/bpy api</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Python/API/bpy_api&amp;diff=54149&amp;oldid=prev"/>
		<updated>2010-02-19T00:35:31Z</updated>

		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/Dev:Source/BPython/API/bpy_api&quot; class=&quot;mw-redirect&quot; title=&quot;Dev:Source/BPython/API/bpy api&quot;&gt;Dev:Source/BPython/API/bpy api&lt;/a&gt; to &lt;a href=&quot;/Dev:2.4/Source/Python/API/bpy_api&quot; title=&quot;Dev:2.4/Source/Python/API/bpy api&quot;&gt;Dev:2.4/Source/Python/API/bpy api&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= New developments in the Blender Python API =&lt;br /&gt;
&lt;br /&gt;
{{Note|Note|The previous version of this page was moved to its discussion page (click on the &amp;quot;discussion&amp;quot; button above). Please check it for the actual discussions and much more info than found here. - [[User:ianwill|Willian]]}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this page (and its discussion page) we are considering additions for BPython. Below, we list the main specific points, mentioning their current state (implemented/under discussion).&lt;br /&gt;
&lt;br /&gt;
== Investigating ==&lt;br /&gt;
&lt;br /&gt;
== Decided ==&lt;br /&gt;
&lt;br /&gt;
Topics here have either not been discussed enough yet or we didn't reach an agreement and are still researching what to do. In a future meeting we can decide about them.&lt;br /&gt;
&lt;br /&gt;
=== Integrating Other Modules - part II ===&lt;br /&gt;
{{Note|Decision: bpy module|We will develop a new module alongside the existing 'Blender' module called bpy.&lt;br /&gt;
the existing bpy module will go into bpy.data and we will be able to have bpy.config and bpy.classes.&lt;br /&gt;
&lt;br /&gt;
We will have a new directory for these called 'bpy'&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We have the old Blender module and its submodules and now we have the bpy module.&lt;br /&gt;
&lt;br /&gt;
Since it was decided &amp;quot;bpy&amp;quot; will only be a representation of the database in Blender (bpy.meshes, bpy.scenes, etc.), we have now two &amp;quot;root&amp;quot; modules, Blender and bpy and won't include new submodules like Classes, Config, etc. in bpy.&lt;br /&gt;
&lt;br /&gt;
So our alternatives for structuring (module hierarchy) are:&lt;br /&gt;
&lt;br /&gt;
# Have Blender and bpy separated, add new submodules to Blender: Blender.Classes, Blender.Config, etc.&lt;br /&gt;
# Put bpy inside Blender: Blender.bpy (so ending with: Blender.bpy.meshes, etc.)&lt;br /&gt;
# Create a new &amp;quot;blender&amp;quot; module (jumping on the lowercase modules bandwagon): blender.bpy, blender.classes, blender.config, maybe blender.constants, someday blender.gui, etc.&lt;br /&gt;
# Something else?&lt;br /&gt;
&lt;br /&gt;
=== Classes module ===&lt;br /&gt;
{{Note|Decision: Classes|Classes will be in their own submodule bpy.classes.Mesh for example}}&lt;br /&gt;
&lt;br /&gt;
We still didn't define where the classes module will be. It was decided that it shouldn't be bpy.classes and that Blender.Classes was a good candidate. See previous topic for other possibilities...&lt;br /&gt;
&lt;br /&gt;
Also, is &amp;quot;classes&amp;quot; the best name?&lt;br /&gt;
&lt;br /&gt;
=== Constants ===&lt;br /&gt;
{{Note|Decision: Constants|Constants will be under their respective classes - bpy.classes.Mesh.TWOSIDE&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
At the moment bpy.* has no access to constants. These are some favored possibilities:&lt;br /&gt;
&lt;br /&gt;
# Class.constant&lt;br /&gt;
# dataseq.constants.* -- example: &amp;lt;code&amp;gt;bpy.meshes.constants.MODE_TWOSIDED&amp;lt;/code&amp;gt;.&lt;br /&gt;
# A new module to group all constants.&lt;br /&gt;
&lt;br /&gt;
'''Status''': still investigating / discussing.&lt;br /&gt;
&lt;br /&gt;
The decisions here are based on voting during a meeting on Sunday (March 25, 2007).&lt;br /&gt;
&lt;br /&gt;
[[User:Khughes|Khughes]] has written [http://wiki.blender.org/index.php?title=BlenderDev/Bitfields a proposal ] for a special PyType for Constants and has implemented it in prototype, but until then we will use what is there.&lt;br /&gt;
&lt;br /&gt;
{{Note|[http://members.optusnet.com.au/cjbarton/BPY_API/Bpy-module.html Current API documentation]|generated and hosted by [[User:ideasman42|Ideasman42]].}}&lt;br /&gt;
&lt;br /&gt;
=== Automatic importing ===&lt;br /&gt;
&lt;br /&gt;
Adding important names (modules, variables, functions) to the builtin Python dictionary on startup.&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
* simplicity: more results with less typing.&lt;br /&gt;
&lt;br /&gt;
Cons:&lt;br /&gt;
* namespace pollution;&lt;br /&gt;
* could bring issues in the future (e.g. if it ever becomes possible to run such scripts from a standalone Python interpreter).&lt;br /&gt;
&lt;br /&gt;
{{Note|Decision: No automatic importing|We will try other ways to achieve simplicity and less verbose scripts:&lt;br /&gt;
* A simple wrapper API on top of BPython, written in Python;&lt;br /&gt;
* Text templates for scripts in Blender's Text Editor.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Status''': implemented by [[User:ideasman42|Ideasman42]].&lt;br /&gt;
&lt;br /&gt;
=== The bpy module ===&lt;br /&gt;
&lt;br /&gt;
{{Note|Decision: bpy|this new module is, like [[User:theeth|Theeth]] mentioned: a &amp;quot;representation of the current state in Blender&amp;quot; (of the &amp;quot;database&amp;quot;, as [[User:Stivs|Stivs]] complemented. We should not add arbitrary modules or variables to it. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Related decision: we will make bpy, etc. replace the old object data modules (Mesh, Lamp, Camera, etc. etc.) completely, no need for them anymore.&lt;br /&gt;
&lt;br /&gt;
'''Status''': bpy implemented by [[User:ideasman42|Ideasman42]]. Rest of the work requires more investigation about sceneRender, etc. (where / how will these be reimplemented).&lt;br /&gt;
&lt;br /&gt;
=== dataseq.load() VS dataseq.new() ===&lt;br /&gt;
&lt;br /&gt;
All object types can be created with a dataseq.new() method. But some object types can be created from data loaded from disk: texts, images, sounds. Do we need a separate .load() method for these or is it ok to add the option for loading directly in their .new() methods?&lt;br /&gt;
&lt;br /&gt;
{{Note|Decision: No need for .load() methods|We can add a &amp;quot;filename&amp;quot; parameter to dataseq.new to be used by those objects where it is needed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Status''': implemented by [[User:ideasman42|Ideasman42]].&lt;br /&gt;
&lt;br /&gt;
=== Integrating Other Modules - part I ===&lt;br /&gt;
&lt;br /&gt;
At the moment bpy has support for all datatypes (bpy.meshes, bpy.scenes etc)&lt;br /&gt;
as well as bpy.libraries and bpy.config. But how should we go about adding less data centric modules like Blender.Window, Draw, BGL, sys etc.&lt;br /&gt;
&lt;br /&gt;
{{Note|Decision: we still need these old modules|Draw, BGL and Window should stay as they are, for now, in the Blender module.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Constructors VS dataseq.new() ===&lt;br /&gt;
&lt;br /&gt;
Example:&amp;lt;code&amp;gt;something.Mesh(name) VS bpy.meshes.new(name)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A key point here is to avoid troubles we've had with the older BPython ways, like being able to create objects without data or not linked to any scene.&lt;br /&gt;
&lt;br /&gt;
{{Note|Decision: It's desirable to have both alternatives|During the meeting we agreed that constructors are needed, but that the current dataseq.new() way could stay as alternative.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[User:Ascotan|Ascotan]] suggested a module named classes as a place for the constructors. Blender.Classes was mentioned by [[User:theeth|Theeth]] during the meeting. No decision yet.&lt;br /&gt;
&lt;br /&gt;
'''Status''': still investigating / discussing.&lt;br /&gt;
&lt;br /&gt;
=== Documentation ===&lt;br /&gt;
&lt;br /&gt;
==== Deprecation ====&lt;br /&gt;
&lt;br /&gt;
Since we're remodeling the API, it may be a good idea, only this time, to simply remove *from the documentation* all parts we decide to deprecate in the old API.&lt;br /&gt;
&lt;br /&gt;
{{Note|Decision: remove deprecated parts the docs|To favor the new API developments, we plan to remove from our main documentation references to deprecated parts of the API. An older version of the reference guide will be kept so users can still find information about those parts, since they won't be removed from the API itself for now.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Status''': We can only do this once we finish our current work. So it's not clear now if we will do this for 2.44 or later.&lt;br /&gt;
&lt;br /&gt;
==== Focus ====&lt;br /&gt;
&lt;br /&gt;
Our main document is an API Reference Guide. Its purpose is to list everything available in the BPython API, but it also contains many code samples and we try to explain things well.&lt;br /&gt;
&lt;br /&gt;
Still, many users complain that it is not user-friendly enough, that it needs more examples, a more gentle introduction, whatever.&lt;br /&gt;
&lt;br /&gt;
{{Note|Decision: reference guide separated from user manual|In the meeting we decided to split our documentation in ref guide + user manual. Details will be discussed / defined later.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Programming Model For Error Handling ===&lt;br /&gt;
&lt;br /&gt;
Programming models for error handling come in two basic flavors:&lt;br /&gt;
One is based on return codes, the other on exceptions.&lt;br /&gt;
&lt;br /&gt;
* Return Codes - Each function call returns a status code or special value to indicate whether the call succeeded.  Programming in this environment is like a mountain climber negotiating a glacier where each step is carefully tested.  This style is well suited for systems programming or system integration where the return types are not uniform.  Passing values back up thru layers of calls is difficult however.&lt;br /&gt;
&lt;br /&gt;
* Exceptions - Programming with exceptions is more like a walk in the park where everything is assumed to be OK all the time.  Functions always return useful values or they raise an exception.  This style is more suited for a scripting language.  The scripter does not need to remember details like whether a return value of zero means success or failure.  It is never necessary to check if a returned value is valid.&lt;br /&gt;
It also makes it easier to pass errors back up thru a chain of function calls.&lt;br /&gt;
&lt;br /&gt;
{{Note|Decision: We favor '''exceptions'''|being a guideline, we'll follow this on future developments and &amp;quot;fix&amp;quot; parts of the current API where this is not happening.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Status''': We need to list our guidelines somewhere :) .&lt;/div&gt;</summary>
		<author><name>wiki&gt;Mindrones</name></author>
		
	</entry>
</feed>