[Solved] "Mesh Not Found"

Post Reply
MusaFuchs
Member
Posts: 17
Joined: Wed Feb 28, 2018 15:44

[Solved] "Mesh Not Found"

by MusaFuchs » Post

I am trying to modify the default mod's "flowers" init.lua to use the mesh drawtype instead of the plantlike.

When I do this I get 'mesh not found' errors.

Here is the code as I've modified it.

Code: Select all

local function add_simple_flower(name, desc, box, f_groups)
	-- Common flowers' groups
	f_groups.snappy = 3
	f_groups.flower = 1
	f_groups.flora = 1
	f_groups.attached_node = 1

	minetest.register_node("flowers:" .. name, {
		description = desc,
		---drawtype = "plantlike",
		drawtype = "mesh",
		mesh = "flowers.obj",
		waving = 1,
		tiles = {"flowers_" .. name .. ".png"},
		inventory_image = "flowers_" .. name .. ".png",
		wield_image = "flowers_" .. name .. ".png",
		sunlight_propagates = true,
		paramtype = "light",
		walkable = false,
		buildable_to = true,
		stack_max = 99,
		groups = f_groups,
		sounds = default.node_sound_leaves_defaults(),
		--[===[selection_box = {
			type = "fixed",
			fixed = box
		}]===]
	})
end
I have the 'flowers.obj' mesh in a 'meshes' folder within the 'flowers' mod folder, all within the \games\minetest_game\mods\ folder.

Any clue what's going wrong, or where to start looking?

--Edit--
When I reboot the client I no longer get the 'mesh not found' error, but the mesh is rendered as an air block. I have the origin set properly in blender, and the mesh is just a simple pyramid that's 1x1 blender-unit.
Last edited by MusaFuchs on Mon Mar 05, 2018 00:04, edited 1 time in total.

sofar
Developer
Posts: 2190
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: "Mesh Not Found"

by sofar » Post

The `flowers.obj` file needs to go into a subfolder called `models`.

MusaFuchs
Member
Posts: 17
Joined: Wed Feb 28, 2018 15:44

Re: "Mesh Not Found"

by MusaFuchs » Post

Good to know. The only reference I could find online, https://rubenwardy.com/minetest_modding ... types.html , said to use a 'meshes' folder.

User avatar
rubenwardy
Moderator
Posts: 7101
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: London, United Kingdom
Contact:

Re: "Mesh Not Found"

by rubenwardy » Post

MusaFuchs wrote:Good to know. The only reference I could find online, https://rubenwardy.com/minetest_modding ... types.html , said to use a 'meshes' folder.
Oops, fixed https://github.com/rubenwardy/minetest_ ... 85d8fd583f

PS: please make sure you add [Solved] to the title when your problem is solved
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest