About Store Forum Documentation Contact



Post Reply 
Problem with removed material.
Author Message
Pherael Offline
Member

Post: #1
Problem with removed material.
I have problem, somewhere on one area is painted material that was removed (and erased). Is there any way to fix it without repaint whole area? There is no way to tell where exactly material is painted by looking at it:
   
10-02-2014 01:43 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Problem with removed material.
If this is a material issue, then you can use Editor Network Interface,
worldTerrainGetMaterial
and iterate all pixels to verify that their material exists.
You can make the terrain fix using worldTerrainSetMaterial as well, just remove the missing material from pixels.

An existing material is one that has its ID listed in the
getElms (Memp<Elm> elms) <- this is ID sorted, so you can use binary search
and that has "Elm.final_publish && !Elm.final_removed"
10-02-2014 11:18 PM
Find all posts by this user Quote this message in a reply
Pherael Offline
Member

Post: #3
RE: Problem with removed material.
Thank you for idea! I'll try it later, but I think that should solve my problem.
10-02-2014 11:29 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Problem with removed material.
These functions will be available in next release:
Code:
namespace EE{namespace Edit{
static Int CompareElm(C Elm &elm, C UID &id) {return Compare(elm.id, id);}
Elm* FindElm(Memp<Elm> elms, C UID &elm_id               ) {return elms.binaryFind(elm_id, CompareElm);}
Elm* FindElm(Memp<Elm> elms, C UID &elm_id, ELM_TYPE type) {if(Elm *elm=FindElm(elms, elm_id))if(elm->type==type)return elm; return NULL;}
}}

You can use them for binary finding of project elements.
10-03-2014 06:05 AM
Find all posts by this user Quote this message in a reply
Post Reply