Dynamic geometry and materials

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
Hrenli
Halfling
Posts: 73
Joined: Tue Jun 14, 2016 12:26 pm
x 19

Dynamic geometry and materials

Post by Hrenli »

Hi,

It might sound a bit like nitpicking, but what bothers me (slightly) is that when I create any geometry by code the log is polluted by the following lines:
Can't assign material because this Material does not exist. Have you forgotten to define it in a .material script?
You can see the same when running dynamic geometry sample. Seems like not a real problem, but I am still wondering - is there a way to avoid it? It clutters the log and doesn't look neat. :)
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5299
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1280
Contact:

Re: Dynamic geometry and materials

Post by dark_sylinc »

One good way to avoid it is to set a valid material name to the mesh, so when the Item is created the material is assigned and the warning isn't issued.

Nonetheless I agree, so I've pushed a fix.
Post Reply