new $.oBackdrop(groupPath, backdropObject)
openHarmony/openHarmony_backdrop.js, line 85
The constructor for the $.oBackdrop class.
Name | Type | Description |
---|---|---|
groupPath |
string | The path to the object in which this backdrop is placed. |
backdropObject |
backdropObject | The harmony-internal backdrop object associated with this oBackdrop. |
Example
function createColoredBackdrop(){
// This script will prompt for a color and create a backdrop around the selection
$.beginUndo()
var doc = $.scn; // grab the scene
var nodes = doc.selectedNodes; // grab the selection
if(!nodes) return // exit the function if no nodes are selected
var color = pickColor(); // prompt for color
var group = doc.root // get the group to add the backdrop to
var backdrop = group.addBackdropToNodes(nodes, "BackDrop", "", color)
$.endUndo();
// function to get the color chosen by the user
function pickColor(){
var d = new QColorDialog;
d.exec();
var color = d.selectedColor();
return new $.oColorValue({r:color.red(), g:color.green(), b:color.blue(), a:color.alpha()})
}
}
Members
-
bodystring
-
The body text of the backdrop.
-
bodyFontobject
-
The body font of the backdrop in form { family:"familyName", "size":int, "color": oColorValue }
-
boundsoBox
-
The bounds of the backdrop.
-
coloroColorValue
-
The color of the backdrop.
-
indexint
-
The index of this backdrop in the current group.
-
readonlynodesArray.<$.oNode>
-
The nodes contained within this backdrop
-
readonlyparentArray.<$.oNode>
-
The nodes contained within this backdrop
-
positionoPoint
-
The position of the backdrop.
-
titlestring
-
The title of the backdrop.
-
titleFontobject
-
The title font of the backdrop in form { family:"familyName", "size":int, "color": oColorValue }
-
widthfloat
-
The width of the backdrop.
-
xfloat
-
The position of the backdrop on the horizontal axis.
-
yfloat
-
The position of the backdrop on the vertical axis.