Advertisement
Ogers

Untitled

Apr 13th, 2022
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.07 KB | None | 0 0
  1. Hello Ferdinand
  2. I am getting the error when setting the values when using Set function from https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_handbook_node_implementation_programmatically.html
  3.  
  4. template <typename ATTR> Result<void> Set(const Id& category, const ATTR& attr, const typename ATTR::ValueType& value)
  5.  {
  6.  // Retrieve the category"s and add an attribute.
  7.  iferr_scope;
  8.  DataDictionary& dict = GetPortDictionary(category) iferr_return;
  9.  dict.Set(attr, value) iferr_return;
  10.  return OK;
  11.  }
  12.  
  13. Below is a part of the code and I am getting the error when setting DESCRIPTION::DATA::BASE::ENUM. It works all good with other data types.
  14.  
  15. maxon::Id options[] = { Id("Test1"), Id("Test2"), Id("Test3") };
  16.                     Block<Id> block = maxon::ToBlock(options);
  17.                     maxon::BaseArray<maxon::Tuple<maxon::Id, maxon::Data>> data = maxon::BlockToEnumArray(block) iferr_return;
  18.                     node.Set(DATADESCRIPTION_CATEGORY_DATA, DESCRIPTION::DATA::BASE::DATATYPE, GetDataType<InternedId>().GetId()) iferr_return;
  19.                     node.Set(DATADESCRIPTION_CATEGORY_DATA, DESCRIPTION::DATA::BASE::CLASSIFICATION, DESCRIPTION::DATA::BASE::CLASSIFICATION.ENUM_NONE) iferr_return;
  20.                     node.Set(DATADESCRIPTION_CATEGORY_DATA, DESCRIPTION::DATA::BASE::ENUM, data) iferr_return;
  21.                     node.Set(DATADESCRIPTION_CATEGORY_UI, DESCRIPTION::UI::BASE::GROUPID, page_id) iferr_return;
  22.                     node.Set(DATADESCRIPTION_CATEGORY_UI, DESCRIPTION::UI::BASE::GUITYPEID, Id("net.maxon.ui.enum")) iferr_return;
  23.                     node.Set(LANGUAGE_ENGLISH_ID, DESCRIPTION::STRING::BASE::TRANSLATEDSTRING, (maxon::String)meta.m_label) iferr_return;
  24.  
  25. This is the error message I am getting too.
  26. error C2664: 'maxon::Result<void> delight_network::ProceduralNodeBuilder::Set<maxon::DESCRIPTION::DATA::BASE::ENUM_PrivateAttribute>(const maxon::Id &,const ATTR &,const maxon::DESCRIPTION::DATA::BASE::ENUM_PrivateAttribute::ValueType &)': cannot convert argument 3 from 'maxon::BaseArray<maxon::Tuple<maxon::Id,maxon::Data>,16,maxon::BASEARRAYFLAGS::NONE,maxon::DefaultAllocator>' to 'const maxon::DESCRIPTION::DATA::BASE::ENUM_PrivateAttribute::ValueType &'
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement