Materiale manager Dynamic channel



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

    On 20/08/2009 at 05:03, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:    
    Platform:      
    Language(s) :

    ---------
    Hello all,
    i need to add Dynamically new channel in my Material Plugin,
    whit getddescription i can manage various part of interface witout problem but i can't acces to Obaselit group to add new channel on my left list.
    any Idea ?
    Franz



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

    On 20/08/2009 at 05:07, xxxxxxxx wrote:

    Sorry I don't really understand your problem. I need some more info to be able to help you.

    cheers,
    Matthias



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

    On 20/08/2009 at 05:15, xxxxxxxx wrote:

    sorry Matthias,
    my bad english :(
    i am working on a plugin material ( material data ) very similar to standard c4d material.
    i'dd like to add or remove channel from material iterface with GetDDescription.

    for example if user need one more specular channel can add it  in the left list and parameter in rigth part of material editor.

    if i use description resource and i include Mbase to add a new channel i have to create it in Obaselist GROUP, but i can't find the way to accesto this via getddescription.

    hope this help.
    thanks in advance
    Franz



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

    On 21/08/2009 at 06:43, xxxxxxxx wrote:

    Here is a simple example, a material with one channel that you can switch on and off.

    > \> CONTAINER Msimplematerial \> { \>      NAME Msimplematerial; \>      INCLUDE Mpreview; \>      INCLUDE Mbase; \> \>      GROUP Obaselist \>      { \>           GROUP \>           { \>                MATEDCOLUMNS 1; \> \>                BOOL SIMPLEMATERIAL_USE_COLOR { PARENTMSG ID_SIMPLEMATERIALGROUP_COLOR; } \>           } \>      } \>       \>      GROUP ID_SIMPLEMATERIALGROUP_COLOR \>      { \>           COLOR SIMPLEMATERIAL_COLOR_COLOR { OPEN; } \>      } \> \>      INCLUDE Millum; \>      INCLUDE Massign; \> } \>

    > \> Bool SimpleMaterial::GetDDescription(GeListNode \*node, Description \*description, LONG &flags;) \> { \>      if (!description->LoadDescription(node->GetType())) return FALSE; \> \>      BaseContainer \*data=((PluginMaterial\* )node)->GetDataInstance(); \> \>      BaseContainer bc = GetCustomDataTypeDefault(DTYPE_GROUP); \> \>      if (data->GetBool(SIMPLEMATERIAL_USE_COLOR, TRUE)) \>      { \>           bc.SetBool(DESC_HIDE, FALSE); \>           bc.SetString(DESC_SHORT_NAME, String("Color")); \>           bc.SetString(DESC_NAME, String("Color")); \> \>           if (!description->SetParameter(DescLevel(ID_SIMPLEMATERIALGROUP_COLOR,DTYPE_GROUP,0),bc,DescLevel(1000491))) return FALSE; \>      } \>      else \>      { \>           bc.SetBool(DESC_HIDE, TRUE); \>           bc.SetString(DESC_SHORT_NAME, String("Color")); \>           bc.SetString(DESC_NAME, String("Color")); \> \>           if (!description->SetParameter(DescLevel(ID_SIMPLEMATERIALGROUP_COLOR,DTYPE_GROUP,0),bc,DescLevel(1000491))) return FALSE; \>      } \> \>      flags |= DESCFLAGS_DESC_LOADED; \> \>      return SUPER::GetDDescription(node,description,flags); \> } \>

    hope this helps

    cheers,
    Matthias



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

    On 21/08/2009 at 10:26, xxxxxxxx wrote:

    Hello Matthias,
    Thanks for reply, as i undestand, you code show or hide dynamicaly a parameter in a material Channel.
    i'dd like to add or remove dynamicaly the channel form left channel list.
    locking in to your replye i think is no possible to do this.

    a solution meaby can be write my own Material editor, with GeDialog , ok no problem, but can i override standard material editor on user double click on material in material manager and open my dialog "custom material manager"?
    All the best
    Franz


Log in to reply