THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/06/2004 at 05:29, xxxxxxxx wrote:
Cinema 4D Version: 8.207
Language(s) : C++ ;
now I am trying to add a material to my scene.
BaseMaterial * mat = BaseMaterial::Alloc(type);
My problem is that the sdk does not give an explanation of "type" constants for the Material alloc method. Can anyone tell me what I have to fill in there? When I insert a 0 Cinema crashes afterwards when adding Information such as using setname etc.
On 10/06/2004 at 06:11, xxxxxxxx wrote:
The constants are just the material IDs. There are a few defined in ge_prepass:
#define Mbase 5702
#define Mmaterial 5703
#define Mplugin 5705
#define Mfog 8803
#define Mterrain 8808
#define Mdanel 1011117
#define Mbanji 1011118
#define Mbanzi 1011119
#define Mcheen 1011120
#define Mmabel 1011121
#define Mnukei 1011122
On 10/06/2004 at 08:20, xxxxxxxx wrote:
okay that worked but now for the next problem:
TextureTag * tag = static_cast<TextureTag*>-(object->MakeTag(Ttexture, NULL));
tag->SetName("Set by GroImp");
assuming everything with the object and material went ok. So why does my Object that I assigned the tag to get invisible? Furthermore I cannot see the Tag in the Object browser...
On 14/06/2004 at 23:45, xxxxxxxx wrote:
I think, you must at first insert the material into the active document.
(e.g. GetActiveDocument()->InsertMaterial( mat ); )