元編程參考文件

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
所屬包
電腦圖形