Problems with EditableMeshes

Hello everyone!

So I’ve been playing around with editablemeshes recently, and I’ve come across two problems.

The first problem is that after I try to create the mesh (yields no errors) I try to move the vertices, but they just doesn’t move! Still no errors whatsoever!

Secondly, I’ve seen in blender that my mesh has 12 vertices, while in roblox it tells me it has 38! I will have to loop through these vertices many times (and possibly with more complex meshes) , and it would be very expensive to loop through more than 3 times the original amount vertices.

Here is my code:

wait(0.5)
local assetservice = game:GetService("AssetService")
local mesh = workspace.default
local jimbo = assetservice:CreateEditableMeshAsync(mesh.MeshContent)

for i, v in jimbo:GetVertices() do
	jimbo:SetPosition(v, jimbo:GetPosition(v) + Vector3.new(2,0,0))
	print("Done?")
end

Here is my output:
image

And my blender vertice count:

Any help would be appreciated!

Hello everyone! I apparently didn’t activate the editablemeshes API in the security tab… whoopsies! :sweat_smile:

Still doesn’t explain the 38 vertices though…

Vertices splits up when you import the mesh into Roblox. In blender you could have multiple normal directions on one vertex so you only need one vertex to connect 3 faces. In Roblox, for mesh assets, a mesh vertex could only have one normal, so upon importing, that one vertex splits into 3. That’s how you get 38 vertices after importing it to Roblox.
For EditableMesh we do supports Split Vertex Attributes, allowing multiple normal directions on one vertex. You can find details at page EditableMesh. You can merge those additional vertices by calling MergeVertices.