THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/11/2012 at 10:30, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R9.6+
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
Hi,
I would appreciate some direction on how one goes about getting HairGuides* for feather and fur objects, if it is possible to do that.
I find no mention of these objects in the docs, nor any defined name for them in ge_prepass.h. However, I know their IDs, and given the hair_grass.cpp example, I have found some degree of success by sending them op->Message(MSG_HAIR_GET_OBJECT_TYPE, HairPluginMessageData* ). Casting the filled HairPluginMessageData::data field to HairPluginObjectData*, I do find that there are calc_generate , add_generate , and calc_hair functions present. However, in attempting to actually call calc_generate on the object, I have not been successful in generating a valid HairGuides*.
Taking for example a fur object, if I pass HAIR_GENERATE_PASS_BUILD, I do get a non-null HairGuides*, but it has only one guide with seven segments, and it crashes unpredictably later, for instance, when calling HairGuides::GetRootUV. If I pass HAIR_GENERATE_PASS_INIT, calc_generate itself crashes. Most likely, I am just not passing correct parameters to calc_generate ; doc and op seem self-explanatory, but I am not sure what the others expect to be passed.
The context is code running inside of a Hierarchy run with BUILDFLAGS_EXTERNALRENDERER, and I would appreciate if one of the developers could please post some example of how this is supposed to be done (if it is possible to get HairGuides* for these objects, that is).
Thanks,
JD