﻿<?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%2FExtensions%2FBLU</id>
	<title>Dev:2.4/Source/Extensions/BLU - 版の履歴</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%2FExtensions%2FBLU"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Extensions/BLU&amp;action=history"/>
	<updated>2026-07-12T16:46:29Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Extensions/BLU&amp;diff=41616&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/Extensions/BLU&amp;diff=41616&amp;oldid=prev"/>
		<updated>2018-06-28T17:45:09Z</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:45時点における版&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/Extensions/BLU&amp;diff=41615&amp;oldid=prev</id>
		<title>wiki&gt;Mindrones bot: Bot: Fixing redirects; cosmetic changes</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=Dev:2.4/Source/Extensions/BLU&amp;diff=41615&amp;oldid=prev"/>
		<updated>2011-06-19T17:14:38Z</updated>

		<summary type="html">&lt;p&gt;Bot: Fixing redirects; cosmetic changes&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=BLU=&lt;br /&gt;
== What? ==&lt;br /&gt;
&lt;br /&gt;
BLU is Blender LUa&lt;br /&gt;
&lt;br /&gt;
== NB: ==&lt;br /&gt;
&lt;br /&gt;
* Currently the code is quite much &amp;quot;from-the-hip&amp;quot; coding, don't do this at home, since it is not good practice ;) (I have started a [[Dev:2.4/Source/Extensions/BLU/Documentation/UseCases|Use Case]] document in an attempt to formalise the design process. I'm also looking for a web-based requirement management system to use for the design process)&lt;br /&gt;
&lt;br /&gt;
* Feel free to peek at the code, but it'll be ugly as hell until I get myself together to do it nicer, although I think that the not-so-feeble-of-mind should be able to jump right in and get the hang of it.&lt;br /&gt;
&lt;br /&gt;
* I've been playing with #defines, so you'll see some heavy [[Dev:2.4/Source/Extensions/BLU/Documentation/Macros|macro]] usage.&lt;br /&gt;
&lt;br /&gt;
* After reading http://lists.blender.org/pipermail/bf-python/2005-September/003080.html I'll be compiling Lua with float as internal number type. &amp;lt;s&amp;gt;Will report on it soonish.&amp;lt;/s&amp;gt; I compile now using float as the internal number format. I haven't spotted any drawbacks from it yet.&lt;br /&gt;
&lt;br /&gt;
== Where? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
See my personal page for a crude startup (patch) of embedding Lua with Blender. Currently I do it so that Python is cut out. This also means no Game engine etc. For Lua a few (semi-) working modules are now available: Camera, Object, Lamp and Scene.&lt;br /&gt;
&lt;br /&gt;
== Why BLU? ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two reasons:&lt;br /&gt;
* I need to keep in touch with the codebase&lt;br /&gt;
&lt;br /&gt;
* On the ML the trouble with different Python versions made me think of Lua as a good candidate for Python functionality without having compiling trouble on all the different platforms. The included Lua source in the zip on my personal page should compile on any system with a more or less sane ANSI C compiler. It is self-contained and should have no extra dependencies. In the source/blender/lua/libs directory I have included some external libs I like to see included as 'built-ins' for BLU.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== todo/roadmap? ==&lt;br /&gt;
&lt;br /&gt;
* design interfacing with Blender datatypes&lt;br /&gt;
* define naming conventions&lt;br /&gt;
** filenaming&lt;br /&gt;
*** {{literal|blu_[modulename].[c|h]}}, {{literal|blu_[modulename]_helper.[c|h]}}&lt;br /&gt;
** functions&lt;br /&gt;
*** {{literal|blu_[modulename]_get_[member]}} - this can be handled by copying the macros used in lamp, scene and object&lt;br /&gt;
* design internal data representation and access&lt;br /&gt;
** enums&lt;br /&gt;
*** use {{literal|BLU_ENUM}} macro&lt;br /&gt;
** dictionaries, constants. How should these be represented? Currently I use strings, ie. &amp;quot;Shadows&amp;quot;, &amp;quot;Layer&amp;quot; (for Lamp modes). These strings are 'globally' available. I still need to determine if that is the wisest thing to do. 'Normal' constants would be more intuitive for scripters to work with, but that might create potential danger situations, where a scripter chooses a variable name that is already in use as a constant. This could be solved by using module scoping, but is that desirable?&lt;br /&gt;
** bitmasks&lt;br /&gt;
* documentation&lt;br /&gt;
* example scripts&lt;br /&gt;
** showing features&lt;br /&gt;
** conversion of existing python scripts as proof&lt;br /&gt;
* make sure correct handling of license is done (inclusion of proper text, crediting authors of extra libs: {{literal|lv3}}, {{literal|lrandom}}, {{literal|lbitlib}}...)&lt;br /&gt;
&lt;br /&gt;
Apart from BLU itself the actual integration into the rest of Blender needs to be investigated: can BPy and BLU coexist? Is there any reason for them to coexist? Why? Why not?&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
Blender data is accessible through modules. Follow a few 'features' of how Blender scripting is done with Lua. The list is more of a requirement list. Every entry will tell if it is implemented or not.&lt;br /&gt;
&lt;br /&gt;
See also preliminary scripter documentation: [[Dev:2.4/Source/Extensions/BLU/Documentation|API]]&lt;br /&gt;
&lt;br /&gt;
==== Creating a new object ====&lt;br /&gt;
&lt;br /&gt;
Create a new object (not Blender Object, but data object). Creating a new object means either creating entirely new data into Blender and having it usable in Lua scripting, or retreiving data from Blenders database in Lua usable form.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;ob = Object.new(type, &amp;quot;name&amp;quot;)&amp;lt;/source&amp;gt;&lt;br /&gt;
Create an entirely new Blender object of type {{literal|type}}&lt;br /&gt;
* type, constant, one of Object.Lamp, Object.Camera, Object.Scene, Object.Ipo, Object.Curve (required) (TODO: determine all needed objects)&lt;br /&gt;
&lt;br /&gt;
* name, string (optional)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;ob = Object.get(&amp;quot;name&amp;quot;)&amp;lt;/source&amp;gt;&lt;br /&gt;
Retrieve a Blender object with name &amp;quot;name&amp;quot;&lt;br /&gt;
* name, string (required)&lt;br /&gt;
&lt;br /&gt;
==== Methods ====&lt;br /&gt;
&lt;br /&gt;
Perform operations on and with Blender data. Method calls are easily spotted by the colon&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;loc = ob:get_location()&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Bitflags and constants/enums ====&lt;br /&gt;
&lt;br /&gt;
Manipulate bitflags. &amp;lt;s&amp;gt;This is still open. There are a few potential ways&lt;br /&gt;
===== in string =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;la = Lamp.new(&amp;quot;Spot&amp;quot;, &amp;quot;LuaLamp&amp;quot;)&lt;br /&gt;
la:set_mode(&amp;quot;Shadows|Layer&amp;quot;)&amp;lt;/source&amp;gt;&lt;br /&gt;
===== multiple string =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;la = Lamp.new(&amp;quot;Spot&amp;quot;, &amp;quot;LuaLamp&amp;quot;)&lt;br /&gt;
la:set_mode(&amp;quot;Shadows&amp;quot;, &amp;quot;Layer&amp;quot;)&amp;lt;/source&amp;gt;&lt;br /&gt;
===== constants =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;la = Lamp.new(&amp;quot;Spot&amp;quot;, &amp;quot;LuaLamp&amp;quot;)&lt;br /&gt;
la:set_mode(Shadows|Layer)&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/s&amp;gt;&lt;br /&gt;
Constants (and enums) are accessible from their module, ie. {{literal|Lamp.Spot}} or {{literal|Camera.Persp}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create an new lamp of type Sun&lt;br /&gt;
la = Lamp.new(Lamp.Sun, &amp;quot;LuaLamp&amp;quot;)&lt;br /&gt;
-- set both Shadows and Layer bitflags&lt;br /&gt;
la:set_mode(Lamp.Shadows|Lamp.Layer)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Extra datatypes, modules ====&lt;br /&gt;
&lt;br /&gt;
===== vector3 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create vectors for either integers or floats with the same constructor&lt;br /&gt;
v = vector3(1,1,1)&lt;br /&gt;
v = vector3(1.0,1.0,1.0)&lt;br /&gt;
-- the same vector can be accessed in 3 different ways, even those can be mixed&lt;br /&gt;
print(v.x, v.y, v.z)&lt;br /&gt;
print(v.r, v.g, v.b)&lt;br /&gt;
print(v.1, v.2, v.3)&lt;br /&gt;
print(v.x, v.g, v.3)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{literal|vector3}} is by Luiz Henrique de Figueiredo (03 Dec 2004 11:29:50, public domain)&lt;br /&gt;
&lt;br /&gt;
===== bit (bitlib) =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bittest = 8&lt;br /&gt;
print(bittest)&lt;br /&gt;
bittest = bit.lshift(bittest, 2)&lt;br /&gt;
print(bittest)&lt;br /&gt;
bittest = bit.rshift(bittest, 1)&lt;br /&gt;
print(bittest)&lt;br /&gt;
bittest = bit.bnot(bittest)&lt;br /&gt;
print(bittest)&lt;br /&gt;
bittest = bit.mod(bittest, 3)&lt;br /&gt;
print(bittest)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{literal|bitlib}} is by Reuben Thomas (nov00-09jan04)&lt;br /&gt;
&lt;br /&gt;
== What Lua version? ==&lt;br /&gt;
&lt;br /&gt;
Current implementation is based on [http://www.lua.org/work/lua-5.1-alpha.tar.gz lua-5.1-alpha], which is included in the patch. Lua 5.1 final is expected to be released in a few months. When that happens I'll update this, too.&lt;br /&gt;
&lt;br /&gt;
== Changelog ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
20050916&lt;br /&gt;
* new function for helping in determining userdata type: {{literal|blu_checkudata}} (blu_tools)&lt;br /&gt;
&lt;br /&gt;
* start of Camera module&lt;br /&gt;
&lt;br /&gt;
* linking of Camera data to Object&lt;br /&gt;
&lt;br /&gt;
== Test script ==&lt;br /&gt;
&lt;br /&gt;
See [[Dev:2.4/Source/Extensions/BLU/Documentation/Testlua|test.lua]]&lt;br /&gt;
&lt;br /&gt;
-- [[User:JesterKing|Nathan Letwory]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Mindrones bot</name></author>
		
	</entry>
</feed>