GetBitmap from channels always NULL



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

    On 14/02/2003 at 15:06, xxxxxxxx wrote:

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

    ---------
    Given a BaseMaterial, I am iterating through the channels on a BaseMaterial and executing this:
    for ( i = 0; i < theChannelIndex; i ++ )
    {
    BaseChannel* baseChannelPtr =  inC4dMaterial->GetChannel( i );
    BaseBitmap* theChannelBitmap = baseChannelPtr->GetBitmap();
    if ( theChannelBitmap != NULL)
    {
    //code here
    }
    }
    I'm going through all the channels and the Real/LONG data is coming fine in the channel, but I am always getting NULL when trying GetBitmap on that channel.
    Anything special I need to do or am not doing?
    Thanks in advance,
    Eric



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

    On 15/02/2003 at 13:24, xxxxxxxx wrote:

    The bitmap isn't available for shaders. Make sure your material has real texture bitmaps (e.g. mytexture.tif) in its channels and not shaders (Cloud, Gradient). Was this it?



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

    On 17/02/2003 at 08:34, xxxxxxxx wrote:

    Mikael,
    The channel and material is nothing special.. I just created a new material and go to Diffuse and just load in a texture..ithas a regular ol' bitmap (.jpg) .tga) in it. C4D returns the texture string from:

      
    baseChannelPtr->GetData().GetString( BASECHANNEL_TEXTURE   );  
    

    but when I try:

      
    BaseBitmap* theChannelBitmap = baseChannelPtr->GetBitmap();   
    

    it's always NULL

    U think it only works on certain bitmaps?

    Thanks.



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

    On 25/02/2003 at 08:01, xxxxxxxx wrote:

    Anyone see any light at the end of the tunnel for this?
    I'm trying a workaround: Newing up a BaseImage and tyring to load in an image into it isntead of getting the empty NULL container..
    I'm trying to do this by getting the filename of the image. However, all i'm seeing is only the real name of the image, not the full path to load the image. is there a way to get the full path name of the image?
    I am in Mac OSX C++
    Thanks again, eric.


Log in to reply