﻿<?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%3AWalid_shouman%2FDrafts</id>
	<title>利用者:Walid shouman/Drafts - 版の履歴</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%3AWalid_shouman%2FDrafts"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Walid_shouman/Drafts&amp;action=history"/>
	<updated>2026-07-25T19:09:44Z</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:Walid_shouman/Drafts&amp;diff=142273&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:Walid_shouman/Drafts&amp;diff=142273&amp;oldid=prev"/>
		<updated>2018-06-28T20:56:06Z</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日 (木) 20:56時点における版&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:Walid_shouman/Drafts&amp;diff=142272&amp;oldid=prev</id>
		<title>wiki&gt;Walid shouman: adding UV transfer drafts</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Walid_shouman/Drafts&amp;diff=142272&amp;oldid=prev"/>
		<updated>2013-07-21T22:03:12Z</updated>

		<summary type="html">&lt;p&gt;adding UV transfer drafts&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This page isn't intended to be informatic as much as it's as a draft for whatever I'm thinking about adding to the wiki,&lt;br /&gt;
[[User:Walid shouman|Walid shouman]] 01:12, 4 June 2013 (CEST)&lt;br /&gt;
&lt;br /&gt;
what I'm up to now is making a custom data transfer between 2 meshes {{Priority|high}}&lt;br /&gt;
&lt;br /&gt;
= Details =&lt;br /&gt;
*Custom Data type: CD_MLOOPCOL (mesh color)&lt;br /&gt;
*Custom Data number: 17&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Actions =&lt;br /&gt;
* Link to new files that will hold the bmesh tools &amp;amp; operators(getting everything organized) {{WikiTask/Inprogress|100|}} :D&lt;br /&gt;
* Registering a new operator (ease the development)-skipped for now first things first :D - &lt;br /&gt;
* Getting the functions to work without errors (proving that I understood how to deal with customData and Bmesh) {{WikiTask/Inprogress|10|}}&lt;br /&gt;
* Transferring the data successfully&lt;br /&gt;
&lt;br /&gt;
= Readings =&lt;br /&gt;
Within the step of registering&lt;br /&gt;
* To register a new operator I've started with understanding the vertex_group_transfer_weight_vertex found in object_vgroup.c&lt;br /&gt;
* Then I found this which further illustrates how the operators act [[Dev:2.5/Source/Architecture/Operators|http://wiki.blender.org/index.php/Dev:2.5/Source/Architecture/Operators]]&lt;br /&gt;
* Checking the tutorial found at [[Dev:2.5/Source/Architecture/Operators/Tutorial|http://wiki.blender.org/index.php/Dev:2.5/Source/Architecture/Operators/Tutorial]]&lt;br /&gt;
* I didn't yet finish it till the end so it seems hard &lt;br /&gt;
&lt;br /&gt;
= Extra things =&lt;br /&gt;
Totally like this progress bar ^_^ &lt;br /&gt;
&lt;br /&gt;
{{WikiTask/Inprogress|30|good progresses}}&lt;br /&gt;
&lt;br /&gt;
== Thought ==&lt;br /&gt;
Before getting things out of the draft I was thinking about a good hierarchy for this blog&lt;br /&gt;
&lt;br /&gt;
== Adding a file ==&lt;br /&gt;
this is considered a reminder till the blog is set up: Tips for adding a file&lt;br /&gt;
* Create ur file.h //check the format of #ifdefs from any neighbouring file2.h&lt;br /&gt;
* Create ur file.c //include the file.h into it&lt;br /&gt;
* Declare the necessary functions of file.c in file.h&lt;br /&gt;
* Add the file.c and file.h to the nearest CMakeList (for cmake users like me)&lt;br /&gt;
* Goto the calling_file.c that will call ur function&lt;br /&gt;
* Open its CMakeList and check the folders included there (figure out the nearest folder to file.h ... in my case it was ../../bmesh)&lt;br /&gt;
* Open the calling_file.c and include the file.h relative to the nearest folder to it ... in my case it was (#include &amp;quot;tools/bmesh_transfer_data.h&amp;quot;) as the file's path was  blender/source/blender/bmesh/tools/bmesh_transfer_data.h&lt;br /&gt;
* Now call any function you've already declared in file.h&lt;br /&gt;
* That's it :)&lt;br /&gt;
&lt;br /&gt;
== Making/registering an operator ==&lt;br /&gt;
&lt;br /&gt;
==== Overview ====&lt;br /&gt;
* This guide is based upon testings! be careful :)&lt;br /&gt;
* Operators's functionality could either be written in C or Python but the common thing is that registering happens in Python&lt;br /&gt;
* The term functionality here includes (exec Code, description, name displayed in search(space bar), options)&lt;br /&gt;
* Other than that would be registering AKA UI (or even easier finding the operator itself in the program)&lt;br /&gt;
* Here I'll illustrate the steps to add the transfer shape keys within C and registering it in Python&lt;br /&gt;
&lt;br /&gt;
==== Python part ====&lt;br /&gt;
* Want to add the operator into the 3D View editor, open bin/2.67/scripts/startup/bl_ui/space_view3d_toolbar.py then find the section u want to add the operator into (sections represent different modes) for me i chosen &lt;br /&gt;
# ********** default tools for object-mode ****************&lt;br /&gt;
then add the following line @ line=~117&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
col.operator(&amp;quot;object.shape_key_transfer&amp;quot;, text=&amp;quot;Transfer Shapekeys&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the first argument shape_key_transfer Must be the same as defined in C&lt;br /&gt;
the second argument is the button's text&lt;br /&gt;
&lt;br /&gt;
* Want to add to a more relevant place (more difficult), open Properties_data_mesh.py, under the MESH_MT_shape_key_specials, add the following line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
layout.operator(&amp;quot;object.shape_key_transfer&amp;quot;, icon='COPY_ID') &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the first argument is the opertor name , the second is the icon name&lt;br /&gt;
* Note: in my special case i had to change the name and label of the old shape key transfer tool found in 2.67/scirpts/startup/bl_operators/object.py to distinguish between the tool under development and the old tool written in python&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    bl_idname = &amp;quot;object.shape_key_transfer_old&amp;quot;&lt;br /&gt;
    bl_label = &amp;quot;Transfer Shape Key Old&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== C part ====&lt;br /&gt;
* 4 main steps are to be done here&lt;br /&gt;
* My function shall be written in the object scope so open blender/source/blender/editors/object/object_shapekey.c then append the funtion responsible for handling the operator to the end of the file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void OBJECT_OT_shape_key_transfer(wmOperatorType *ot)&lt;br /&gt;
{&lt;br /&gt;
	//notice that the function name should match the first argument sent in the python code&lt;br /&gt;
&lt;br /&gt;
	/* identifiers */&lt;br /&gt;
	ot-&amp;gt;name = &amp;quot;Transfer Shape Key&amp;quot;;&lt;br /&gt;
	ot-&amp;gt;idname = &amp;quot;OBJECT_OT_shape_key_transfer&amp;quot;;&lt;br /&gt;
	ot-&amp;gt;description = &amp;quot;Transfer () shape key to the selected objects&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
	/* api callbacks */&lt;br /&gt;
	ot-&amp;gt;poll = shape_key_poll;			//don't know how to edit this yet!!&lt;br /&gt;
	ot-&amp;gt;exec = shape_key_transfer_exec;&lt;br /&gt;
&lt;br /&gt;
	/* flags */&lt;br /&gt;
	ot-&amp;gt;flag = OPTYPE_REGISTER | OPTYPE_UNDO;&lt;br /&gt;
&lt;br /&gt;
	/* properties */ //not yet!!&lt;br /&gt;
	//not available&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add the poll(already there for my case) and exec functions above the previous function... and let's have a trivial exec function that does nothing&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
static int shape_key_transfer_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))&lt;br /&gt;
{&lt;br /&gt;
	/** UNUSED are used to tell the compiler not to worry and we don't want to use those variables&lt;br /&gt;
	* static int and return OPERATOR_FINISHED upon success are just necessery&lt;br /&gt;
	*/&lt;br /&gt;
	return OPERATOR_FINISHED;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Add the OBJECT_OT_shape_key_transfer() to the header file, open blender/source/blender/editors/object/object_intern.h and append the following after the other shape key functions around line =~234&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void OBJECT_OT_shape_key_transfer(struct wmOperatorType *ot);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Finally add the function to the object operators to be accessed by Python, open blender/source/blender/editors/object/object_ops.c and append the following after the other shape key functions around line =~212&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	WM_operatortype_append(OBJECT_OT_shape_key_transfer);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= basis for the UV transfer function =&lt;br /&gt;
&lt;br /&gt;
Those drafts could be a bit messy but they were the basis for many steps to determining how to transfer UVs&lt;br /&gt;
&lt;br /&gt;
[[File:UV_algorithm_based_on_raycasting.png|thumb|600px|center|raycasting UV algorithm seed based on Alexx reference]]&lt;br /&gt;
&lt;br /&gt;
[[File:UV_algorithm_spatial1.png|thumb|600px|center|spatial UV algorithm seed]]&lt;br /&gt;
&lt;br /&gt;
[[File:Basic_loop_interpolation.png|thumb|600px|center|loop interpolation]]&lt;br /&gt;
&lt;br /&gt;
[[File:UV_islands_spatial_transfer_with_details.png|600px|thumb|center|island based transfer (see full resolution if the preview didn't work)]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Walid shouman</name></author>
		
	</entry>
</feed>