Advice for a New Plugin

I'm not sure if I've asked this before, but with the introduction of MacOS Sierra I'm going to try again. I'm on a Mac and haven't updated to El Capitain because of a Carrara issue. I don't like being two versions behind so I hope that there's a solution for this before Sierra is released. I have logged a support ticket as well as others. 

When I open a Carrara file that has a missing texture in previous versions a window pops up with the name of the missing texture at the very top. I'm able to do a search, find the missing file and then the Carrara file opens properly. It happens more often than I'd like. In El Capitain, the window opens, but the text at the top is missing so I can't find the missing texture because I have no idea what it is. Apple probably changed an API and Daz needs to update Carrara. Good luck. Is there a Carrara API that might be able to identify the missing file and put up a window with the name? My son is willing to do the programming, but he's not familiar with Carrara.

 

Any good advice?

Comments

  • Philemo_CarraraPhilemo_Carrara Posts: 1,175

    It's a bit tricky, but it might be done :

    File dialog invocation is done via a methods in IshUtilities.h. You would need to subclass this class and overide file dialog methods with you own (or OSX) file dialog.

    In the 'init' part of the plugin, would would need to modify a global variable holding a pointer to ISHUtilities :

    extern IShUtilities*                    gShellUtilities;

    It is set by ComSafeUtilities (you can find the source in the SDK) and has to be redone.

    The question is does the scene loader use gShellUtilities or an undocumented link :-)

    You won't know unless you try.

     

  • BrianP21361BrianP21361 Posts: 808

    Thanks Philemon. I'll pass it along to my son and see if he has any luck. 

  • TangoAlphaTangoAlpha Posts: 4,584

    If you can achieve that, your son will be my personal hero. That bug is the bane of my life angry (I'm always shuffling props etc between different projects, and identifying that one texture file that you missed is a real PITA)

  • BrianP21361BrianP21361 Posts: 808
    Philemo said:

    It's a bit tricky, but it might be done :

    File dialog invocation is done via a methods in IshUtilities.h. You would need to subclass this class and overide file dialog methods with you own (or OSX) file dialog.

    In the 'init' part of the plugin, would would need to modify a global variable holding a pointer to ISHUtilities :

    extern IShUtilities*                    gShellUtilities;

    It is set by ComSafeUtilities (you can find the source in the SDK) and has to be redone.

    The question is does the scene loader use gShellUtilities or an undocumented link :-)

    You won't know unless you try.

     

    He was able to replace gFileFormatUtilities which is what handles the file open dialogue, not gShellUtilities. Unfortunately when Carrara opens something it most likely doesnt go through gFileFormatUtilities because it doesnt call the fucntion. Do you have any further ideas on how this could be done? 

Sign In or Register to comment.