Created
April 6, 2019 16:53
-
-
Save cecilemuller/a748b0f69218fdb6fbc49b238a9036ea to your computer and use it in GitHub Desktop.
Photoshop Scripting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-env photoshop */ | |
/** | |
* New 3D Layer from File. | |
* @param {String} modelFilepath Absolute path to the 3D file | |
* | |
* Examples: | |
* `addLayer3D('C:\\example\\scene.wrl');` | |
* `addLayer3D('C:\\example\\scene.dae');` | |
* `addLayer3D('C:\\example\\scene.obj');` | |
* `addLayer3D('C:\\example\\scene.stl');` | |
*/ | |
function addLayer3D(modelFilepath){ | |
var list1 = new ActionList(); | |
var desc1 = new ActionDescriptor(); | |
list1.putPath(new File(modelFilepath)); | |
desc1.putList(stringIDToTypeID('fileList'), list1); | |
executeAction(stringIDToTypeID('add3DLayerFromFile'), desc1, DialogModes.NO); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment