User Tools

Site Tools


Selecting Properties

The following sections deal largely with property widgets. The Parameters (WIP), Posing (WIP), Shaping (WIP), Lights (WIP), Cameras (WIP), and Surfaces (WIP) panes are the typical places that property widgets are presented to the user; as sliders, [on/off] buttons and/or color widgets. With the exception of the Parameters pane, all of these panes provide an Editor page for displaying the widgets. Instructions that demonstrate accessing these widgets are found in the sections below and follow a pattern:

{
	"%the_pane_we_target%": "/the/path/to/the/property/label",
	"value": %depends_on_property_type%
}

“%the_pane_we_target%” is always a String and can be one of:

%depends_on_property_type% can be:

  • A slider would require a floating point Number such as 1.0, or an integer such as 10
  • An [on/off] button would be the Boolean value true or false
  • A color widget would be a hexadecimal encoded String such as “#00ff00”, or “0x00ff00”, for the color green

Parameters Pane

Interactive lessons can be used to guide the user to adjust a property to a specific value, on the Parameters (WIP) pane. The parameters instruction accepts a query that represents the full property group path to the property - ending with the label of the property. This type of instruction operates on the currently selected node; see Selecting Nodes.

A value member must be defined for the instruction to specify a target value. Numeric properties may also define a tolerance member to describe the range of values that will allow the lesson to proceed.

Including an instruction of this type will guide the user to the Parameters pane, to navigate the property group hierarchy and ultimately to the widget for the property.

Two examples:

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

Interactive_Lesson_Parameters_Example_1.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"action": "DzPrimitiveAction",
	"result": "node",
	"info": "Create a cube, using the New Primitive action."
	},
	{
	"select": "node@0",
	"info": "Select the cube, in the Scene pane.",
	},
	{
	"parameters": "/General/Transforms/Translation/Y Translate",
	"value": 100,
	"tolerance": 5,
	"info": "Adjust the position of the cube to be ~100 cm from the ground.  You can use the slider, but you can also click the value and enter 100 into the text field."
	}
]);
Interactive_Lesson_Parameters_Example_2.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"select": "Genesis.head",
	"info": "Select Genesis' head."
	},
	{
	"viewport": "controls.frame",
	"info": "Move in close using the Frame control."
	},
	{
	"parameters": "/Pose Controls/Head/Mouth/Mouth Open",
	"value": 1,
	"info": "Adjust the Mouth Open property to 1.0."
	}
]);

Posing Pane

The Editor page of the Posing (WIP) pane can be accessed by including an instruction of the posing type. Similar to the parameters instruction described above, this instruction accepts a query that represents the full property group path to a property - ending with the label of the property. 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_Posing_Example_1.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"posing": "/Pose Controls/Head/Mouth/Mouth Open",
	"value": 1,
	"info": "Adjust the Mouth Open property to 1.0."
	}
]);

A posing instruction can also be used to guide the user, step by step, to a file to load from the Presets page, in a way that is similar to the content instruction. This is accomplished by starting the query with “/Presets/”, followed by the category path to the file you are guiding the user to. The path portion of the query can be the full path, a leading portion of the path, or the name of the file without a path. Using just the name will guide the user to the first instance in the hierarchy of the Presets page.

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

Interactive_Lesson_Posing_Example_2.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"posing": "/Presets/Default/Poses/By Function/POSE - Genesis 2 Female Barefoot Dancer.duf",
	"asset_path": "/DAZ Studio Tutorials/Genesis 2 Barefoot Dancer/POSE - Genesis 2 Female Barefoot Dancer.duf",
	"info": "Navigate to, and double click to apply, the Posing Preset.",
	}
]);

Shaping Pane

The Editor page of the Shaping (WIP) pane can be accessed by including an instruction of the shaping type. This instruction is similar to the parameters instruction described above. 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_Shaping_Example_1.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"shaping": "/Actor/Female/Real World/Basic Female",
	"value": 1,
	"info": "Adjust the Basic Female property to 1.0."
	}
]);

Lights Pane

The Editor page of the Lights (WIP) pane can be accessed by including an instruction of the lights type. This instruction is similar to the parameters instruction described above. 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_Lights_Example_1.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"lights": "/Light/Color",
	"value": "#ffff00",
	"info": "Adjust the light color to yellow."
	}
]);