InitBakeTexture compile error
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/09/2010 at 06:09, xxxxxxxx wrote:
It seems that the BAKE_TEX_AUTO_xxx IDs are causing the errors. It's not quite clear to me how to use them either. I will ask the developers.
Using a fixed texture size seems to work fine though (BAKE_TEX_WIDTH, BAKE_TEX_HEIGHT).
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/09/2010 at 04:30, xxxxxxxx wrote:
Ok thanks Matthias, I will try using a fixed size, would be great to view autosize working...
I will post the results.
Cheers
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/10/2010 at 01:17, xxxxxxxx wrote:
Same errors using a fixed 1024x1024 size...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2010 at 06:57, xxxxxxxx wrote:
It seems to work fione here.
Here my test code:
Bool MenuTest::Execute(BaseDocument *doc) { BaseObject *obj = doc->GetFirstObject(); if (!obj) return FALSE; BaseContainer bakeSettings; bakeSettings.SetBool(BAKE_TEX_USE_CAMERA_VECTOR, FALSE); bakeSettings.SetBool(BAKE_TEX_USE_POLYSELECTION, FALSE); bakeSettings.SetBool(BAKE_TEX_AMBIENT_OCCLUSION, FALSE); bakeSettings.SetBool(BAKE_TEX_NORMAL, FALSE); bakeSettings.SetBool(BAKE_TEX_SURFACECOLOR, FALSE); bakeSettings.SetBool(BAKE_TEX_COLOR, FALSE); bakeSettings.SetBool(BAKE_TEX_DIFFUSION, FALSE); bakeSettings.SetBool(BAKE_TEX_LUMINANCE, FALSE); bakeSettings.SetBool(BAKE_TEX_ALPHA, FALSE); bakeSettings.SetBool(BAKE_TEX_ALPHA, FALSE); bakeSettings.SetBool(BAKE_TEX_ILLUMINATION, TRUE); bakeSettings.SetBool(BAKE_TEX_SHADOWS, TRUE); bakeSettings.SetBool(BAKE_TEX_BUMP, FALSE); bakeSettings.SetBool(BAKE_TEX_TRANSPARENCY, FALSE); bakeSettings.SetBool(BAKE_TEX_UVMAP, FALSE); bakeSettings.SetBool(BAKE_TEX_REFLECTION, FALSE); bakeSettings.SetBool(BAKE_TEX_USE_PHONG_TAG, TRUE); bakeSettings.SetBool(BAKE_TEX_COLOR_ILLUM, TRUE); bakeSettings.SetBool(BAKE_TEX_COLOR_SHADOWS, TRUE); bakeSettings.SetLong(BAKE_TEX_WIDTH, 512); bakeSettings.SetLong(BAKE_TEX_HEIGHT, 512); bakeSettings.SetLong(BAKE_TEX_PIXELBORDER, 2); bakeSettings.SetVector(BAKE_TEX_FILL_COLOR, Vector(1.0)); BaseTag* textag = obj->GetTag(Ttexture); BaseTag* uvwtag = obj->GetTag(Tuvw); if(textag) { LONG error; BaseDocument *bakeDoc = InitBakeTexture(doc, (TextureTag* )textag, (UVWTag* )uvwtag, NULL, bakeSettings, &error, NULL); AutoAlloc<BaseBitmap> bmp; if (!bmp) return FALSE; if (bakeDoc) error = BakeTexture(bakeDoc, bakeSettings, bmp, NULL, NULL, NULL); ShowBitmap(bmp); } return TRUE; }
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/10/2010 at 15:30, xxxxxxxx wrote:
Modifing the code like your example works (YES, THANK YOU!), but only if I use a fixed bitmap size.
Can you give a working autosize example please??
Thank you again for your help, Matthias
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/01/2012 at 20:34, xxxxxxxx wrote:
Sorry for resurrecting this old thread. But I can't get the example Matthias posted to work.
The error I get is: no instance of overloaded function "InitBakeTexture" matches the argument listI'm puzzled why it's asking me to overload a method. Because there is never one used in any of the above examples.
And when I try to make one inside of my class. I can't get it to compile.Did something change between then and now that's making this not work anymore?
-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/01/2012 at 00:22, xxxxxxxx wrote:
Hi,
The compiler doesn't tell you to overload InitBakeTexture (). InitBakeTexture() has 2 overloads (2 versions of the function but with different arguments) and it just can't find which overload to call.
Instead of declaring error as LONG:
LONG error;
Declare it as BAKE_TEX_ERR:
BAKE_TEX_ERR error;
And it compiles fine now - yes just that... poor compilers :).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/01/2012 at 01:32, xxxxxxxx wrote:
I've just looked in the SDK docs up to R13 and the error parameter is given as a LONG. So this looks like a documentation error. Can't really blame the compiler for that
(Looking in c4d_tools.h shows that InitBakeTexture does use BAKE_TEX_ERR but this change hasn't made it into the docs.)
Steve
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/01/2012 at 02:36, xxxxxxxx wrote:
Originally posted by xxxxxxxx
I've just looked in the SDK docs up to R13 and the error parameter is given as a LONG. So this looks like a documentation error. Can't really blame the compiler for that
(Looking in c4d_tools.h shows that InitBakeTexture does use BAKE_TEX_ERR but this change hasn't made it into the docs.)
Right. The parameter type is wrong in the docs. So... blame the docs .
Thanks for pointing that out Steve. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/01/2012 at 07:38, xxxxxxxx wrote:
Thanks.
Works fine now with the correct type.-ScottA