About Store Forum Documentation Contact
Donations:
392$/mo



Post Reply 
Resource trouble?
Author Message
mizukami Offline
Member

Post: #1
Resource trouble?
In our project, We have some resource trouble.
Same "src_file", but different UID/file_id given.

example.

weapon/aaa/sword UID(xxx, xxx, xxx. xxx) (a)
weapon/aaa/sword UID(yyy, yyy, yyy, yyy) (b)

Drawing with (a) will fail.
Drawing with (b) will success.
These files appears in EI.getElms(elms) both.
But (a) is not found in EE Editor.

Now, some data including (a)'s UID. So, It occurs runtime crash.
First, i want to remove (a) from our project. How should i do?
And, why do i got this situation?

(EE Windows Edition: Engine build 39, Editor Build 37)
03-31-2016 10:43 AM
Find all posts by this user Quote this message in a reply
SamNainocard Offline
Member

Post: #2
RE: Resource trouble?
Do you mean Erase Removed Elements in the "M" menu? it will remove all element that marked as removed, or you can also restore the 'removed' element by clicking the bin icon near search button and restore it.
03-31-2016 11:50 AM
Find all posts by this user Quote this message in a reply
mizukami Offline
Member

Post: #3
RE: Resource trouble?
Thanks for reply.

Resource (a) is missing in EE Editor. So, i cannot erase/remove the resource (a) by EE Editor's operation.
However, (a) appears in return value "EditorInterface.getElms();". Well then, maybe it can do some EE method (program), i think.
03-31-2016 12:00 PM
Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #4
RE: Resource trouble?
Is this related to Editor Interface? if so this might be a delete bug.
03-31-2016 03:46 PM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Bronze Supporter

Post: #5
RE: Resource trouble?
did you tried to clean the project ?
remove deleted ( because it doesnt do it by itself. ), you can see if its still there by enabling the "show removed" near the search bar of the menutree.

did you tried to import the project, into a clean installation of EE ?
(This post was last modified: 03-31-2016 07:13 PM by RedcrowProd.)
03-31-2016 07:11 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Resource trouble?
Hi,

When you remove an element, it's still there but hidden.
You can show it by clicking on the "trash bin" icon at the top.
To completely remove the file, click "M" menu, "Erase Removed Elements".

When using "EditorInterface.getElms", you can check for "Elm.final_removed":
Code:
struct Elm // Project Element
{
   Enum1<ELM_TYPE> type   ; // type of the element
   Bool            removed, // if this element is marked   as removed    (this does not include parents state which may affect the final result, see 'final_removed' for final value)
                   publish, // if this element is included in publishing (this does not include parents state which may affect the final result, see 'final_publish' for final value)
             final_removed, // if this element or  its parents are marked   as removed
             final_publish; // if this element and its parents are included in publishing
03-31-2016 11:39 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: Resource trouble?
For your convenience I will add this option:
Code:
getElms(Memp<Elm> elms, Bool include_removed=false)
that will not list removed elements by default.
04-01-2016 02:22 AM
Find all posts by this user Quote this message in a reply
mizukami Offline
Member

Post: #8
RE: Resource trouble?
(03-31-2016 07:11 PM)RedcrowProd Wrote:  did you tried to clean the project ?
remove deleted ( because it doesnt do it by itself. ), you can see if its still there by enabling the "show removed" near the search bar of the menutree.

Already done and nothing to effort...

(03-31-2016 07:11 PM)RedcrowProd Wrote:  did you tried to import the project, into a clean installation of EE ?

I'll try. Thanks.

Code:
getElms(Memp<Elm> elms, Bool include_removed=false)

Sorry, i cannot found in our EE version.
(This post was last modified: 04-01-2016 03:13 AM by mizukami.)
04-01-2016 03:12 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
RE: Resource trouble?
Hi,

"Erase Removed Elements" will remove that element completely,
However if you connect to Server to synchronize your project, it will download it from Server again.
So you need to call "Erase Removed Elements" on all of your developer clients, and on the Server to completely get rid of an element.

Can you tell me if you checked for "Elm.final_removed"?
If you encounter an element with "final_removed==true" then you can treat it as removed, and you can ignore it.

Quote:For your convenience I will add this option:
I meant that I will add this for the next release of the Engine.
But it will only get rid of the "removed" elements from the list.
Which you can achieve with the following:
Code:
EI.getElms(elms);
REPA(elms)if(elms[i].final_removed)elms.remove(i, true); // need to keep order because elements are sorted by ID
04-01-2016 03:20 AM
Find all posts by this user Quote this message in a reply
mizukami Offline
Member

Post: #10
RE: Resource trouble?
(03-31-2016 11:39 PM)Esenthel Wrote:  When using "EditorInterface.getElms", you can check for "Elm.final_removed":
Code:
struct Elm // Project Element
{
   Enum1<ELM_TYPE> type   ; // type of the element
   Bool            removed, // if this element is marked   as removed    (this does not include parents state which may affect the final result, see 'final_removed' for final value)
                   publish, // if this element is included in publishing (this does not include parents state which may affect the final result, see 'final_publish' for final value)
             final_removed, // if this element or  its parents are marked   as removed
             final_publish; // if this element and its parents are included in publishing

Checked.
"final_removed" and "removed" flags were FALSE at all our resources.

Engineer says, it might be forgotten "Erase Removed Elements" before.
If so, something our resource information had broken?
04-01-2016 03:53 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #11
RE: Resource trouble?
Hi,

Can you check what are the ELM_TYPE (elm.type) of the elements?
From your previous post I see:
Code:
weapon/aaa/sword UID(xxx, xxx, xxx. xxx) (a)
weapon/aaa/sword UID(yyy, yyy, yyy, yyy) (b)

Perhaps one element is ELM_OBJ and another ELM_MESH?

ELM_OBJ can be accessed by:
ObjectPtr obj=UID(..)
if(obj)obj->mesh(); // optionally access the Mesh

ELM_MESH can be accessed by:
MeshPtr mesh=UID(..)

In the Editor Project List, only ELM_OBJ is displayed.
ELM_MESH is hidden, because it's accessed from the Object Editor.
04-01-2016 04:00 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #12
RE: Resource trouble?
04-01-2016 04:09 AM
Find all posts by this user Quote this message in a reply
mizukami Offline
Member

Post: #13
RE: Resource trouble?
Our engineer says, both of resources (a)(b) are MESH.
Additional information from him. On Android build, works (look like) fine. But iOS build crashes.

Can I remove the element by UID(a)? (by EE program or UID specified operation)
04-01-2016 04:28 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #14
RE: Resource trouble?
Hi,

Can you please send me (by Email or Private Message) the "Data" file of your Project?
I will investigate it and find the best solution for this problem.

When you start the Editor and are in the list of Projects:
-Right click on a project, select "Explore"
-Folder with Project files will be opened
-Please compress "Data" file with 7z/rar/zip and send it to me.

Thank you
04-01-2016 04:42 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #15
RE: Resource trouble?
To remove a specific element, you can use:
EditorInterface.setElmRemoved

But for ELM_MESH it's better to check first, if it's not referenced by any ELM_OBJ.
Which I can do for you after receiving the "Data" file.
04-01-2016 04:46 AM
Find all posts by this user Quote this message in a reply
Post Reply