THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2003 at 07:55, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.012
Platform: Mac ;
Language(s) : C++ ;
---------
I've gone around and around trying to see why i'm getting NULL trying to get the bitmap on a material's channel..
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.
I am also able to get the String name of the texture:
String theTexture = baseChannelPtr->GetData().GetString( BASECHANNEL_TEXTURE );
and C4D returns the name of the actual texture, but i am not able to get a BaseBitmp of the image. :(
I have tried making sure the image is located next to the .c4d file, in my home directory.
Eric