TextureBitmap-Where to find it?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/06/2008 at 15:09, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10+
Platform: Windows ; Mac OSX ;
Language(s) : C.O.F.F.E.E ;---------
I need to get the pixelsize (GetWidth() , GetHeight()) of a bitmap that is already loaded.
Where and in what Container is it?
I can get the name and filepath and reload it from disk into a new(BaseBitmap) but:
A. it is very slow.
B. if the path is relative there is no path to go by (without extra search and thus even slower.I do feel a little rusty, but just can't find the loaded bitmap/correct container.....
Cheers
Lennart -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/06/2008 at 15:11, xxxxxxxx wrote:
What I have and works with absolute paths is:
>
\> var mat=doc->GetFirstMaterial(); \> if(!mat) return; \> \> \> var channel = mat->GetChannel(CHANNEL_COLOR); \> \> if(mat#MATERIAL_COLOR_SHADER->GetType()!=5833) \> { \> println("No bitmap"); \> return; \> } \> var path = mat#MATERIAL_COLOR_SHADER#BITMAPSHADER_FILENAME; \> var name = path->GetLastString(); \> // var file = GenerateTexturePath(name, doc->GetFilename()); \> \> var bitmap = new(BaseBitmap,1,1); \> bitmap->Load(path); \> \> var bm_x, bm_y; \> bm_x = bitmap->GetWidth(); \> bm_y = bitmap->GetHeight(); \> \> println(name,": ",bm_x,"--",bm_y); \>
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/06/2008 at 00:48, xxxxxxxx wrote:
Where is the bitmap loaded, in a material/shader?
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/06/2008 at 02:52, xxxxxxxx wrote:
Hi. Here it is loaded in a Colorchannel of a material.
It could be loaded in any channel (luminance,alpha etc)
but that I can check if I know where to look for it.thanks
Lennart -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/06/2008 at 12:04, xxxxxxxx wrote:
I'm not there...
I see the size info of the loaded bitmap in the Material AM as well as if I
use the "Bitmap properties" command but no luck in getting it from
the channel basecontainer..
If anyone knows I'd be happy.
I'll keep on searching meanwhile.Cheers
Lennart -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/06/2008 at 17:56, xxxxxxxx wrote:
Unfortunatly the resolution or the link to the bitmap is not stored in a container. You have to check the bitmap manually, going by the path provided.
cheers,
Matthias