About Store Forum Documentation Contact



Post Reply 
EditorInterface::worldObjGetData Error
Author Message
Tottel Offline
Member

Post: #1
EditorInterface::worldObjGetData Error
Hi,

I'm occasionally getting an "Can't load enum ...." error message when using worldObjGetData();

If I use "selected only", I get it on a few objects in my scene only. If I use it on all objects in the area, I get the error all the time.

What exactly would cause the error? I've tried changing the object class, removed all the params, but it's still causing the error when I select those objects.

I'm using it like this, and don't see anything wrong with this. If I comment out everything but this line, I still get the error. The world is loaded, objects is empty and not used anywhere else..

Code:
// Get all selected objects
   if(EI.worldObjGetData(EI.curWorld(), objects, null, null, true, false))
   {
        ....
    }

Any ideas?
(This post was last modified: 11-04-2013 09:45 AM by Tottel.)
11-03-2013 11:33 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: EditorInterface::worldObjGetData Error
Hi,
Thanks for reporting the issue, I'll try to investigate once I find a free moment.
11-04-2013 12:05 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: EditorInterface::worldObjGetData Error
Hi,

I've investigated the issue, this can happen when trying to load an object parameter, that references an enum that was erased from the project.

Even if you've removed the parameters, the errors may still occur, because the parameters are still present in the object, but with 'removed' set to true.

To solve this issue, please set:
Enums.mode(CACHE_DUMMY);
at the start of your application, which will not exit when enum is not found, but instead it will create an empty object for it.
11-04-2013 06:02 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #4
RE: EditorInterface::worldObjGetData Error
Thanks!
11-04-2013 08:28 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #5
RE: EditorInterface::worldObjGetData Error
Working fine. But now I have another issue, related to the same method, if I'm not mistaken.

I use
Code:
Time.wait(1000/3);

To update 3 times per second, since I'm also using
Code:
// Get all objects in the scene
if(EI.worldObjGetData(EI.curWorld(), allObjects))
{
     ...
}

To get all the objects in my scene. A bit overkill, I know; but I need this since I have to check every param of every object in the scene, to see if it references the object I have selected.

This works fine, for a short while. After a few seconds, the worldObjGetData just doesn't return true anymore. The longer I do the Time.Wait, the longer that this keeps working. But still, it's not reliable, and I can't just update every 3 seconds or so.
11-04-2013 09:50 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: EditorInterface::worldObjGetData Error
Thank you!
I will investigate this as well
11-05-2013 12:29 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: EditorInterface::worldObjGetData Error
Thanks for reporting the issue, it will work ok in next release smile
11-05-2013 08:31 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #8
RE: EditorInterface::worldObjGetData Error
Thanks a ton, as always. smile
11-05-2013 08:37 AM
Find all posts by this user Quote this message in a reply
Post Reply