User Tools

Site Tools


surfaces

The Surfaces (WIP) pane can be accessed by including an instruction of the surfaces type.

Properties

An instruction of the surfaces type can be used to cause the Interactive Lesson Manager to guide the user, step by step, to a property via the Editor page.

This type of instruction operates on the currently selected node; see Selecting Nodes.

Click the name of the example below to save it as a file.

Interactive_Lesson_Surfaces_Properties_Example_1.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"action": "DzPrimitiveAction",
	"result": "node",
	"info": "Please create a Cube.  When the dialog appears, make sure cube is the type and click OK."
	},
	{
	"select": "node@0",
	"info": "In the Scene Tab, ensure that the cube you just created is selected."
	},
	{
	"surfaces": "/Default/Diffuse Color",
	"value": "#ff0000",
	"info": "Now that the cube is selected, you are going to adjust the diffuse color of the cube to red.  In the Surfaces Pane, you will find the Diffuse Color property.  There you can change the color, by clicking on it.  This will popup a color picker.  In the color picker, you will see the words Red, Green, and Blue. Click on each of these text fields and type the values 255, 0, and 0 respectively."
	}
]);

Content

An instruction of the surfaces type can be used to cause the Interactive Lesson Manager to guide the user, step by step, to a user-facing file to load via the Presets page. This is accomplished by prepending “/Preset” to the query value.

The query value can be the short name of a file, or the full category path of a file. Using the short name of a file will guide the user to the first instance [within the database] in the category hierarchy. Using the full category path of a file will prefer the specified category if it exists.

Including an asset_path_member member in the instruction will help the Interactive Lesson Manager resolve the file being referenced in the event that the category path is not specified, or if the specified category path does not exist. The value of this member should consist of the relative [to a mapped content directory] path to the target file.

Click the name of the example below to save it as a file.

Interactive_Lesson_Surfaces_Content_Example_1.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"surfaces": "/Presets/Simple Skin.duf",
	"asset_path": "/Shader Presets/Shader Mixer/Simple Skin.duf",
	"info": "Apply the Simple Skin preset."
	}
]);