object change in C.O.F.F.E.E



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/02/2004 at 23:41, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.503 
    Platform:      
    Language(s) :   C.O.F.F.E.E  ;

    ---------Hi,

    Can you help me writing a plugin?
    I'm workin on a Poser import plugin that works fine until Curious Labs update to service pack 4.

    Here is my problem.
    I just want to now (if it is possible) how to refresh a command in a C.O.F.F.E.E plugin.
    for example: I change the name of an object and I want to see the
    change in the object manager directly.
    Until now, the change is activated when I leave the plugin.
    I have the same problem loading an object inside a plugin.
    I cannot use the object directly, in the plugin. but when I leave the plugin, the object is well loaded. <SCRIPT language=javascript>postamble();_<_Script_>_



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 01/03/2004 at 15:18, xxxxxxxx wrote:

    From what you say it sounds like GeEventAdd(MSG_UPDATE) is what you want.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 01/03/2004 at 21:56, xxxxxxxx wrote:

    Hi,
    No that doesn't work
     
    Here is part of my code:
            filename = GeGetStartupPath();
            filename->FileSelect("Please select a OBJ file.", FALSE);

    _<_x-tab_>_bsp;  _<_x-tab_>_ument(filename);
       _<_x-tab_>_n_<_x-tab_>_sp;  
     &nbs;_<_x-tab_>_     _ventAdd(DOCUMENT_CHANGED);

    &nb;_<_x-tab_>_;     _<_x-tab_>_/X-TAB>GeEventAdd(NEW_ACTIVE_OBJECT);
    _p;      &_<_x-tab_>_X-TAB>GeEventAdd(ACTIVE_OBJECT_CHANGED);
    _<_x-tab_>_AB>        vDoc->Message(MSG_UPDATE);
            GeEventAdd(MSG_UPDATE);
    // This is a multi-part wavefront object
    // The Object normally is loaded, I can see the progress ba_<_x-tab_>_ But It doesn't show nor exist at this stage_<_x-tab_>_BR>       &nb;_<_x-tab_>_TAB>var _<_x-tab_>_oc-&g;_<_x-tab_>_rstObject();

    // Obj is NULL&nb;_<_x-tab_>_;
    _>       &_<_x-tab_>_-T_<_x-tab_>_bj != NULL)
       &nbs;_<_x-tab_<_x-tab_>_p;  {
     &nbs;_<_x-tab_>_     _<_x-tab_>_>      _<_x-tab_<_x-tab_>_var ObjN = Obj->GetName();
    _p;    _<_x-tab_>_nbsp;    _<_x-tab_>_bsp;   println("Loaded=", ObjN);
            }

    // And the rest of my program suppose_<_x-tab_>_rk on the loaded object does nothing...
    /_<_x-tab_>_ the end, after my "OK Message _<_x-tab_>_he Object is loaded.

    &nb;_<_x-tab_>_;     filename = GeGetStartupPat_<_x-tab_>_>      _<_x-tab_>_bsp;filename->FileSelec_<_x-tab_>_se select a Mat file.", FALSE);

    _       File->Open(filename, GE_READ);
            .... Rest of my program
    // If I load_<_iFrame_>_art and remove the OBJ loading code, my program works fine
    _fLogFrame style="DISPLAY: none" src= ">
     
     
    <SCRIPT type=text/javascript>



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/03/2004 at 05:13, xxxxxxxx wrote:

    I think the problem is that vDoc isn't the loaded document. LoadDocument() loads a new document into C4D. So you'll have to iterate through the open documents to find the new one. (Probably either vDoc->GetNext(), or the last one in the chain; I haven't checked.)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/03/2004 at 07:46, xxxxxxxx wrote:

    I tried that but it won't work either.
    At the end, It's the only document loaded.
    Perhaps a thread problem? It seems like that the loaded object exist only when the plugin leaves.
    By the way I already have C4D 8.5
    Thank you.
    B->_/IFRAME> <SCRIPT type=t_<_!-- nopopups(); //--_<_Script_>_//-->



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 10/03/2004 at 02:22, xxxxxxxx wrote:

    Ok, sorry about the version confusion. Please folks, try to remember to fill in the version header when you start a new thread. Otherwise it becomes hard for me to know when the information is correct. (I've updated this thread manually.)
    However, I was unable to reproduce your findings in 8.503. Granted, I used a 3ds file since I didn't have any obj files lying around. This is the code I used:

        
        
        class MyMenuPlugin : MenuPlugin  
        {  
        public:  
          MyMenuPlugin();  
            
          GetID();  
          GetName();  
          GetHelp();  
          Execute(doc);  
        }
        
        
        
        
        MyMenuPlugin::MyMenuPlugin() { super(); }  
        MyMenuPlugin::GetID()        { return 1000011; } // Temp  
        MyMenuPlugin::GetName()      { return "C.O.F.F.E.E. Test"; }  
        MyMenuPlugin::GetHelp()      { return "C.O.F.F.E.E. Dummy Plugin"; }
        
        
        
        
        MyMenuPlugin::Execute(doc)  
        {  
          var filename = GeGetStartupPath();  
          filename->FileSelect("Please select a OBJ file.", FALSE);
        
        
        
        
          LoadDocument(filename);
        
        
        
        
          var d = GetFirstDocument();  
          while (d)  
          {  
            println(d, "  ", d->GetFirstObject()->GetName());  
            d = d->GetNext();  
          }  
        }
        
        
        
        
        main()  
        {  
          Register(MyMenuPlugin);  
        }
    

    The code prints both the first object in the current scene and the first object of the loaded scene.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 10/03/2004 at 09:25, xxxxxxxx wrote:

    Thank you
    That work!!!
    The problem was: I passed the old vDoc not the new one to my subroutine
    Getting older, need glasses.
    Thank you again.
     
    B-><IFRAME id=kpfLogFrame style="DISPLAY: none" style="DISPLAY: none" src= "> _<_iFrame_>_
    Thank you, that work!!!
    The problem was that I passed vDoc not the NEW
    Doc to my subroutine. (Getting older, need glasses)
    Thank you again.
     
    B->
    <SCRIPT type=text/javascript> &#_<_!-- nopopups(); //--_>_-->&#1_<_Script_>_;CRIPT> <!-- Kerio Popup Killer - end of the script appended by KPF--></body> </html> <!-- Kerio Popup Killer - script has been appended by KPF --> <iframe id=" kpfLogFrame? onload="destroyIfra_<_iFrame_>_#070;RAME> <SCRIPT type=text_<_!-- nopopups(); //--_<_Script_>_-> </SCRIPT> <!-- Kerio Popup Killer - end of the script appended by KPF--></P>


Log in to reply