Compare commits

..

8 Commits
1.2.0 ... main

Author SHA1 Message Date
marijavik
a48b933abe
Merge pull request #67 from EpicGames/release_1.3.1
Update for 1.3.1 release
2024-12-20 15:27:54 +01:00
Marija Vik
20bb3c545e Update for 1.3.1 release 2024-12-20 13:06:15 +01:00
marijavik
6c46445fb0
Merge pull request #58 from EpicGames/release_1.3.0
Update for 1.3.0 release
2024-08-15 10:11:36 +02:00
marija.vik
9839c8fab7 Update for 1.3.0 release 2024-08-15 10:04:44 +02:00
marija.vik
47a3a045e0 Added scripts, dna and body files used at the talk MetaHuman:DNACalibration Deep Dive 2023-10-11 13:57:30 +02:00
Srdjan Milicev
401ea78fc9 update DNACalib 2023-09-21 10:38:00 +02:00
Srdjan Milicev
c0a894d421 update dna_viewer_grab_changes_from_scene_and_propagate_to_dna.py 2023-09-15 16:00:53 +02:00
Srdjan Milicev
106a9f4942 update DNACalib 2023-08-25 13:59:28 +02:00
130 changed files with 50997 additions and 763 deletions

View File

@ -2,6 +2,36 @@
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
## [1.3.1] - 2024-12-20
### Added
- example script to assemble face rig in Maya with textures `dna_viewer_build_rig_with_textures.py`
- added support for Maya 2024 in dna_calibration.mod file
## [1.3.0] - 2024-08-15
### Added
- support for Maya 2024
- support for Python 3.10
- added source code comments to python wrappers
### Fixed
- `CalculateMeshLowerLODsCommand` was rewritten to address edge cases discovered with eye lashes and to handle some common cases of invalid UV data.
- `RotateCommand` to rotate blend shape target deltas as well.
- `SetBlendShapeTargetDeltasCommand` to allow setting vertex indices as well.
- Swig generated classes are now wrapped instead of being monkey-patched to invoke constructors and destructors (which allows building with newer Swig versions - 4.0.x and 4.1.x).
### Changed
- CMake files to add test cases that execute the example scripts and allow generating bundled archives with CPack.
- Binaries for embeddedRL4 plugin to be .so files.
## [1.2.0] - 2023-06-30
### Added
- assets (gui.ma, Ada.dna, additional_assemble_script.py) which support MHC 2.x.x releases (UE 5.2 and 5.3)
## [1.1.0] - 2023-04-20
### Added

View File

@ -125,6 +125,7 @@ Several Python examples are provided for reference and can be found in the **exa
- [Generates rig](/examples/dna_viewer_build_rig.py)
- [Export FBX per LOD](/examples/dna_viewer_export_fbx.py)
- [Propagating changes from Maya scene to dna](/examples/dna_viewer_grab_changes_from_scene_and_propagate_to_dna.py)
- [Generate face rig with textures](/examples/dna_viewer_build_rig_with_textures.py)
Note: Examples are grouped in three groups: DNA, DNACalib, and DNAViewer. These names are embedded as prefixes: dna_, dnacalib_, and dna_viewer_.
@ -171,7 +172,7 @@ else:
```
# Notes
If a user runs examples in Maya 2022, the value for `ROOT_DIR` should be changed and absolute paths must be used,
If a user runs examples in Maya, the value for `ROOT_DIR` should be changed and absolute paths must be used,
e.g. `c:/MetaHuman-DNA-Calibration` in Windows or `/home/user/MetaHuman-DNA-Calibration` in Linux. Important: Use `/` (forward slash), Maya uses forward slashes in path.
See the [FAQ guide](docs/faq.md) for additional specifications.

BIN
UnrealFest.zip Normal file

Binary file not shown.

526
data/lights.ma Normal file
View File

@ -0,0 +1,526 @@
//Maya ASCII 2018ff09 scene
//Name: dh_lights.ma
//Last modified: Thu, May 11, 2023 11:07:06 AM
//Codeset: 1252
requires maya "2018ff09";
requires "stereoCamera" "10.0";
currentUnit -l centimeter -a degree -t film;
fileInfo "application" "maya";
fileInfo "product" "Maya 2018";
fileInfo "version" "2018";
fileInfo "cutIdentifier" "201903222215-65bada0e52";
fileInfo "osv" "Microsoft Windows 8 Enterprise Edition, 64-bit (Build 9200)\n";
createNode transform -s -n "persp";
rename -uid "7BE03783-4E24-89B6-5989-A493C66637E0";
setAttr ".v" no;
setAttr ".t" -type "double3" 30.386393925746596 164.46424883057017 220.93384230676068 ;
setAttr ".r" -type "double3" -4.5383527322844488 364.60000000001168 2.4928380793358483e-17 ;
createNode camera -s -n "perspShape" -p "persp";
rename -uid "17C4DE2D-4474-6D71-CB6F-6A8339904880";
setAttr -k off ".v" no;
setAttr ".fl" 70;
setAttr ".coi" 235.22766075984245;
setAttr ".imn" -type "string" "persp";
setAttr ".den" -type "string" "persp_depth";
setAttr ".man" -type "string" "persp_mask";
setAttr ".tp" -type "double3" 5.2474091943811381 153.18041361778683 22.081981913115726 ;
setAttr ".hc" -type "string" "viewSet -p %camera";
createNode transform -s -n "top";
rename -uid "31146484-4292-2309-297F-65BEAF59D272";
setAttr ".v" no;
setAttr ".t" -type "double3" 0 100.1 0 ;
setAttr ".r" -type "double3" -89.999999999999986 0 0 ;
createNode camera -s -n "topShape" -p "top";
rename -uid "57F36015-479F-8693-E5D7-258FDB082AAA";
setAttr -k off ".v" no;
setAttr ".rnd" no;
setAttr ".coi" 100.1;
setAttr ".ow" 30;
setAttr ".imn" -type "string" "top";
setAttr ".den" -type "string" "top_depth";
setAttr ".man" -type "string" "top_mask";
setAttr ".hc" -type "string" "viewSet -t %camera";
setAttr ".o" yes;
createNode transform -s -n "front";
rename -uid "D49E1F9F-45C5-21B5-FBA0-1489D48D157A";
setAttr ".v" no;
setAttr ".t" -type "double3" 0 0 100.1 ;
createNode camera -s -n "frontShape" -p "front";
rename -uid "C0399F30-4794-526C-41BE-12864024BA2D";
setAttr -k off ".v" no;
setAttr ".rnd" no;
setAttr ".coi" 100.1;
setAttr ".ow" 30;
setAttr ".imn" -type "string" "front";
setAttr ".den" -type "string" "front_depth";
setAttr ".man" -type "string" "front_mask";
setAttr ".hc" -type "string" "viewSet -f %camera";
setAttr ".o" yes;
createNode transform -s -n "side";
rename -uid "F8B47EFF-46B3-66B0-A1E0-928C7E024511";
setAttr ".v" no;
setAttr ".t" -type "double3" 100.1 0 0 ;
setAttr ".r" -type "double3" 0 89.999999999999986 0 ;
createNode camera -s -n "sideShape" -p "side";
rename -uid "1A18B0B0-4597-714D-E72F-DDA863A6711A";
setAttr -k off ".v" no;
setAttr ".rnd" no;
setAttr ".coi" 100.1;
setAttr ".ow" 30;
setAttr ".imn" -type "string" "side";
setAttr ".den" -type "string" "side_depth";
setAttr ".man" -type "string" "side_mask";
setAttr ".hc" -type "string" "viewSet -s %camera";
setAttr ".o" yes;
createNode transform -n "Lights";
rename -uid "BC495762-4E8D-5F2A-7844-19883889F5F0";
setAttr ".t" -type "double3" -9.1321692712715037e-15 0 0 ;
createNode transform -n "directionalLight1" -p "Lights";
rename -uid "65DA2872-436B-EDD6-1D2D-E6BFF59299BC";
setAttr ".t" -type "double3" 15.486014481397302 138.81235271383406 5.2714390949948786 ;
setAttr ".r" -type "double3" -116.515 10.116 -98.348000000000013 ;
createNode directionalLight -n "directionalLightShape1" -p "directionalLight1";
rename -uid "36B42BE7-4800-2440-AF1C-E980D1CC87BF";
setAttr -k off ".v";
setAttr ".cl" -type "float3" 0.49200001 0.74699998 0.72899997 ;
setAttr ".urs" no;
setAttr ".dms" yes;
setAttr ".dr" 1280;
createNode transform -n "directionalLight2" -p "Lights";
rename -uid "7323F264-4461-0429-2501-FAB17160A35E";
setAttr ".t" -type "double3" 20.940014481397302 138.81235271383406 5.2714390949948786 ;
setAttr ".r" -type "double3" 25.053 -21.159 -133.766 ;
createNode directionalLight -n "directionalLightShape2" -p "directionalLight2";
rename -uid "674147DA-41B9-DF32-387E-81AD128B5F70";
setAttr -k off ".v";
setAttr ".cl" -type "float3" 0.71764708 0.86666667 0.90196079 ;
setAttr ".in" 1.1449999809265137;
setAttr ".urs" no;
setAttr ".dms" yes;
setAttr ".dr" 1280;
createNode transform -n "directionalLight3" -p "Lights";
rename -uid "FEE50C1F-498A-CA90-4D71-E1BCF3CC7285";
setAttr ".t" -type "double3" 18.166014481397301 138.81235271383406 5.2714390949948786 ;
setAttr ".r" -type "double3" -136.209 46.468 55.503 ;
createNode directionalLight -n "directionalLightShape3" -p "directionalLight3";
rename -uid "0FDD36F9-46DC-9CD8-95F3-0584EE829681";
setAttr -k off ".v";
setAttr ".cl" -type "float3" 0.57647061 0.8509804 0.9137255 ;
setAttr ".in" 0.7929999828338623;
setAttr ".urs" no;
setAttr ".dms" yes;
setAttr ".dr" 1280;
createNode lightLinker -s -n "lightLinker1";
rename -uid "164B5954-4F38-1CA6-4626-8BB06933E9DC";
setAttr -s 2 ".lnk";
setAttr -s 2 ".slnk";
createNode displayLayerManager -n "layerManager";
rename -uid "F5E9D64D-4FD6-EEA8-5D5E-6B9518D7E895";
createNode displayLayer -n "defaultLayer";
rename -uid "F8BF08C2-4846-CFBF-91C2-E580763F662F";
createNode renderLayerManager -n "renderLayerManager";
rename -uid "7F55B5EA-488C-8D40-BE39-5496C9D71AF3";
createNode renderLayer -n "defaultRenderLayer";
rename -uid "48CE02BC-4D67-7414-65B5-1089007AFCE7";
setAttr ".g" yes;
createNode script -n "uiConfigurationScriptNode";
rename -uid "8418F3FA-4979-1AF9-5770-6498EFF21B86";
setAttr ".b" -type "string" (
"// Maya Mel UI Configuration File.\n//\n// This script is machine generated. Edit at your own risk.\n//\n//\n\nglobal string $gMainPane;\nif (`paneLayout -exists $gMainPane`) {\n\n\tglobal int $gUseScenePanelConfig;\n\tint $useSceneConfig = $gUseScenePanelConfig;\n\tint $nodeEditorPanelVisible = stringArrayContains(\"nodeEditorPanel1\", `getPanel -vis`);\n\tint $nodeEditorWorkspaceControlOpen = (`workspaceControl -exists nodeEditorPanel1Window` && `workspaceControl -q -visible nodeEditorPanel1Window`);\n\tint $menusOkayInPanels = `optionVar -q allowMenusInPanels`;\n\tint $nVisPanes = `paneLayout -q -nvp $gMainPane`;\n\tint $nPanes = 0;\n\tstring $editorName;\n\tstring $panelName;\n\tstring $itemFilterName;\n\tstring $panelConfig;\n\n\t//\n\t// get current state of the UI\n\t//\n\tsceneUIReplacement -update $gMainPane;\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Top View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels $panelName;\n"
+ "\t\t$editorName = $panelName;\n modelEditor -e \n -docTag \"RADRENDER\" \n -editorChanged \"updateModelPanelBar\" \n -camera \"top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n"
+ " -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n"
+ " -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n"
+ " $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Side View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -docTag \"RADRENDER\" \n -editorChanged \"updateModelPanelBar\" \n -camera \"side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n"
+ " -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n"
+ " -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n"
+ " -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Front View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -docTag \"RADRENDER\" \n -editorChanged \"updateModelPanelBar\" \n -camera \"front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n"
+ " -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n"
+ " -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n"
+ " -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Persp View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels $panelName;\n"
+ "\t\t$editorName = $panelName;\n modelEditor -e \n -docTag \"RADRENDER\" \n -editorChanged \"updateModelPanelBar\" \n -camera \"persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n"
+ " -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n"
+ " -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1319\n -height 626\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n"
+ " $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -docTag \"isolOutln_fromSeln\" \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n"
+ " -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -isSet 0\n -isSetMember 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n"
+ " -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -selectCommand \"<function selCom at 0x7f29c5c04aa0>\" \n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n -renderFilterIndex 0\n -selectionOrder \"chronological\" \n -expandAttribute 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"Outliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -docTag \"isolOutln_fromSeln\" \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 1\n"
+ " -showReferenceMembers 1\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n"
+ " -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"graphEditor\" (localizedPanelLabel(\"Graph Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels $panelName;\n"
+ "\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 1\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 1\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n"
+ " -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 1\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n"
+ " -renderFilterVisible 0\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 1\n -displayInfinities 0\n -displayValues 0\n -autoFit 1\n -autoFitTime 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showResults \"off\" \n -showBufferCurves \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n -showUpstreamCurves 1\n -showCurveNames 0\n -showActiveCurveNames 0\n -stackedCurves 0\n -stackedCurvesMin -1\n -stackedCurvesMax 1\n -stackedCurvesSpace 0.2\n -displayNormalized 0\n -preSelectionHighlight 0\n"
+ " -constrainDrag 0\n -classicMode 1\n -valueLinesToggle 0\n -outliner \"graphEditor1OutlineEd\" \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dopeSheetPanel\" (localizedPanelLabel(\"Dope Sheet\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n"
+ " -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 1\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUpstreamCurves 1\n -showUnitlessCurves 0\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n"
+ " -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -displayValues 0\n -autoFit 0\n -autoFitTime 0\n -snapTime \"integer\" \n -snapValue \"none\" \n"
+ " -outliner \"dopeSheetPanel1OutlineEd\" \n -showSummary 1\n -showScene 0\n -hierarchyBelow 0\n -showTicks 1\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"timeEditorPanel\" (localizedPanelLabel(\"Time Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Time Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"clipEditorPanel\" (localizedPanelLabel(\"Trax Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n"
+ " -displayKeys 0\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -displayValues 0\n -autoFit 0\n -autoFitTime 0\n -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"sequenceEditorPanel\" (localizedPanelLabel(\"Camera Sequencer\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Camera Sequencer\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = sequenceEditorNameFromPanel($panelName);\n clipEditor -e \n -displayKeys 0\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n"
+ " -displayInfinities 0\n -displayValues 0\n -autoFit 0\n -autoFitTime 0\n -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperGraphPanel\" (localizedPanelLabel(\"Hypergraph Hierarchy\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -mergeConnections 0\n -zoom 1\n -animateTransition 0\n -showRelationships 1\n -showShapes 0\n -showDeformers 0\n -showExpressions 0\n"
+ " -showConstraints 0\n -showConnectionFromSelected 0\n -showConnectionToSelected 0\n -showConstraintLabels 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -opaqueContainers 0\n -freeform 0\n -image \"C:/work/Batman/characters/Bane/sourceimages/Bane_tpage_2048.tga\" \n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -heatMapDisplay 0\n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -range 0 0 \n -iconSize \"smallIcons\" \n -showCachedConnections 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperShadePanel\" (localizedPanelLabel(\"Hypershade\")) `;\n"
+ "\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"visorPanel\" (localizedPanelLabel(\"Visor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"nodeEditorPanel\" (localizedPanelLabel(\"Node Editor\")) `;\n\tif ($nodeEditorPanelVisible || $nodeEditorWorkspaceControlOpen) {\n\t\tif (\"\" == $panelName) {\n\t\t\tif ($useSceneConfig) {\n\t\t\t\t$panelName = `scriptedPanel -unParent -type \"nodeEditorPanel\" -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n"
+ " -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n -showNamespace 1\n -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -editorMode \"default\" \n"
+ " $editorName;\n\t\t\t}\n\t\t} else {\n\t\t\t$label = `panel -q -label $panelName`;\n\t\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n"
+ " -showNamespace 1\n -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -editorMode \"default\" \n $editorName;\n\t\t\tif (!$useSceneConfig) {\n\t\t\t\tpanel -e -l $label $panelName;\n\t\t\t}\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"createNodePanel\" (localizedPanelLabel(\"Create Node\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Create Node\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"polyTexturePlacementPanel\" (localizedPanelLabel(\"UV Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"UV Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n"
+ "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"renderWindowPanel\" (localizedPanelLabel(\"Render View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"shapePanel\" (localizedPanelLabel(\"Shape Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tshapePanel -edit -l (localizedPanelLabel(\"Shape Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"posePanel\" (localizedPanelLabel(\"Pose Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tposePanel -edit -l (localizedPanelLabel(\"Pose Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n"
+ "\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynRelEdPanel\" (localizedPanelLabel(\"Dynamic Relationships\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"relationshipPanel\" (localizedPanelLabel(\"Relationship Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"referenceEditorPanel\" (localizedPanelLabel(\"Reference Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels $panelName;\n"
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"componentEditorPanel\" (localizedPanelLabel(\"Component Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Component Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynPaintScriptedPanelType\" (localizedPanelLabel(\"Paint Effects\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"scriptEditorPanel\" (localizedPanelLabel(\"Script Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels $panelName;\n"
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"profilerPanel\" (localizedPanelLabel(\"Profiler Tool\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Profiler Tool\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"contentBrowserPanel\" (localizedPanelLabel(\"Content Browser\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Content Browser\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"Stereo\" (localizedPanelLabel(\"Stereo\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Stereo\")) -mbv $menusOkayInPanels $panelName;\n"
+ "string $editorName = ($panelName+\"Editor\");\n stereoCameraView -e \n -editorChanged \"updateModelPanelBar\" \n -camera \"persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n"
+ " -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererOverrideName \"stereoOverrideVP2\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 4 4 \n -bumpResolution 4 4 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 0\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n"
+ " -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n"
+ " -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 0\n -height 0\n -sceneRenderFilter 0\n -displayMode \"centerEye\" \n -viewColor 0 0 0 1 \n -useCustomBackground 1\n $editorName;\n stereoCameraView -e -viewSelected 0 $editorName;\n stereoCameraView -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"ToggledOutliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"ToggledOutliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -docTag \"isolOutln_fromSeln\" \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n"
+ " -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n"
+ " -alwaysToggleSelect 0\n -directSelect 0\n -isSet 0\n -isSetMember 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -selectCommand \"pass\" \n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n -renderFilterIndex 0\n -selectionOrder \"chronological\" \n -expandAttribute 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\tif ($useSceneConfig) {\n"
+ " string $configName = `getPanel -cwl (localizedPanelLabel(\"Current Layout\"))`;\n if (\"\" != $configName) {\n\t\t\tpanelConfiguration -edit -label (localizedPanelLabel(\"Current Layout\")) \n\t\t\t\t-userCreated false\n\t\t\t\t-defaultImage \"vacantCell.xP:/\"\n\t\t\t\t-image \"\"\n\t\t\t\t-sc false\n\t\t\t\t-configString \"global string $gMainPane; paneLayout -e -cn \\\"single\\\" -ps 1 100 100 $gMainPane;\"\n\t\t\t\t-removeAllPanels\n\t\t\t\t-ap false\n\t\t\t\t\t(localizedPanelLabel(\"Persp View\")) \n\t\t\t\t\t\"modelPanel\"\n"
+ "\t\t\t\t\t\"$panelName = `modelPanel -unParent -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels `;\\n$editorName = $panelName;\\nmodelEditor -e \\n -docTag \\\"RADRENDER\\\" \\n -editorChanged \\\"updateModelPanelBar\\\" \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 32768\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -greasePencils 1\\n -shadows 0\\n -captureSequenceNumber -1\\n -width 1319\\n -height 626\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName;\\nmodelEditor -e \\n -pluginObjects \\\"gpuCacheDisplayFilter\\\" 1 \\n $editorName\"\n"
+ "\t\t\t\t\t\"modelPanel -edit -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels $panelName;\\n$editorName = $panelName;\\nmodelEditor -e \\n -docTag \\\"RADRENDER\\\" \\n -editorChanged \\\"updateModelPanelBar\\\" \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 32768\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -greasePencils 1\\n -shadows 0\\n -captureSequenceNumber -1\\n -width 1319\\n -height 626\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName;\\nmodelEditor -e \\n -pluginObjects \\\"gpuCacheDisplayFilter\\\" 1 \\n $editorName\"\n"
+ "\t\t\t\t$configName;\n\n setNamedPanelLayout (localizedPanelLabel(\"Current Layout\"));\n }\n\n panelHistory -e -clear mainPanelHistory;\n sceneUIReplacement -clear;\n\t}\n\n\ngrid -spacing 5 -size 12 -divisions 5 -displayAxes yes -displayGridLines yes -displayDivisionLines yes -displayPerspectiveLabels no -displayOrthographicLabels no -displayAxesBold yes -perspectiveLabelPosition axis -orthographicLabelPosition edge;\nviewManip -drawCompass 0 -compassAngle 0 -frontParameters \"1 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000\" -homeParameters \"\" -selectionLockParameters \"\";\n}\n");
setAttr ".st" 3;
createNode script -n "sceneConfigurationScriptNode";
rename -uid "55EEE3F8-4EE1-A60E-BD11-499251DB7F72";
addAttr -ci true -m -sn "stringOptions" -ln "stringOptions" -at "compound" -nc
3;
addAttr -ci true -sn "name" -ln "name" -dt "string" -p "stringOptions";
addAttr -ci true -sn "value" -ln "value" -dt "string" -p "stringOptions";
addAttr -ci true -sn "type" -ln "type" -dt "string" -p "stringOptions";
setAttr ".b" -type "string" "playbackOptions -min 1 -max 120 -ast 1 -aet 200 ";
setAttr ".st" 6;
setAttr -s 48 ".stringOptions";
setAttr ".stringOptions[0].name" -type "string" "rast motion factor";
setAttr ".stringOptions[0].value" -type "string" "1.0";
setAttr ".stringOptions[0].type" -type "string" "scalar";
setAttr ".stringOptions[1].name" -type "string" "rast transparency depth";
setAttr ".stringOptions[1].value" -type "string" "8";
setAttr ".stringOptions[1].type" -type "string" "integer";
setAttr ".stringOptions[2].name" -type "string" "rast useopacity";
setAttr ".stringOptions[2].value" -type "string" "true";
setAttr ".stringOptions[2].type" -type "string" "boolean";
setAttr ".stringOptions[3].name" -type "string" "importon";
setAttr ".stringOptions[3].value" -type "string" "false";
setAttr ".stringOptions[3].type" -type "string" "boolean";
setAttr ".stringOptions[4].name" -type "string" "importon density";
setAttr ".stringOptions[4].value" -type "string" "1.0";
setAttr ".stringOptions[4].type" -type "string" "scalar";
setAttr ".stringOptions[5].name" -type "string" "importon merge";
setAttr ".stringOptions[5].value" -type "string" "0.0";
setAttr ".stringOptions[5].type" -type "string" "scalar";
setAttr ".stringOptions[6].name" -type "string" "importon trace depth";
setAttr ".stringOptions[6].value" -type "string" "0";
setAttr ".stringOptions[6].type" -type "string" "integer";
setAttr ".stringOptions[7].name" -type "string" "importon traverse";
setAttr ".stringOptions[7].value" -type "string" "true";
setAttr ".stringOptions[7].type" -type "string" "boolean";
setAttr ".stringOptions[8].name" -type "string" "shadowmap pixel samples";
setAttr ".stringOptions[8].value" -type "string" "3";
setAttr ".stringOptions[8].type" -type "string" "integer";
setAttr ".stringOptions[9].name" -type "string" "ambient occlusion";
setAttr ".stringOptions[9].value" -type "string" "false";
setAttr ".stringOptions[9].type" -type "string" "boolean";
setAttr ".stringOptions[10].name" -type "string" "ambient occlusion rays";
setAttr ".stringOptions[10].value" -type "string" "64";
setAttr ".stringOptions[10].type" -type "string" "integer";
setAttr ".stringOptions[11].name" -type "string" "ambient occlusion cache";
setAttr ".stringOptions[11].value" -type "string" "false";
setAttr ".stringOptions[11].type" -type "string" "boolean";
setAttr ".stringOptions[12].name" -type "string" "ambient occlusion cache density";
setAttr ".stringOptions[12].value" -type "string" "1.0";
setAttr ".stringOptions[12].type" -type "string" "scalar";
setAttr ".stringOptions[13].name" -type "string" "ambient occlusion cache points";
setAttr ".stringOptions[13].value" -type "string" "64";
setAttr ".stringOptions[13].type" -type "string" "integer";
setAttr ".stringOptions[14].name" -type "string" "irradiance particles";
setAttr ".stringOptions[14].value" -type "string" "false";
setAttr ".stringOptions[14].type" -type "string" "boolean";
setAttr ".stringOptions[15].name" -type "string" "irradiance particles rays";
setAttr ".stringOptions[15].value" -type "string" "256";
setAttr ".stringOptions[15].type" -type "string" "integer";
setAttr ".stringOptions[16].name" -type "string" "irradiance particles interpolate";
setAttr ".stringOptions[16].value" -type "string" "1";
setAttr ".stringOptions[16].type" -type "string" "integer";
setAttr ".stringOptions[17].name" -type "string" "irradiance particles interppoints";
setAttr ".stringOptions[17].value" -type "string" "64";
setAttr ".stringOptions[17].type" -type "string" "integer";
setAttr ".stringOptions[18].name" -type "string" "irradiance particles indirect passes";
setAttr ".stringOptions[18].value" -type "string" "0";
setAttr ".stringOptions[18].type" -type "string" "integer";
setAttr ".stringOptions[19].name" -type "string" "irradiance particles scale";
setAttr ".stringOptions[19].value" -type "string" "1.0";
setAttr ".stringOptions[19].type" -type "string" "scalar";
setAttr ".stringOptions[20].name" -type "string" "irradiance particles env";
setAttr ".stringOptions[20].value" -type "string" "true";
setAttr ".stringOptions[20].type" -type "string" "boolean";
setAttr ".stringOptions[21].name" -type "string" "irradiance particles env rays";
setAttr ".stringOptions[21].value" -type "string" "256";
setAttr ".stringOptions[21].type" -type "string" "integer";
setAttr ".stringOptions[22].name" -type "string" "irradiance particles env scale";
setAttr ".stringOptions[22].value" -type "string" "1";
setAttr ".stringOptions[22].type" -type "string" "integer";
setAttr ".stringOptions[23].name" -type "string" "irradiance particles rebuild";
setAttr ".stringOptions[23].value" -type "string" "true";
setAttr ".stringOptions[23].type" -type "string" "boolean";
setAttr ".stringOptions[24].name" -type "string" "irradiance particles file";
setAttr ".stringOptions[24].value" -type "string" "";
setAttr ".stringOptions[24].type" -type "string" "string";
setAttr ".stringOptions[25].name" -type "string" "geom displace motion factor";
setAttr ".stringOptions[25].value" -type "string" "1.0";
setAttr ".stringOptions[25].type" -type "string" "scalar";
setAttr ".stringOptions[26].name" -type "string" "contrast all buffers";
setAttr ".stringOptions[26].value" -type "string" "true";
setAttr ".stringOptions[26].type" -type "string" "boolean";
setAttr ".stringOptions[27].name" -type "string" "finalgather normal tolerance";
setAttr ".stringOptions[27].value" -type "string" "25.842";
setAttr ".stringOptions[27].type" -type "string" "scalar";
setAttr ".stringOptions[28].name" -type "string" "trace camera clip";
setAttr ".stringOptions[28].value" -type "string" "false";
setAttr ".stringOptions[28].type" -type "string" "boolean";
setAttr ".stringOptions[29].name" -type "string" "unified sampling";
setAttr ".stringOptions[29].value" -type "string" "true";
setAttr ".stringOptions[29].type" -type "string" "boolean";
setAttr ".stringOptions[30].name" -type "string" "samples quality";
setAttr ".stringOptions[30].value" -type "string" "0.25 0.25 0.25 0.25";
setAttr ".stringOptions[30].type" -type "string" "color";
setAttr ".stringOptions[31].name" -type "string" "samples min";
setAttr ".stringOptions[31].value" -type "string" "1.0";
setAttr ".stringOptions[31].type" -type "string" "scalar";
setAttr ".stringOptions[32].name" -type "string" "samples max";
setAttr ".stringOptions[32].value" -type "string" "100.0";
setAttr ".stringOptions[32].type" -type "string" "scalar";
setAttr ".stringOptions[33].name" -type "string" "samples error cutoff";
setAttr ".stringOptions[33].value" -type "string" "0.0 0.0 0.0 0.0";
setAttr ".stringOptions[33].type" -type "string" "color";
setAttr ".stringOptions[34].name" -type "string" "samples per object";
setAttr ".stringOptions[34].value" -type "string" "false";
setAttr ".stringOptions[34].type" -type "string" "boolean";
setAttr ".stringOptions[35].name" -type "string" "progressive";
setAttr ".stringOptions[35].value" -type "string" "false";
setAttr ".stringOptions[35].type" -type "string" "boolean";
setAttr ".stringOptions[36].name" -type "string" "progressive max time";
setAttr ".stringOptions[36].value" -type "string" "0";
setAttr ".stringOptions[36].type" -type "string" "integer";
setAttr ".stringOptions[37].name" -type "string" "progressive subsampling size";
setAttr ".stringOptions[37].value" -type "string" "4";
setAttr ".stringOptions[37].type" -type "string" "integer";
setAttr ".stringOptions[38].name" -type "string" "iray";
setAttr ".stringOptions[38].value" -type "string" "false";
setAttr ".stringOptions[38].type" -type "string" "boolean";
setAttr ".stringOptions[39].name" -type "string" "light relative scale";
setAttr ".stringOptions[39].value" -type "string" "0.31831";
setAttr ".stringOptions[39].type" -type "string" "scalar";
setAttr ".stringOptions[40].name" -type "string" "trace camera motion vectors";
setAttr ".stringOptions[40].value" -type "string" "false";
setAttr ".stringOptions[40].type" -type "string" "boolean";
setAttr ".stringOptions[41].name" -type "string" "ray differentials";
setAttr ".stringOptions[41].value" -type "string" "true";
setAttr ".stringOptions[41].type" -type "string" "boolean";
setAttr ".stringOptions[42].name" -type "string" "environment lighting mode";
setAttr ".stringOptions[42].value" -type "string" "off";
setAttr ".stringOptions[42].type" -type "string" "string";
setAttr ".stringOptions[43].name" -type "string" "environment lighting quality";
setAttr ".stringOptions[43].value" -type "string" "0.2";
setAttr ".stringOptions[43].type" -type "string" "scalar";
setAttr ".stringOptions[44].name" -type "string" "environment lighting shadow";
setAttr ".stringOptions[44].value" -type "string" "transparent";
setAttr ".stringOptions[44].type" -type "string" "string";
setAttr ".stringOptions[45].name" -type "string" "environment lighting resolution";
setAttr ".stringOptions[45].value" -type "string" "512";
setAttr ".stringOptions[45].type" -type "string" "integer";
setAttr ".stringOptions[46].name" -type "string" "environment lighting shader samples";
setAttr ".stringOptions[46].value" -type "string" "2";
setAttr ".stringOptions[46].type" -type "string" "integer";
setAttr ".stringOptions[47].name" -type "string" "environment lighting scale";
setAttr ".stringOptions[47].value" -type "string" "1.0 1.0 1.0";
setAttr ".stringOptions[47].type" -type "string" "color";
createNode shapeEditorManager -n "shapeEditorManager";
rename -uid "C1A4E002-4B00-921F-6C36-E7981109BC70";
createNode poseInterpolatorManager -n "poseInterpolatorManager";
rename -uid "0A7A777B-42BC-EFFC-F4FB-ECB6E726E530";
createNode nodeGraphEditorInfo -n "hyperShadePrimaryNodeEditorSavedTabsInfo";
rename -uid "A959A99A-4D35-3DA7-D5AD-E39C23F21339";
setAttr ".tgi[0].tn" -type "string" "Untitled_1";
setAttr ".tgi[0].vl" -type "double2" -330.95236780151544 -323.80951094248991 ;
setAttr ".tgi[0].vh" -type "double2" 317.85713022663526 338.09522466054096 ;
select -ne :time1;
setAttr -av -k on ".cch";
setAttr -k on ".fzn";
setAttr -av -cb on ".ihi";
setAttr -av -k on ".nds";
setAttr -cb on ".bnm";
setAttr -k on ".o" 1;
setAttr -av -k on ".unw" 1;
setAttr -av -k on ".etw";
setAttr -av -k on ".tps";
setAttr -av -k on ".tms";
select -ne :hardwareRenderingGlobals;
setAttr -av -k on ".cch";
setAttr -av -k on ".ihi";
setAttr -av -k on ".nds";
setAttr -cb on ".bnm";
setAttr ".otfna" -type "stringArray" 22 "NURBS Curves" "NURBS Surfaces" "Polygons" "Subdiv Surface" "Particles" "Particle Instance" "Fluids" "Strokes" "Image Planes" "UI" "Lights" "Cameras" "Locators" "Joints" "IK Handles" "Deformers" "Motion Trails" "Components" "Hair Systems" "Follicles" "Misc. UI" "Ornaments" ;
setAttr ".otfva" -type "Int32Array" 22 0 1 1 1 1 1
1 1 1 0 0 0 0 0 0 0 0 0
0 0 0 0 ;
setAttr -k on ".hwi";
setAttr -av ".ta";
setAttr -av ".tq";
setAttr -av ".etmr" no;
setAttr -av ".tmr" 4096;
setAttr -av ".aoon";
setAttr -av ".aoam";
setAttr -av ".aora";
setAttr -k on ".hff";
setAttr -av -k on ".hfd";
setAttr -av -k on ".hfs";
setAttr -av -k on ".hfe";
setAttr -av ".hfc";
setAttr -av -k on ".hfcr";
setAttr -av -k on ".hfcg";
setAttr -av -k on ".hfcb";
setAttr -av -k on ".hfa";
setAttr -av ".mbe";
setAttr -av -k on ".mbsof";
setAttr -k on ".blen";
setAttr -k on ".blat";
setAttr -av ".msaa";
select -ne :renderPartition;
setAttr -av -k on ".cch";
setAttr -cb on ".ihi";
setAttr -av -k on ".nds";
setAttr -cb on ".bnm";
setAttr -s 2 ".st";
setAttr -cb on ".an";
setAttr -cb on ".pt";
select -ne :renderGlobalsList1;
setAttr -k on ".cch";
setAttr -cb on ".ihi";
setAttr -k on ".nds";
setAttr -cb on ".bnm";
select -ne :defaultShaderList1;
setAttr -k on ".cch";
setAttr -cb on ".ihi";
setAttr -k on ".nds";
setAttr -cb on ".bnm";
setAttr -s 4 ".s";
select -ne :postProcessList1;
setAttr -k on ".cch";
setAttr -cb on ".ihi";
setAttr -k on ".nds";
setAttr -cb on ".bnm";
setAttr -s 2 ".p";
select -ne :defaultRenderingList1;
setAttr -k on ".ihi";
select -ne :lightList1;
setAttr -s 3 ".l";
select -ne :initialShadingGroup;
setAttr -av -k on ".cch";
setAttr -k on ".fzn";
setAttr -cb on ".ihi";
setAttr -av -k on ".nds";
setAttr -cb on ".bnm";
setAttr -k on ".bbx";
setAttr -k on ".vwm";
setAttr -k on ".tpv";
setAttr -k on ".uit";
setAttr -k on ".mwc";
setAttr -cb on ".an";
setAttr -cb on ".il";
setAttr -cb on ".vo";
setAttr -cb on ".eo";
setAttr -cb on ".fo";
setAttr -cb on ".epo";
setAttr -k on ".ro" yes;
select -ne :initialParticleSE;
setAttr -av -k on ".cch";
setAttr -cb on ".ihi";
setAttr -av -k on ".nds";
setAttr -cb on ".bnm";
setAttr -k on ".mwc";
setAttr -cb on ".an";
setAttr -cb on ".il";
setAttr -cb on ".vo";
setAttr -cb on ".eo";
setAttr -cb on ".fo";
setAttr -cb on ".epo";
setAttr -k on ".ro" yes;
lockNode -l 0 -lu 1;
select -ne :defaultResolution;
setAttr -av -k on ".cch";
setAttr -av -k on ".ihi";
setAttr -av -k on ".nds";
setAttr -k on ".bnm";
setAttr -av -k on ".w";
setAttr -av -k on ".h";
setAttr -av -k on ".pa" 1;
setAttr -av -k on ".al";
setAttr -av -k on ".dar";
setAttr -av -k on ".ldar";
setAttr -av -k on ".dpi";
setAttr -av -k on ".off";
setAttr -av -k on ".fld";
setAttr -av -k on ".zsl";
setAttr -av -k on ".isu";
setAttr -av -k on ".pdu";
select -ne :defaultLightSet;
setAttr -k on ".cch";
setAttr -k on ".ihi";
setAttr -av -k on ".nds";
setAttr -k on ".bnm";
setAttr -s 3 ".dsm";
setAttr -k on ".mwc";
setAttr -k on ".an";
setAttr -k on ".il";
setAttr -k on ".vo";
setAttr -k on ".eo";
setAttr -k on ".fo";
setAttr -k on ".epo";
setAttr -k on ".ro";
select -ne :hardwareRenderGlobals;
setAttr -av -k on ".cch";
setAttr -cb on ".ihi";
setAttr -av -k on ".nds";
setAttr -cb on ".bnm";
setAttr -av -k off -cb on ".ctrs" 256;
setAttr -av -k off -cb on ".btrs" 512;
setAttr -av -k off -cb on ".fbfm";
setAttr -av -k off -cb on ".ehql";
setAttr -av -k off -cb on ".eams";
setAttr -av -k off -cb on ".eeaa";
setAttr -av -k off -cb on ".engm";
setAttr -av -k off -cb on ".mes";
setAttr -av -k off -cb on ".emb";
setAttr -av -k off -cb on ".mbbf";
setAttr -av -k off -cb on ".mbs";
setAttr -av -k off -cb on ".trm";
setAttr -av -k off -cb on ".tshc";
setAttr -av -k off -cb on ".enpt";
setAttr -av -k off -cb on ".clmt";
setAttr -av -k off -cb on ".tcov";
setAttr -av -k off -cb on ".lith";
setAttr -av -k off -cb on ".sobc";
setAttr -av -k off -cb on ".cuth";
setAttr -av -k off -cb on ".hgcd";
setAttr -av -k off -cb on ".hgci";
setAttr -av -k off -cb on ".mgcs";
setAttr -av -k off -cb on ".twa";
setAttr -av -k off -cb on ".twz";
setAttr -cb on ".hwcc";
setAttr -cb on ".hwdp";
setAttr -cb on ".hwql";
setAttr -k on ".hwfr";
setAttr -k on ".soll";
setAttr -k on ".sosl";
setAttr -k on ".bswa";
setAttr -k on ".shml";
setAttr -k on ".hwel";
relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message";
relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
relationship "shadowLink" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message";
connectAttr "layerManager.dli[0]" "defaultLayer.id";
connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid";
connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na;
connectAttr "directionalLightShape1.ltd" ":lightList1.l" -na;
connectAttr "directionalLightShape2.ltd" ":lightList1.l" -na;
connectAttr "directionalLightShape3.ltd" ":lightList1.l" -na;
connectAttr ":perspShape.msg" ":defaultRenderGlobals.sc";
connectAttr "directionalLight1.iog" ":defaultLightSet.dsm" -na;
connectAttr "directionalLight2.iog" ":defaultLightSet.dsm" -na;
connectAttr "directionalLight3.iog" ":defaultLightSet.dsm" -na;
// End of dh_lights.ma

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

8545
data/shader.ma Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -21,3 +21,15 @@ PYTHONPATH +:=
PYTHONPATH +:= data
PYTHONPATH +:= lib/Maya2023/linux
MAYA_PLUG_IN_PATH +:= lib/Maya2023/linux
+ MAYAVERSION:2024 PLATFORM:win64 MetaHuman-DNA-Calibration any .
PYTHONPATH +:=
PYTHONPATH +:= data
PYTHONPATH +:= lib/Maya2024/windows
MAYA_PLUG_IN_PATH +:= lib/Maya2024/windows
+ MAYAVERSION:2024 PLATFORM:linux MetaHuman-DNA-Calibration any .
PYTHONPATH +:=
PYTHONPATH +:= data
PYTHONPATH +:= lib/Maya2024/linux
MAYA_PLUG_IN_PATH +:= lib/Maya2024/linux

View File

@ -3,7 +3,25 @@ project(dnacalib)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMakeModulesExtra")
enable_testing()
add_subdirectory(DNACalib)
add_subdirectory(SPyUS)
add_subdirectory(PyDNA)
add_subdirectory(PyDNACalib)
################################################
# Package build artifacts
set(CPACK_GENERATOR "ZIP")
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
string(CONCAT CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}"
"-${CMAKE_PROJECT_VERSION}"
"-${CMAKE_SYSTEM_NAME}"
"-${CMAKE_SYSTEM_PROCESSOR}"
"-${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}"
"-${CMAKE_BUILD_TYPE}"
"-${PYTHON3_EXACT_VERSION}"
"-SHARED")
include(CPack)

View File

@ -14,6 +14,14 @@
set(INSTALL_LIBRARY_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}")
macro(install_library target_name)
# component_name is an optional argument, and will default to the given target_name
set(COMPONENT_NAME ${target_name})
set(extra_args ${ARGN})
list(LENGTH extra_args num_extra_args)
if(${num_extra_args} GREATER 0)
list(GET extra_args 0 COMPONENT_NAME)
endif()
include(GNUInstallDirs)
set(REPRESENTATIVE_TARGET_NAME ${target_name})
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
@ -21,9 +29,20 @@ macro(install_library target_name)
# Set install destinations and associate installed target files with an export
install(TARGETS ${REPRESENTATIVE_TARGET_NAME}
EXPORT ${PROJECT_NAME}-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${COMPONENT_NAME}
RUNTIME
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${COMPONENT_NAME}
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${COMPONENT_NAME}
NAMELINK_COMPONENT ${COMPONENT_NAME}
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT ${COMPONENT_NAME}
PUBLIC_HEADER
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT ${COMPONENT_NAME}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
# Write build-tree targets
@ -37,7 +56,8 @@ macro(install_library target_name)
install(EXPORT ${PROJECT_NAME}-targets
FILE ${PROJECT_NAME}Targets.cmake
NAMESPACE ${PROJECT_NAME}::
DESTINATION ${INSTALL_CONFIGDIR})
DESTINATION ${INSTALL_CONFIGDIR}
COMPONENT ${COMPONENT_NAME})
include(CMakePackageConfigHelpers)
@ -68,13 +88,17 @@ macro(install_library target_name)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.install.cmake"
DESTINATION ${INSTALL_CONFIGDIR}
RENAME "${PROJECT_NAME}Config.cmake")
RENAME "${PROJECT_NAME}Config.cmake"
COMPONENT ${COMPONENT_NAME})
# Install package version file
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION ${INSTALL_CONFIGDIR})
DESTINATION ${INSTALL_CONFIGDIR}
COMPONENT ${COMPONENT_NAME})
# Install include files
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(DIRECTORY include/
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT ${COMPONENT_NAME})
endmacro()

View File

@ -100,6 +100,8 @@ set(SOURCES
src/dnacalib/TypeDefs.h
src/dnacalib/commands/CalculateMeshLowerLODsCommand.cpp
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.cpp
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h
src/dnacalib/commands/ClearBlendShapesCommand.cpp
src/dnacalib/commands/CommandSequence.cpp
src/dnacalib/commands/PruneBlendShapeTargetsCommand.cpp

View File

@ -123,6 +123,8 @@ set(SOURCES
src/dnacalib/CommandImplBase.h
src/dnacalib/TypeDefs.h
src/dnacalib/commands/CalculateMeshLowerLODsCommand.cpp
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.cpp
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h
src/dnacalib/commands/ClearBlendShapesCommand.cpp
src/dnacalib/commands/CommandSequence.cpp
src/dnacalib/commands/PruneBlendShapeTargetsCommand.cpp

View File

@ -41,12 +41,19 @@ struct ArrayViewTraits<const T> {
using difference_type = std::ptrdiff_t;
};
template<typename T, typename U>
struct IsCompatible {
static constexpr bool value = std::is_same<typename std::remove_cv<T>::type, typename std::remove_cv<U>::type>::value &&
(std::is_const<typename std::remove_reference<T>::type>::value ||
!std::is_const<typename std::remove_reference<U>::type>::value);
};
/**
@brief A view over a continuous sequence of objects.
@tparam T element type
Provides a view over a continuous sequence of objects owned by some other object.
Contains a count of elements and a pointer to a location where they are stored.
ArrayView does not own the mmemory it points to - it does not perform any allocation
ArrayView does not own the memory it points to - it does not perform any allocation
and deallocation. It can be constructed given a pointer and element count, or a container
type argument. The class provides helper methods for creating subviews over the objects,
and methods for by-value comparison with containers. ConstArrayView represents an immutable view.
@ -76,23 +83,23 @@ class ArrayView {
sz{size} {
}
ArrayView(std::nullptr_t /*unused*/, size_type /*unused*/) : ArrayView{nullptr, {}} {
}
template<typename U>
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
ArrayView(ArrayView<U>& src) : ArrayView{src.data(), src.size()} {
}
template<typename U>
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
ArrayView(const ArrayView<U>& src) : ArrayView{src.data(), src.size()} {
}
template<typename U>
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
ArrayView(ArrayView<U>&& src) : ArrayView{src.data(), src.size()} {
}
template<typename U, typename std::enable_if<!std::is_rvalue_reference<U &&>::value, int>::type = 0>
explicit ArrayView(U&& src) : ArrayView{src.data(), src.size()} {
template<typename U,
typename std::enable_if<!std::is_rvalue_reference<U &&>::value &&
IsCompatible<T, typename std::remove_reference<U>::type::value_type>::value,
int>::type = 0>
ArrayView(U&& src) : ArrayView{src.data(), static_cast<size_type>(src.size())} {
}
size_type size() const {
@ -193,7 +200,8 @@ bool operator!=(const ArrayView<T>& lhs, const ArrayView<U>& rhs) {
}
template<typename T, typename TContainer>
bool operator==(const ArrayView<T>& lhs, const TContainer& rhs) {
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator==(const ArrayView<T>& lhs,
const TContainer& rhs) {
if (lhs.size() != rhs.size()) {
return false;
}
@ -207,17 +215,20 @@ bool operator==(const ArrayView<T>& lhs, const TContainer& rhs) {
}
template<typename T, typename TContainer>
bool operator!=(const ArrayView<T>& lhs, const TContainer& rhs) {
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator!=(const ArrayView<T>& lhs,
const TContainer& rhs) {
return !(lhs == rhs);
}
template<typename T, typename TContainer>
bool operator==(const TContainer& lhs, const ArrayView<T>& rhs) {
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator==(const TContainer& lhs,
const ArrayView<T>& rhs) {
return (rhs == lhs);
}
template<typename T, typename TContainer>
bool operator!=(const TContainer& lhs, const ArrayView<T>& rhs) {
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator!=(const TContainer& lhs,
const ArrayView<T>& rhs) {
return !(lhs == rhs);
}

View File

@ -32,12 +32,4 @@ class StringView : public trust::ConstArrayView<char> {
};
inline bool operator==(const StringView& lhs, const StringView& rhs) {
return (static_cast<const StringView::Base&>(lhs) == static_cast<const StringView::Base&>(rhs));
}
inline bool operator!=(const StringView& lhs, const StringView& rhs) {
return !(lhs == rhs);
}
} // namespace dna

View File

@ -70,7 +70,7 @@ void JointFilter::apply(RawBehavior& dest) {
}
}
// Collect row indices of removed output indices to be used for joint delta removal
Set<std::size_t> rowsToDelete{memRes};
UnorderedSet<std::size_t> rowsToDelete{memRes};
// Remove output indices belonging to the deletable joint
extd::filter(jointGroup.outputIndices, [this, &rowsToDelete](std::uint16_t outputIndex, std::size_t rowIndex) {
const auto jointIndex = static_cast<std::uint16_t>(outputIndex / jointAttributeCount);

View File

@ -3,11 +3,26 @@
#include "dnacalib/commands/CalculateMeshLowerLODsCommand.h"
#include "dnacalib/CommandImplBase.h"
#include "dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h"
#include "dnacalib/dna/DNA.h"
#include "dnacalib/dna/DNACalibDNAReaderImpl.h"
#include "dnacalib/types/Aliases.h"
#include "dnacalib/types/UVBarycentricMapping.h"
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4365 4987)
#endif
#include <algorithm>
#include <cstddef>
#include <cstdio>
#include <iterator>
#include <limits>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
namespace dnac {
class CalculateMeshLowerLODsCommand::Impl : public CommandImplBase<Impl> {
@ -25,7 +40,16 @@ class CalculateMeshLowerLODsCommand::Impl : public CommandImplBase<Impl> {
}
void run(DNACalibDNAReaderImpl* output) {
UVBarycentricMapping mapping{output, meshIndex, getMemoryResource()};
auto faceGetter = std::bind(&dna::Reader::getFaceVertexLayoutIndices, output, meshIndex, std::placeholders::_1);
const auto layoutPositions = output->getVertexLayoutPositionIndices(meshIndex);
const auto layoutTexCoords = output->getVertexLayoutTextureCoordinateIndices(meshIndex);
const auto origMappingUs = output->getVertexTextureCoordinateUs(meshIndex);
const auto mappingVs = output->getVertexTextureCoordinateVs(meshIndex);
const auto mappingUs = deduplicateTextureCoordinates(origMappingUs, mappingVs);
const auto faceCount = output->getFaceCount(meshIndex);
UVBarycentricMapping mapping{faceGetter, layoutPositions, layoutTexCoords, mappingUs, mappingVs, faceCount,
getMemoryResource()};
auto srcMeshXs = output->getVertexPositionXs(meshIndex);
auto srcMeshYs = output->getVertexPositionYs(meshIndex);
@ -36,51 +60,83 @@ class CalculateMeshLowerLODsCommand::Impl : public CommandImplBase<Impl> {
};
for (std::uint16_t mi : findIndicesOfMeshLowerLODs(output)) {
auto vertexLayoutPositionIndices = output->getVertexLayoutPositionIndices(mi);
auto vertexLayoutTextureCoordinateIndices = output->getVertexLayoutTextureCoordinateIndices(mi);
auto us = output->getVertexTextureCoordinateUs(mi);
auto vs = output->getVertexTextureCoordinateVs(mi);
const auto vertexLayoutPositionIndices = output->getVertexLayoutPositionIndices(mi);
const auto vertexLayoutTextureCoordinateIndices = output->getVertexLayoutTextureCoordinateIndices(mi);
const auto vs = output->getVertexTextureCoordinateVs(mi);
const auto us = deduplicateTextureCoordinates(output->getVertexTextureCoordinateUs(mi), vs);
const std::uint32_t positionCount = output->getVertexPositionCount(mi);
RawVector3Vector destVertexPositions {positionCount, {}, getMemoryResource()};
// As there can be multiple VertexLayout per each VertexPosition we will use arithmetic mean value.
Vector<uint8_t> vertexLayoutsPerPosition{positionCount, {}, getMemoryResource()};
Vector<std::uint8_t> vertexLayoutsPerPosition{positionCount, {}, getMemoryResource()};
for (std::size_t i = 0u; i < vertexLayoutPositionIndices.size(); ++i) {
const std::uint32_t uvIndex = vertexLayoutTextureCoordinateIndices[i];
for (std::uint32_t vli = 0u; vli < vertexLayoutPositionIndices.size(); ++vli) {
std::uint32_t uvIndex = vertexLayoutTextureCoordinateIndices[vli];
const fvec2 uvs = {us[uvIndex], vs[uvIndex]};
const auto weightsIndicesPair = mapping.getBarycentric(uvs);
const fvec3& barycentric = weightsIndicesPair.first;
auto srcVtxIndices = weightsIndicesPair.second;
fvec3 barycentric = std::get<0>(weightsIndicesPair);
auto srcVtxIndices = std::get<1>(weightsIndicesPair);
if (srcVtxIndices.size() == 0) {
// We'll need to handle this case in the future?
assert(false && "Could not map a vertex, did not hit any triangle's bounding box.");
continue;
// We didn't hit any triangle. We aim to identify the nearest face to this UV, ensuring
// that the selected face has an intersection with at least one of the adjacent faces of the vertex we are
// projecting.
float minDistance = std::numeric_limits<float>::max();
std::uint32_t sourceTriangleIndex = std::numeric_limits<std::uint32_t>::max();
// First we find all of the faces that are adjacent to this vertex
for (std::uint32_t fi = 0u; fi < output->getFaceCount(mi); fi++) {
const auto face = output->getFaceVertexLayoutIndices(mi, fi);
if (std::find(face.begin(), face.end(), vli) == face.end()) {
continue;
}
// Gather all vertex UVs from this face and create a bounding box from it
Vector<fvec2> UVs{getMemoryResource()};
for (const auto vertexLayoutIndex : face) {
uvIndex = vertexLayoutTextureCoordinateIndices[vertexLayoutIndex];
UVs.emplace_back(us[uvIndex], vs[uvIndex]);
}
const BoundingBox faceBoundingBox{UVs};
// Find the closest triangle that has intersection with this face
auto bBoxes = mapping.getBoundingBoxes();
for (std::uint32_t bi = 0u; bi < bBoxes.size(); bi++) {
const auto& bBox = bBoxes[bi];
if (bBox.overlaps(faceBoundingBox)) {
const float distance = bBox.distance(uvs);
if (distance < minDistance) {
minDistance = distance;
sourceTriangleIndex = bi;
}
}
}
}
if (sourceTriangleIndex != std::numeric_limits<std::uint32_t>::max()) {
barycentric = mapping.getTriangle(sourceTriangleIndex).getBarycentricCoords(uvs);
srcVtxIndices = mapping.getTrianglePositionIndices(sourceTriangleIndex);
} else {
assert(false && "Could not map a vertex. It is not within a face of higher lod.");
continue;
}
}
const fvec3 src =
getSrcVertex(srcVtxIndices[0]) * barycentric[0] +
getSrcVertex(srcVtxIndices[1]) * barycentric[1] +
getSrcVertex(srcVtxIndices[2]) * barycentric[2];
const uint32_t positionIndex = vertexLayoutPositionIndices[i];
const uint32_t positionIndex = vertexLayoutPositionIndices[vli];
float& destX = destVertexPositions.xs[positionIndex];
float& destY = destVertexPositions.ys[positionIndex];
float& destZ = destVertexPositions.zs[positionIndex];
const auto vtxLayoutCount = ++vertexLayoutsPerPosition[positionIndex];
// We require mean average, more than one vertexLayout for this vertex position
const auto lastDenominator = static_cast<float>(vtxLayoutCount - 1u);
const auto newDenominator = static_cast<float>(vtxLayoutCount);
destX = (destX * lastDenominator + src[0]) / newDenominator;
destY = (destY * lastDenominator + src[1]) / newDenominator;
destZ = (destZ * lastDenominator + src[2]) / newDenominator;
if (vtxLayoutCount == 1) {
destX = src[0];
destY = src[1];
destZ = src[2];
} else {
// We require mean average, more than one vertexLayout for this vertex position
const auto lastDenominator = static_cast<float>(vtxLayoutCount - 1u);
const auto newDenominator = static_cast<float>(vtxLayoutCount);
destX = (destX * lastDenominator + src[0]) / newDenominator;
destY = (destY * lastDenominator + src[1]) / newDenominator;
destZ = (destZ * lastDenominator + src[2]) / newDenominator;
}
}
output->setVertexPositions(mi, std::move(destVertexPositions));
}
@ -113,12 +169,23 @@ class CalculateMeshLowerLODsCommand::Impl : public CommandImplBase<Impl> {
}
}
} else {
isLowerLOD = std::find(lodMeshIndices.begin(), lodMeshIndices.end(), meshIndex) != lodMeshIndices.end();
isLowerLOD =
std::find(lodMeshIndices.begin(), lodMeshIndices.end(), meshIndex) != lodMeshIndices.end();
}
}
return lowerLODIndices;
}
Vector<float> deduplicateTextureCoordinates(ConstArrayView<float> us, ConstArrayView<float> vs) {
Vector<float> usCopy{us.begin(), us.end(), getMemoryResource()};
if (isUVMapOverlapping(us, vs)) {
// The offset function will not modify those given arrays for which the specified offset is 0.0
// So const_cast-ing here is just to satisfy the compiler, not for modifying the data sneakily.
offsetOverlappingUVMapRegion(usCopy, {const_cast<float*>(vs.data()), vs.size()}, 1.0f, 0.0f);
}
return usCopy;
}
private:
std::uint16_t meshIndex;
};

View File

@ -0,0 +1,62 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h"
#include <algorithm>
#include <cmath>
#include <cstddef>
namespace dnac {
inline bool near(float a, float b, float threshold) {
return std::fabs(a - b) < threshold;
}
bool isUVMapOverlapping(ConstArrayView<float> us,
ConstArrayView<float> vs,
std::size_t overlapCountThreshold,
float uvCompareThreshold) {
// Quick heuristic to check if the UV is really mirrored into the upper half of the array,
// if first N matches, it will be considered a total match and deduplication should proceed
assert(us.size() == vs.size());
if ((us.size() % 2ul) != 0ul) {
return false;
}
const std::size_t half = (us.size() / 2ul);
for (std::size_t i = {}; i < std::min(half, overlapCountThreshold); ++i) {
bool found = false;
for (std::size_t j = half; j < us.size(); ++j) {
if (near(us[i], us[j], uvCompareThreshold) && near(vs[i], vs[j], uvCompareThreshold)) {
found = true;
break;
}
}
if (!found) {
return false;
}
}
return true;
}
void offsetOverlappingUVMapRegion(ArrayView<float> us, ArrayView<float> vs, float uOffset, float vOffset,
float uvCompareThreshold) {
assert(us.size() == vs.size());
const std::size_t half = (us.size() / 2ul);
for (std::size_t i = {}; i < half; ++i) {
for (std::size_t j = half; j < us.size(); ++j) {
if (near(us[i], us[j], uvCompareThreshold) && near(vs[i], vs[j], uvCompareThreshold)) {
if (uOffset != 0.0f) {
us[i] += uOffset;
}
if (vOffset != 0.0f) {
vs[i] += vOffset;
}
break;
}
}
}
}
} // namespace dnac

View File

@ -0,0 +1,19 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "dnacalib/types/Aliases.h"
namespace dnac {
bool isUVMapOverlapping(ConstArrayView<float> us,
ConstArrayView<float> vs,
std::size_t overlapCountThreshold = 10ul,
float uvCompareThreshold = 0.0002f);
void offsetOverlappingUVMapRegion(ArrayView<float> us,
ArrayView<float> vs,
float uOffset = 1.0f,
float vOffset = 0.0f,
float uvCompareThreshold = 0.0002f);
} // namespace dnac

View File

@ -70,7 +70,7 @@ void JointFilter::apply(RawBehavior& dest) {
}
}
// Collect row indices of removed output indices to be used for joint delta removal
Set<std::size_t> rowsToDelete{memRes};
UnorderedSet<std::size_t> rowsToDelete{memRes};
// Remove output indices belonging to the deletable joint
extd::filter(jointGroup.outputIndices, [this, &rowsToDelete](std::uint16_t outputIndex, std::size_t rowIndex) {
const auto jointIndex = static_cast<std::uint16_t>(outputIndex / jointAttributeCount);

View File

@ -42,11 +42,22 @@ class BoundingBox {
BoundingBox(std::begin(container), std::end(container), alpha) {
}
bool contains(const fvec2& point) const {
bool contains(fvec2 point) const {
return point[0] >= min[0] && point[0] <= max[0] &&
point[1] >= min[1] && point[1] <= max[1];
}
float distance(fvec2 point) const {
const float dx = std::max({min[0] - point[0], 0.0f, point[0] - max[0]});
const float dy = std::max({min[1] - point[1], 0.0f, point[1] - max[1]});
return std::sqrt(dx * dx + dy * dy);
}
bool overlaps(const BoundingBox& other) const {
return (max[0] >= other.min[0] && other.max[0] >= min[0]) &&
(max[1] >= other.min[1] && other.max[1] >= min[1]);
}
fvec2 getMin() const {
return min;
}

View File

@ -2,7 +2,6 @@
#pragma once
#include "dnacalib/types/Aliases.h"
#include "dnacalib/TypeDefs.h"
#include <array>
@ -15,12 +14,6 @@ class Triangle {
Triangle(const fvec2& a, const fvec2& b, const fvec2& c);
explicit Triangle(const std::array<fvec2, 3>& vertices);
Triangle(const Triangle& triangle) = default;
Triangle& operator=(const Triangle& triangle) = default;
Triangle(Triangle&&) = default;
Triangle& operator=(Triangle&& triangle) = default;
fvec3 getBarycentricCoords(const fvec2& point) const;
fvec2 A() const;

View File

@ -12,73 +12,74 @@ UVBarycentricMapping::UVBarycentricMapping(const std::function<ConstArrayView<st
std::uint32_t faceCount,
MemoryResource* memRes) :
triangles{memRes},
bBoxes{memRes} {
trianglePositionIndices{memRes} {
auto estimatedTriangleCount = static_cast<std::size_t>(static_cast<float>(faceCount) * 2.5f);
triangles.reserve(estimatedTriangleCount);
bBoxes.reserve(estimatedTriangleCount);
for (std::uint32_t i = 0u; i < faceCount; i++) {
auto face = faceGetter(i);
while (face.size() > 2) {
const auto vertexLayoutIndex0 = face[0];
const auto vertexLayoutIndex1 = face[1];
const auto vertexLayoutIndex2 = face[face.size() - 1u];
boundingBoxes.reserve(estimatedTriangleCount);
trianglePositionIndices.reserve(estimatedTriangleCount);
const std::array<std::uint32_t, 3> positionIndices {vertexPositionIndices[vertexLayoutIndex0],
vertexPositionIndices[vertexLayoutIndex1],
vertexPositionIndices[vertexLayoutIndex2]};
for (std::uint32_t fi = 0u; fi < faceCount; fi++) {
auto face = faceGetter(fi);
if (face.size() > 2) {
const auto n = face.size();
for (std::uint32_t i = 0; i < n - 2; ++i) {
for (std::uint32_t j = i + 1; j < n - 1; ++j) {
for (std::uint32_t k = j + 1; k < n; ++k) {
const auto vli0 = face[i];
const auto vli1 = face[j];
const auto vli2 = face[k];
const std::array<std::uint32_t, 3> positionIndices {vertexPositionIndices[vli0],
vertexPositionIndices[vli1],
vertexPositionIndices[vli2]};
const auto uvIndex0 = textureCoordinateUVIndices[vli0];
const auto uvIndex1 = textureCoordinateUVIndices[vli1];
const auto uvIndex2 = textureCoordinateUVIndices[vli2];
const auto uvIndex0 = textureCoordinateUVIndices[vertexLayoutIndex0];
const auto uvIndex1 = textureCoordinateUVIndices[vertexLayoutIndex1];
const auto uvIndex2 = textureCoordinateUVIndices[vertexLayoutIndex2];
const std::array<fvec2, 3> UVs = {fvec2{Us[uvIndex0], Vs[uvIndex0]},
fvec2{Us[uvIndex1], Vs[uvIndex1]},
fvec2{Us[uvIndex2], Vs[uvIndex2]}};
triangles.emplace_back(Triangle{UVs}, positionIndices);
bBoxes.emplace_back(BoundingBox{UVs});
face = face.last(face.size() - 1u);
}
}
triangles.shrink_to_fit();
bBoxes.shrink_to_fit();
}
UVBarycentricMapping::UVBarycentricMapping(const dna::Reader* reader, std::uint16_t meshIndex, MemoryResource* memRes) :
UVBarycentricMapping(std::bind(&dna::Reader::getFaceVertexLayoutIndices, reader, meshIndex, std::placeholders::_1),
reader->getVertexLayoutPositionIndices(meshIndex),
reader->getVertexLayoutTextureCoordinateIndices(meshIndex),
reader->getVertexTextureCoordinateUs(meshIndex),
reader->getVertexTextureCoordinateVs(meshIndex),
reader->getFaceCount(meshIndex),
memRes) {
}
ConstArrayView<UVBarycentricMapping::TrianglePositionIndicesPair> UVBarycentricMapping::getTriangles() const {
return {triangles.data(), triangles.size()};
}
ConstArrayView<BoundingBox> UVBarycentricMapping::getBoundingBoxes() const {
return {bBoxes.data(), bBoxes.size()};
}
UVBarycentricMapping::BarycentricPositionIndicesPair UVBarycentricMapping::getBarycentric(const fvec2& uv) const {
BarycentricPositionIndicesPair barycentricPositionsPair;
for (std::uint32_t i = 0u; i < bBoxes.size(); i++) {
if (bBoxes[i].contains(uv)) {
const auto barycentricWeights = triangles[i].first.getBarycentricCoords(uv);
// If we don't hit any triangle, we will use one whose bounding box we hit
barycentricPositionsPair = {barycentricWeights, ConstArrayView<std::uint32_t>{triangles[i].second}};
if ((barycentricWeights[0] >= 0.0f) && (barycentricWeights[0] <= 1.0f) &&
(barycentricWeights[1] >= 0.0f) && (barycentricWeights[1] <= 1.0f) &&
(barycentricWeights[2] >= 0.0f) && (barycentricWeights[2] <= 1.0f)) {
return barycentricPositionsPair;
const std::array<fvec2, 3> UVs = {fvec2{Us[uvIndex0], Vs[uvIndex0]},
fvec2{Us[uvIndex1], Vs[uvIndex1]},
fvec2{Us[uvIndex2], Vs[uvIndex2]}};
triangles.emplace_back(UVs);
boundingBoxes.emplace_back(UVs);
trianglePositionIndices.emplace_back(positionIndices);
}
}
}
}
}
return barycentricPositionsPair;
triangles.shrink_to_fit();
boundingBoxes.shrink_to_fit();
trianglePositionIndices.shrink_to_fit();
}
UVBarycentricMapping::BarycentricPositionIndicesPair UVBarycentricMapping::getBarycentric(fvec2 uv) const {
const auto isPointInsideTriangle = [](const fvec3& barycentricPoint) {
return barycentricPoint[0] > 0.0f && barycentricPoint[1] > 0.0f && barycentricPoint[2] > 0.0f;
};
for (std::uint32_t i = 0; i < triangles.size(); i++) {
const auto& triangle = triangles[i];
// we check if point is inside triangle (all barycentric coordinates are positive)
if (boundingBoxes[i].contains(uv)) {
const auto barycentricPoint = triangle.getBarycentricCoords(uv);
if (isPointInsideTriangle(barycentricPoint)) {
return BarycentricPositionIndicesPair{barycentricPoint,
ConstArrayView<std::uint32_t>{trianglePositionIndices[i]}};
}
}
}
return {};
}
const Triangle& UVBarycentricMapping::getTriangle(std::uint32_t index) const {
return triangles[index];
}
ConstArrayView<std::uint32_t> UVBarycentricMapping::getTrianglePositionIndices(std::uint32_t index) const {
return trianglePositionIndices[index];
}
ConstArrayView<BoundingBox> UVBarycentricMapping::getBoundingBoxes() const {
return boundingBoxes;
}
} // namespace dnac

View File

@ -3,16 +3,15 @@
#pragma once
#include "dnacalib/types/Aliases.h"
#include "dnacalib/types/Triangle.h"
#include "dnacalib/types/BoundingBox.h"
#include "dnacalib/types/Triangle.h"
namespace dnac {
class UVBarycentricMapping {
public:
using TrianglePositionIndicesPair = std::pair<Triangle, std::array<std::uint32_t, 3u> >;
using BarycentricPositionIndicesPair = std::pair<fvec3, ConstArrayView<std::uint32_t> >;
using TrianglePositionIndicesPair = std::tuple<Triangle, std::array<std::uint32_t, 3u> >;
using BarycentricPositionIndicesPair = std::tuple<fvec3, ConstArrayView<std::uint32_t> >;
public:
UVBarycentricMapping(const std::function<ConstArrayView<std::uint32_t>(std::uint32_t)>& faceGetter,
@ -23,16 +22,15 @@ class UVBarycentricMapping {
std::uint32_t faceCount,
MemoryResource* memRes);
explicit UVBarycentricMapping(const dna::Reader* reader, std::uint16_t meshIndex, MemoryResource* memRes);
ConstArrayView<TrianglePositionIndicesPair> getTriangles() const;
BarycentricPositionIndicesPair getBarycentric(fvec2 uv) const;
const Triangle& getTriangle(std::uint32_t index) const;
ConstArrayView<std::uint32_t> getTrianglePositionIndices(std::uint32_t index) const;
ConstArrayView<BoundingBox> getBoundingBoxes() const;
BarycentricPositionIndicesPair getBarycentric(const fvec2& uv) const;
private:
Vector<TrianglePositionIndicesPair> triangles;
Vector<BoundingBox> bBoxes;
Vector<Triangle> triangles;
Vector<BoundingBox> boundingBoxes;
Vector<std::array<std::uint32_t, 3u> > trianglePositionIndices;
};
} // namespace dnac

View File

@ -2,13 +2,15 @@ set(PYTHON3_EXACT_VERSION "" CACHE STRING "Specify exact python3 version against
if(PYTHON3_EXACT_VERSION)
set(find_python3_extra_args ${PYTHON3_EXACT_VERSION} EXACT)
endif()
find_package(Python3 ${find_python3_extra_args} COMPONENTS Development)
find_package(Python3 ${find_python3_extra_args} COMPONENTS Development Interpreter)
set(py_version "py${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
set(output_dir "${py_version}")
set_property(SOURCE DNA.i PROPERTY CPLUSPLUS ON)
set_property(SOURCE DNA.i PROPERTY SWIG_MODULE_NAME dna)
set_property(SOURCE DNA.i PROPERTY SWIG_FLAGS "-doxygen")
option(TYPEMAP_DEBUG "Debug deducing of typemaps" OFF)
if(TYPEMAP_DEBUG)
set_property(SOURCE DNA.i PROPERTY SWIG_FLAGS "-debug-tmsearch")
endif()
@ -19,12 +21,17 @@ swig_add_library(py3dna
LANGUAGE
python
OUTPUT_DIR
${CMAKE_BINARY_DIR}/py3bin
${CMAKE_BINARY_DIR}/${output_dir}
OUTFILE_DIR
${CMAKE_BINARY_DIR}/python3
SOURCES
DNA.i)
add_library(PyDNA::py3dna ALIAS py3dna)
set_property(TARGET py3dna PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON)
set_target_properties(py3dna PROPERTIES
SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON
SWIG_COMPILE_DEFINITIONS DNA_BUILD_WITH_JSON_SUPPORT=ON)
target_compile_definitions(py3dna PRIVATE DNA_BUILD_WITH_JSON_SUPPORT=ON)
target_include_directories(py3dna PUBLIC ${CMAKE_CURRENT_LIST_DIR})
target_link_libraries(py3dna
PUBLIC
@ -33,14 +40,31 @@ target_link_libraries(py3dna
PRIVATE
Python3::Python)
add_custom_target(py3dna-distribution ALL
DEPENDS
py3dna
COMMAND
${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/py3bin
COMMAND
${CMAKE_COMMAND} -E copy $<TARGET_FILE:py3dna> ${CMAKE_BINARY_DIR}/py3bin
COMMAND
${CMAKE_COMMAND} -E copy $<TARGET_FILE:DNACalib::dnacalib> ${CMAKE_BINARY_DIR}/py3bin
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/examples/demo.py ${CMAKE_BINARY_DIR}/py3bin/dna_demo.py)
set(component_name "${PROJECT_NAME}-${py_version}")
get_property(wrapper_files TARGET py3dna PROPERTY SWIG_SUPPORT_FILES)
install(FILES ${wrapper_files} DESTINATION ${output_dir} COMPONENT ${component_name})
install(TARGETS py3dna
RUNTIME
DESTINATION ${output_dir}
COMPONENT ${component_name}
LIBRARY
DESTINATION ${output_dir}
COMPONENT ${component_name}
NAMELINK_COMPONENT ${component_name}
ARCHIVE
DESTINATION ${output_dir}
COMPONENT ${component_name})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/examples/demo.py DESTINATION ${output_dir} RENAME dna_demo.py COMPONENT ${component_name})
set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL};${component_name}" PARENT_SCOPE)
if(WIN32)
set(extra_env "PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
set(DNA_TEST_NAMES dna_binary_to_json_demo dna_demo)
foreach(test_name ${DNA_TEST_NAMES})
add_test(NAME ${test_name}
COMMAND ${CMAKE_COMMAND} -E env ${extra_env} LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} PYTHONPATH=. ${Python3_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/../../../examples/${test_name}.py"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${output_dir})
set_property(TEST ${test_name} PROPERTY PASS_REGULAR_EXPRESSION "Done\.")
endforeach()

View File

@ -1,5 +1,17 @@
%module dna
%pythonbegin
%{
import os
if hasattr(os, 'add_dll_directory'):
for path in os.environ.get('PATH', '').split(';'):
try:
if path:
os.add_dll_directory(path)
except Exception:
pass
%}
%{
#include <pma/Defs.h>
#include <pma/MemoryResource.h>

View File

@ -2,13 +2,15 @@ set(PYTHON3_EXACT_VERSION "" CACHE STRING "Specify exact python3 version against
if(PYTHON3_EXACT_VERSION)
set(find_python3_extra_args ${PYTHON3_EXACT_VERSION} EXACT)
endif()
find_package(Python3 ${find_python3_extra_args} COMPONENTS Development)
find_package(Python3 ${find_python3_extra_args} COMPONENTS Development Interpreter)
set(py_version "py${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
set(output_dir "${py_version}")
set_property(SOURCE DNACalib.i PROPERTY CPLUSPLUS ON)
set_property(SOURCE DNACalib.i PROPERTY SWIG_MODULE_NAME dnacalib)
set_property(SOURCE DNACalib.i PROPERTY SWIG_FLAGS "-doxygen")
option(TYPEMAP_DEBUG "Debug deducing of typemaps" OFF)
if(TYPEMAP_DEBUG)
set_property(SOURCE DNACalib.i PROPERTY SWIG_FLAGS "-debug-tmsearch")
endif()
@ -19,32 +21,53 @@ swig_add_library(py3dnacalib
LANGUAGE
python
OUTPUT_DIR
${CMAKE_BINARY_DIR}/py3bin
${CMAKE_BINARY_DIR}/${output_dir}
OUTFILE_DIR
${CMAKE_BINARY_DIR}/python3
SOURCES
DNACalib.i)
add_library(PyDNACalib::py3dnacalib ALIAS py3dnacalib)
set_property(TARGET py3dnacalib PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON)
set_target_properties(py3dnacalib PROPERTIES SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON)
target_link_libraries(py3dnacalib
PUBLIC
py3dna
PyDNA::py3dna
PRIVATE
Spyus::spyus
DNACalib::dnacalib
Python3::Python)
add_custom_target(py3dnacalib-distribution ALL
DEPENDS
py3dnacalib
COMMAND
${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/py3bin
COMMAND
${CMAKE_COMMAND} -E copy $<TARGET_FILE:py3dnacalib> ${CMAKE_BINARY_DIR}/py3bin
COMMAND
${CMAKE_COMMAND} -E copy $<TARGET_FILE:DNACalib::dnacalib> ${CMAKE_BINARY_DIR}/py3bin
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/examples/demo.py ${CMAKE_BINARY_DIR}/py3bin/dnacalib_demo.py
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/examples/remove_joint.py ${CMAKE_BINARY_DIR}/py3bin/dnacalib_remove_joint.py
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/examples/clear_blend_shapes.py ${CMAKE_BINARY_DIR}/py3bin/dnacalib_clear_blend_shapes.py)
set(component_name "${PROJECT_NAME}-${py_version}")
get_property(wrapper_files TARGET py3dnacalib PROPERTY SWIG_SUPPORT_FILES)
install(FILES ${wrapper_files} DESTINATION ${output_dir} COMPONENT ${component_name})
install(TARGETS py3dnacalib
RUNTIME
DESTINATION ${output_dir}
COMPONENT ${component_name}
LIBRARY
DESTINATION ${output_dir}
COMPONENT ${component_name}
NAMELINK_COMPONENT ${component_name}
ARCHIVE
DESTINATION ${output_dir}
COMPONENT ${component_name})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/examples/clear_blend_shapes.py DESTINATION ${output_dir}/examples RENAME dnacalib_clear_blend_shapes.py COMPONENT ${component_name})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/examples/demo.py DESTINATION ${output_dir}/examples RENAME dnacalib_demo.py COMPONENT ${component_name})
install(FILES ${CMAKE_CURRENT_LIST_DIR}/examples/remove_joint.py DESTINATION ${output_dir}/examples RENAME dnacalib_remove_joint.py COMPONENT ${component_name})
set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL};${component_name}" PARENT_SCOPE)
if(WIN32)
set(extra_env "PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
set(DNACALIB_TEST_NAMES dnacalib_clear_blend_shapes
dnacalib_demo
dnacalib_lod_demo
dnacalib_neutral_mesh_subtract
dnacalib_remove_joint
dnacalib_rename_joint_demo)
foreach(test_name ${DNACALIB_TEST_NAMES})
add_test(NAME ${test_name}
COMMAND ${CMAKE_COMMAND} -E env ${extra_env} LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} PYTHONPATH=. ${Python3_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/../../../examples/${test_name}.py"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${output_dir})
set_property(TEST ${test_name} PROPERTY PASS_REGULAR_EXPRESSION "Done\.")
endforeach()

View File

@ -1,5 +1,17 @@
%module dnacalib
%pythonbegin
%{
import os
if hasattr(os, 'add_dll_directory'):
for path in os.environ.get('PATH', '').split(';'):
try:
if path:
os.add_dll_directory(path)
except Exception:
pass
%}
%include <exception.i>
%include <stdint.i>

View File

@ -171,28 +171,59 @@ class name(object):
%enddef
%pythoncode %{
def __new_decorator(factory_func, original_new):
@staticmethod
def __new(cls, *args, **kwargs):
# FIXME: while this workaround solves the immediate issue with the set of classes we currently have,
# it will fail for classes that use a factory function but need no parameters at all, in which case
# the factory function will never be invoked, only the original __new__ function.
if args or kwargs:
return factory_func(*args, **kwargs)
return original_new(cls)
return __new
def with_metaclass(meta, *bases):
class metaclass(type):
def __managed_init(self, *args, **kwargs):
self._args = args
self._kwargs = kwargs
def __new__(cls, name, this_bases, d):
return meta(name, bases, d)
@classmethod
def __prepare__(cls, name, this_bases):
return meta.__prepare__(name, bases)
return type.__new__(metaclass, 'temporary_class', (), {})
%}
%define pythonize_unmanaged_type(type, creator, destroyer)
%define pythonize_unmanaged_type(typename, creator, destroyer)
%pythoncode %{
type ## .__new__ = __new_decorator(type ## _ ## creator, type ## .__new__)
type ## .__del__ = lambda instance: type ## _ ## destroyer ## (instance)
type ## .__init__ = __managed_init
del type ## .creator
del type ## .destroyer
typename ## Impl = typename
class typename ## ImplReflectionMixin(type):
def __getattr__(cls, name):
return getattr(typename ## Impl, name)
def __dir__(cls):
return [name for name in dir(typename ## Impl) if name not in (#creator, #destroyer)]
class typename(with_metaclass(typename ## ImplReflectionMixin, object)):
__slots__ = ('_args', '_kwargs', '_instance')
def __init__(self, *args, **kwargs):
self._args = args
self._kwargs = kwargs
self._instance = typename ## Impl. ## creator(*args, **kwargs)
def __del__(self):
typename ## Impl. ## destroyer(self._instance)
def _in_slots(self, attr):
for cls in type(self).__mro__:
if attr in getattr(cls, '__slots__', []):
return True
return False
def __getattr__(self, attr):
if self._in_slots(attr):
return object.__getattr__(self, attr)
return getattr(self._instance, attr)
def __setattr__(self, attr, value):
if self._in_slots(attr):
object.__setattr__(self, attr, value)
else:
setattr(self._instance, attr, value)
def __dir__(self):
return [name for name in self._instance.__dir__() if name not in (#creator, #destroyer)]
%}
%enddef

View File

@ -75,6 +75,7 @@ def save_dna(reader, path):
def create_json_dna(input_path, output_path):
dna_reader = load_dna(input_path)
save_dna(dna_reader, output_path)
print('Done.')
if __name__ == "__main__":

View File

@ -93,6 +93,7 @@ def create_new_dna(dna_path):
create_dna(dna_path)
dna_reader = load_dna(dna_path)
print_dna_summary(dna_reader)
print('Done.')
if __name__ == "__main__":

View File

@ -0,0 +1,355 @@
"""
This example demonstrates generating functional rig based on DNA file in Maya scene with applied textures.
Maps added in data folder belong to Ada preset character. User should use source data downloaded from Quixel Bridge.
IMPORTANT: You have to setup the environment before running this example. Please refer to the 'Environment setup' section in README.md.
- usage in command line:
mayapy dna_viewer_build_rig_with_textures.py
NOTE: Script cannot be called with Python, it must be called with mayapy.
- usage in Maya:
1. copy whole content of this file to Maya Script Editor
2. change value of ROOT_DIR to absolute path of dna_calibration, e.g. `c:/dna_calibration` in Windows or `/home/user/dna_calibration`. Important:
Use `/` (forward slash), because Maya uses forward slashes in path.
"""
import time
import os
# if you use Maya, use absolute path
ROOT_DIR = f"{os.path.dirname(os.path.abspath(__file__))}/..".replace("\\", "/")
DATA_DIR = f"{ROOT_DIR}/data"
from maya import cmds, mel
from dna_viewer import (
DNA,
RigConfig,
build_rig
)
ORIENT_Y = [0.0, 0.0, 0.0]
COMMON_MAP_INFOS = [
("dx11_diffuseIrradiance", 1),
("dx11_jitter", 1),
("dx11_skinLUT", 1),
("dx11_specularIrradiance", 1),
]
MAP_INFOS = [
("head_color", 1),
("head_cm1_color", 0),
("head_cm2_color", 0),
("head_cm3_color", 0),
("head_normal", 1),
("head_wm1_normal", 0),
("head_wm2_normal", 0),
("head_wm3_normal", 0),
("head_specular", 1),
("head_specular_16Bits", 1),
("head_occlusion", 1),
("head_occlusion_16Bits", 1),
("head_cavity", 1),
("head_cavity_16Bits", 1),
("head_transmission", 1),
("head_transmission_16Bits", 1),
("head_curvature", 1),
("head_curvature_16Bits", 1),
("head_position", 1),
("head_position_16Bits", 1),
("head_worldspace", 1),
("head_worldspace_16Bits", 1),
("head_bentNormal", 1),
("head_bentNormal_16Bits", 1),
("teeth_color", 1),
("teeth_normal", 1),
("eyes_color", 1),
("eyeLeft_color", 1),
("eyeRight_color", 1),
("eyeLeft_normal", 1),
("eyeRight_normal", 1),
("eyes_color_16Bits", 1),
("eyes_normal", 1),
("eyes_normal_16Bits", 1),
("eyelashes_color", 1),
]
MASKS = [
"head_wm1_blink_L",
"head_wm1_blink_R",
"head_wm1_browsRaiseInner_L",
"head_wm1_browsRaiseInner_R",
"head_wm1_browsRaiseOuter_L",
"head_wm1_browsRaiseOuter_R",
"head_wm1_chinRaise_L",
"head_wm1_chinRaise_R",
"head_wm1_jawOpen",
"head_wm1_purse_DL",
"head_wm1_purse_DR",
"head_wm1_purse_UL",
"head_wm1_purse_UR",
"head_wm1_squintInner_L",
"head_wm1_squintInner_R",
"head_wm2_browsDown_L",
"head_wm2_browsDown_R",
"head_wm2_browsLateral_L",
"head_wm2_browsLateral_R",
"head_wm2_mouthStretch_L",
"head_wm2_mouthStretch_R",
"head_wm2_neckStretch_L",
"head_wm2_neckStretch_R",
"head_wm2_noseWrinkler_L",
"head_wm2_noseWrinkler_R",
"head_wm3_cheekRaiseInner_L",
"head_wm3_cheekRaiseInner_R",
"head_wm3_cheekRaiseOuter_L",
"head_wm3_cheekRaiseOuter_R",
"head_wm3_cheekRaiseUpper_L",
"head_wm3_cheekRaiseUpper_R",
"head_wm3_smile_L",
"head_wm3_smile_R",
"head_wm13_lips_DL",
"head_wm13_lips_DR",
"head_wm13_lips_UL",
"head_wm13_lips_UR",
]
MESH_SHADER_MAPPING = {
"head_lod": "head_shader",
"teeth_lod": "teeth_shader",
"saliva_lod": "saliva_shader",
"eyeLeft_lod": "eyeLeft_shader",
"eyeRight_lod": "eyeRight_shader",
"eyeshell_lod": "eyeshell_shader",
"eyelashes_lod": "eyelashes_shader",
"eyelashesShadow_lod": "eyelashesShadow_shader",
"eyeEdge_lod": "eyeEdge_shader",
"cartilage_lod": "eyeEdge_shader",
}
SHADERS = ["head_shader", "teeth_shader", "eyeLeft_shader", "eyeRight_shader"]
SHADER_ATTRIBUTES_MAPPING = {
"FRM_WMmultipliers.head_cm2_color_head_wm2_browsDown_L": "shader_head_shader.maskWeight_00",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_browsDown_L": "shader_head_shader.maskWeight_01",
"FRM_WMmultipliers.head_cm2_color_head_wm2_browsDown_R": "shader_head_shader.maskWeight_02",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_browsDown_R": "shader_head_shader.maskWeight_03",
"FRM_WMmultipliers.head_cm2_color_head_wm2_browsLateral_L": "shader_head_shader.maskWeight_04",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_browsLateral_L": "shader_head_shader.maskWeight_05",
"FRM_WMmultipliers.head_cm2_color_head_wm2_browsLateral_R": "shader_head_shader.maskWeight_06",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_browsLateral_R": "shader_head_shader.maskWeight_07",
"FRM_WMmultipliers.head_cm1_color_head_wm1_browsRaiseInner_L": "shader_head_shader.maskWeight_08",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_browsRaiseInner_L": "shader_head_shader.maskWeight_09",
"FRM_WMmultipliers.head_cm1_color_head_wm1_browsRaiseInner_R": "shader_head_shader.maskWeight_10",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_browsRaiseInner_R": "shader_head_shader.maskWeight_11",
"FRM_WMmultipliers.head_cm1_color_head_wm1_browsRaiseOuter_L": "shader_head_shader.maskWeight_12",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_browsRaiseOuter_L": "shader_head_shader.maskWeight_13",
"FRM_WMmultipliers.head_cm1_color_head_wm1_browsRaiseOuter_R": "shader_head_shader.maskWeight_14",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_browsRaiseOuter_R": "shader_head_shader.maskWeight_15",
"FRM_WMmultipliers.head_cm1_color_head_wm1_blink_L": "shader_head_shader.maskWeight_16",
"FRM_WMmultipliers.head_cm1_color_head_wm1_squintInner_L": "shader_head_shader.maskWeight_17",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_blink_L": "shader_head_shader.maskWeight_18",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_squintInner_L": "shader_head_shader.maskWeight_19",
"FRM_WMmultipliers.head_cm1_color_head_wm1_blink_R": "shader_head_shader.maskWeight_20",
"FRM_WMmultipliers.head_cm1_color_head_wm1_squintInner_R": "shader_head_shader.maskWeight_21",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_blink_R": "shader_head_shader.maskWeight_22",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_squintInner_R": "shader_head_shader.maskWeight_23",
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseInner_L": "shader_head_shader.maskWeight_24",
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseOuter_L": "shader_head_shader.maskWeight_25",
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseUpper_L": "shader_head_shader.maskWeight_26",
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseInner_L": "shader_head_shader.maskWeight_27",
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseOuter_L": "shader_head_shader.maskWeight_28",
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseUpper_L": "shader_head_shader.maskWeight_29",
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseInner_R": "shader_head_shader.maskWeight_30",
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseOuter_R": "shader_head_shader.maskWeight_31",
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseUpper_R": "shader_head_shader.maskWeight_32",
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseInner_R": "shader_head_shader.maskWeight_33",
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseOuter_R": "shader_head_shader.maskWeight_34",
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseUpper_R": "shader_head_shader.maskWeight_35",
"FRM_WMmultipliers.head_cm2_color_head_wm2_noseWrinkler_L": "shader_head_shader.maskWeight_36",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_noseWrinkler_L": "shader_head_shader.maskWeight_37",
"FRM_WMmultipliers.head_cm2_color_head_wm2_noseWrinkler_R": "shader_head_shader.maskWeight_38",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_noseWrinkler_R": "shader_head_shader.maskWeight_39",
"FRM_WMmultipliers.head_cm3_color_head_wm3_smile_L": "shader_head_shader.maskWeight_40",
"FRM_WMmultipliers.head_wm3_normal_head_wm3_smile_L": "shader_head_shader.maskWeight_41",
"FRM_WMmultipliers.head_cm1_color_head_wm13_lips_UL": "shader_head_shader.maskWeight_42",
"FRM_WMmultipliers.head_cm1_color_head_wm13_lips_UR": "shader_head_shader.maskWeight_43",
"FRM_WMmultipliers.head_cm1_color_head_wm13_lips_DL": "shader_head_shader.maskWeight_44",
"FRM_WMmultipliers.head_cm1_color_head_wm13_lips_DR": "shader_head_shader.maskWeight_45",
"FRM_WMmultipliers.head_wm1_normal_head_wm13_lips_UL": "shader_head_shader.maskWeight_46",
"FRM_WMmultipliers.head_wm1_normal_head_wm13_lips_UR": "shader_head_shader.maskWeight_47",
"FRM_WMmultipliers.head_wm1_normal_head_wm13_lips_DL": "shader_head_shader.maskWeight_48",
"FRM_WMmultipliers.head_wm1_normal_head_wm13_lips_DR": "shader_head_shader.maskWeight_49",
"FRM_WMmultipliers.head_cm3_color_head_wm3_smile_R": "shader_head_shader.maskWeight_50",
"FRM_WMmultipliers.head_wm3_normal_head_wm3_smile_R": "shader_head_shader.maskWeight_51",
"FRM_WMmultipliers.head_cm3_color_head_wm13_lips_UL": "shader_head_shader.maskWeight_52",
"FRM_WMmultipliers.head_cm3_color_head_wm13_lips_DL": "shader_head_shader.maskWeight_53",
"FRM_WMmultipliers.head_wm3_normal_head_wm13_lips_UL": "shader_head_shader.maskWeight_54",
"FRM_WMmultipliers.head_wm3_normal_head_wm13_lips_DL": "shader_head_shader.maskWeight_55",
"FRM_WMmultipliers.head_cm3_color_head_wm13_lips_UR": "shader_head_shader.maskWeight_56",
"FRM_WMmultipliers.head_cm3_color_head_wm13_lips_DR": "shader_head_shader.maskWeight_57",
"FRM_WMmultipliers.head_wm3_normal_head_wm13_lips_UR": "shader_head_shader.maskWeight_58",
"FRM_WMmultipliers.head_wm3_normal_head_wm13_lips_DR": "shader_head_shader.maskWeight_59",
"FRM_WMmultipliers.head_cm2_color_head_wm2_mouthStretch_L": "shader_head_shader.maskWeight_60",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_mouthStretch_L": "shader_head_shader.maskWeight_61",
"FRM_WMmultipliers.head_cm2_color_head_wm2_mouthStretch_R": "shader_head_shader.maskWeight_62",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_mouthStretch_R": "shader_head_shader.maskWeight_63",
"FRM_WMmultipliers.head_cm1_color_head_wm1_purse_UL": "shader_head_shader.maskWeight_64",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_purse_UL": "shader_head_shader.maskWeight_65",
"FRM_WMmultipliers.head_cm1_color_head_wm1_purse_UR": "shader_head_shader.maskWeight_66",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_purse_UR": "shader_head_shader.maskWeight_67",
"FRM_WMmultipliers.head_cm1_color_head_wm1_purse_DL": "shader_head_shader.maskWeight_68",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_purse_DL": "shader_head_shader.maskWeight_69",
"FRM_WMmultipliers.head_cm1_color_head_wm1_purse_DR": "shader_head_shader.maskWeight_70",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_purse_DR": "shader_head_shader.maskWeight_71",
"FRM_WMmultipliers.head_cm1_color_head_wm1_chinRaise_L": "shader_head_shader.maskWeight_72",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_chinRaise_L": "shader_head_shader.maskWeight_73",
"FRM_WMmultipliers.head_cm1_color_head_wm1_chinRaise_R": "shader_head_shader.maskWeight_74",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_chinRaise_R": "shader_head_shader.maskWeight_75",
"FRM_WMmultipliers.head_cm1_color_head_wm1_jawOpen": "shader_head_shader.maskWeight_76",
"FRM_WMmultipliers.head_wm1_normal_head_wm1_jawOpen": "shader_head_shader.maskWeight_77",
"FRM_WMmultipliers.head_cm2_color_head_wm2_neckStretch_L": "shader_head_shader.maskWeight_78",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_neckStretch_L": "shader_head_shader.maskWeight_79",
"FRM_WMmultipliers.head_cm2_color_head_wm2_neckStretch_R": "shader_head_shader.maskWeight_80",
"FRM_WMmultipliers.head_wm2_normal_head_wm2_neckStretch_R": "shader_head_shader.maskWeight_81",
}
# Methods
def import_head_shaders(shader_scene_path, shaders_dir_path, masks_dir_path, maps_dir_path):
import_shader(shader_scene_path, MESH_SHADER_MAPPING)
resolve_scene_shader_paths(SHADERS, shaders_dir_path)
set_mask_textures(MASKS, masks_dir_path)
set_map_textures(COMMON_MAP_INFOS, maps_dir_path)
set_map_textures(MAP_INFOS, maps_dir_path)
connect_attributes_to_shader(SHADER_ATTRIBUTES_MAPPING)
def import_shader(shader_scene_path, mesh_shader_mapping):
print("Shader scene imported")
cmds.file(shader_scene_path, options="v=0", type="mayaAscii", i=True)
try:
items = mesh_shader_mapping.iteritems()
except:
items = mesh_shader_mapping.items()
for meshName, shaderName in items:
for lodLvl in range(0, 8):
try:
# Apply shader to all meshes based on LOD level
resolved_mesh_name = meshName + str(lodLvl) + "_mesh"
shader = "shader_" + shaderName
cmds.select(resolved_mesh_name, replace=True)
mel.eval("sets -e -forceElement " + shader + "SG")
except:
print("Skipped adding shader for mesh %s." % meshName)
def resolve_scene_shader_paths(shaders, folder_name):
for shader in shaders:
node_name = "shader_" + shader
if not cmds.objExists(node_name):
continue
file_shader_name = cmds.getAttr(node_name + ".shader")
shader_folder_name, shader_file_name = os.path.split(file_shader_name)
shader_folder_name = folder_name
cmds.setAttr(
node_name + ".shader",
shader_folder_name + "/" + shader_file_name,
type="string",
)
def set_mask_textures(masks, folder_name):
for mask in masks:
node_name = "maskFile_" + mask
if not cmds.objExists(node_name):
continue
file_texture_name = cmds.getAttr(node_name + ".fileTextureName")
texture_folder_name, texture_file_name = os.path.split(file_texture_name)
texture_folder_name = folder_name
cmds.setAttr(
node_name + ".fileTextureName",
texture_folder_name + "/" + texture_file_name,
type="string",
)
def set_map_textures(map_infos, folder_name):
for mapInfo in map_infos:
node_name = "mapFile_" + mapInfo[0]
if mapInfo[1]:
node_name = "baseMapFile_" + mapInfo[0]
if not cmds.objExists(node_name):
continue
file_texture_name = cmds.getAttr(node_name + ".fileTextureName")
texture_folder_name, texture_file_name = os.path.split(file_texture_name)
texture_folder_name = folder_name
cmds.setAttr(
node_name + ".fileTextureName",
texture_folder_name + "/" + texture_file_name,
type="string",
)
def connect_attributes_to_shader(shader_attributes_mapping):
print("Connecting attributes to shader...")
try:
items = shader_attributes_mapping.iteritems()
except Exception as ex:
print(f"Error: {ex}")
items = shader_attributes_mapping.items()
for frm_attribute, shaderAttribute in items:
if cmds.objExists(frm_attribute) and cmds.objExists(shaderAttribute):
cmds.connectAttr(frm_attribute, shaderAttribute, force=True)
def create_lights(lights_file_path, orient):
print("Creating lights...")
cmds.file(lights_file_path, defaultNamespace=True, i=True)
cmds.xform("Lights", ro=orient)
cmds.makeIdentity("Lights", apply=True)
# Define all paths
dna_path = f"{DATA_DIR}/mh4/dna_files/Ada.dna"
gui_path = f"{DATA_DIR}/mh4/gui.ma"
aas_path = f"{DATA_DIR}/mh4/additional_assemble_script.py"
ac_path = f"{DATA_DIR}/analog_gui.ma"
light_scene = f"{DATA_DIR}/lights.ma"
shader_scene = f"{DATA_DIR}/shader.ma"
shaders_dir = f"{DATA_DIR}/shaders"
masks_dir = f"{DATA_DIR}/masks"
maps_dir = f"{DATA_DIR}/maps"
output_scene = f"{ROOT_DIR}/output/Ada_rig.mb"
try:
start_time = time.time()
# open new scene
cmds.file(new=True, force=True)
# import DNA data
dna = DNA(dna_path)
config = RigConfig(
gui_path=gui_path,
analog_gui_path=ac_path,
aas_path=aas_path,
)
build_rig(dna=dna, config=config)
import_head_shaders(shader_scene, shaders_dir, masks_dir, maps_dir)
create_lights(light_scene, ORIENT_Y)
# save scene
cmds.file(rename=output_scene)
cmds.file(save=True, type="mayaBinary")
print("--- Import finished in %s seconds ---" % (time.time() - start_time))
except Exception as ex:
print("Error building scene", ex)

View File

@ -6,7 +6,7 @@ Follow the steps:
1. Start Maya
2. open maya scene (do 2.1 or 2.2)
2.1. Open existing maya scene generated from dna or
2.1. Generate new scene using build_meshes or
2.2. start DNA Viewer GUI (dna_viewer_run_in_maya.py)
- Select DNA file that you want to load and generate scene for
- Select meshes that you want to change
@ -79,7 +79,7 @@ from dnacalib import (
VectorOperation_Add,
)
from dna_viewer import DNA, RigConfig, build_rig
from dna_viewer import DNA, RigConfig, build_rig, build_meshes
def load_dna_reader(path):
@ -202,12 +202,18 @@ def assemble_maya_scene():
makedirs(OUTPUT_DIR, exist_ok=True)
dna = DNA(CHARACTER_DNA)
config = RigConfig(
gui_path=f"{DATA_DIR}/gui.ma",
analog_gui_path=f"{DATA_DIR}/analog_gui.ma",
aas_path=ADDITIONAL_ASSEMBLE_SCRIPT,
)
build_rig(dna=dna, config=config)
##################################
# This is step 2 sub-step 1
# use this block only if you need to assemble of scene from step 2.1
# config = RigConfig(
# gui_path=f"{DATA_DIR}/gui.ma",
# analog_gui_path=f"{DATA_DIR}/analog_gui.ma",
# aas_path=ADDITIONAL_ASSEMBLE_SCRIPT,
# )
# build_meshes(dna=dna, config=config)
# This is end of step 2 sub-step 1
##################################
# This is step 3 sub-step a
current_vertices_positions = {}

View File

@ -15,7 +15,7 @@ IMPORTANT: You have to setup the environment before running this example. Please
- change CHARACTER_NAME to Taro, or the name of a custom DNA file placed in /data/dna_files
- change value of LODS to list of lods needed to be extracted
Expected: Script will generate Ada_with_lods_1_and_3.dna in OUTPUT_DIR, from original Ada.dna.
Expected: Script will generate Ada_with_lods_1_and_3.dna in OUTPUT_DIR, from original Ada.
NOTE: If OUTPUT_DIR does not exist, it will be created.
"""
@ -27,8 +27,11 @@ from os import path as ospath
ROOT_DIR = f"{ospath.dirname(ospath.abspath(__file__))}/..".replace("\\", "/")
OUTPUT_DIR = f"{ROOT_DIR}/output"
import dnacalib as dnacalib
import dna
from dna import DataLayer_All, FileStream, Status, BinaryStreamReader, BinaryStreamWriter
from dnacalib import (
DNACalibDNAReader,
SetLODsCommand,
)
# Sets DNA file path
DNA = f"{ROOT_DIR}/data/dna_files/Ada.dna"
@ -38,17 +41,21 @@ DNA_NEW = f"{OUTPUT_DIR}/Ada_with_lods_1_and_3.dna"
LODS = [1, 3]
def save_dna(reader: dnacalib.DNACalibDNAReader, created_dna_path: str):
def save_dna(reader: DNACalibDNAReader, created_dna_path: str):
# Saves the dna
stream = dna.FileStream(created_dna_path, dna.FileStream.AccessMode_Write, dna.FileStream.OpenMode_Binary)
writer = dna.BinaryStreamWriter(stream)
stream = FileStream(created_dna_path, FileStream.AccessMode_Write, FileStream.OpenMode_Binary)
writer = BinaryStreamWriter(stream)
writer.setFrom(reader)
writer.write()
if not Status.isOk():
status = Status.get()
raise RuntimeError(f"Error saving DNA: {status.message}")
def run_SetLODsCommand(reader):
calibrated = dnacalib.DNACalibDNAReader(reader)
command = dnacalib.SetLODsCommand()
calibrated = DNACalibDNAReader(reader)
command = SetLODsCommand()
# Set a list of LODs that will be exported to the new file
command.setLODs(LODS)
# Runs the command that reduces LODs of the DNA
@ -58,8 +65,8 @@ def run_SetLODsCommand(reader):
if calibrated.getLODCount() != 2:
raise RuntimeError("Setting new number of LODs in DNA was unsuccessful!")
print("\nSuccessfully changed number of LODs in DNA.")
print("Saving DNA...")
print("\nSuccessfully changed number of LODs in ")
print("Saving ..")
# Save the newly created DNA
save_dna(calibrated, DNA_NEW)
print("Done.")
@ -67,8 +74,8 @@ def run_SetLODsCommand(reader):
def load_dna_calib(dna_path: str):
# Load the DNA
stream = dna.FileStream(dna_path, dna.FileStream.AccessMode_Read, dna.FileStream.OpenMode_Binary)
reader = dna.BinaryStreamReader(stream, dna.DataLayer_All)
stream = FileStream(dna_path, FileStream.AccessMode_Read, FileStream.OpenMode_Binary)
reader = BinaryStreamReader(stream, DataLayer_All)
reader.read()
return reader

View File

@ -71,3 +71,4 @@ if __name__ == "__main__":
# Prints the new joint name
print(calibrated.getJointName(10))
save_dna(calibrated, OUTPUT_DNA)
print('Done.')

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -4,6 +4,18 @@
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
import os
if hasattr(os, 'add_dll_directory'):
for path in os.environ.get('PATH', '').split(';'):
try:
if path:
os.add_dll_directory(path)
except Exception:
pass
from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
raise RuntimeError("Python 2.7 or later required")
@ -62,20 +74,16 @@ class _SwigNonDynamicMeta(type):
def __new_decorator(factory_func, original_new):
@staticmethod
def __new(cls, *args, **kwargs):
# FIXME: while this workaround solves the immediate issue with the set of classes we currently have,
# it will fail for classes that use a factory function but need no parameters at all, in which case
# the factory function will never be invoked, only the original __new__ function.
if args or kwargs:
return factory_func(*args, **kwargs)
return original_new(cls)
return __new
def with_metaclass(meta, *bases):
class metaclass(type):
def __managed_init(self, *args, **kwargs):
self._args = args
self._kwargs = kwargs
def __new__(cls, name, this_bases, d):
return meta(name, bases, d)
@classmethod
def __prepare__(cls, name, this_bases):
return meta.__prepare__(name, bases)
return type.__new__(metaclass, 'temporary_class', (), {})
import dna
class VersionInfo(object):
@ -142,13 +150,50 @@ def DNACalibDNAReader_destroy(instance):
return _py3dnacalib.DNACalibDNAReader_destroy(instance)
DNACalibDNAReader.__new__ = __new_decorator(DNACalibDNAReader_create, DNACalibDNAReader.__new__)
DNACalibDNAReader.__del__ = lambda instance: DNACalibDNAReader_destroy(instance)
DNACalibDNAReader.__init__ = __managed_init
del DNACalibDNAReader.create
del DNACalibDNAReader.destroy
DNACalibDNAReaderImpl = DNACalibDNAReader
class DNACalibDNAReaderImplReflectionMixin(type):
def __getattr__(cls, name):
return getattr(DNACalibDNAReaderImpl, name)
def __dir__(cls):
return [name for name in dir(DNACalibDNAReaderImpl) if name not in ("create","destroy")]
class DNACalibDNAReader(with_metaclass(DNACalibDNAReaderImplReflectionMixin, object)):
__slots__ = ('_args', '_kwargs', '_instance')
def __init__(self, *args, **kwargs):
self._args = args
self._kwargs = kwargs
self._instance = DNACalibDNAReaderImpl.create(*args, **kwargs)
def __del__(self):
DNACalibDNAReaderImpl.destroy(self._instance)
def _in_slots(self, attr):
for cls in type(self).__mro__:
if attr in getattr(cls, '__slots__', []):
return True
return False
def __getattr__(self, attr):
if self._in_slots(attr):
return object.__getattr__(self, attr)
return getattr(self._instance, attr)
def __setattr__(self, attr, value):
if self._in_slots(attr):
object.__setattr__(self, attr, value)
else:
setattr(self._instance, attr, value)
def __dir__(self):
return [name for name in self._instance.__dir__() if name not in ("create","destroy")]
class Command(object):
r""" Command is an abstract class whose implementations are expected to modify the DNA provided in the run() method in some way."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
def __init__(self, *args, **kwargs):
@ -167,6 +212,14 @@ VectorOperation_Add = _py3dnacalib.VectorOperation_Add
VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract
VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply
class CommandSequence(Command):
r"""
CommandSequence is used to run a sequence of commands on the same DNA.
Notes:
Commands will be run in the order in which they were added to the sequence.
CommandSequence holds pointers to commands, but does not own them.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_CommandSequence
@ -178,15 +231,34 @@ class CommandSequence(Command):
return _py3dnacalib.CommandSequence_run(self, output)
def add(self, command):
r"""
Method for adding a command to a sequence of commands to run.
:type command: :py:class:`Command`
:param command:
The command to add.
"""
return _py3dnacalib.CommandSequence_add(self, command)
def remove(self, command):
r"""
Method for removing a command from the sequence of commands to run.
:type command: :py:class:`Command`
:param command:
The command to remove.
"""
return _py3dnacalib.CommandSequence_remove(self, command)
def contains(self, command):
r"""
Method for checking if the provided command is part of the command sequence.
:type command: :py:class:`Command`
:param command:
The command to check.
"""
return _py3dnacalib.CommandSequence_contains(self, command)
def size(self):
r""" Number of commands in command sequence."""
return _py3dnacalib.CommandSequence_size(self)
# Register CommandSequence in _py3dnacalib:
@ -216,6 +288,12 @@ CommandSequence.add = command_sequence_add(CommandSequence.add)
CommandSequence.remove = command_sequence_remove(CommandSequence.remove)
class CalculateMeshLowerLODsCommand(Command):
r"""
CalculateMeshLowerLODsCommand is used to recalculate vertex positions for lower LOD meshes of the specified mesh.
Notes:
The calculation is done based on vertex positions of the specified mesh and vertex texture coordinates of its lower LOD meshes.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand
@ -224,6 +302,12 @@ class CalculateMeshLowerLODsCommand(Command):
_py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args))
def setMeshIndex(self, meshIndex):
r"""
Method for setting the index of the mesh to calculate lower LOD meshes from.
:type meshIndex: int
:param meshIndex:
The index of the mesh.
"""
return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex)
def run(self, output):
@ -233,6 +317,11 @@ class CalculateMeshLowerLODsCommand(Command):
_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand)
class ClearBlendShapesCommand(Command):
r"""
ClearBlendShapesCommand is used to clear all blend shapes data from a DNA.
Notes: This command clears blend shape target deltas and blend shape animation data. By doing so, it transforms the DNA to be "joints only".
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand
@ -247,6 +336,8 @@ class ClearBlendShapesCommand(Command):
_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand)
class PruneBlendShapeTargetsCommand(Command):
r""" PruneBlendShapeTargetsCommand is used to prune blend shape target deltas whose absolute magnitude is less than or equal to the specified threshold."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand
@ -255,6 +346,12 @@ class PruneBlendShapeTargetsCommand(Command):
_py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args))
def setThreshold(self, threshold):
r"""
Method for setting the threshold for pruning blend shape target deltas.
:type threshold: float
:param threshold:
The threshold to use.
"""
return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold)
def run(self, output):
@ -264,6 +361,8 @@ class PruneBlendShapeTargetsCommand(Command):
_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand)
class RemoveAnimatedMapCommand(Command):
r""" RemoveAnimatedMapCommand is used to remove animated maps."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand
@ -272,9 +371,23 @@ class RemoveAnimatedMapCommand(Command):
_py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args))
def setAnimatedMapIndex(self, animatedMapIndex):
r"""
Method for setting the index of the animated map to remove.
:type animatedMapIndex: int
:param animatedMapIndex:
The index of the animated map.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed.
"""
return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex)
def setAnimatedMapIndices(self, animatedMapIndices):
r"""
Method for setting the indices of animated maps to remove.
:type animatedMapIndices: dnac::ConstArrayView< std::uint16_t >
:param animatedMapIndices:
The animated map indices.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed.
"""
return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices)
def run(self, output):
@ -284,6 +397,8 @@ class RemoveAnimatedMapCommand(Command):
_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand)
class RemoveBlendShapeCommand(Command):
r""" RemoveBlendShapeCommand is used to remove blend shapes."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand
@ -292,9 +407,23 @@ class RemoveBlendShapeCommand(Command):
_py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args))
def setBlendShapeIndex(self, blendShapeIndex):
r"""
Method for setting the index of the blend shape to remove.
:type blendShapeIndex: int
:param blendShapeIndex:
The index of the blend shape.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed.
"""
return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex)
def setBlendShapeIndices(self, blendShapeIndices):
r"""
Method for setting the indices of blend shapes to remove.
:type blendShapeIndices: dnac::ConstArrayView< std::uint16_t >
:param blendShapeIndices:
The blend shape indices.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed.
"""
return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices)
def run(self, output):
@ -304,6 +433,8 @@ class RemoveBlendShapeCommand(Command):
_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand)
class RemoveJointAnimationCommand(Command):
r""" RemoveJointAnimationCommand is used to remove joint animation data."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand
@ -312,9 +443,23 @@ class RemoveJointAnimationCommand(Command):
_py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args))
def setJointIndex(self, jointIndex):
r"""
Method for setting the index of a joint whose animation data to remove.
:type jointIndex: int
:param jointIndex:
The index of the joint.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed.
"""
return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex)
def setJointIndices(self, jointIndices):
r"""
Method for setting the indices of joints whose animation data to remove.
:type jointIndices: dnac::ConstArrayView< std::uint16_t >
:param jointIndices:
The joint indices.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed.
"""
return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices)
def run(self, output):
@ -324,6 +469,8 @@ class RemoveJointAnimationCommand(Command):
_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand)
class RemoveJointCommand(Command):
r""" RemoveJointCommand is used to remove joints."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand
@ -332,9 +479,23 @@ class RemoveJointCommand(Command):
_py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args))
def setJointIndex(self, jointIndex):
r"""
Method for setting the index of the joint to remove.
:type jointIndex: int
:param jointIndex:
The index of the joint.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed.
"""
return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex)
def setJointIndices(self, jointIndices):
r"""
Method for setting the indices of joints to remove.
:type jointIndices: dnac::ConstArrayView< std::uint16_t >
:param jointIndices:
The joint indices.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed.
"""
return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices)
def run(self, output):
@ -344,6 +505,8 @@ class RemoveJointCommand(Command):
_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand)
class RemoveMeshCommand(Command):
r""" RemoveMeshCommand is used to remove meshes."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand
@ -352,9 +515,22 @@ class RemoveMeshCommand(Command):
_py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args))
def setMeshIndex(self, meshIndex):
r"""
Method for setting the index of the mesh to remove.
:type meshIndex: int
:param meshIndex:
The index of the mesh.
"""
return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex)
def setMeshIndices(self, meshIndices):
r"""
Method for setting the indices of meshes to remove.
:type meshIndices: dnac::ConstArrayView< std::uint16_t >
:param meshIndices:
The mesh indices.
Notes: Call to either setter overwrites previous setter calls. When running the command, the last set mesh(es) will be removed.
"""
return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices)
def run(self, output):
@ -364,6 +540,8 @@ class RemoveMeshCommand(Command):
_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand)
class RenameAnimatedMapCommand(Command):
r""" RenameAnimatedMapCommand is used to rename an animated map."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand
@ -372,6 +550,31 @@ class RenameAnimatedMapCommand(Command):
_py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args))
def setName(self, *args):
r"""
*Overload 1:*
Method for setting a new name for animated map with given index.
:type animatedMapIndex: int
:param animatedMapIndex:
The index of the animated map whose name to change.
:type newName: string
:param newName:
The new name for the animated map.
|
*Overload 2:*
Method for setting a new name for animated map with given name.
Notes:
The renaming will not happen if there is no animated map with given current name.
:type oldName: string
:param oldName:
The current name of the animated map whose name to change.
:type newName: string
:param newName:
The new name for the animated map.
"""
return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args)
def run(self, output):
@ -381,6 +584,8 @@ class RenameAnimatedMapCommand(Command):
_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand)
class RenameBlendShapeCommand(Command):
r""" RenameBlendShapeCommand is used to rename a blend shape channel."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand
@ -389,6 +594,31 @@ class RenameBlendShapeCommand(Command):
_py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args))
def setName(self, *args):
r"""
*Overload 1:*
Method for setting a new name for blend shape channel with given index.
:type blendShapeIndex: int
:param blendShapeIndex:
The index of the blend shape channel whose name to change.
:type newName: string
:param newName:
The new name for the blend shape channel.
|
*Overload 2:*
Method for setting a new name for blend shape channel with given name.
Notes:
The renaming will not happen if there is no blend shape channel with given current name.
:type oldName: string
:param oldName:
The current name of the blend shape channel whose name to change.
:type newName: string
:param newName:
The new name for the blend shape channel.
"""
return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args)
def run(self, output):
@ -398,6 +628,8 @@ class RenameBlendShapeCommand(Command):
_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand)
class RenameJointCommand(Command):
r""" RenameJointCommand is used to rename a joint."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RenameJointCommand
@ -406,6 +638,31 @@ class RenameJointCommand(Command):
_py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args))
def setName(self, *args):
r"""
*Overload 1:*
Method for setting a new name for joint with given index.
:type jointIndex: int
:param jointIndex:
The index of the joint whose name to change.
:type newName: string
:param newName:
The new name for the joint.
|
*Overload 2:*
Method for setting a new name for joint with given name.
Notes:
The renaming will not happen if there is no joint with given current name.
:type oldName: string
:param oldName:
The current name of the joint whose name to change.
:type newName: string
:param newName:
The new name for the joint.
"""
return _py3dnacalib.RenameJointCommand_setName(self, *args)
def run(self, output):
@ -415,6 +672,8 @@ class RenameJointCommand(Command):
_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand)
class RenameMeshCommand(Command):
r""" RenameMeshCommand is used to rename a mesh."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand
@ -423,6 +682,31 @@ class RenameMeshCommand(Command):
_py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args))
def setName(self, *args):
r"""
*Overload 1:*
Method for setting a new name for mesh with given index.
:type meshIndex: int
:param meshIndex:
The index of the mesh whose name to change.
:type newName: string
:param newName:
The new name for the mesh.
|
*Overload 2:*
Method for setting a new name for mesh with given name.
Notes:
The renaming will not happen if there is no mesh with given current name.
:type oldName: string
:param oldName:
The current name of the mesh whose name to change.
:type newName: string
:param newName:
The new name for the mesh.
"""
return _py3dnacalib.RenameMeshCommand_setName(self, *args)
def run(self, output):
@ -432,6 +716,14 @@ class RenameMeshCommand(Command):
_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand)
class RotateCommand(Command):
r"""
RotateCommand is used to rotate neutral joints and vertex positions around given origin.
Notes:
Joint rotations are represented in parent space, so it is enough to rotate only root joints, as that rotation will be propagated to the rest of the joints.
If the origin is not set, the assumed origin is (0, 0, 0).
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_RotateCommand
@ -440,9 +732,21 @@ class RotateCommand(Command):
_py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args))
def setRotation(self, degrees):
r"""
Method for setting the rotation angles.
:type degrees: dnac::Vector3
:param degrees:
Rotation angles in degrees.
"""
return _py3dnacalib.RotateCommand_setRotation(self, degrees)
def setOrigin(self, origin):
r"""
Method for setting the rotation origin.
:type origin: dnac::Vector3
:param origin:
Origin coordinates.
"""
return _py3dnacalib.RotateCommand_setOrigin(self, origin)
def run(self, output):
@ -452,6 +756,12 @@ class RotateCommand(Command):
_py3dnacalib.RotateCommand_swigregister(RotateCommand)
class ScaleCommand(Command):
r"""
ScaleCommand is used to scale neutral joints, vertex positions and joint and blendshape deltas by a factor.
Notes:
Only translation attributes of neutral joints and joint deltas are scaled.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_ScaleCommand
@ -460,9 +770,22 @@ class ScaleCommand(Command):
_py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args))
def setScale(self, scale):
r"""
Method for setting the scale factor to multiply with.
:type scale: float
:param scale:
Scale factor.
"""
return _py3dnacalib.ScaleCommand_setScale(self, scale)
def setOrigin(self, origin):
r"""
Method for setting the origin.
Notes: The origin is used to properly scale position values (vertex positions and neutral joint translations).
:type origin: dnac::Vector3
:param origin:
Origin coordinates.
"""
return _py3dnacalib.ScaleCommand_setOrigin(self, origin)
def run(self, output):
@ -472,6 +795,8 @@ class ScaleCommand(Command):
_py3dnacalib.ScaleCommand_swigregister(ScaleCommand)
class SetBlendShapeTargetDeltasCommand(Command):
r""" SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand
@ -480,21 +805,85 @@ class SetBlendShapeTargetDeltasCommand(Command):
_py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args))
def setMeshIndex(self, meshIndex):
r"""
Method for setting the index of the mesh whose blend shape target to change.
:type meshIndex: int
:param meshIndex:
The mesh index.
"""
return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex)
def setBlendShapeTargetIndex(self, blendShapeTargetIndex):
r"""
Method for setting the index of the blend shape target to change.
:type blendShapeTargetIndex: int
:param blendShapeTargetIndex:
The blend shape target index.
"""
return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex)
def setDeltas(self, *args):
r"""
*Overload 1:*
Method for setting the values used to calculate new deltas for blend shape target.
:type deltas: dnac::ConstArrayView< dnac::Vector3 >
:param deltas:
The values used in calculation.
|
*Overload 2:*
Method for setting the values used to calculate new deltas for blend shape target.
:type xs: dnac::ConstArrayView< float >
:param xs:
The X values for each delta.
:type ys: dnac::ConstArrayView< float >
:param ys:
The Y values for each delta.
:type zs: dnac::ConstArrayView< float >
:param zs:
The Z values for each delta.
"""
return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args)
def setVertexIndices(self, vertexIndices):
r"""
Method for setting the vertex indices that correspond to new deltas.
:type vertexIndices: dnac::ConstArrayView< std::uint32_t >
:param vertexIndices:
The vertexIndices.
"""
return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices)
def setMasks(self, masks):
r"""
Method for setting masks used to calculate new deltas for blend shape target.
Notes:
If no masks are set, default weight value of 1 is used for each delta.
:type masks: dnac::ConstArrayView< float >
:param masks:
The weights for each delta.
"""
return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks)
def setOperation(self, operation):
r"""
Method for setting the type of operation used to calculate new deltas for blend shape target.
Notes:
Available operations are: Interpolate, Add, Subtract and Multiply. Each delta is calculated based on the provided operation type in the following way:
Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)`
Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)`
setValue is the value from new deltas that were set, and weight is the value from masks array.
:type operation: int
:param operation:
The operation to use.
"""
return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation)
def run(self, output):
@ -509,6 +898,8 @@ SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib
SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch
class SetLODsCommand(Command):
r""" SetLODsCommand is used to specify LODs to use. Joints, blend shapes, animated maps and meshes that are not in specified LODs are removed from the DNA."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_SetLODsCommand
@ -517,6 +908,12 @@ class SetLODsCommand(Command):
_py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args))
def setLODs(self, lods):
r"""
Method for setting the LODs to keep.
:type lods: dnac::ConstArrayView< std::uint16_t >
:param lods:
New LODs to be used.
"""
return _py3dnacalib.SetLODsCommand_setLODs(self, lods)
def run(self, output):
@ -526,6 +923,8 @@ class SetLODsCommand(Command):
_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand)
class SetNeutralJointRotationsCommand(Command):
r""" SetNeutralJointRotationsCommand is used to set new rotation values to neutral joints."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand
@ -534,6 +933,29 @@ class SetNeutralJointRotationsCommand(Command):
_py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args))
def setRotations(self, *args):
r"""
*Overload 1:*
Method for setting the neutral joint rotations.
:type rotations: dnac::ConstArrayView< dnac::Vector3 >
:param rotations:
Rotation values for each joint.
|
*Overload 2:*
Method for setting the neutral joint rotations.
:type xs: dnac::ConstArrayView< float >
:param xs:
The X rotation value for each joint.
:type ys: dnac::ConstArrayView< float >
:param ys:
The Y rotation value for each joint.
:type zs: dnac::ConstArrayView< float >
:param zs:
The Z rotation value for each joint.
"""
return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args)
def run(self, output):
@ -543,6 +965,8 @@ class SetNeutralJointRotationsCommand(Command):
_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand)
class SetNeutralJointTranslationsCommand(Command):
r""" SetNeutralJointTranslationsCommand is used to set new translation values to neutral joints."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand
@ -551,6 +975,29 @@ class SetNeutralJointTranslationsCommand(Command):
_py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args))
def setTranslations(self, *args):
r"""
*Overload 1:*
Method for setting the neutral joint translations.
:type translations: dnac::ConstArrayView< dnac::Vector3 >
:param translations:
Translation values for each joint.
|
*Overload 2:*
Method for setting the neutral joint translations.
:type xs: dnac::ConstArrayView< float >
:param xs:
The X translation value for each joint.
:type ys: dnac::ConstArrayView< float >
:param ys:
The Y translation value for each joint.
:type zs: dnac::ConstArrayView< float >
:param zs:
The Z translation value for each joint.
"""
return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args)
def run(self, output):
@ -560,6 +1007,8 @@ class SetNeutralJointTranslationsCommand(Command):
_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand)
class SetSkinWeightsCommand(Command):
r""" SetSkinWeightsCommand is used to set new skin weights for a vertex in a mesh."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand
@ -568,15 +1017,39 @@ class SetSkinWeightsCommand(Command):
_py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args))
def setMeshIndex(self, meshIndex):
r"""
Method for setting the index of the targeted mesh.
:type meshIndex: int
:param meshIndex:
The mesh index.
"""
return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex)
def setVertexIndex(self, vertexIndex):
r"""
Method for setting the index of the vertex to change.
:type vertexIndex: int
:param vertexIndex:
The vertex index.
"""
return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex)
def setWeights(self, weights):
r"""
Method for setting the weights with which joints influence the vertex in question.
:type weights: dnac::ConstArrayView< float >
:param weights:
Weights for each joint that has an influence on the vertex.
"""
return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights)
def setJointIndices(self, jointIndices):
r"""
Method for setting the joint indices of joints that influence the vertex in question.
:type jointIndices: dnac::ConstArrayView< std::uint16_t >
:param jointIndices:
Joint indices of joints that have an influence on the vertex.
"""
return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices)
def run(self, output):
@ -586,6 +1059,8 @@ class SetSkinWeightsCommand(Command):
_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand)
class SetVertexPositionsCommand(Command):
r""" SetVertexPositionsCommand is used to change vertex positions values."""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand
@ -594,15 +1069,67 @@ class SetVertexPositionsCommand(Command):
_py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args))
def setMeshIndex(self, meshIndex):
r"""
Method for setting the index of the mesh to change.
:type meshIndex: int
:param meshIndex:
The mesh index.
"""
return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex)
def setPositions(self, *args):
r"""
*Overload 1:*
Method for setting the vertex positions used to calculate new values.
:type positions: dnac::ConstArrayView< dnac::Vector3 >
:param positions:
The vertex positions.
|
*Overload 2:*
Method for setting the vertex positions used to calculate new values.
:type xs: dnac::ConstArrayView< float >
:param xs:
The X coordinates for each vertex.
:type ys: dnac::ConstArrayView< float >
:param ys:
The Y coordinates for each vertex.
:type zs: dnac::ConstArrayView< float >
:param zs:
The Z coordinates for each vertex.
"""
return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args)
def setMasks(self, masks):
r"""
Method for setting vertex masks used to calculate new vertex position values.
Notes:
If no masks are set, default weight value of 1 is used for each vertex.
:type masks: dnac::ConstArrayView< float >
:param masks:
The weights for each vertex.
"""
return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks)
def setOperation(self, operation):
r"""
Method for setting the type of operation used to calculate new vertex position values.
Notes:
Available operations are: Interpolate, Add, Subtract and Multiply. Each position is calculated based on the provided operation type in the following way:
Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)`
Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)`
setValue is the value from new positions that were set, and weight is the value from masks array.
:type operation: int
:param operation:
The operation to use.
"""
return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation)
def run(self, output):
@ -613,6 +1140,12 @@ _py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand)
SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch
class TranslateCommand(Command):
r"""
TranslateCommand is used to translate neutral joints and vertex positions.
Notes:
Joint translations are represented in parent space, so it is enough to translate only root joints, as that translation will be propagated to the rest of the joints.
"""
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
__repr__ = _swig_repr
__swig_destroy__ = _py3dnacalib.delete_TranslateCommand
@ -621,6 +1154,12 @@ class TranslateCommand(Command):
_py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args))
def setTranslation(self, translation):
r"""
Method for setting the translation vector.
:type translation: dnac::Vector3
:param translation:
The translation vector.
"""
return _py3dnacalib.TranslateCommand_setTranslation(self, translation)
def run(self, output):

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More