コード例 #1
0
String ApplinkExporter::getParameterString(BaseTag& tag, LONG paramID)
{
	GeData parameter;
	if (tag.GetParameter(DescLevel(paramID), parameter, DESCFLAGS_GET_0)) 
	{
		return parameter.GetString();
	}
	return "";
}
コード例 #2
0
/// ***************************************************************************
/// This function hides or unhides all materials used by the object *op*.
/// If *doc* is not \c nullptr, undos will be added.
/// ***************************************************************************
static void HideMaterials(BaseObject* op, Bool hide, BaseDocument* doc)
{
  BaseTag* tag = op->GetFirstTag();
  GeData data;
  while (tag)
  {
    if (tag->GetType() == Ttexture && tag->GetParameter(TEXTURETAG_MATERIAL, data, DESCFLAGS_GET_0))
    {
      BaseMaterial* mat = static_cast<BaseMaterial*>(data.GetLink(doc, Mbase));
      if (mat) HideHierarchy(mat, hide, doc, false);
    }
    tag = tag->GetNext();
  }
  BaseObject* child = op->GetDown();
  while (child) {
    HideMaterials(child, hide, doc);
    child = child->GetNext();
  }
}