Skip to main content

Environment

EnvironmentSet EnvironmentGet Environments Envir...

Updated over 2 months ago

EnvironmentSet

Set the current environment of the avatar.

Python C++ C# VS Server

Python

BwApi.EnvironmentSet(name)

C++

BwApiEnvironmentSet(name);

C#

BwApi.EnvironmentSet(name);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentSet",
	"params": {
		"name": "value"
	}
}    

Parameters

Param

Variable

Description

In

name

Name of the environment

Error/success code (see BwApiErrorCodes enum).

If the name doesn't exist nothing will happen.

EnvironmentGet

Get the current environment of the avatar.

Python C++ C# VS Server

Python

BwApi.EnvironmentGet()

C++

BwApiEnvironmentGet();

C#

BwApi.EnvironmentGet();

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentGet",
	"params": {}
}    

Parameters

Param

Variable

Description

Out

name

Name of the current environment

Error/success code (see BwApiErrorCodes enum).

Environments

Get all the environments in the system.

Python C++ C# VS Server

Python

BwApi.Environments()

C++

BwApiEnvironments();

C#

BwApi.Environments();

VS Server

{
	"id": "API processing order number",
	"function": "Environments",
	"params": {}
}    

Parameters

Param

Variable

Description

Out

environments

List of environments

Error/success code (see BwApiErrorCodes enum).

EnvironmentLightCurrentSet

Set the light of the avatar.

Python C++ C# VS Server

Python

BwApi.EnvironmentLightCurrentSet(name)

C++

BwApiEnvironmentLightCurrentSet(name);

C#

BwApi.EnvironmentLightCurrentSet(name);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentLightCurrentSet",
	"params": {
		"name": "value"
	}
}    

Parameters

Param

Variable

Description

In

name

Name of the light

Error/success code (see BwApiErrorCodes enum).

If the name doesn't exist nothing will happen.

EnvironmentLightCurrentGet

Get the light of the avatar.

Python C++ C# VS Server

Python

BwApi.EnvironmentLightCurrentGet()

C++

BwApiEnvironmentLightCurrentGet();

C#

BwApi.EnvironmentLightCurrentGet();

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentLightCurrentGet",
	"params": {}
}    

Parameters

Param

Variable

Description

Out

name

Name of the current light

Error/success code (see BwApiErrorCodes enum).

EnvironmentLights

Get all the lights in the system.

Python C++ C# VS Server

Python

BwApi.EnvironmentLights()

C++

BwApiEnvironmentLights();

C#

BwApi.EnvironmentLights();

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentLights",
	"params": {}
}    

Parameters

Param

Variable

Description

Out

lights

List of lights

Error/success code (see BwApiErrorCodes enum).

EnvironmentLightInfoSet

Set the light info.

Python C++ C# VS Server

Python

BwApi.EnvironmentLightInfoSet(name, jsonLightInfo)

C++

BwApiEnvironmentLightInfoSet(name, jsonLightInfo);

C#

BwApi.EnvironmentLightInfoSet(name, jsonLightInfo);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentLightInfoSet",
	"params": {
		"name": "value",
		"jsonLightInfo": "value"
	}
}    

Parameters

Param

Variable

Description

In

name

Name of the light

In

jsonLightInfo

JSON object as a string that represents a light info object (see Schema/light.json schema)

Error/success code (see BwApiErrorCodes enum).

If the name doesn't exist nothing will happen.

EnvironmentLightInfoGet

Get the light info

Python C++ C# VS Server

Python

BwApi.EnvironmentLightInfoGet(name, jsonLightInfo)

C++

BwApiEnvironmentLightInfoGet(name, jsonLightInfo);

C#

BwApi.EnvironmentLightInfoGet(name, jsonLightInfo);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentLightInfoGet",
	"params": {
		"name": "value",
		"jsonLightInfo": "value"
	}
}    

Parameters

Param

Variable

Description

In

name

Name of the light

In

jsonLightInfo

JSON object as a string that represents a light info object (see Schema/light.json schema)

Error/success code (see BwApiErrorCodes enum).

If the name doesn't exist nothing will happen.

EnvironmentLightSetDefault

Set current HDRI Light as Default HDRI Light.

Python C++ C#

Python

BwApi.EnvironmentLightSetDefault()

C++

BwApiEnvironmentLightSetDefault();

C#

BwApi.EnvironmentLightSetDefault();

Error/success code (see BwApiErrorCodes enum).

EnvironmentLightLoadDefault

Load Default HDRI Light.

Python C++ C#

Python

BwApi.EnvironmentLightLoadDefault()

C++

BwApiEnvironmentLightLoadDefault();

C#

BwApi.EnvironmentLightLoadDefault();

Error/success code (see BwApiErrorCodes enum).

EnvironmentLightImport

Import HDRI Light from file.

Python C++ C#

Python

BwApi.EnvironmentLightImport(fileName)

C++

BwApiEnvironmentLightImport(fileName);

C#

BwApi.EnvironmentLightImport(fileName);

Parameters

Param

Variable

Description

In

fileName

Filename of the light to import

Error/success code (see BwApiErrorCodes enum).

EnvironmentLightDelete

Delete imported HDRI Light.

Python C++ C#

Python

BwApi.EnvironmentLightDelete(name)

C++

BwApiEnvironmentLightDelete(name);

C#

BwApi.EnvironmentLightDelete(name);

Parameters

Param

Variable

Description

In

name

Name of the light

Error/success code (see BwApiErrorCodes enum).

EnvironmentCameraGet

Get the current camera of the environment.

Python C++ C# VS Server

Python

BwApi.EnvironmentCameraGet()

C++

BwApiEnvironmentCameraGet();

C#

BwApi.EnvironmentCameraGet();

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentCameraGet",
	"params": {}
}    

Parameters

Param

Variable

Description

Out

cameraJson

Camera JSON object as a string containing all the camera information (see Schema/camera.json schema)

Error/success code (see BwApiErrorCodes enum).

EnvironmentCameraSet

Set the current camera of the environment.

Python C++ C# VS Server

Python

BwApi.EnvironmentCameraSet(cameraJson)

C++

BwApiEnvironmentCameraSet(cameraJson);

C#

BwApi.EnvironmentCameraSet(cameraJson);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentCameraSet",
	"params": {
		"cameraJson": "value"
	}
}    

Parameters

Param

Variable

Description

In

cameraJson

Camera JSON object as a string containing all the camera information (see Schema/camera.json schema)

Error/success code (see BwApiErrorCodes enum).

EnvironmentTurntableCameraPositionsGet

Get all the the turntable position from a given number of angles and a camera.

Python C++ C# VS Server

Python

BwApi.EnvironmentTurntableCameraPositionsGet(cameraJson, angles)

C++

BwApiEnvironmentTurntableCameraPositionsGet(cameraJson, angles);

C#

BwApi.EnvironmentTurntableCameraPositionsGet(cameraJson, angles);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentTurntableCameraPositionsGet",
	"params": {
		"cameraJson": "value",
		"angles": "value"
	}
}    

Parameters

Param

Variable

Description

In

cameraJson

Camera JSON object as a string containing all the camera information (see Schema/camera.json schema)

In

angles

Number of angles

Out

cameraPositions

Array of camera positions (as a string) that represents the turntable positions

Error/success code (see BwApiErrorCodes enum).

EnvironmentCameraViews

Get all camera views.

Python C++ C# VS Server

Python

BwApi.EnvironmentCameraViews()

C++

BwApiEnvironmentCameraViews();

C#

BwApi.EnvironmentCameraViews();

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentCameraViews",
	"params": {}
}    

Parameters

Param

Variable

Description

Out

cameraViews

Array of camera view names

Error/success code (see BwApiErrorCodes enum).

There are two special camera views named GarmentFront and AvatarFront which get the camera to focus on the garment or the avatar.

EnvironmentCameraViewGet

Get the camera by camera view name.

Python C++ C# VS Server

Python

BwApi.EnvironmentCameraViewGet(garmentId, cameraViewName)

C++

BwApiEnvironmentCameraViewGet(garmentId, cameraViewName);

C#

BwApi.EnvironmentCameraViewGet(garmentId, cameraViewName);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentCameraViewGet",
	"params": {
		"garmentId": "value",
		"cameraViewName": "value"
	}
}    

Parameters

Param

Variable

Description

In

garmentId

Existing garment ID

In

cameraViewName

Camera view name

Out

cameraJson

Camera JSON object as string containing all the camera's information (see Schema/camera.json schema)

Error/success code (see BwApiErrorCodes enum).

There are two special camera views named GarmentFront and AvatarFront which get the camera to focus on the garment or the avatar.

EnvironmentBBoxToCamera

Get camera which is looking at the given 3D bounding box.

Python C++ C# VS Server

Python

BwApi.EnvironmentBBoxToCamera(boundingBox)

C++

BwApiEnvironmentBBoxToCamera(boundingBox);

C#

BwApi.EnvironmentBBoxToCamera(boundingBox);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentBBoxToCamera",
	"params": {
		"boundingBox": "value"
	}
}    

Parameters

Param

Variable

Description

In

boundingBox

List of BwApiCoordinatesXYZ that construct bounding box camera should look at

Out

cameraJson

Camera JSON object as string containing all the camera's information (see Schema/camera.json schema)

Error/success code (see BwApiErrorCodes enum).

The camera will look at the middle point of the given bounding box.

EnvironmentCameraViewImport

Import a camera view.

Python C++ C#

Python

BwApi.EnvironmentCameraViewImport(cameraViewPath)

C++

BwApiEnvironmentCameraViewImport(cameraViewPath);

C#

BwApi.EnvironmentCameraViewImport(cameraViewPath);

Parameters

Param

Variable

Description

In

cameraViewPath

Camera view full path

Error/success code (see BwApiErrorCodes enum).

EnvironmentCameraViewExport

Export a camera view.

Python C++ C#

Python

BwApi.EnvironmentCameraViewExport(cameraViewName, cameraViewPath)

C++

BwApiEnvironmentCameraViewExport(cameraViewName, cameraViewPath);

C#

BwApi.EnvironmentCameraViewExport(cameraViewName, cameraViewPath);

Parameters

Param

Variable

Description

In

cameraViewName

Camera view name

In

cameraViewPath

Camera view full path

Error/success code (see BwApiErrorCodes enum).

There are two special camera views named GarmentFront and AvatarFront which get the camera to focus on the garment or the avatar.

EnvironmentAvatarVisibilitySet

Set the visibility of the current avatar.

Python C++ C# VS Server

Python

BwApi.EnvironmentAvatarVisibilitySet(visible)

C++

BwApiEnvironmentAvatarVisibilitySet(visible);

C#

BwApi.EnvironmentAvatarVisibilitySet(visible);

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentAvatarVisibilitySet",
	"params": {
		"visible": "value"
	}
}    

Parameters

Param

Variable

Description

In

visible

The avatar visibility

Error/success code (see BwApiErrorCodes enum).

EnvironmentAvatarVisibilityGet

Get the visibility of the current avatar.

Python C++ C# VS Server

Python

BwApi.EnvironmentAvatarVisibilityGet()

C++

BwApiEnvironmentAvatarVisibilityGet();

C#

BwApi.EnvironmentAvatarVisibilityGet();

VS Server

{
	"id": "API processing order number",
	"function": "EnvironmentAvatarVisibilityGet",
	"params": {}
}    

Parameters

Param

Variable

Description

Out

visible

The avatar visibility

Error/success code (see BwApiErrorCodes enum).

Did this answer your question?