<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.figuramc.org/index.php?action=history&amp;feed=atom&amp;title=Tutorials%2FModelPart_Indexing</id>
	<title>Tutorials/ModelPart Indexing - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.figuramc.org/index.php?action=history&amp;feed=atom&amp;title=Tutorials%2FModelPart_Indexing"/>
	<link rel="alternate" type="text/html" href="https://wiki.figuramc.org/index.php?title=Tutorials/ModelPart_Indexing&amp;action=history"/>
	<updated>2026-04-14T23:42:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.figuramc.org/index.php?title=Tutorials/ModelPart_Indexing&amp;diff=120&amp;oldid=prev</id>
		<title>Manuel: Automated upload of converted .txt file.</title>
		<link rel="alternate" type="text/html" href="https://wiki.figuramc.org/index.php?title=Tutorials/ModelPart_Indexing&amp;diff=120&amp;oldid=prev"/>
		<updated>2024-09-26T20:45:11Z</updated>

		<summary type="html">&lt;p&gt;Automated upload of converted .txt file.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;import Emoji from ‘@site/src/components/Emoji’; import FileTreeRoot from ‘@site/src/components/FileTree/Root’; import FileTreeNode from ‘@site/src/components/FileTree/Node’;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This page describes the process to access any ModelPart from the global ModelPart &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;getting-a-modelpart&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Getting a ModelPart =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A property of all ModelParts is that you can get a child ModelPart of a parent ModelPart by [[tutorials/types/Tables#generic-indexing|indexing]] the parent with the child’s name.&amp;lt;br/&amp;gt; &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt; itself is a ModelPart. All bbmodel files in the avatar act as child ModelParts to &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt; Everything in the root of a Blockbench project is a child of the bbmodel ModelPart.&amp;lt;br/&amp;gt; After that, parenting follows the parent structure as defined in the Blockbench OUTLINER.&amp;lt;br/&amp;gt; For example the cube &amp;lt;Emoji icon=&amp;quot;blockbench/cube&amp;quot;/&amp;gt; &amp;lt;code&amp;gt;RightArm&amp;lt;/code&amp;gt;,&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;FileTreeRoot&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;model.bbmodel&amp;quot; icon=&amp;quot;file/bbmodel&amp;quot;&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;Head&amp;quot; icon=&amp;quot;blockbench/group&amp;quot;&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;Head&amp;quot; icon=&amp;quot;blockbench/cube&amp;quot;/&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;Head Layer&amp;quot; icon=&amp;quot;blockbench/cube&amp;quot;/&amp;gt; &amp;lt;/FileTreeNode&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;RightArm&amp;quot; icon=&amp;quot;blockbench/group&amp;quot;&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;RightArm&amp;quot; icon=&amp;quot;blockbench/cube&amp;quot;/&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;RightArm Layer&amp;quot; icon=&amp;quot;blockbench/cube&amp;quot;/&amp;gt; &amp;lt;/FileTreeNode&amp;gt; &amp;lt;/FileTreeNode&amp;gt; &amp;lt;/FileTreeRoot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Would be accessed via &amp;lt;code&amp;gt;models.model.RightArm.RightArm&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;figura-model-format&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Figura Model Format ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using the Figura Model Format Blockbench plugin you can right click a group/cube/mesh and copy the path to your clipboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To use the plugin open Blockbench and go to &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt; in the upper left, and go down to the &amp;lt;code&amp;gt;Plugins…&amp;lt;/code&amp;gt; option, you can find &amp;lt;code&amp;gt;Figura Model Format&amp;lt;/code&amp;gt; there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the plugin is installed, open the Blockbench project and go back to &amp;lt;code&amp;gt;File&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Convert Project&amp;lt;/code&amp;gt;. Choose the &amp;lt;code&amp;gt;Figura Model&amp;lt;/code&amp;gt; format and press confirm.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After that’s complete you can right click on a group/cube/mesh and copy the path to your clibboard. Note that this path will not include any subfolders the Blockbench model is in.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;storing-a-modelpart&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Storing a ModelPart =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As there is nothing special about indexing straight from &amp;lt;code&amp;gt;models&amp;lt;/code&amp;gt; all the time (its just another ModelPart), if a specific ModelPart is used multiple times in a script we can store it in a variable for ease of access.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;--sets a World parented part to match the player&amp;#039;s position and body rotation&lt;br /&gt;
&lt;br /&gt;
local worldPart = models.model.World&lt;br /&gt;
&lt;br /&gt;
function events.RENDER(delta, context)&lt;br /&gt;
&lt;br /&gt;
    worldPart:setPos(player:getPos(delta) * 16)&lt;br /&gt;
&lt;br /&gt;
    worldPart:setRot(0, -player:getBodyYaw(delta) + 180, 0)&lt;br /&gt;
&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;bbmodels-in-subfolders&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= BBmodels in subfolders =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
bbmodel files in subfolders are a special case. For them, the folder itself acts as another ModelPart.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;FileTreeRoot&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;subfolderA&amp;quot; icon=&amp;quot;file/folder&amp;quot;&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;Pet.bbmodel&amp;quot; icon=&amp;quot;file/bbmodel&amp;quot;/&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;bow.bbmodel&amp;quot; icon=&amp;quot;file/bbmodel&amp;quot;/&amp;gt; &amp;lt;/FileTreeNode&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;subfolderB&amp;quot; icon=&amp;quot;file/folder&amp;quot;&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;model.bbmodel&amp;quot; icon=&amp;quot;file/bbmodel&amp;quot;/&amp;gt; &amp;lt;FileTreeNode label=&amp;quot;bow.bbmodel&amp;quot; icon=&amp;quot;file/bbmodel&amp;quot;/&amp;gt; &amp;lt;/FileTreeNode&amp;gt; &amp;lt;/FileTreeRoot&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bbmodel &amp;lt;Emoji icon=&amp;quot;file/bbmodel&amp;quot;/&amp;gt; &amp;lt;code&amp;gt;Pet.bbmodel&amp;lt;/code&amp;gt; would be accessed by &amp;lt;code&amp;gt;models.subfolderA.Pet&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Manuel</name></author>
	</entry>
</feed>