@ferdinand Thanks!
Latest posts made by BruceC
-
RE: How to compute Redshift MoGraph index ratios (RSMGIDRatioColor)?
@i_mazlov Thank you for confirming, Ilia!
-
RE: How to compute Redshift MoGraph index ratios (RSMGIDRatioColor)?
Thank you for the reply, Ferdinand.
I don't have access to the beta forums, can I assume the fix will make RSMGIDRatioColor act something like below for HoneyComb?(index/total number) or (1 - index/total number)Cheers
-
How to compute Redshift MoGraph index ratios (RSMGIDRatioColor)?
Hi,
Can you help me find out the rule of how RSMGIDRatioColor works when it is applied to a cloner in Honeycomb mode? According to the document here: The index ratio of the clone as a grayscale color. I would expect the greyscale color for each instance would be (index/total number) or (1 - index/total number). This means instances color will from pure black to white or white to black. And when cloner is in Linear mode, it matches this as below snapshot shows.
However, when the cloner is in HoneyComb mode, the first instance looks like pure white, however, the last instance is far from black as the below snapshot shows.

So I'm wondering what the rule of RSMGIDRatioColor is for each instance when cloner is in Honeycomb mode.
Thanks!
-
RE: Button scaled unexpectedly when it is in the same row with an expanded linkbox
Thanks for the reply @i_mazlov. Yeah, I already tried the workaround, it worked.
-
Button scaled unexpectedly when it is in the same row with an expanded linkbox
I have a button and a linkbox placed in the same row, however I found the button is always scaled horizontally when the linkbox is expanded.
Could you please help me find out how to stop the button being scaled horizontally?
I have tried applyingDESC_SCALEHtoFALSEandDESC_FITHtoTRUE, but it doesn't work after the linkbox is expanded.Before the linkbox is expanded, the button's width is expected.

After the linkbox is expanded, the button is scaled unexpected.

I essentially used the below code snippet to create the button and linkbox in
NodeData::GetDDescription()Int32 groupID = xxgroupIdxx; const DescID groupDescID = CreateDescID(DescLevel(groupID, DTYPE_GROUP, 0)); { BaseContainer bc = GetCustomDataTypeDefault(DTYPE_GROUP); bc.SetInt32(DESC_COLUMNS, 2); bc.SetInt32(DESC_SCALEH, TRUE); description->SetParameter(groupDescID, bc, CreateDescID(DescLevel(AOV_COMP_PARAMS_GRP))); } { DescID id = CreateDescID(DescLevel(xxButtonIdxx, DTYPE_BUTTON, 0)); BaseContainer bc = GetCustomDataTypeDefault(DTYPE_BUTTON); bc.SetString(DESC_NAME, "test"_s); bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_BUTTON); bc.SetBool(DESC_SCALEH, FALSE); //// <<<<<<<<<<< bc.SetBool(DESC_FITH, TRUE); //// <<<<<<<<<<<< I have tried using these two flags, but they don't help description->SetParameter(id, bc, groupDescID); } { const DescID id = CreateDescID(DescLevel(xxLinkIdxx, DTYPE_BASELISTLINK, 0)); BaseContainer bc = GetCustomDataTypeDefault(DTYPE_BASELISTLINK); bc.SetString(DESC_NAME, "test"_s); bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_LINKBOX); bc.SetData(DESC_SCALEH, TRUE); bc.SetContainer(DESC_ACCEPT, accept); description->SetParameter(id, bc, groupDescID); }Thanks!
-
RE: Efficient way of saving array to BaseContainer
Thank you @ferdinand for the help!
Write raw memory does help a lot, appreciate!
-
Efficient way of saving array to BaseContainer
Hi,
could you please help me to find out the efficient way of saving/reading an array with a large size of vectors to BaseContainer?I could store/read each Vector in the array one by one as below, but when the size of the array is large, this method will cause performance issue.
save() { maxon::BaseArray<Vector> arrayData; BaseContainer dataBC; Int dataCount = arrayData.GetCount(); dataBC.SetInt32(XX_COUNT, dataCount); for (Int idx = 0; idx < dataCount; ++idx) { dataBC.SetVector(XX_ITEM + idx, positions[idx]); } } load() { maxon::BaseArray<Vector> arrayData; BaseContainer dataBC; Int dataCount = dataBC->GetInt32(XX_COUNT, 0); arrayData.resize(dataCount); for (Int32 idx = 0; idx < dataCount; ++idx) { arrayData[idx] = dataBC->GetVector(XX_ITEM + idx, Vector(0, 0, 0)); } }Then I remember vertex color tag has a special way of reading the color data stored. So I think C4D supports an efficient way of save/loading large array data.
I tried the below way by storing a raw memory chunk, but it doesn't work. It seems it only stores the memory address rather than the content of the memory address, and I suspect it will have serialize/deserialize problem when the scene file is opened in another platform (operating system).save() { maxon::BaseArray<Vector> arrayData; BaseContainer dataBC; Int dataCount = dataBC->GetInt32(XX_COUNT, 0); Vector* rawData = NewMem(Vector, arrayData.GetCount()) iferr_return; MemCopy((void*)rawData, (void*)arrayData.GetFirst(), Int(sizeof(Vector) * arrayData.GetCount())); GeData data(rawData, VOIDVALUE); dataBC.SetData(XX_ITEM, data); DeleteMem(rawData); } load() { maxon::BaseArray<Vector> arrayData; Int32 dataCount = dataBC->GetInt32(XX_COUNT, 0); arrayData.resize(dataCount); const GeData& data = dataBC->GetData(XX_ITEM); Vector* rawData = (Vector *)data.GetVoid(); for (Int32 idx = 0; idx < dataCount; ++idx) { arrayData[idx] = rawData[idx]; } }So could you please help me to find out the right efficient way of saving/reading an array with a large size of vectors to BaseContainer?
Thank you very much!
-
RE: create link parameter accept Alembic tag
@m_adam, Thank you!
Yes,
Message(GeListNode* node, Int32 type, void* data)works for me.I'm wondering shall my plugin just return
trueafter processingMSG_DESCRIPTION_CHECKDRAGANDDROPin theMessage()function (set the value ofDescriptionCheckDragAndDrop::_result) or still callSUPER::Message(node, type, data);at the end?
It looks to me that callingSUPER::Message(node, type, data);at the end still works.
But the example in MSG_DESCRIPTION_CHECKDRAGANDDROP Message doesn't callSUPER::Message(node, type, data);.Thanks!
-
RE: Read Alembic tag's data
@m_adam, Thank you very much, this works for me!