Descriptions: No Names Displayed



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

    On 02/08/2003 at 08:10, xxxxxxxx wrote:

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

    ---------
    Hi,

    to add parameters at runtime, I'm overriding GetDDescription of MaterialData with something like

      
    if (!description || !node) return FALSE;  
    if (!description->LoadDescription(node->GetType())) return FALSE;  
      
    BaseContainer bc = GetCustomDataTypeDefault(DTYPE_LONG);  
    bc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_LONG);  
    bc.SetString(DESC_SHORT_NAME, "foo");  
    bc.SetString(DESC_NAME, "foobar");  
    if (!description->SetParameter(DescLevel(20000), bc, DescLevel(ID_OF_ONE_OF_MY_GROUPS)))  
        return FALSE;  
      
    flags |= DESCFLAGS_DESC_LOADED;  
    return MaterialData::GetDDescription(node, description, flags);  
    

    The number entry field itself appears in the Attribute Manager. The name of the parameter should appear left to it---but it doesn't.

    Any ideas?

    Thanks in advance!



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

    On 02/08/2003 at 14:27, xxxxxxxx wrote:

    Hi lovi :)
    it seems you need to use DescLevels for dynamic descriptions with initial values. (DescLevel(YOUR_ID,CUSTOMGUI_TYPE,CREATOR_ID) please don´t ask me what creator id exactly specifies. Mikael will hopefully tell us on monday...but setting it to "0" will always work, even when adding several customguis)
    So this code should work:
    BaseContainer bc = GetCustomDataTypeDefault(DTYPE_LONG);
    bc.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_LONG);
    bc.SetString(DESC_SHORT_NAME, "foobar");
    if (!description->SetParameter( DescLevel(20000,DTYPE_LONG,0), bc, DescLevel(ID_OF_ONE_OF_MY_GROUPS)))
        return FALSE;
    P.S.: Afaik, only DESC_SHORT_NAME will be shown in the Attribute Manager but please check ;)



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

    On 03/08/2003 at 03:32, xxxxxxxx wrote:

    Hi,

    thanks, but sorry: No, with that change I still see no names to the left of the editable fields!?

    Regards,
    jl



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

    On 03/08/2003 at 06:23, xxxxxxxx wrote:

    Hi lovi,
    just tried it, it works fine for me here. this is how my overloaded GetDDescription looks like (the way you tried before didn´t work for me either but that one worked) :

        
        
        Bool RFRANIMATION::GetDDescription(GeListNode *node, Description *description,LONG &flags)  
        {   
         if (!description || !node) return FALSE;   
         if (!description->LoadDescription(node->GetType())) return FALSE;
        
        
        
        
          BaseContainer test = GetCustomDataTypeDefault(DTYPE_LONG);  
         test.SetLong(DESC_CUSTOMGUI, CUSTOMGUI_LONG);  
         test.SetString(DESC_SHORT_NAME, "foobar");  
         if (!description->SetParameter(DescLevel(20000,DTYPE_LONG,0), test, DescLevel(RFR_MAIN)))  
            return FALSE;
        
        
        
        
         flags |= DESCFLAGS_DESC_LOADED;
        
        
        
        
         return ObjectData::GetDDescription(node, description, flags);  
        }
    

    And it works fine.
    Best
    Samir



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

    On 03/08/2003 at 07:21, xxxxxxxx wrote:

    Ooops, yeah, you're right. Silly typo on my side.

    Regards,
    jl



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

    On 05/08/2003 at 10:49, xxxxxxxx wrote:

    Type/Creator are additional information for safety. If you retrieve data from an object there's no need to check the creator. In the case above you can set it to your own ID.



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

    On 09/08/2003 at 15:02, xxxxxxxx wrote:

    Hi Samir,

    thanks for sharing your knowlegde about descriptions. The description part is now finished. And a little bit more. So it's time to make an announcement that something called C4Dfx is on the way.

    _<_img border="0" src= "http://www.l7h.cn/media/c4dfx.jpg"_>_

    Regards,
    jl



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

    On 09/08/2003 at 16:13, xxxxxxxx wrote:

    Hi Jörn,
    cool. What exactly is it? It looks like a shader? Creating structure or similar. Cannot really identify it. Tell me more :)



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

    On 10/08/2003 at 01:55, xxxxxxxx wrote:

    Hi,

    it's CgFX for Cinema, like the implementations for Maya, XSI, and 3ds max. This is now ready to, say, 70%. In addition I want to implement some features of Maya's new hardware renderer---with one small exception: My solution is going to work on FX 5900 and similar cards, not just on the big Quadros.

    Regards,
    jl



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

    On 10/08/2003 at 03:09, xxxxxxxx wrote:

    Hi,
    that sounds great Jörn. Keep us informed :)



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

    On 10/08/2003 at 05:44, xxxxxxxx wrote:

    A dream will become true, hope to see more soon.
    A question: will the hardware shader extrem speed up the rendertime in c4d ?
    best wishes, Kaji



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

    On 11/08/2003 at 00:22, xxxxxxxx wrote:

    Hi Kaji,

    yes, there will be quite a noticeable speedup. The question is: Which price in terms of quality do you want to pay for the speedup? Of course there won't be real raytracing. In the first release no environment maps will be computed automatically. Materials will be rendered simplified. And so on.

    Regards,
    jl


Log in to reply