Create and access nodes and resources. More...
Public Member Functions | |
Brush | CreateBrush (string name, BrushLibrary parent, BrushTypeEnum brushType) |
Creates a brush in the Brushes library. More... | |
Brush | CreateBrush (string name, BrushLibrary parent, BrushType brushType) |
Creates a brush in the Brushes library. More... | |
Node | CreateComponentNode (string name, Node parent, ComponentType componentType) |
Creates a component node. More... | |
DataSource | CreateDataSource (string name, [NotNull] DataSourceType dataSourceType) |
NodeComponent | CreateNodeComponent (string name, NodeComponentHost parent, NodeComponentType nodeComponentType) |
Creates a node component to the specified parent. More... | |
ProjectItem | CreateProjectItem (Type projectItemType, string name, ProjectItem parent) |
Creates a project item. More... | |
T | CreateProjectItem< T > (string name, ProjectItem parent) |
Creates a project item. More... | |
RenderPass | CreateRenderPass (string name, IComposerContainer parent, RenderPassType renderPassType) |
Creates a render pass. More... | |
RenderPassPrefab | CreateRenderPassPrefab (string name, RenderPassType renderPassType) |
Creates a render pass prefab. More... | |
StudioPluginItem | CreateStudioPluginItem (string name, [CanBeNull] StudioPluginItem parent, [CanBeNull] string logicFactoryName) |
ProjectItem | GetProjectItem (string projectItemPath) |
Gets a project item. More... | |
ProjectItem | GetProjectItemByKzbUrl (string kzbUrl, bool searchFromReferencedProjects) |
IEnumerable< string > | GetReferringItemsKzbNames (string propertyTypeName) |
bool | IsAbstract (Type projectItemType) |
Properties | |
ProjectItem | ActiveComposition [get] |
AnimationClipLibrary | AnimationClipLibrary [get] |
AnimationLibrary | AnimationLibrary [get] |
Gets the Animation Data library which stores all animations in a Kanzi Studio project. More... | |
ApplicationConfigurationResourceFileDirectory | ApplicationDirectory [get] |
Asset3DImportSourceDirectory | Asset3DImportSourceDirectory [get] |
string | BinaryExportDirectory [get] |
BinaryShaderFormatLibrary | BinaryShaderFormatLibrary [get] |
BrushLibrary | BrushLibrary [get] |
Gets the Brushes library which stores brushes used in a Kanzi Studio project. More... | |
BrushTypeLibrary | BrushTypeLibrary [get] |
Gets the brush types available in a Kanzi Studio project. More... | |
ComponentTypeLibrary | ComponentTypeLibrary [get] |
Gets the component node types available in a Kanzi Studio project. More... | |
DataSourceLibrary | DataSourceLibrary [get] |
DataSourceTypeLibrary | DataSourceTypeLibrary [get] |
EnginePluginLibrary | EnginePluginLibrary [get] |
FontDirectory | FontDirectory [get] |
Gets the Fonts directory which contains the fonts in a Kanzi Studio project. More... | |
FontFamilyLibrary | FontFamilyLibrary [get] |
Gets the Font Families library which contains the font families in a Kanzi Studio project. More... | |
GenericResourceFileDirectory | GenericResourceFileDirectory [get] |
Gets the Generic directory which contains the generic resource files in a Kanzi Studio project. More... | |
IEnumerable< Guide > | Guides [get] |
Gets the guides in a Kanzi Studio project. More... | |
ImageDirectory | ImageDirectory [get] |
Gets the Images directory which contains the image files in a Kanzi Studio project. More... | |
bool | IsNewlyCreatedProject [get] |
bool | IsSDKProject [get] |
Checks whether this Kanzi Studio project follows the folder structure of a project that uses application code. More... | |
bool | JavaProject [get] |
LocaleLibrary | LocaleLibrary [get] |
MaterialLibrary | MaterialLibrary [get] |
Gets the Materials library which contains the materials in a Kanzi Studio project. More... | |
MaterialTypeLibrary | MaterialTypeLibrary [get] |
Gets the Material Types library which contains the material types in a Kanzi Studio project. More... | |
MeshLibrary | MeshLibrary [get] |
Gets the Meshes library which contains the meshes in a Kanzi Studio project. More... | |
MessageTypeLibrary | MessageTypeLibrary [get] |
Gets the message types available in a Kanzi Studio project. More... | |
NodeComponentTypeLibrary | NodeComponentTypeLibrary [get] |
Gets the node component types available in a Kanzi Studio project. More... | |
PageTransitionCollectionLibrary | PageTransitionCollectionLibrary [get] |
Gets the Page Transitions library which contains the page transitions in a Kanzi Studio project. More... | |
PipelineItemLibrary | PipelineItemLibrary [get] |
Gets the Object Sources library which contains the object sources and filters in a Kanzi Studio project. More... | |
PrefabLibrary | PrefabLibrary [get] |
Gets the Prefabs library which contains the prefabs used in a Kanzi Studio project. More... | |
string | PreviewWorkingDirectory [get] |
ProjectReferenceLibrary | ProjectReferenceLibrary [get] |
Gets the Project References library which stores the project references and kzb file references in a Kanzi Studio project. More... | |
RenderPassPrefabLibrary | RenderPassPrefabLibrary [get] |
Gets the Render Pass Prefabs library which stores the render passes used in a Kanzi Studio project. More... | |
RenderPassTypeLibrary | RenderPassTypeLibrary [get] |
Gets the render pass types available in a Kanzi Studio project. More... | |
Screen | Screen [get] |
Gets the Screen node in a Kanzi Studio project. More... | |
ShaderSourceDirectory | ShaderSourceDirectory [get] |
Gets the Shaders directory which stores the shader source files in a Kanzi Studio project. More... | |
ShortcutLibrary | ShortcutLibrary [get] |
Gets the Bookmarks library which stores the bookmarks in a Kanzi Studio project. More... | |
StateManagerLibrary | StateManagerLibrary [get] |
Gets the State Managers library which stores state managers used in a Kanzi Studio project. More... | |
StudioPluginItemLibrary | StudioPluginItemLibrary [get] |
StyleLibrary | StyleLibrary [get] |
Gets the Styles library which stores styles used in a Kanzi Studio project. More... | |
TagLibrary | TagLibrary [get] |
Gets the Tags library which stores tags used in a Kanzi Studio project. More... | |
TextureLibrary | TextureLibrary [get] |
Gets the Textures library which stores textures used in a Kanzi Studio project. More... | |
ThemeLibrary | ThemeLibrary [get] |
TimelineSequenceLibrary | TimelineSequenceLibrary [get] |
TrajectoryLibrary | TrajectoryLibrary [get] |
Gets the Trajectories library which stores trajectories used in a Kanzi Studio project. More... | |
TriggerActionTypeLibrary | TriggerActionTypeLibrary [get] |
Gets the trigger action types available in a Kanzi Studio project. More... | |
Events | |
EventHandler< CompositionChangedEventArgs > | ActiveCompositionChanged |
EventHandler | BinaryExported |
Occurs after the export of the kzb file of the project is completed. More... | |
EventHandler | BinaryExporting |
Occurs when the export of the kzb file of the project starts. More... | |
EventHandler | Closing |
EventHandler< ProjectMergeEventArgs > | Merged |
EventHandler< ProjectMergeEventArgs > | Merging |
EventHandler< ProjectSavingEventArgs > | Saved |
Occurs after Kanzi Studio successfully saves the project. More... | |
EventHandler< ProjectSavingEventArgs > | Saving |
Occurs when the saving of the project starts. More... | |
Create and access nodes and resources.
Use the functions in this class to create nodes and resources in a project and to access the resources in resource libraries in a project.
Brush CreateBrush | ( | string | name, |
BrushLibrary | parent, | ||
BrushTypeEnum | brushType | ||
) |
Creates a brush in the Brushes library.
You can use this function to create brushes of types that come with Kanzi Studio.
name | The name of the brush. |
parent | The library in which you create the brush. |
brushType | The type of the brush you create with this function. Use BrushTypeEnum.COLOR for Color Brush, BrushTypeEnum.CONTENT for Content Brush, BrushTypeEnum.MATERIAL for Material brush, and BrushTypeEnum.TEXTURE for Texture Brush. |
Examples
To create a green Color Brush use this code snippet.
In the Visual Studio solution of your plugin, in the Solution Explorer right-click the project name, select Add Reference, and add the reference to the PresentationCore assembly. Your plugin uses this assembly to define the color you use to set the Brush Color property of the Color Brush.
Brush CreateBrush | ( | string | name, |
BrushLibrary | parent, | ||
BrushType | brushType | ||
) |
Creates a brush in the Brushes library.
name | The name of the brush. |
parent | The library in which you create the brush. |
brushType | The type of the brush you create with this function. BrushTypeLibrary stores the brush types available in a Kanzi Studio project. |
Examples
To create a green Color Brush use this code snippet.
In the Visual Studio solution of your plugin, in the Solution Explorer right-click the project name, select Add Reference, and add the reference to the PresentationCore assembly. Your plugin uses this assembly to define the color you use to set the Brush Color property of the Color Brush.
To create a function that creates texture brushes that use PNG images from a directory:
Node CreateComponentNode | ( | string | name, |
Node | parent, | ||
ComponentType | componentType | ||
) |
Creates a component node.
name | The name of the node. |
parent | The parent node of the node you create with this function. |
componentType | The component type of the node. |
Examples
To create component nodes:
NodeComponent CreateNodeComponent | ( | string | name, |
NodeComponentHost | parent, | ||
NodeComponentType | nodeComponentType | ||
) |
Creates a node component to the specified parent.
name | The name of the node component. |
parent | The NodeComponentHost in which you want to create the node component. |
nodeComponentType | The type of the node component you create with this function. NodeComponentTypeLibrary stores the node component types available in a Kanzi Studio project. |
Examples
To create a node component:
ProjectItem CreateProjectItem | ( | Type | projectItemType, |
string | name, | ||
ProjectItem | parent | ||
) |
Creates a project item.
Use this function to create Kanzi nodes and resources.
projectItemType | The type of the item. |
name | The name of the item. |
parent | The parent item of the item you create with this function. |
Examples
To create five Page nodes in the RootPage node:
T CreateProjectItem< T > | ( | string | name, |
ProjectItem | parent | ||
) |
Creates a project item.
Use this function to create Kanzi nodes and resources.
T | The type of the item you want to create with this function. |
name | The name of the item. |
parent | The parent item of the item you create with this function. |
Examples
To create a function which creates an Empty Node 2D:
T | : | ProjectItem |
RenderPass CreateRenderPass | ( | string | name, |
IComposerContainer | parent, | ||
RenderPassType | renderPassType | ||
) |
Creates a render pass.
Use this function to create render passes of different types in the Render Pass Prefabs library of a Kanzi Studio project.
name | The name of the render pass. |
parent | The parent render pass of the render pass you create with this function. |
renderPassType | The type of the render pass. RenderPassTypeLibrary stores the render pass types available in a Kanzi Studio project. |
Examples
To create a basic set of render passes which first clear depth and then draw all the content of the scene:
To create render passes which render to a composition target and draw that to the screen use this code snippet.
In the Visual Studio solution of your plugin, in the Solution Explorer right-click the project name, select Add Reference, and add the reference to the PresentationCore assembly. Your plugin uses this assembly to define the color you use to set the Clear Color property for a Clear Render Pass.
RenderPassPrefab CreateRenderPassPrefab | ( | string | name, |
RenderPassType | renderPassType | ||
) |
Creates a render pass prefab.
Use this function to create render pass prefabs in the Render Pass Prefabs library of a Kanzi Studio project.
name | The name of the render pass prefab. |
renderPassType | The type of the render pass. RenderPassTypeLibrary stores the render pass types available in a Kanzi Studio project. |
Examples
To create a render pass prefab that contains a basic set of render passes which first clear depth and then draw all the content of the scene:
ProjectItem GetProjectItem | ( | string | projectItemPath | ) |
Gets a project item.
For example, use this function to get a node in the node tree and then add child nodes to it, or add, set, and modify the values of the node properties.
projectItemPath | The path to the project item you want to get. |
Examples
To get a project item:
|
get |
Gets the Animation Data library which stores all animations in a Kanzi Studio project.
After you get the library, you can access and create resources in that library.
Examples
To create an animation in the Animation Data library:
|
get |
Gets the Brushes library which stores brushes used in a Kanzi Studio project.
After you get the library, you can access and create resources in that library.
The Brushes library in a Kanzi Studio project.
Examples
To get a brush from the Brushes library:
|
get |
Gets the brush types available in a Kanzi Studio project.
Examples
To get the brush types available in a Kanzi Studio project:
|
get |
Gets the component node types available in a Kanzi Studio project.
Examples
To get the available component node types:
|
get |
Gets the Fonts directory which contains the fonts in a Kanzi Studio project.
After you get the directory, you can access and import fonts.
Examples
To import a font file to the Fonts directory and add that font file to a Font Family:
|
get |
Gets the Font Families library which contains the font families in a Kanzi Studio project.
After you get the library, you can access and create font families.
Examples
To create a function that creates a Font Family and adds to it a font file:
|
get |
Gets the Generic directory which contains the generic resource files in a Kanzi Studio project.
After you get the directory, you can access and import files.
Examples
To import a text file to the Generic directory:
|
get |
Gets the guides in a Kanzi Studio project.
Examples
To get the guides in a Kanzi Studio project:
To create a guide:
|
get |
Gets the Images directory which contains the image files in a Kanzi Studio project.
Examples
To get an image file in the Images directory of a Kanzi Studio project:
To import an image to the Images directory:
|
get |
Checks whether this Kanzi Studio project follows the folder structure of a project that uses application code.
If the project follows the folder structure of a project that uses application code, true, otherwise false.
|
get |
Gets the Materials library which contains the materials in a Kanzi Studio project.
After you get the library, you can access and create materials.
Examples
To create a material in the Materials library:
|
get |
Gets the Material Types library which contains the material types in a Kanzi Studio project.
After you get the library, you can access and create material types.
Examples
To get all material types in the Material Types library of a Kanzi Studio project:
To create a function that creates a material type from vertex and fragment shaders:
|
get |
Gets the Meshes library which contains the meshes in a Kanzi Studio project.
Examples
To get the meshes in a Kanzi Studio project:
|
get |
Gets the message types available in a Kanzi Studio project.
Examples
To get the message types available in a Kanzi Studio project:
|
get |
Gets the node component types available in a Kanzi Studio project.
Examples
To get the node component types available in Kanzi:
|
get |
Gets the Page Transitions library which contains the page transitions in a Kanzi Studio project.
After you get the library, you can access and create page transitions.
Examples
To create and configure a page transition:
|
get |
Gets the Object Sources library which contains the object sources and filters in a Kanzi Studio project.
After you get the library, you can access and create object sources and filters.
Examples
To create a Tag Filter:
|
get |
Gets the Prefabs library which contains the prefabs used in a Kanzi Studio project.
After you get the library, you can access and create prefabs.
The Prefabs library in a Kanzi Studio project.
Examples
To create a prefab in the Prefabs library and instantiate it:
|
get |
Gets the Project References library which stores the project references and kzb file references in a Kanzi Studio project.
Examples
To convert all project references to kzb file references:
|
get |
Gets the Render Pass Prefabs library which stores the render passes used in a Kanzi Studio project.
After you get the library, you can access and create resources in that library.
Examples
To get the render pass prefabs in a Kanzi Studio project:
|
get |
Gets the render pass types available in a Kanzi Studio project.
Examples
To get the render pass types available in Kanzi:
Gets the Screen node in a Kanzi Studio project.
The Screen node is the root node of the node tree in Kanzi.
The Screen node.
Examples
To get the Screen node:
|
get |
Gets the Shaders directory which stores the shader source files in a Kanzi Studio project.
Examples
To get all shader source files in the Shaders directory of a Kanzi Studio project:
|
get |
Gets the Bookmarks library which stores the bookmarks in a Kanzi Studio project.
After you get the library, you can access and create bookmarks.
Examples
To create a bookmark in the Bookmarks library:
|
get |
Gets the State Managers library which stores state managers used in a Kanzi Studio project.
After you get the library, you can access and create state managers in that library.
The State Manager library in a Kanzi Studio project.
Examples
To create a state manager with a state group, state, and a state object in the State Managers library:
To get a state manager from the State Managers library:
|
get |
Gets the Styles library which stores styles used in a Kanzi Studio project.
After you get the library, you can access and create resources in that library.
The Styles library in a Kanzi Studio project.
Examples
To create a named style in the Styles library:
To create a typed style in the Styles library:
To get a style from the Styles library:
|
get |
Gets the Tags library which stores tags used in a Kanzi Studio project.
After you get the library, you can access and create resources in that library.
The Tags library in a Kanzi Studio project.
Examples
To get a tag from the Tags library:
To create a tag in the Tags library:
|
get |
Gets the Textures library which stores textures used in a Kanzi Studio project.
After you get the library, you can access and create resources in that library.
The Textures library in a Kanzi Studio project.
Examples
To get a texture from the Textures library:
To create a Single Texture in the Textures library:
To create a function that creates a Single Texture from an image file:
To create a Render Target Texture in the Textures library:
|
get |
Gets the Trajectories library which stores trajectories used in a Kanzi Studio project.
After you get the library, you can access and create resources in that library.
Examples
To create a trajectory in the Trajectories library and set a Trajectory Layout node to use that trajectory:
|
get |
Gets the trigger action types available in a Kanzi Studio project.
Examples
To get the trigger action types available in a Kanzi Studio project:
EventHandler BinaryExported |
Occurs after the export of the kzb file of the project is completed.
Examples
To subscribe to the BinaryExported event:
EventHandler BinaryExporting |
Occurs when the export of the kzb file of the project starts.
Examples
To subscribe to the BinaryExporting event:
EventHandler<ProjectSavingEventArgs> Saved |
Occurs after Kanzi Studio successfully saves the project.
EventHandler<ProjectSavingEventArgs> Saving |
Occurs when the saving of the project starts.