Scene kit command
node.addNode
Add Node
Adds a node of `kind` (see `node.describe`) to `group` at `location` with input `values`.
- Kit
- Scene 0.1.0 (.kscene)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
group | integer | string | no | The group's id or name; the only group when left out |
kind | "groupInput" | "groupOutput" | "group" | "repeatInput" | "repeatOutput" | "simulationInput" | "simulationOutput" | "meshCube" | "meshGrid" | "meshUvSphere" | "meshIcoSphere" | "meshCylinder" | "meshCone" | "meshLine" | "meshCircle" | "curveLine" | "curveCircle" | "curveBezierSegment" | "curveQuadrilateral" | "curveSpiral" | "curveStar" | "curveToMesh" | "curveToPoints" | "fillCurve" | "resampleCurve" | "trimCurve" | "reverseCurve" | "setCurveRadius" | "setCurveTilt" | "setSplineType" | "setNurbsOrder" | "setNurbsWeight" | "setSplineCyclic" | "setSplineResolution" | "splineParameter" | "curveLength" | "endpointSelection" | "transform" | "joinGeometry" | "setPosition" | "deleteGeometry" | "mergeByDistance" | "subdivideMesh" | "subdivisionSurface" | "extrudeMesh" | "meshToPoints" | "meshToCurve" | "distributePointsOnFaces" | "pointsToVertices" | "instanceOnPoints" | "realizeInstances" | "setMaterial" | "storeNamedAttribute" | "captureAttribute" | "position" | "normal" | "index" | "value" | "vector" | "objectInfo" | "separateXyz" | "combineXyz" | "math" | "vectorMath" | "randomValue" | "compare" | "switch" | "mapRange" | "sceneTime" | "namedAttribute" | "domainSize" | "attributeStatistic" | "accumulateField" | "meshBoolean" | "dualMesh" | "flipFaces" | "splitEdges" | "triangulate" | "scaleElements" | "meshIsland" | "edgeAngle" | "faceArea" | "edgeNeighbors" | "sampleIndex" | "sampleNearest" | "raycast" | "geometryProximity" | "translateInstances" | "rotateInstances" | "scaleInstances" | "instanceRotation" | "instanceScale" | "rotateEuler" | "rotateRotation" | "rotateVector" | "eulerToRotation" | "rotationToEuler" | "axisAngleToRotation" | "invertRotation" | "renderLayers" | "image" | "rgb" | "compositorOutput" | "viewer" | "alphaOver" | "brightContrast" | "colorBalance" | "exposure" | "hueSaturation" | "invert" | "mixColor" | "rgbCurves" | "blur" | "denoise" | "glare" | "defocus" | "vectorBlur" | "kuwahara" | "cryptomatte" | "chromaKey" | "colorKey" | "differenceKey" | "distanceKey" | "keying" | "luminanceKey" | "ellipseMask" | "lensDistortion" | "crop" | "flip" | "rotate" | "scale" | "imageTransform" | "translate" | "materialOutput" | "textureCoordinate" | "geometryInfo" | "fresnel" | "layerWeight" | "principledBsdf" | "diffuseBsdf" | "glossyBsdf" | "glassBsdf" | "transparentBsdf" | "emission" | "volumeAbsorption" | "volumeScatter" | "principledVolume" | "mixShader" | "addShader" | "imageTexture" | "noiseTexture" | "voronoiTexture" | "gradientTexture" | "checkerTexture" | "waveTexture" | "colorRamp" | "separateColor" | "combineColor" | "mapping" | "bump" | "normalMap" | yes | The node's kind (node.describe lists their sockets) |
location | number[] | no | [x, y] in the editor's units |
values | object | no | Socket and setting values by id, as node.setValue takes them |
Call through scene_run
text
scene_run {
"path": "<file>.kscene",
"steps": [{ "command": "node.addNode", "params": { "kind": <"groupInput" | "groupOutput" | "group" | "repeatInput" | "repeatOutput" | "simulationInput" | "simulationOutput" | "meshCube" | "meshGrid" | "meshUvSphere" | "meshIcoSphere" | "meshCylinder" | "meshCone" | "meshLine" | "meshCircle" | "curveLine" | "curveCircle" | "curveBezierSegment" | "curveQuadrilateral" | "curveSpiral" | "curveStar" | "curveToMesh" | "curveToPoints" | "fillCurve" | "resampleCurve" | "trimCurve" | "reverseCurve" | "setCurveRadius" | "setCurveTilt" | "setSplineType" | "setNurbsOrder" | "setNurbsWeight" | "setSplineCyclic" | "setSplineResolution" | "splineParameter" | "curveLength" | "endpointSelection" | "transform" | "joinGeometry" | "setPosition" | "deleteGeometry" | "mergeByDistance" | "subdivideMesh" | "subdivisionSurface" | "extrudeMesh" | "meshToPoints" | "meshToCurve" | "distributePointsOnFaces" | "pointsToVertices" | "instanceOnPoints" | "realizeInstances" | "setMaterial" | "storeNamedAttribute" | "captureAttribute" | "position" | "normal" | "index" | "value" | "vector" | "objectInfo" | "separateXyz" | "combineXyz" | "math" | "vectorMath" | "randomValue" | "compare" | "switch" | "mapRange" | "sceneTime" | "namedAttribute" | "domainSize" | "attributeStatistic" | "accumulateField" | "meshBoolean" | "dualMesh" | "flipFaces" | "splitEdges" | "triangulate" | "scaleElements" | "meshIsland" | "edgeAngle" | "faceArea" | "edgeNeighbors" | "sampleIndex" | "sampleNearest" | "raycast" | "geometryProximity" | "translateInstances" | "rotateInstances" | "scaleInstances" | "instanceRotation" | "instanceScale" | "rotateEuler" | "rotateRotation" | "rotateVector" | "eulerToRotation" | "rotationToEuler" | "axisAngleToRotation" | "invertRotation" | "renderLayers" | "image" | "rgb" | "compositorOutput" | "viewer" | "alphaOver" | "brightContrast" | "colorBalance" | "exposure" | "hueSaturation" | "invert" | "mixColor" | "rgbCurves" | "blur" | "denoise" | "glare" | "defocus" | "vectorBlur" | "kuwahara" | "cryptomatte" | "chromaKey" | "colorKey" | "differenceKey" | "distanceKey" | "keying" | "luminanceKey" | "ellipseMask" | "lensDistortion" | "crop" | "flip" | "rotate" | "scale" | "imageTransform" | "translate" | "materialOutput" | "textureCoordinate" | "geometryInfo" | "fresnel" | "layerWeight" | "principledBsdf" | "diffuseBsdf" | "glossyBsdf" | "glassBsdf" | "transparentBsdf" | "emission" | "volumeAbsorption" | "volumeScatter" | "principledVolume" | "mixShader" | "addShader" | "imageTexture" | "noiseTexture" | "voronoiTexture" | "gradientTexture" | "checkerTexture" | "waveTexture" | "colorRamp" | "separateColor" | "combineColor" | "mapping" | "bump" | "normalMap"> } }]
}The required parameters, with placeholders for their types: not a tested example. Optional: group, location, values. scene_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"group": {
"description": "The group's id or name; the only group when left out",
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-khp-name": "name",
"x-khp-types": [
"NodeGroup"
]
},
"kind": {
"description": "The node's kind (node.describe lists their sockets)",
"enum": [
"groupInput",
"groupOutput",
"group",
"repeatInput",
"repeatOutput",
"simulationInput",
"simulationOutput",
"meshCube",
"meshGrid",
"meshUvSphere",
"meshIcoSphere",
"meshCylinder",
"meshCone",
"meshLine",
"meshCircle",
"curveLine",
"curveCircle",
"curveBezierSegment",
"curveQuadrilateral",
"curveSpiral",
"curveStar",
"curveToMesh",
"curveToPoints",
"fillCurve",
"resampleCurve",
"trimCurve",
"reverseCurve",
"setCurveRadius",
"setCurveTilt",
"setSplineType",
"setNurbsOrder",
"setNurbsWeight",
"setSplineCyclic",
"setSplineResolution",
"splineParameter",
"curveLength",
"endpointSelection",
"transform",
"joinGeometry",
"setPosition",
"deleteGeometry",
"mergeByDistance",
"subdivideMesh",
"subdivisionSurface",
"extrudeMesh",
"meshToPoints",
"meshToCurve",
"distributePointsOnFaces",
"pointsToVertices",
"instanceOnPoints",
"realizeInstances",
"setMaterial",
"storeNamedAttribute",
"captureAttribute",
"position",
"normal",
"index",
"value",
"vector",
"objectInfo",
"separateXyz",
"combineXyz",
"math",
"vectorMath",
"randomValue",
"compare",
"switch",
"mapRange",
"sceneTime",
"namedAttribute",
"domainSize",
"attributeStatistic",
"accumulateField",
"meshBoolean",
"dualMesh",
"flipFaces",
"splitEdges",
"triangulate",
"scaleElements",
"meshIsland",
"edgeAngle",
"faceArea",
"edgeNeighbors",
"sampleIndex",
"sampleNearest",
"raycast",
"geometryProximity",
"translateInstances",
"rotateInstances",
"scaleInstances",
"instanceRotation",
"instanceScale",
"rotateEuler",
"rotateRotation",
"rotateVector",
"eulerToRotation",
"rotationToEuler",
"axisAngleToRotation",
"invertRotation",
"renderLayers",
"image",
"rgb",
"compositorOutput",
"viewer",
"alphaOver",
"brightContrast",
"colorBalance",
"exposure",
"hueSaturation",
"invert",
"mixColor",
"rgbCurves",
"blur",
"denoise",
"glare",
"defocus",
"vectorBlur",
"kuwahara",
"cryptomatte",
"chromaKey",
"colorKey",
"differenceKey",
"distanceKey",
"keying",
"luminanceKey",
"ellipseMask",
"lensDistortion",
"crop",
"flip",
"rotate",
"scale",
"imageTransform",
"translate",
"materialOutput",
"textureCoordinate",
"geometryInfo",
"fresnel",
"layerWeight",
"principledBsdf",
"diffuseBsdf",
"glossyBsdf",
"glassBsdf",
"transparentBsdf",
"emission",
"volumeAbsorption",
"volumeScatter",
"principledVolume",
"mixShader",
"addShader",
"imageTexture",
"noiseTexture",
"voronoiTexture",
"gradientTexture",
"checkerTexture",
"waveTexture",
"colorRamp",
"separateColor",
"combineColor",
"mapping",
"bump",
"normalMap"
],
"type": "string"
},
"location": {
"description": "[x, y] in the editor's units",
"items": {
"type": "number"
},
"type": "array"
},
"values": {
"additionalProperties": true,
"description": "Socket and setting values by id, as node.setValue takes them",
"type": "object"
}
},
"required": [
"kind"
],
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (scene_commands through @kition/[email protected], built from KitionAI/kition-scene@4d06faf). As data: commands.jsonl.