vrdFileExportSettings 示例
#pragma once
#include <vrdObject.h>
#include <vrdData.h>
class VR_KERNELSERVICES_EXPORT vrdFileExportSettings : public vrdData
{
Q_OBJECT
// File specific options
VRD_PROPERTY(bool, exportLights, READ getExportLights WRITE setExportLights)
VRD_PROPERTY(bool, exportCameras, READ getExportCameras WRITE setExportCameras)
VRD_PROPERTY(bool, exportEnvironmentGeometries, READ getExportEnvironmentGeometries WRITE setExportEnvironmentGeometries)
VRD_PROPERTY(bool, exportSceneplates, READ getExportSceneplates WRITE setExportSceneplates)
// Animation Options
VRD_PROPERTY(bool, exportAnimationCurves, READ getExportAnimationCurves WRITE setExportAnimationCurves)
VRD_PROPERTY(bool, exportAnimationClips, READ getExportAnimationClips WRITE setExportAnimationClips)
// Geometry Options
VRD_PROPERTY(bool, removeBSides, READ getRemoveBSides WRITE setRemoveBSides)
// Export Options
VRD_PROPERTY(bool, exportAnnotations, READ getExportAnnotations WRITE setExportAnnotations)
VRD_PROPERTY(bool, exportMetadata, READ getExportMetadata WRITE setExportMetadata)
VRD_PROPERTY(bool, exportTransformVariants, READ getExportTransformVariants WRITE setExportTransformVariants)
VRD_PROPERTY(bool, exportScripts, READ getExportScripts WRITE setExportScripts)
VRD_PROPERTY(bool, exportTouchSensors, READ getExportTouchSensors WRITE setExportTouchSensors)
VRD_PROPERTY(bool, exportGeometrySwitches, READ getExportGeometrySwitches WRITE setExportGeometrySwitches)
VRD_PROPERTY(bool, exportMaterialSwitches, READ getExportMaterialSwitches WRITE setExportMaterialSwitches)
VRD_PROPERTY(bool, exportVariantSets, READ getExportVariantSets WRITE setExportVariantSets)
VRD_PROPERTY(bool, exportVariants, READ getExportVariants WRITE setExportVariants)
// Advanced Options
VRD_PROPERTY(bool, exportLightmaps, READ getExportLightmaps WRITE setExportLightmaps)
VRD_PROPERTY(bool, keepUnusedMaterials, READ getKeepUnusedMaterials WRITE setKeepUnusedMaterials)
VRD_PROPERTY(bool, keepEmptyMaterialGroupNodes, READ getKeepEmptyMaterialGroupNodes WRITE setKeepEmptyMaterialGroupNodes)
VRD_PROPERTY(bool, keepEmptyGeometryNodes, READ getKeepEmptyGeometryNodes WRITE setKeepEmptyGeometryNodes)
VRD_PROPERTY(bool, keepEmptyGroupNodes, READ getKeepEmptyGroupNodes WRITE setKeepEmptyGroupNodes)
VRD_PROPERTY(bool, keepEmptyShellNodes, READ getKeepEmptyShellNodes WRITE setKeepEmptyShellNodes)
// FBX settings
VRD_PROPERTY(int, fbxVersionId, READ getFbxVersionId WRITE setFbxVersionId)
VRD_PROPERTY(int, fbxFormat, READ getFbxFormat WRITE setFbxFormat)
VRD_PROPERTY(bool, exportVertexColors, READ getExportVertexColors WRITE setExportVertexColors)
// JT
VRD_PROPERTY(bool, exportInvisibleData, READ getExportInvisibleData WRITE setExportInvisibleData)
// STL settings
VRD_PROPERTY(int, stlFormat, READ getStlFormat WRITE setStlFormat)
// WRL
VRD_PROPERTY(bool, inlineTextures, READ getInlineTextures WRITE setInlineTextures)
// WRL
VRD_PROPERTY(bool, exportColors, READ getExportColors WRITE setExportColors)
VRD_PROPERTY(bool, exportMeshes, READ getExportMeshes WRITE setExportMeshes)
VRD_PROPERTY(SurfaceExportMode, exportSurfaces, READ getExportSurfaces WRITE setExportSurfaces)
public:
/*!
@brief Keeps surfaces as surfaces, converts surfaces to a mesh, or excludes all surfaces.
*/
enum SurfaceExportMode : quint32
{
/*! @brief Keeps surfaces as surfaces */
Surface = 0,
/*! @brief Converts surfaces to a mesh */
Mesh = 1,
/*! @brief Converts surfaces to a mesh and a surface */
Both = 2,
/*! @brief Excludes all surfaces */
None = 4
};
Q_ENUM(SurfaceExportMode)
/*!
@brief Create an empty vrdFileExportSettings object
*/
vrdFileExportSettings();
/*!
@brief Create a copy of another vrdFileExportSettings object
@param other The template object, we will copy from
*/
vrdFileExportSettings(const vrdFileExportSettings & other);
~vrdFileExportSettings() override;
/*!
@brief Allows to export meshes
@param enable The new state of mesh export
*/
void setExportMeshes(bool enable);
/*!
@brief Check if it is allowed to export meshes
@return The present state of mesh export
*/
bool getExportMeshes() const;
/*!
@brief Allows to export surfaces
@param mode
*/
void setExportSurfaces(SurfaceExportMode mode);
/*!
@brief Check if it is allowed to export surfaces
@return The present state of surface export
*/
SurfaceExportMode getExportSurfaces() const;
/*!
@brief Allows to export lights
@param enable The new state of light export
*/
void setExportLights(bool enable);
/*!
@brief Check if it is allowed to export lights
@return The present state of light export
*/
bool getExportLights() const;
/*!
@brief Allows to export cameras
@param enable The new state of camera export
*/
void setExportCameras(bool enable);
/*!
@brief Check if it is allowed to export cameras
@return The present state of camera export
*/
bool getExportCameras() const;
/*!
@brief Allows to export environment geometries
@param enable The new state of environment geometry export
*/
void setExportEnvironmentGeometries(bool enable);
/*!
@brief Check if it is allowed to export environment geometries
@return The present state of environment geometry export
*/
bool getExportEnvironmentGeometries() const;
/*!
@brief Allows to export sceneplates
@param enable The new state of sceneplate export
*/
void setExportSceneplates(bool enable);
/*!
@brief Check if it is allowed to export sceneplates
@return The present state of sceneplate export
*/
bool getExportSceneplates() const;
/*!
@brief Allows to export animation curves
@param enable The new state of animation curve export
*/
void setExportAnimationCurves(bool enable);
/*!
@brief Check if it is allowed to export animation curves
@return The present state of animation curve export
*/
bool getExportAnimationCurves() const;
/*!
@brief Allows to export animation clips
@param enable The new state of animation clip export
*/
void setExportAnimationClips(bool enable);
/*!
@brief Check if it is allowed to export animation clips
@return The present state of animation clip export
*/
bool getExportAnimationClips() const;
/*!
@brief A B-Side definition is comparable with the No Show feature in CAD software. When enabled, this removes all shapes and components set as a B-Side.
@param enable The new state of B side remove clearance
*/
void setRemoveBSides(bool enable);
/*!
@brief Check if it is allowed to remove all B sides
@return The present state of B side remove clearance
*/
bool getRemoveBSides() const;
/*!
@brief Allows to export annotations
@param enable The new state of annotation export
*/
void setExportAnnotations(bool enable);
/*!
@brief Check if it is allowed to export annotations
@return The present state of annotation export
*/
bool getExportAnnotations() const;
/*!
@brief Allows to export metadata
@param enable The new state of metadata export
*/
void setExportMetadata(bool enable);
/*!
@brief Check if it is allowed to export metadata
@return The present state of metadata export
*/
bool getExportMetadata() const;
/*!
@brief Allows to export transform variants
@param enable The new state of transform variant export
*/
void setExportTransformVariants(bool enable);
/*!
@brief Check if it is allowed to export transform variants
@return The present state of transform variant export
*/
bool getExportTransformVariants() const;
/*!
@brief Allows to export scripts
@param enable The new state of script export
*/
void setExportScripts(bool enable);
/*!
@brief Check if it is allowed to export scripts
@return The present state of script export
*/
bool getExportScripts() const;
/*!
@brief Allows to export touch sensors
@param enable The new state of touch sensor export
*/
void setExportTouchSensors(bool enable);
/*!
@brief Check if it is allowed to export touch sensors
@return The present state of touch sensor export
*/
bool getExportTouchSensors() const;
/*!
@brief Allows to export geometry switches
If geometry switches are not enabled, this could affect Variants and variant sets.
@param enable The new state of geometry switch export
*/
void setExportGeometrySwitches(bool enable);
/*!
@brief Check if it is allowed to export geometry switches
@return The present state of geometry switch export
*/
bool getExportGeometrySwitches() const;
/*!
@brief Allows to export material switches
If material switches are not enabled, this could affect Variants and variant sets.
@param enable The new state of material switch export
*/
void setExportMaterialSwitches(bool enable);
/*!
@brief Check if it is allowed to export material switches
@return The present state of material switch export
*/
bool getExportMaterialSwitches() const;
/*!
@brief Allows to export variant sets
@param enable The new state of variant set export
*/
void setExportVariantSets(bool enable);
/*!
@brief Check if it is allowed to export variant sets with their different geometry and material switches
@return The present state of variant set export
*/
bool getExportVariantSets() const;
/*!
@brief Allows to export variants
@param enable The new state of variant export
*/
void setExportVariants(bool enable);
/*!
@brief Check if it is allowed to export variants
@return The present state of variant export
*/
bool getExportVariants() const;
/*!
@brief Allows to export lightmaps. Depending on the resolution, lightmaps can be very large, in terms of the amount of data.
@param enable The new state of lightmap export
*/
void setExportLightmaps(bool enable);
/*!
@brief Check if it is allowed to export lightmaps
@return The present state of lightmap export
*/
bool getExportLightmaps() const;
/*!
@brief Keeps unused materials in exported data. A large number of unused materials can increase the amount of data.
@param keep The new state of unused material export handling
*/
void setKeepUnusedMaterials(bool keep);
/*!
@brief Query how unused materials are handled. Keeps material group nodes that contain no child nodes.
@return The present state of unused material export handling
*/
bool getKeepUnusedMaterials() const;
/*!
@brief Keeps empty material groups in exported data.
Incorrect usage of external geometry editors could generate shape nodes that contain no polygons.
These types of shape nodes imported into VRED could decrease runtime stability. This feature keeps such shape nodes.
@param keep The new state of empty material group export handling
*/
void setKeepEmptyMaterialGroupNodes(bool keep);
/*!
@brief Query how empty material groups are handled
@return The present state of empty material group export handling
*/
bool getKeepEmptyMaterialGroupNodes() const;
/*!
@brief Keeps empty geometries in exported data
@param keep The new state of empty geometry export handling
*/
void setKeepEmptyGeometryNodes(bool keep);
/*!
@brief Query how empty geometries are handled
@return The present state of empty geometry export handling
*/
bool getKeepEmptyGeometryNodes() const;
/*!
@brief Keeps empty groups in exported data
@param keep The new state of empty group export handling
*/
void setKeepEmptyGroupNodes(bool keep);
/*!
@brief Query how empty groups are handled
@return The present state of empty group export handling
*/
bool getKeepEmptyGroupNodes() const;
/*!
@brief Keeps empty shell nodes without children in exported data
@param keep The new state of empty shell export handling
*/
void setKeepEmptyShellNodes(bool keep);
/*!
@brief Query how empty shells are handled
@return The present state of empty shell export handling
*/
bool getKeepEmptyShellNodes() const;
/*!
@brief Set the FBX version id
0: FBX 2020
2019: FBX 2019
2018: FBX 2018
2016: FBX 2016/2017
2014: FBX 2014/2015
2013: FBX 2013
2012: FBX 2012
2011: FBX 2011
@param id The new FBX version id
*/
void setFbxVersionId(int id);
/*!
@brief Query the used FBX version id
@return The present used FBX version id
*/
int getFbxVersionId() const;
/*!
@brief Set the FBX format
0: Binary
1: ASCII
@param format The new FBX format
*/
void setFbxFormat(int format);
/*!
@brief Query the FBX format
@return The present used FBX format
*/
int getFbxFormat() const;
/*!
@brief Export invisible nodes as visible nodes (true) or remove all invisible nodes from export (false).
@param enable The new state of invisible data export
*/
void setExportInvisibleData(bool enable);
/*!
@brief Check if it is allowed to export invisible data
@return The present state of invisible data export
*/
bool getExportInvisibleData() const;
// check for simplification / renaming to "vertex baking"? / merge both options?
/*!
@brief Keeps existing red, green, and blue values stored for each vertex in the model.
@param enable The new state of vertex color export
*/
void setExportVertexColors(bool enable);
/*!
@brief Check if it is allowed to export vertex colors
@return The present state of vertex color export
*/
bool getExportVertexColors() const;
/*!
@brief Allows to export colors on polygon mesh segments.
@param enable The new state of color export
*/
void setExportColors(bool enable);
/*!
@brief Check if it is allowed to export colors
@return The present state of color export
*/
bool getExportColors() const;
// check if enum can be used.
/*!
@brief Set the used STL format
0: Binary
1: ASCII
@param format The new STL format
*/
void setStlFormat(int format);
/*!
@brief Query the used STL format
@return Ther present used STL format
*/
int getStlFormat() const;
/*!
@brief Embeds the texture data in the geometry file.
When disabled, texture images are stored in separate files that are referenced in the geometry file.
@param enable New state of inline texture clearance
*/
void setInlineTextures(bool enable);
/*!
@brief Query if textures in exported files will be inlined
@return The present state of inline texture clearance
*/
bool getInlineTextures() const;
};
Q_DECLARE_METATYPE(vrdFileExportSettings)