Glyph2 Version 2.18.0 |
pw:: FrameworkFramework type Derives FromSummary
getRoot
This action returns the root (global) framework system. ParametersNone ReturnsThis action returns the root pw::Framework object. hasFrameworks
This action returns true if multiple frameworks are present. This is equivalent to checking if the root framework has any child frameworks. ParametersNone ReturnsThis action returns a boolean value. get
This action returns the framework specified by the name-based path. Parameters
ReturnsThis action returns the specified pw::Framework object. find
This action returns a path to an instance of the framework. Parameters
ReturnsThis action returns a list pw::Framework objects representing a path from the root framework (the first entry in the list) to the target framework (the last entry in the list). An empty list is returned if the target could not be found. setActive
This action specifies the active framework. If the framework is instanced more than once, the full path to the desired instance must be specified. Parameters
ReturnsThis action returns nothing. getActive
This action returns the full path to the active framework as a list of pw::Framework objects. The first entry in the list will be the root framework and the last entry will be the active framework. ParametersNone. ReturnsThis action returns the active framework as a list of pw::Framework objects. getRootToTailTransform
This action returns a transformation matrix which will convert a point in the coordinate system of the framework specified by the root of the path to the coordinate system of the framework specified as the tail of the path. Parameters
ReturnsThis action returns a pwu::Transform value representing the transformation to convert a point in the root framework in the path to the tail framework in the path. getTailToRootTransform
This action returns a transformation matrix which will convert a point in the coordinate system of the framework specified by the tail of the path to the coordinate system of the framework specified as the root of the path. Parameters
ReturnsThis action returns a pwu::Transform value representing the transformation to convert a point in the tail framework in the path to the root framework in the path. convertPoint
This action transforms a point from one framework coordinate system to another framework coordinate system. Parameters
NoteA path argument must be a list of either pw::Framework objects or framework names. The path must start at the root framework, start at the active framework, or start at a child of the active framework. If both a ‘from’ and a ‘to’ path are specified, then it is also permissible for the two paths to share the same starting framework (regardless of whether it is the root or active framework). ReturnsThis action returns an XYZ value vector representing the transformed point. convertDirection
This action transforms a direction from one framework coordinate system to another framework coordinate system. Parameters
NoteA path argument must be a list of either pw::Framework objects or framework names. The path must start at the root framework, start at the active framework, or start at a child of the active framework. If both a ‘from’ and a ‘to’ path are specified, then it is also permissible for the two paths to share the same starting framework (regardless of whether it is the root or active framework). This differs from the pw::Framework.convertPoint routine in how the XYZ value is prepared for use with the 4x4 transform matrix. For a point value, the fourth value of the point vector is set to 1. This allows it to pick up the translation values in the transform. For a direction, the fourth value of the XYZ vector is set to 0. One way to think about this is to consider a direction as the difference between two points. The transformed direction should be the difference between the transformed points. If the transform is given by M, the direction as D and the points as P1 and P2, then
Given that P1 and P2 both have 1 as the fourth value, the fourth value for the direction should be 0. ReturnsThis action returns an XYZ value vector representing the transformed direction. convertNormal
This action transforms a normal vector from one framework coordinate system to another framework coordinate system. Parameters
NoteA path argument must be a list of either pw::Framework objects or framework names. The path must start at the root framework, start at the active framework, or start at a child of the active framework. If both a ‘from’ and a ‘to’ path are specified, then it is also permissible for the two paths to share the same starting framework (regardless of whether it is the root or active framework). Normal vectors are transformed by the transposed inverse of the transformation matrix/ ReturnsThis action returns an XYZ value vector representing the transformed normal. The result will be normalized. computeTransform
This action computes the transform from one framework coordinate system to another. Parameters
NoteA path argument must be a list of either pw::Framework objects or framework names. The path must start at the root framework, start at the active framework, or start at a child of the active framework. If both a ‘from’ and a ‘to’ path are specified, then it is also permissible for the two paths to share the same starting framework (regardless of whether it is the root or active framework). ReturnsThis action returns a pwu::Transform value representing the transformation matrix. export
This action exports one or more frameworks. Parameters
NotesA path argument must be a list of either pw::Framework objects or framework names. The path must start at the root framework. If more than one framework is specified and they are not in the same branch, they will be exported as direct children of an empty temporary root framework. For example, if the list of frameworks to export was “root a b c” and “root d e”, the frameworks “c” and “e” would be exported as “temp_root c” and “temp_root e”. Any transforms by “a”, “b”, or “d” will be ignored. In this way, they would be later imported under a single framework. In the rare case where the frameworks to be placed under the “temp_root” have the same name, an additional framework will be inserted between the temporary root and each exported framework so the names can be preserved. For example, if the list of frameworks to export was “root a b c” and “root d e c”, the frameworks “c” and “c” (which may or may not be instances of the same framework) would be exported as “temp_root framework-1 c” and “temp_root framework-2 c”. No overset data is included in the export. Because the framework hierarchy may be different, the default view and saved views may not be the same when reading in the exported framework subset. ReturnsThis action returns no value. isValidPath
This action tests to see if a framework path argument is valid. Parameters
ReturnsThis function returns true if the specified path exists. A false value is returned if the path does not exist. Enabled
This attribute controls whether or not the framework is displayed when it is not the active framework. Parameters
TypeThis attribute is a boolean value. DefaultThe default for this attribute is true. InactiveTransparency
This attribute controls how transparent its entities are drawn when the framework is not the active framework. Parameters
TypeThis attribute is a float value between 0.0 (fully opaque) and 1.0 (fully transparent). DefaultThe default for this attribute is 0.5. Transform
This attribute is the transform of the framework system. It transforms a point in the child’s space into the parent’s transform space. TypeThis attribute is a pwu::Transform list. DefaultThe default for this attribute is the identity transform. delete
This action deletes this framework system, any framework systems attached to it as children, and any entities contained in the deleted framework systems. ParametersNone NoteIt is an error to try to delete the root framework system. Use <pw::Application reset> instead. ReturnsThis action returns nothing. Name
This attribute is the name of the framework system. TypeThis attribute is a string. NoteThe name “.” and names starting with “::pw” are invalid. DefaultThe default for this attribute is a uniquely generated name. createChild
This action creates a new pw::Framework object and adds it as a child. If any entities are specified, they are moved from the parent framework to the newly created child framework. Parameters
ReturnsThis action returns a new pw::Framework object. addChild
This action adds a child pw::Framework object to the framework. Parameters
ReturnsThis action returns nothing. An error is raised if a circular dependency would be created or if the child is the root framework. removeChild
This action removes a child pw::Framework object from the framework. Parameters
ReturnsThis action returns nothing. reorderChild
This action reorders a child pw::Framework of the framework. Parameters
ReturnsThis action returns nothing. reparent
This action removes the framework from one parent, a pw::Framework object, to another parent, also a pw::Framework object. Parameters
NotesIf the child framework is instanced multiple times and is referenced by permanent framework paths (such as those used by voxel blocks to track enclosing entities or various grid entities to track sources), then reparenting will be prohibited. Updating the paths is ambiguous in such cases. A framework in the active framework path cannot be reparented. Framework transparency settings and cut planes are assigned per instance of a framework. Reparenting a framework destroys the old instance and creates a new instance. If the framework is multiply instanced and an instance path is specified, or if there is only one instance of the framework, then the transparency and cut planes will be copied over to the new instance (or instances if the destination is itself multiply-instanced). Otherwise, any transparency settings or cut planes will be lost. ReturnsThis action returns an index of the reparented framework in the range [1, N], where N is the number of children in destination_parent. insertParent
This action inserts a new pw::Framework object between this framework and the specified child. Parameters
ReturnsThis action returns the newly created pw::Framework object. The new framework will be a child of this framework and a parent of the specified child. getChild
This action returns a pw::Framework object. Parameters
ReturnsThis action returns a pw::Framework object corresponding to the specified child. hasChild
This action returns the true if the framework directly contains the specified child framework. Parameters
ReturnsThis action returns true if the specified pw::Framework object is a direct child of the parent framework. isolateChild
This action replaces the local instance of a multiply-instanced framework with a non-shared copy. All other instances of the framework are unaffected. Parameters
ReturnsThis action returns pw::Framework object. If the child was multiply instanced, the returned value is the newly created non-shared copy. If the child was already isolated, the return value is the original child. flattenChild
This action moves the entities in the child or at the tail of the specified path to this framework, transforming them from the child space to the parent space. After moving the entities, the source framework will be removed from its parent if it has no child frameworks. The path will continue to be culled up to the parent until a framework with entities or other framework children is encountered. This command will fail if any framework along the specified path is multiply instanced. Such frameworks must be isolated first (otherwise all instances would be affected). Parameters
ReturnsThis action returns nothing. getPathCount
This action returns the number of times the framework and the specified child is referenced by a permanent framework path (such as grid entities referencing sources). Parameters
ReturnsThis action returns an unsigned integer representing the number of framework paths that reference this framework and the specified child framework sequentially. getAttachmentPoint
This action returns various values associated with an attachment point of a framework. Parameters
ReturnsThis action returns varying values based on which optional parameter is specified. See the list of paremeters above. addAttachmentPoint
This action adds an attachment point to a framework. Parameters
ReturnsThis action returns an unsigned integer representing the index of the newly added attachment point. Note that the index can change over time if earlier attachment points are removed. modifyAttachmentPoint
This action modifies an existing attachment point of a framework. Parameters
ReturnsThis action returns an unsigned integer representing the index of the newly added attachment point. Note that the index can change over time if earlier attachment points are removed. removeAttachmentPoint
This action removes the attachment point specified either by index or name. Parameters
ReturnsThis action returns nothing. attach
This action transforms the framework such that the parent attachment point and the child attachment point line up in the global transform space. The parent attachment point must be in a framework that is not a child of any instance of this framework. The child attachment point must be an attachment point on this framework or a framework that is an instance of this framework. After the transformation, the location points will be identical in the global transform space, the up directions will be opposite, and the forward directions will be identical. Parameters
ReturnsThis action returns nothing. computeAttachTransform
This action computes the transform for the framework such that, if applied, would line up the parent attachment point and the child attachment point in the global transform space. The parent attachment point must be in a framework that is not a child of any instance of this framework. The child attachment point must be an attachment point on this framework or a framework that is an instance of this framework. After the transformation, the location points will be identical in the global transform space, the up directions will be opposite, and the forward directions will be identical. Parameters
ReturnsThis action returns the pwu::Transform that would align the two attachment points. |
This action returns the root (global) framework system.
pw::Framework getRoot
This action returns true if multiple frameworks are present.
pw::Framework hasFrameworks
This action returns the framework specified by the name-based path.
pw::Framework get $path
This action returns a path to an instance of the framework.
pw::Framework find < ?-root head? target | -next path >
This action specifies the active framework.
pw::Framework setActive < path | framework >
This action returns the full path to the active framework as a list of pw::Framework objects.
pw::Framework getActive
This action returns a transformation matrix which will convert a point in the coordinate system of the framework specified by the root of the path to the coordinate system of the framework specified as the tail of the path.
pw::Framework getRootToTailTransform path
This action returns a transformation matrix which will convert a point in the coordinate system of the framework specified by the tail of the path to the coordinate system of the framework specified as the root of the path.
pw::Framework getTailToRootTransform path
This action transforms a point from one framework coordinate system to another framework coordinate system.
pw::Framework convertPoint ?-from path? ?-to path? < point | coord >
This action transforms a direction from one framework coordinate system to another framework coordinate system.
pw::Framework convertDirection ?-from path? ?-to path? direction
This action transforms a normal vector from one framework coordinate system to another framework coordinate system.
pw::Framework convertNormal ?-from path? ?-to path? normal
This action computes the transform from one framework coordinate system to another.
pw::Framework computeTransform ?-from path? ?-to path?
This action exports one or more frameworks.
pw::Framework export ?-compress level? filename framework_path_list
This action tests to see if a framework path argument is valid.
pw::Framework isValidPath framework_path
This attribute controls whether or not the framework is displayed when it is not the active framework.
$framework get/setEnabled value
This attribute controls how transparent its entities are drawn when the framework is not the active framework.
$framework get/setInactiveTransparency ?-instance path? ?-all? value
This attribute is the transform of the framework system.
$framework get/setTransform xform
This action deletes this framework system, any framework systems attached to it as children, and any entities contained in the deleted framework systems.
$framework delete
This attribute is the name of the framework system.
$framework get/setName name
This action creates a new pw::Framework object and adds it as a child.
$parent createChild ?entities?
This action adds a child pw::Framework object to the framework.
$parent addChild child
This action removes a child pw::Framework object from the framework.
$parent removeChild child
This action reorders a child pw::Framework of the framework.
$framework reorderChild $child index
This action removes the framework from one parent, a pw::Framework object, to another parent, also a pw::Framework object.
$child reparent ?-path instance? source_parent destination_parent
This action inserts a new pw::Framework object between this framework and the specified child.
$parent insertParent $child
This action returns the number of framework children for this framework.
$parent getChildCount
This action returns a pw::Framework object.
$parent getChild < index | name >
This action returns the true if the framework directly contains the specified child framework.
$parent hasChild < name | framework >
This action replaces the local instance of a multiply-instanced framework with a non-shared copy.
$parent isolateChild < index | child >
This action moves the entities in the child or at the tail of the specified path to this framework, transforming them from the child space to the parent space.
$parent flattenChild < index | child | relative_path >
This action returns the number of times the framework is instanced (i.e., a child of another framework).
$parent getInstanceCount
This action returns the number of times the framework and the specified child is referenced by a permanent framework path (such as grid entities referencing sources).
$parent getPathCount
This action returns the number of attachment points the framework contains.
$parent getAttachmentPointCount
This action returns various values associated with an attachment point of a framework.
$framework getAttachmentPoint ?< -name | -location | -up | -forward>? < index | name >
This action adds an attachment point to a framework.
$framework addAttachmentPoint ?-name name? location up forward
This action modifies an existing attachment point of a framework.
$framework modifyAttachmentPoint <name | index> ?-name new_name? ?-location location? ?-up up_direction? ?-forward forward_direction?
This action removes the attachment point specified either by index or name.
$parent removeAttachmentPoint < index | name >
This action removes all the attachment points from a framework
$parent clearAttachmentPoints
This action transforms the framework such that the parent attachment point and the child attachment point line up in the global transform space.
$parent attach parent_path parent_attachment_point child_path child_attachment_point
This action computes the transform for the framework such that, if applied, would line up the parent attachment point and the child attachment point in the global transform space.
$parent computeAttachTransform parent_path parent_attachment_point child_path child_attachment_point