Jump to content
Developer Wiki and Function Reference Links ×

Specifying a resource folder in a library file as a target for ISDK::ExportResourceN?


Recommended Posts

One of our plug-ins is automagically exporting symbols to a library file using
 

virtual bool VCOM_CALLTYPE ExportResourceN(MCObjectHandle resource, IFileIdentifier* pFileID = nil, TImportResourceConflictCallbackProcPtr conflictCallback = nil) = 0;


Works like a charm. Users have requested that we should export the symbol into a resource folder within the library file - so the structure of the library file is somewhat "tidier" and easier to work with when they open it up for maintenance purposes.


Is there a way to accomplish that with the SDK? 

Link to comment

What you could try is to put it temporaly in a folder before exporting and see if ExportResourceN maintaince the structure.

 

Another solution I can think of is opening the lib file and create the folder.

Unfortunately this can not be done silently so the user will see the file poping up for a second.


 

       if ( gSDK->OpenDocumentPath( fileID, true))
        {

            // DoStuff
            
            gSDK->DoMenuName("Save", 0);
            gSDK->CloseDocument();            
            gSDK->HandlePendingUpdatesAndActivates(); //workaround for bug in OnFileContent: to trigger closedocument
        }

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...