﻿<?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%3AKellpossible%2Fdev_docs</id>
	<title>利用者:Kellpossible/dev docs - 版の履歴</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%3AKellpossible%2Fdev_docs"/>
	<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kellpossible/dev_docs&amp;action=history"/>
	<updated>2026-09-30T10:36:34Z</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:Kellpossible/dev_docs&amp;diff=137949&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:Kellpossible/dev_docs&amp;diff=137949&amp;oldid=prev"/>
		<updated>2018-06-28T20:50:34Z</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:50時点における版&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:Kellpossible/dev_docs&amp;diff=137948&amp;oldid=prev</id>
		<title>2012年8月22日 (水) 13:28にwiki&gt;Kellpossibleによる</title>
		<link rel="alternate" type="text/html" href="https://wiki.blender.jp/index.php?title=%E5%88%A9%E7%94%A8%E8%80%85:Kellpossible/dev_docs&amp;diff=137948&amp;oldid=prev"/>
		<updated>2012-08-22T13:28:39Z</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;= Precision Modelling Tools Dev Docs =&lt;br /&gt;
note: many sections of the SnapSystem class are still under heavy developement still and subject to change in internal design.&lt;br /&gt;
==Internal Structs and Functions Overview==&lt;br /&gt;
[[Image:Kellpossible_GSOC_2012_Docs_InternalStuctsOverview.png|thumb|768px|Internal Structs Overview]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SnapPoint===&lt;br /&gt;
====variables====&lt;br /&gt;
&amp;lt;b&amp;gt;r_dist&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is the distance from mouse to snap point.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;r_depth&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is the depth of the snap point from the screen.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SnapSystem===&lt;br /&gt;
====variables====&lt;br /&gt;
&amp;lt;b&amp;gt;retval&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is a boolean indicating whether or not a valid snap point has been found.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;callback_data&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is the data assigned from parent code using snapsystem to be used when the function pointers update, finish or cancel_callback are called.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;update_callback&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
gets called when the snapping system has not yet recieved confirmation from the user of the chosen snap point, but there is a temporary snap_point available for providing realtime feedback to the user of their actions when moving the mouse. In the case of transform, this means the geometry moves towards the snap point without permenantly being applied.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;finish_callback&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
same as update_callback, but the snap_point is to be applied this time.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;cancel_callback&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
tells the code using the snapsystem that the current snapsystem snap search has been cancelled.&amp;lt;br&amp;gt;&lt;br /&gt;
====functions====&lt;br /&gt;
&amp;lt;b&amp;gt;SnapSystem_create(...)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
used to setup and create an instance of SnapSystem. Remember to call SnapSystem_free() when finished with it.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SnapSystem_evaluate_stack()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
evaluate the SnapStack contained within SnapSystem to allow final snappoint to be aquired and for draw functions to work. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SnapSystem_Event(wmEvent*)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This function drives the snapping system by passing it events. It indicates whether the events have been consumed by its return value, so external code can act accordingly. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SnapSystem_add_ob()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
SnapSystem operates on a specific list of objects. This function is used to add objects to that list. There are other internal functions which use this function to add objects automatically by a filter. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SnapSystem_draw()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
calles draw for each of the active snaps in the stack &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SnapSystem_reset()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
reset snap system back to default state &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Snap===&lt;br /&gt;
Snap is not designed to be used externally, but rather as a parent for the various snap types (SnapMesh, SnapBone, SnapCurve).&lt;br /&gt;
====variables====&lt;br /&gt;
&amp;lt;b&amp;gt;snap_data&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
this variable stores the data for Snap's subclasses (e.g. SnapMesh_data)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;s_type&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is the type of snap (Mesh, Curve, Bone, Axis...)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;snap_point&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is the storage point for the calculated snap point&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;closest_point&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is a pointer, that when set is used during calculations to ignore potential snaps which are not as close to the screen (depth) or the mouse.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;pick&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is a previously calculated snap to be used for mosed such as planar and parallel snapping, as the user picked face/line/vert. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;min_distance&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
is the minimum distance from the mouse to the snap point required for the snap point to be valid during calculations&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;run&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This variable stores the function pointer which calculates the snap.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;draw&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This variable stores the function pointer which draws the snap. By default this is set to Snap_draw_default()&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;intersect&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;free&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This variable stores the function pointer to the subclass's free function.&amp;lt;br&amp;gt;&lt;br /&gt;
===functions===&lt;br /&gt;
&amp;lt;b&amp;gt;Snap_create(...)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
used to setup and create an instance of Snap. Remember to call Snap_free() when finished with it.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Snap_run()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
calls interal s-&amp;gt;run()&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Snap_draw()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Calls internal s-&amp;gt;draw()&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Snap_draw_default()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Default drawing function to be assigned to s-&amp;gt;draw. It draws the snap_point as a circle at its location.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Snap_free()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Snap_free function calls it's internal s-&amp;gt;free()&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Snap_free_f()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Snap_free_f() frees Snap struct's internal data. This is useful to call after Snap's subclasses have finished their own free, and need to free parent data. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SnapMesh===&lt;br /&gt;
SnapMesh isn't a struct, but rather a collection of functions designed to operate&lt;br /&gt;
on one type (Mesh) of instance of Snap defined by its s_type variable&lt;br /&gt;
====functions====&lt;br /&gt;
&amp;lt;b&amp;gt;SnapMesh_create(...)&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SnapMesh_snap_face(), SnapMesh_snap_planar(), SnapMesh_snap_vertex(), SnapMesh_snap_edge(), SnapMesh_snap_edge_midpoint(), SnapMesh_snap_parallel()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The various snap function calculate a snap point given the mouse position and various other inputs, and then assign the retval variable of Snap according to whether a valid snap was found or not. All, but planar and parallel have a return value indicating the geometry which the user has picked during their snap, for use in combination with other snap modes (planar, parallel etc..).&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;SnapMesh_draw_planar(), SnapMesh_draw_parallel()&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
These functions are used instead of Snap_draw_default as the value of Snap-&amp;gt;draw when SnapMesh-&amp;gt;sm_type is set to planar or parallel snap. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===SnapMesh_data===&lt;br /&gt;
====variables====&lt;br /&gt;
&amp;lt;b&amp;gt;sm_type&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Stores the type of meshsnap (planar, face, vertex, etc..)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ret_data_type&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Sets the type of the return data. I'm planning on implementing a better, and more consistent scheme for input and output data for Snaps.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ret_data_index&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
index of return data if it is a vertex or an edge.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;ret_data_pface&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
pface is a struct storing all the details of a face, with its own internal vert array.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;check&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
check is a variable which stores the various check types that a snap needs to make on the mesh during its calculations to avoid snapping on them. (selected or hidden geometry)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;dm_index_array&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
not in use&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===MeshData===&lt;br /&gt;
The purpose of meshdata is to provide a consistent interface to the mesh system for use in mesh based snapping modes without the requirement to convert between them, and thus suffer a performance loss. At the moment it supports two backends: BMEditmesh and DerivedMesh. It does this using a struct with function pointers that are assigned according to the type of mesh system that is getting used.&lt;br /&gt;
====variables====&lt;br /&gt;
&amp;lt;b&amp;gt;data_type&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Indicates the type of data stored in MeshData-&amp;gt;data pointer.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;edit_mode&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
whether the mesh is from an object in edit mode&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;index_init&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Accessing mesh often requires an initialization phase. I'll probably be able to make this invisible to users of MeshData in the future by cache-calling this from the other functions which access the mesh-data.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;getVert&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
get vertex from MeshData using index.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;getEdgeVerts&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
get an edge's two verts using the edge index.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;bvh_from_faces&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
create a bvh from faces contained within MeshData&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;free_bvh_tree&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
free the bvh tree which was created using above function&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;checkVert, checkEdge&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Conduct checks on vert or edge to determine whether they have various qualities (hidden, selected) which might make them unsuitable for snapping.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;free_data&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
this variable determines whether the data given the the MeshData struct during creation should be free'd along with the MeshData struct when the MeshData-&amp;gt;free() function is called. This is useful if a temporary mesh has been passed to MeshData. &amp;lt;br&amp;gt;&lt;br /&gt;
====functions====&lt;br /&gt;
&amp;lt;b&amp;gt;BMEditMesh and DerivedMesh functions&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
for each type of data which can be accessed using MeshData there are corresponding functions implemented to assign to each of the function pointers in MeshData struct.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operation and Integration with transform==&lt;br /&gt;
[[Image:Kellpossible_GSOC_2012_SnapSystemStateDiagram.png|thumb|630px|Snapping System State Diagram]]&lt;br /&gt;
[[Image:Kellpossible_GSOC_2012_Docs_TransformSnapSystem.png|thumb|768px|Internal Structs Overview]]&lt;/div&gt;</summary>
		<author><name>wiki&gt;Kellpossible</name></author>
		
	</entry>
</feed>