元编程参考文档

Staging

49 个节点

本页内容 49

Add To Scene

函数

The scene with more elements in it.

签名
AddToScene -> Scene Description
    scene: Scene Description
    elements: Scene Element 数组
SceneDescription AddToScene(
    SceneDescription scene,
    SceneElement[] elements)

参数

名称类型默认值说明
sceneScene Description—
elementsScene Element 数组—

返回

结果Scene Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Animate

函数

The element moving through keys: at each key's moment it is where the key says, and between them it is eased from one to the next.

签名
Animate -> Scene Element
    element: Scene Element
    keys: Motion Key 数组
    easing: Motion Easing
    loop: 真否
SceneElement Animate(
    SceneElement element,
    MotionKey[] keys,
    MotionEasing easing = MotionEasing.Smooth,
    bool loop = false)

参数

名称类型默认值说明
elementScene Element—What moves.
keysMotion Key 数组—The keys, in any order; they are put in time order.
easingMotion EasingSmoothHow it goes from key to key: smoothly, at a steady pace, or in steps.
loop真否FalseWhether it starts again from the first key after the last.

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Animate Setting

函数

A setting of a light or a camera changing through keys over the run: a light fading up or flickering, a zoom, a focus pull. Replaces any track the element had for that setting.

签名
AnimateSetting -> Scene Element
    element: Scene Element
    setting: Animated Setting
    keys: Setting Key 数组
    easing: Motion Easing
    loop: 真否
SceneElement AnimateSetting(
    SceneElement element,
    AnimatedSetting setting,
    SettingKey[] keys,
    MotionEasing easing = MotionEasing.Smooth,
    bool loop = false)

参数

名称类型默认值说明
elementScene Element—A light, for Intensity and Exposure; a camera, for Focal Length, Focus Distance and F Stop.
settingAnimated Setting—Which setting changes.
keysSetting Key 数组—The keys, in any order; they are put in time order.
easingMotion EasingSmoothHow it goes from key to key.
loop真否FalseWhether it starts again from the first key after the last.

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Area Light

函数

A glowing rectangle at a point, facing another: a softbox, a window.

签名
AreaLight -> Light Element
    x: 数字
    y: 数字
    z: 数字
    targetX: 数字
    targetY: 数字
    targetZ: 数字
    width: 数字
    height: 数字
    intensity: 数字
    color: 可选颜色
LightElement AreaLight(
    double x,
    double y,
    double z,
    double targetX = 0,
    double targetY = 0,
    double targetZ = 0,
    double width = 1,
    double height = 1,
    double intensity = 5,
    ColorElement? color)

参数

名称类型默认值说明
x数字—
y数字—
z数字—
targetX数字0
targetY数字0
targetZ数字0
width数字1
height数字1
intensity数字5
color可选颜色—

返回

结果Light Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Box

函数

A box, centred on its origin.

签名
Box -> Shape Element
    width: 数字
    depth: 数字
    height: 数字
    name: 文本
ShapeElement Box(
    double width = 1,
    double depth = 1,
    double height = 1,
    string name = "")

参数

名称类型默认值说明
width数字1
depth数字1
height数字1
name文本—

返回

结果Shape Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Camera

函数

A camera at a point, looking at another, in focus there.

签名
Camera -> Camera Element
    x: 数字
    y: 数字
    z: 数字
    targetX: 数字
    targetY: 数字
    targetZ: 数字
    focalLength: 数字
    fStop: 数字
    name: 文本
CameraElement Camera(
    double x,
    double y,
    double z,
    double targetX = 0,
    double targetY = 0,
    double targetZ = 0,
    double focalLength = 35,
    double fStop = 0,
    string name = "Camera")

参数

名称类型默认值说明
x数字—Where it stands.
y数字—Where it stands.
z数字—Where it stands: 1.6 is eye height.
targetX数字0What it looks at.
targetY数字0What it looks at.
targetZ数字0What it looks at.
focalLength数字35The lens in millimetres on a full-frame sensor: 24 is wide, 35 normal, 85 a portrait lens.
fStop数字0The aperture for depth of field, or 0 for everything sharp.
name文本CameraIts name, which a scene picks it by.

返回

结果Camera Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Cone

函数

A cone standing along Z, point up, centred on its origin.

签名
Cone(diameter: 数字, height: 数字, name: 文本) -> Shape Element
ShapeElement Cone(
    double diameter = 1,
    double height = 1,
    string name = "")

参数

名称类型默认值说明
diameter数字1
height数字1
name文本—

返回

结果Shape Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Cylinder

函数

A cylinder standing along Z, centred on its origin.

签名
Cylinder -> Shape Element
    diameter: 数字
    height: 数字
    name: 文本
ShapeElement Cylinder(
    double diameter = 1,
    double height = 1,
    string name = "")

参数

名称类型默认值说明
diameter数字1
height数字1
name文本—

返回

结果Shape Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Export Usd

函数

Saves a scene as USD: .usda or .usdc referencing its assets where they are, or .usdz with everything packed in.

签名
ExportUsd(scene: Scene Description, path: 文本) -> 文本
string ExportUsd(SceneDescription scene, string path)

参数

名称类型默认值说明
sceneScene Description—
path文本—

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Group

函数

Elements gathered into one, which moves, turns and is painted as one.

签名
Group(elements: Scene Element 数组, name: 文本) -> Group Element
GroupElement Group(SceneElement[] elements, string name = "")

参数

名称类型默认值说明
elementsScene Element 数组—
name文本—

返回

结果Group Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Hdri

函数

An HDRI around the scene, lighting it and seen behind it: a file, a URL or polyhaven:<id>.

签名
Hdri -> Environment Description
    source: 文本
    intensity: 数字
    rotation: 数字
    visible: 真否
EnvironmentDescription Hdri(
    string source,
    double intensity = 1,
    double rotation = 0,
    bool visible = true)

参数

名称类型默认值说明
source文本—The image, latitude-longitude.
intensity数字1How bright.
rotation数字0How far it is turned about Z, in degrees, to bring the sun round.
visible真否TrueWhether the camera sees it, or it only lights the scene.

返回

结果Environment Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Key

函数

One moment of a motion: where the element is then, how it is turned and how big, relative to where it was placed.

签名
Key -> Motion Key
    seconds: 数字
    x: 数字
    y: 数字
    z: 数字
    turnX: 数字
    turnY: 数字
    turnZ: 数字
    size: 数字
MotionKey Key(
    double seconds = 0,
    double x = 0,
    double y = 0,
    double z = 0,
    double turnX = 0,
    double turnY = 0,
    double turnZ = 0,
    double size = 1)

参数

名称类型默认值说明
seconds数字0When, in seconds from the start.
x数字0How far it has moved along X, in metres.
y数字0Along Y.
z数字0Along Z.
turnX数字0How far it is turned about X, in degrees.
turnY数字0About Y.
turnZ数字0About Z, its heading: from 0 to 360 is a whole turn.
size数字1How big it is: 1 as made.

返回

结果Motion Key
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Look Through

函数

The scene seen through another camera, by name.

签名
LookThrough -> Scene Description
    scene: Scene Description
    camera: 文本
SceneDescription LookThrough(
    SceneDescription scene,
    string camera)

参数

名称类型默认值说明
sceneScene Description—
camera文本—

返回

结果Scene Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Material

函数

A material of one colour.

签名
Material -> Material Description
    color: 颜色
    roughness: 数字
    metallic: 数字
    opacity: 数字
    glow: 数字
    name: 文本
MaterialDescription Material(
    ColorElement color,
    double roughness = 0.5,
    double metallic = 0,
    double opacity = 1,
    double glow = 0,
    string name = "")

参数

名称类型默认值说明
color颜色—Its colour, as picked: sRGB.
roughness数字0.50 for a mirror, 1 for chalk.
metallic数字00 for paint and plastic, 1 for metal.
opacity数字11 for solid, 0 for invisible.
glow数字0How brightly it gives off its own colour, 0 for not at all.
name文本—Its name.

返回

结果Material Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Mesh

函数

A polygon mesh from its points and faces: each face is Face Sizes corners long, read in turn from Face Corners.

签名
Mesh -> Mesh Element
    points: 数字数组
    faceSizes: 整数数组
    faceCorners: 整数数组
    name: 文本
MeshElement Mesh(
    double[] points,
    int[] faceSizes,
    int[] faceCorners,
    string name = "")

参数

名称类型默认值说明
points数字数组—The points, three numbers each: x, y, z.
faceSizes整数数组—How many corners each face has.
faceCorners整数数组—Each face's corners as point numbers, from zero, face after face.
name文本—Its name.

返回

结果Mesh Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Model

函数

A model from a file, a URL, a Poly Haven id or a library id: USD, glTF, GLB or OBJ.

签名
Model -> Model Element
    source: 文本
    name: 文本
    unitScale: 数字
ModelElement Model(
    string source,
    string name = "",
    double unitScale = 1)

参数

名称类型默认值说明
source文本—Where it is: chair.glb, https://…/chair.usdz, polyhaven:Barrel_01.
name文本—Its name in the scene; empty to name it after its file.
unitScale数字1A scale to bring it to metres: 0.01 for a model in centimetres.

返回

结果Model Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Motion Blur

函数

The scene with motion blur: the camera's shutter stays open for part of each frame, and what moves while it is open is smeared along its path, as in a film. Costs render time only where something moves.

签名
MotionBlur -> Scene Description
    scene: Scene Description
    shutter: 数字
SceneDescription MotionBlur(
    SceneDescription scene,
    double shutter = 0.5)

参数

名称类型默认值说明
sceneScene Description—The scene.
shutter数字0.5How long the shutter is open, as a fraction of a frame: 0.5, a film camera's usual, blurs half a frame's movement; 0 turns motion blur off.

返回

结果Scene Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Move

函数

The element moved by the given distances, in its group's frame.

签名
Move -> Scene Element
    element: Scene Element
    x: 数字
    y: 数字
    z: 数字
SceneElement Move(
    SceneElement element,
    double x = 0,
    double y = 0,
    double z = 0)

参数

名称类型默认值说明
elementScene Element—
x数字0
y数字0
z数字0

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

No Environment

函数

Nothing around the scene: black, and only its own lights light it.

签名
NoEnvironment() -> Environment Description
EnvironmentDescription NoEnvironment()

返回

结果Environment Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Orbit

函数

The element carried round a point in a circle about the vertical, keeping its own heading towards the centre: a camera circling what it looks at, a moon round a planet.

签名
Orbit -> Scene Element
    element: Scene Element
    centerX: 数字
    centerY: 数字
    centerZ: 数字
    secondsPerTurn: 数字
    clockwise: 真否
SceneElement Orbit(
    SceneElement element,
    double centerX = 0,
    double centerY = 0,
    double centerZ = 0,
    double secondsPerTurn = 8,
    bool clockwise = false)

参数

名称类型默认值说明
elementScene Element—What goes round; a camera that looks at the centre keeps looking at it all the way round.
centerX数字0The centre's X.
centerY数字0The centre's Y.
centerZ数字0The centre's Z.
secondsPerTurn数字8Seconds a whole circle takes.
clockwise真否FalseWhether it goes clockwise seen from above.

返回

结果Scene Element

备注

The element is put in a group whose origin is the centre and the group is spun, so it keeps its own name and a camera is still looked through by it.

所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Paint

函数

The element with a material over whatever it and everything in it had.

签名
Paint -> Scene Element
    element: Scene Element
    material: Material Description
SceneElement Paint(
    SceneElement element,
    MaterialDescription material)

参数

名称类型默认值说明
elementScene Element—
materialMaterial Description—

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Place

函数

The element put at a place, facing a heading (degrees about Z) at a size, whatever its transform was.

签名
Place -> Scene Element
    element: Scene Element
    x: 数字
    y: 数字
    z: 数字
    heading: 数字
    size: 数字
SceneElement Place(
    SceneElement element,
    double x = 0,
    double y = 0,
    double z = 0,
    double heading = 0,
    double size = 1)

参数

名称类型默认值说明
elementScene Element—
x数字0
y数字0
z数字0
heading数字0
size数字1

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Plane

函数

A flat rectangle facing up, in the plane of its origin: a floor, a table top, a backdrop.

签名
Plane(width: 数字, depth: 数字, name: 文本) -> Shape Element
ShapeElement Plane(
    double width = 10,
    double depth = 10,
    string name = "")

参数

名称类型默认值说明
width数字10
depth数字10
name文本—

返回

结果Shape Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Point Light

函数

A small light at a point, shining every way.

签名
PointLight -> Light Element
    x: 数字
    y: 数字
    z: 数字
    intensity: 数字
    color: 可选颜色
    radius: 数字
LightElement PointLight(
    double x,
    double y,
    double z,
    double intensity = 20,
    ColorElement? color,
    double radius = 0.1)

参数

名称类型默认值说明
x数字—
y数字—
z数字—
intensity数字20
color可选颜色—
radius数字0.1

返回

结果Light Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Poly Haven Material

函数

A Poly Haven texture set as a material, by its id: brick_wall_001, wood_floor_deck.

签名
PolyHavenMaterial -> Material Description
    ID: 文本
    resolution: 文本
    tiling: 数字
MaterialDescription PolyHavenMaterial(
    string id,
    string resolution = "1k",
    double tiling = 1)

参数

名称类型默认值说明
ID文本—The texture set's id on polyhaven.com.
resolution文本1k1k, 2k, 4k or 8k.
tiling数字1How many times it repeats across the surface.

返回

结果Material Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Rename

函数

The element under another name.

签名
Rename(element: Scene Element, name: 文本) -> Scene Element
SceneElement Rename(SceneElement element, string name)

参数

名称类型默认值说明
elementScene Element—
name文本—

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Render

函数

Renders a scene with Cycles.

签名
Render -> Pixel Image
    scene: Scene Description
    width: 整数
    height: 整数
    samples: 整数
    exposure: 数字
    timeLimit: 数字
    transparent: 真否
PixelImage Render(
    SceneDescription scene,
    int width = 1280,
    int height = 720,
    int samples = 64,
    double exposure = 0,
    double timeLimit = 0,
    bool transparent = false)

参数

名称类型默认值说明
sceneScene Description—The scene.
width整数1280Width in pixels.
height整数720Height in pixels.
samples整数64Samples per pixel: 16 for a look, 128 for a still, 512 for a clean one.
exposure数字0Brightness in stops.
timeLimit数字0Seconds the render may take, or 0 for as long as the samples need.
transparent真否FalseWhether the background is left transparent.

返回

结果Pixel Image
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Render Animation

函数

Renders a scene's run and saves it as a looping animated GIF, to play in a browser, a chat or a slide.

签名
RenderAnimation -> 文本
    scene: Scene Description
    path: 文本
    width: 整数
    height: 整数
    samples: 整数
    exposure: 数字
string RenderAnimation(
    SceneDescription scene,
    string path,
    int width = 480,
    int height = 270,
    int samples = 16,
    double exposure = 0)

参数

名称类型默认值说明
sceneScene Description—The scene.
path文本—Where to save it; .gif is added when it has no extension.
width整数480Width in pixels.
height整数270Height in pixels.
samples整数16Samples per pixel.
exposure数字0Brightness in stops.

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Render Frame

函数

Renders a scene at a moment of its run.

签名
RenderFrame -> Pixel Image
    scene: Scene Description
    seconds: 数字
    width: 整数
    height: 整数
    samples: 整数
    exposure: 数字
PixelImage RenderFrame(
    SceneDescription scene,
    double seconds = 0,
    int width = 1280,
    int height = 720,
    int samples = 64,
    double exposure = 0)

参数

名称类型默认值说明
sceneScene Description—The scene.
seconds数字0The moment, in seconds from the start.
width整数1280Width in pixels.
height整数720Height in pixels.
samples整数64Samples per pixel.
exposure数字0Brightness in stops.

返回

结果Pixel Image
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Render Frames

函数

Renders every frame of a scene's run, from the first to the one before it would begin again.

签名
RenderFrames -> Pixel Image 数组
    scene: Scene Description
    width: 整数
    height: 整数
    samples: 整数
    exposure: 数字
PixelImage[] RenderFrames(
    SceneDescription scene,
    int width = 640,
    int height = 360,
    int samples = 16,
    double exposure = 0)

参数

名称类型默认值说明
sceneScene Description—The scene.
width整数640Width in pixels.
height整数360Height in pixels.
samples整数16Samples per pixel: few, since a moving picture hides grain that a still shows.
exposure数字0Brightness in stops.

返回

结果Pixel Image 数组
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Render Usd

函数

Renders a USD file as it is, through its own camera or framed whole.

签名
RenderUsd -> Pixel Image
    source: 文本
    camera: 文本
    width: 整数
    height: 整数
    samples: 整数
PixelImage RenderUsd(
    string source,
    string camera = "",
    int width = 1280,
    int height = 720,
    int samples = 64)

参数

名称类型默认值说明
source文本—The file, a URL or an id: anything Staging.Model takes.
camera文本—A camera prim path, or empty to frame the whole stage.
width整数1280Width in pixels.
height整数720Height in pixels.
samples整数64Samples per pixel.

返回

结果Pixel Image
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Render Video

函数

Renders a scene's run and saves it as an MP4 video, H.264 in managed code, to play in any player or upload anywhere: smaller and smoother than a GIF, which has only 256 colours a frame.

签名
RenderVideo -> 文本
    scene: Scene Description
    path: 文本
    width: 整数
    height: 整数
    samples: 整数
    exposure: 数字
    quality: 数字
string RenderVideo(
    SceneDescription scene,
    string path,
    int width = 640,
    int height = 360,
    int samples = 16,
    double exposure = 0,
    double quality = 0.7)

参数

名称类型默认值说明
sceneScene Description—The scene.
path文本—Where to save it; .mp4 is added when it has no extension.
width整数640Width in pixels; rounded up to an even number, as the video's colour format needs.
height整数360Height in pixels; rounded up to an even number.
samples整数16Samples per pixel.
exposure数字0Brightness in stops.
quality数字0.7From 0 to 1: higher is sharper and a bigger file.

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Rotate

函数

The element turned about its own origin by degrees about X, then Y, then Z.

签名
Rotate -> Scene Element
    element: Scene Element
    x: 数字
    y: 数字
    z: 数字
SceneElement Rotate(
    SceneElement element,
    double x = 0,
    double y = 0,
    double z = 0)

参数

名称类型默认值说明
elementScene Element—
x数字0
y数字0
z数字0

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Scale

函数

The element scaled about its own origin; a factor of 1 leaves an axis as it is.

签名
Scale -> Scene Element
    element: Scene Element
    factor: 数字
    x: 数字
    y: 数字
    z: 数字
SceneElement Scale(
    SceneElement element,
    double factor = 1,
    double x = 1,
    double y = 1,
    double z = 1)

参数

名称类型默认值说明
elementScene Element—
factor数字1
x数字1
y数字1
z数字1

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Scatter On Grid

函数

An element repeated on a grid, each copy nudged, turned and sized at random within the limits given: a crowd, a forest, a car park.

签名
ScatterOnGrid -> Scatter Element
    element: Scene Element
    columns: 整数
    rows: 整数
    spacing: 数字
    jitter: 数字
    randomTurn: 真否
    sizeVariation: 数字
    seed: 整数
    name: 文本
ScatterElement ScatterOnGrid(
    SceneElement element,
    int columns = 5,
    int rows = 5,
    double spacing = 2,
    double jitter = 0.3,
    bool randomTurn = true,
    double sizeVariation = 0.2,
    int seed = 1,
    string name = "")

参数

名称类型默认值说明
elementScene Element—What is repeated.
columns整数5How many along X.
rows整数5How many along Y.
spacing数字2Metres between neighbours.
jitter数字0.3How far a copy may stray from its grid point, as a share of the spacing.
randomTurn真否TrueWhether each copy is turned about Z at random.
sizeVariation数字0.2How much a copy's size may differ, as a share: 0.2 is 80% to 120%.
seed整数1The random seed: the same seed lays the same field.
name文本—Its name.

返回

结果Scatter Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Scene

函数

A scene of the given elements, in an environment, seen through a named camera.

签名
Scene -> Scene Description
    elements: Scene Element 数组
    environment: Environment Description
    camera: 文本
    name: 文本
SceneDescription Scene(
    SceneElement[] elements,
    EnvironmentDescription environment,
    string camera = "",
    string name = "Scene")

参数

名称类型默认值说明
elementsScene Element 数组—What is in it, lights and cameras included.
environmentEnvironment Description—What surrounds it; a soft grey studio when not given.
camera文本—The camera to render through, by name; the first one when empty.
name文本SceneIts name.

返回

结果Scene Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Setting Key

函数

A setting's value at a moment, for Animate Setting.

签名
SettingKey(seconds: 数字, value: 数字) -> Setting Key
SettingKey SettingKey(double seconds = 0, double value = 1)

参数

名称类型默认值说明
seconds数字0When, in seconds from the start.
value数字1The value then: a light's intensity or exposure in stops, a camera's focal length in millimetres, its focus distance in metres, or its f-number.

返回

结果Setting Key
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Show

函数

The element shown or hidden.

签名
Show(element: Scene Element, visible: 真否) -> Scene Element
SceneElement Show(SceneElement element, bool visible = true)

参数

名称类型默认值说明
elementScene Element—
visible真否True

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Sky Color

函数

A plain colour around the scene, lighting it evenly.

签名
SkyColor -> Environment Description
    color: 颜色
    intensity: 数字
    visible: 真否
EnvironmentDescription SkyColor(
    ColorElement color,
    double intensity = 0.3,
    bool visible = true)

参数

名称类型默认值说明
color颜色—
intensity数字0.3
visible真否True

返回

结果Environment Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Sphere

函数

A sphere, centred on its origin.

签名
Sphere(diameter: 数字, name: 文本) -> Shape Element
ShapeElement Sphere(double diameter = 1, string name = "")

参数

名称类型默认值说明
diameter数字1
name文本—

返回

结果Shape Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Spin

函数

The element turning steadily about its own vertical axis, where it stands: a turntable, a windmill's head, a lighthouse lamp.

签名
Spin -> Scene Element
    element: Scene Element
    secondsPerTurn: 数字
    clockwise: 真否
    startAngle: 数字
SceneElement Spin(
    SceneElement element,
    double secondsPerTurn = 4,
    bool clockwise = false,
    double startAngle = 0)

参数

名称类型默认值说明
elementScene Element—What turns.
secondsPerTurn数字4Seconds a whole turn takes.
clockwise真否FalseWhether it turns clockwise seen from above, rather than anticlockwise.
startAngle数字0Where the turn starts, in degrees.

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Spin About

函数

The element turning steadily about an axis of your choosing through its own origin: a wheel about X, a door about its hinge.

签名
SpinAbout -> Scene Element
    element: Scene Element
    axisX: 数字
    axisY: 数字
    axisZ: 数字
    secondsPerTurn: 数字
SceneElement SpinAbout(
    SceneElement element,
    double axisX = 1,
    double axisY = 0,
    double axisZ = 0,
    double secondsPerTurn = 4)

参数

名称类型默认值说明
elementScene Element—What turns.
axisX数字1The axis's X, in the element's own frame.
axisY数字0The axis's Y.
axisZ数字0The axis's Z.
secondsPerTurn数字4Seconds a whole turn takes; negative to turn the other way.

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Spot Light

函数

A spot light at a point, aimed at another.

签名
SpotLight -> Light Element
    x: 数字
    y: 数字
    z: 数字
    targetX: 数字
    targetY: 数字
    targetZ: 数字
    coneAngle: 数字
    intensity: 数字
    color: 可选颜色
LightElement SpotLight(
    double x,
    double y,
    double z,
    double targetX = 0,
    double targetY = 0,
    double targetZ = 0,
    double coneAngle = 30,
    double intensity = 100,
    ColorElement? color)

参数

名称类型默认值说明
x数字—
y数字—
z数字—
targetX数字0
targetY数字0
targetZ数字0
coneAngle数字30
intensity数字100
color可选颜色—

返回

结果Light Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Stop Motion

函数

The element standing still: every motion it had taken away.

签名
StopMotion(element: Scene Element) -> Scene Element
SceneElement StopMotion(SceneElement element)

参数

名称类型默认值说明
elementScene Element—

返回

结果Scene Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Sun

函数

The sun: light from far away, from a direction given as elevation above the horizon and azimuth from +X towards +Y.

签名
Sun -> Light Element
    elevation: 数字
    azimuth: 数字
    intensity: 数字
    color: 可选颜色
    softness: 数字
LightElement Sun(
    double elevation = 45,
    double azimuth = 135,
    double intensity = 1,
    ColorElement? color,
    double softness = 0.53)

参数

名称类型默认值说明
elevation数字45Degrees above the horizon.
azimuth数字135Degrees around from +X towards +Y.
intensity数字1How bright: 1 reads as a clear day beside an HDRI of intensity 1. Cycles takes a distant light's UsdLux intensity four times over as irradiance, as its upstream Hydra delegate does, so 1 is Blender's sun strength 4.
color可选颜色—Its colour, sRGB; white when not given.
softness数字0.53Its apparent size in degrees, which softens its shadows: the real sun is 0.53.

返回

结果Light Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Textured Material

函数

A material read from image files: a colour map, and optionally roughness, normal and metallic maps.

签名
TexturedMaterial -> Material Description
    colorMap: 文本
    roughnessMap: 文本
    normalMap: 文本
    metallicMap: 文本
    tiling: 数字
    name: 文本
MaterialDescription TexturedMaterial(
    string colorMap,
    string roughnessMap = "",
    string normalMap = "",
    string metallicMap = "",
    double tiling = 1,
    string name = "")

参数

名称类型默认值说明
colorMap文本—The base colour image.
roughnessMap文本—A roughness image, or empty.
normalMap文本—A tangent-space normal map in the OpenGL convention, or empty.
metallicMap文本—A metallic image, or empty.
tiling数字1How many times the images repeat across the surface.
name文本—Its name.

返回

结果Material Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Timeline

函数

The scene's run: how many seconds it lasts and how many frames a second it is drawn and saved at.

签名
Timeline -> Scene Description
    scene: Scene Description
    seconds: 数字
    framesPerSecond: 数字
SceneDescription Timeline(
    SceneDescription scene,
    double seconds = 0,
    double framesPerSecond = 24)

参数

名称类型默认值说明
sceneScene Description—The scene.
seconds数字0How long it runs; 0 to play its longest motion through once.
framesPerSecond数字24Frames a second.

返回

结果Scene Description
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

Torus

函数

A ring lying flat around Z.

签名
Torus -> Shape Element
    diameter: 数字
    thickness: 数字
    name: 文本
ShapeElement Torus(
    double diameter = 1,
    double thickness = 0.25,
    string name = "")

参数

名称类型默认值说明
diameter数字1
thickness数字0.25
name文本—

返回

结果Shape Element
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形

To Usda

函数

The scene as .usda text, to read or to diff.

签名
ToUsda(scene: Scene Description) -> 文本
string ToUsda(SceneDescription scene)

参数

名称类型默认值说明
sceneScene Description—

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
Staging
所属包
计算机图形