Edit Shader w/o Shader Desc. display?



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

    On 11/03/2005 at 00:37, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.012 
    Platform:   Windows  ; Mac  ;  Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    Alright. Now that nodes can be edited from one central dialog, there is still a little nagging issue. The Node Editor dialog is accessed through the Shader's 'Edit' button in the Material Channel. I've seen several plugins - that means you, darf! ;) - where a dialog appears, but the Shader Properties are not shown in the A.M.. What needs to be done to stop the A.M. from doing this when the 'Edit' button is clicked?

    Thanks, danke sehr, and domo arigatou gozaimash*ta,

    ETA: It'd be tough to do Romaji Japanese here with that censor - all past tense verbs/adverbs/adjectives use 'sh*ta' or 'sh*te'. ;0)



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

    On 11/03/2005 at 05:02, xxxxxxxx wrote:

    Not completely sure what you issue is. Just launch the dialog by passing it a pointer to the correct node tree, don't edit the shader data, yes?

    darf



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

    On 11/03/2005 at 09:06, xxxxxxxx wrote:

    When the 'Edit' button is clicked, the Shader receives a MSG_EDIT message in its Message() method, right? I then launch my dialog under this circumstance, yes? Then the Shader Properties (of which there are none anyway) displays in the A.M. How do I stop that last step from occurring? It should stay on the Material's Channel where the Shader is plugged - hmmm, like BhodiNUT and ChanLum. Surely, there must be something done differently...

      
    // NodeData.Message  
    Bool iShader::Message(GeListNode *node, LONG type, void *data)  
    {  
    ...  
         if (type == MSG_EDIT)  
         {  
              if (isDialog)  
              {  
                   isDialog->SetIShader(this);  
                   // Display interShader non-modal Dialog  
                   if (!isDialog->IsOpen())  
                   {  
                        if (!isDialog->Open(TRUE,0,-1,-1,512,512,ISDIALOG_ID)) return FALSE;  
                   }  
              }  
         }  
         return TRUE;  
    }  
    

    Thanks,



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

    On 11/03/2005 at 16:39, xxxxxxxx wrote:

    Well a work around, I guess, is to do the following:

      
    // NodeData.Message  
    Bool iShader::Message(GeListNode *node, LONG type, void *data)  
    {  
    ...  
         else if (type == MSG_EDIT)  
         {  
              if (isDialog)  
              {  
                   isDialog->SetIShader(this);  
                   // Display interShader non-modal Dialog  
                   if (!isDialog->IsOpen())  
                   {  
                        if (!isDialog->Open(TRUE,0,-1,-1,512,512,ISDIALOG_ID)) return FALSE;  
                   }  
                   BaseDocument *doc = node->GetDocument();  
                   BaseContainer *bc;  
                   bc = ((PluginShader* )node)->GetDataInstance();  
                   doc->SetActiveMaterial(static_cast<BaseMaterial*>(bc->GetLink(ISHADER_MATERIAL, doc)), SELECTION_NEW);  
              }  
         }  
         return TRUE;  
    }  
    

    It's a bit hackish, but it works. I don't think there is any way to intercept the message going to the Material. I see that ChanLum and BhodiNUT both open Modal Dialogs whereas mine is non-modal - which may be the reason for the difference. :)



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

    On 11/03/2005 at 18:19, xxxxxxxx wrote:

    It isn't bhodiNUT anymore. It is the Maxon interpretation of what we intended. Never really evolved did it? Sad.

    darf


Log in to reply