void hkvTextureAsset::getSpecificProperties(hkvPropertyList& properties, hkvProperty::Purpose purpose) const
{
    int flags = (purpose == hkvProperty::PURPOSE_USER_INTERFACE_READ_ONLY) ? hkvProperty::FLAG_READ_ONLY : 0;

    properties.reserve(properties.size() + 10);

    properties.push_back(hkvProperty::groupStart("Texture"));
    properties.back().setDescription("Asset specific properties and settings.");

    hkvPropertyList imageProps;
    m_imageProperties.getProperties(imageProps, purpose);
    for (hkvPropertyList::iterator iter = imageProps.begin(); iter != imageProps.end(); ++iter)
    {
        iter->setFlags(iter->getFlags() | hkvProperty::FLAG_INFORMATION_ONLY);
        properties.push_back(*iter);
    }

    if (purpose == hkvProperty::PURPOSE_SERIALIZATION)
    {
        properties.push_back(hkvProperty("Usage", m_usageInstance.getString(), hkvProperty::TYPE_STRING));
        properties.back().setDefaultValue(m_usageInstance.getStringForAvailableElementsId(0), false);
    }
    else
    {
        properties.push_back(hkvProperty("Usage", m_usageInstance.getAvailableElementsId(), m_usageInstance.getAvailableElementStrings(), flags));
    }

    properties.push_back(hkvProperty("sRGB", m_sRgb, flags, "If enabled, the texture will be gamma-corrected at runtime. Use this for all textures that contain painted or photographed images. Do not set this on Normal Maps or Lookup Tables."));
    properties.push_back(hkvProperty::groupEnd());
}
void hkvTextureTransformationRule::getProperties(hkvPropertyList& properties, hkvProperty::Purpose purpose) const
{
  int iFlags = (purpose == hkvProperty::PURPOSE_USER_INTERFACE_READ_ONLY) ? hkvProperty::FLAG_READ_ONLY : 0;

  if (purpose == hkvProperty::PURPOSE_SERIALIZATION)
  {
    properties.push_back(hkvProperty("Compression", m_compressionInstance.getString(), hkvProperty::TYPE_STRING, 0));
    properties.back().setDefaultValue(m_compressionInstance.getStringForAvailableElementsId(0), false);
  }
  else
  {
    properties.push_back(hkvProperty("Compression", m_compressionInstance.getAvailableElementsId(), m_compressionInstance.getAvailableElementStrings(), iFlags, "Use 'uncompressed' for all textures that must not change due to compression, for example font textures and lookup tables. Use 'Quality' for all other textures, as this will use texture compression but with the best possible quality."));
  }

  if (purpose == hkvProperty::PURPOSE_SERIALIZATION)
  {
    properties.push_back(hkvProperty("Usage", m_usageInstance.getString(), hkvProperty::TYPE_STRING));
    properties.back().setDefaultValue(m_usageInstance.getStringForAvailableElementsId(0), false);
  }
  else
  {
    properties.push_back(hkvProperty("Usage", m_usageInstance.getAvailableElementsId(), m_usageInstance.getAvailableElementStrings(), iFlags, "The texture usage helps to optimize the transformed texture for a certain use-case. Selecting e.g. 'NormalMap' will result in higher quality normal map compression on many platforms."));
  }

  properties.push_back(hkvProperty("RemoveAlphaChannel", m_removeAlphaChannel, iFlags, "If enabled, the transformed texture will never have an alpha channel. Use this, if you have textures that have an alpha channel in their source data, which is not used at runtime, and you want to get rid of it. Note that this might or might not reduce the size of the transformed file, as this depends on the (platform specific) file format. So this is not a guarantee to save space."));
  properties.push_back(hkvProperty("CreateMipMaps", m_createMipMaps, iFlags, "If enabled, the transformed file will contain mipmaps. Enable this for all standard textures. However for textures that are used for splash-screens, UI, lookup tables and basically everything that will or should never get scaled, you might need to disable this."));
  properties.back().setDefaultValue(true);
  properties.push_back(hkvProperty("DownscaleLevel", m_downscaleLevel, iFlags, "Specifies how many mipmap levels to discard. Zero means the texture is used in full resolution. One means the highest mipmap will be discarded. Two means the two highest mipmaps will be discarded, and so on. Use this to scale down textures for example for devices that do not have enough RAM or processing power, or that do not require the visual fidelity due to smaller screens."));
  properties.push_back(hkvProperty("MinimumSize", m_minSize, iFlags, "Specify the minimum length of the longer edge of the target texture. Set to 0 for no user-defined limit (target device/format limits may still apply)."));
  properties.push_back(hkvProperty("MaximumSize", m_maxSize, iFlags, "Specify the maximum length of the longer edge of the target texture. Set to 0 for no user-defined limit (target device/format limits may still apply)."));
}
Esempio n. 3
0
void hkvModelAsset::getSpecificProperties(hkvPropertyList& properties, hkvProperty::Purpose purpose) const
{
  int flags = (purpose == hkvProperty::PURPOSE_USER_INTERFACE_READ_ONLY) ? hkvProperty::FLAG_READ_ONLY : 0;

  properties.reserve(properties.size() + 10);

  properties.push_back(hkvProperty::groupStart("Model"));
  properties.back().setDescription("Asset specific properties and settings.");

  properties.push_back(hkvProperty("UseCustomLODDistances", m_useCustomLodDistances, flags, "Whether to apply the custom LOD switch distances defined in a separate property."));
  properties.push_back(hkvProperty("LODSwitchDistances", m_lodDistances, s_lodDistanceCustomType, flags, "The viewing distances up to which each detail level of the model will be displayed. If this list has no entries, the mesh does not support multiple levels of detail. A distance value of -1 means 'infinity'."));

  properties.push_back(hkvProperty::groupEnd());
}
void hkvImageFileProperties::getProperties(hkvPropertyList& properties, hkvProperty::Purpose purpose) const
{
  int flags = hkvProperty::FLAG_READ_ONLY;

  properties.reserve(properties.size() + 5);

  bool valid = m_imageFormatInstance.getDefinitionId() != HKV_IMAGE_FILE_FORMAT_INVALID;

  if (purpose != hkvProperty::PURPOSE_SERIALIZATION)
  {
    properties.push_back(hkvProperty("Valid", valid, flags | hkvProperty::FLAG_READ_ONLY, "If an image is not valid, either the image file is damaged or the file format is not supported. Check the file and save it with a different format."));
  }

  if (valid)
  {
    properties.push_back(hkvProperty("FileFormat", m_imageFormatInstance.getString(), hkvProperty::TYPE_STRING, flags | hkvProperty::FLAG_READ_ONLY, "Which file format the source texture uses."));
    properties.push_back(hkvProperty("Width", m_width, flags | hkvProperty::FLAG_READ_ONLY, "The width of the texture in pixels."));
    properties.push_back(hkvProperty("Height", m_height, flags | hkvProperty::FLAG_READ_ONLY, "The height of the texture in pixels."));
    properties.push_back(hkvProperty("HasAlpha", m_hasAlpha, flags | hkvProperty::FLAG_READ_ONLY, "Whether the texture contains an Alpha-channel."));
  }
}
Esempio n. 5
0
void hkvFbxAsset::getInternalProperties(hkvPropertyList& properties, hkvProperty::Purpose purpose) const
{
  int iFlags = (purpose == hkvProperty::PURPOSE_USER_INTERFACE_READ_ONLY) ? hkvProperty::FLAG_READ_ONLY : 0;

  properties.push_back(hkvProperty::groupStart("FBX"));
  properties.back().setDescription("Asset specific properties and settings.");
  {
    if (purpose == hkvProperty::PURPOSE_SERIALIZATION)
    {
      properties.push_back(hkvProperty("FBX Target", m_fbxTarget.getString(), hkvProperty::TYPE_STRING));
      properties.back().setDefaultValue(m_fbxTarget.getStringForAvailableElementsId(0), false);
    }
    else
    {
      properties.push_back(hkvProperty("FBX Target", m_fbxTarget.getAvailableElementsId(),
        m_fbxTarget.getAvailableElementStrings(), iFlags,
        "The FBX target defines how animations inside the FBX file are handled. Select 'Single output' if you want all animation takes to be merged into one output. "
        "Also select this option if you want to create a vmesh or a model file with animations.\n"
        "Select 'Multiple Outputs' if each animation take in the FBX file should have its separate transformation as required by Havok Animation Studio."));
      if (getFbxTarget() != HKV_FBX_TARGET_NONE)
      {
        properties.back().getMetaInfo()[hkvProperty::ENUM_META_CONFIRMATION_MESSAGE] = hkvVariantValue("Changing the 'FBX Target' will reset the output targets, do you want to continue?", false);
      }

      if (m_tagfiles.empty())
      {
        properties.push_back(hkvProperty("INFO", "Transform required.", hkvProperty::TYPE_STRING, hkvProperty::FLAG_READ_ONLY,
          "Please transform the FBX Asset once to generate the list of possible targets."));
      }
    }
    getTagfileArrayProperties(properties, purpose);
  }
  properties.push_back(hkvProperty::groupEnd());

  hkvFilterManagerTransformableAsset::getInternalProperties(properties, purpose);
}
Esempio n. 6
0
 void parseValue(const char* name, T val, const hkArray<hkStringPtr>& path, hkUint32 stackIndex)
 {
   setProperty(hkvProperty(name, val), path, stackIndex, hkvProperty::PURPOSE_SERIALIZATION);
 }