Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
SCR_BatchPrefabsOperationsTool Interface Reference

Workbench tool for generation of windows & glass prefabs. More...

Inheritance diagram for SCR_BatchPrefabsOperationsTool:
[legend]

Public Member Functions

void ProcessComponents (IEntitySource entSrc, SCR_BatchPrefabTemplates prefabGeneratorConfig)
 Process all components listed in config and try to apply all changes defined in m_ComponentAttributesArray by calling ProcessAttributes function.
 
void ProcessAttributes (IEntitySource entSrc, IEntitySource entSrcAttribute, array< ref ContainerIdPathEntry > containerPath, array< ref SCR_BatchPrefabTemplatesAttributes > TemplateData)
 Process all attributes listed in config and apply change to selected entity source.
 
void Execute ()
 Create bunch of inherited prefabs with selected models in m_aModelsToProcess array.
 
void ExecuteModify ()
 Modify all prefabs listed in m_aPrefabsToProcess with instructions contained in m_sPrefabConfig.
 

Protected Attributes

int m_iAddonToUse
 
ResourceName m_sBaseClass
 
ResourceName m_sPathToSave
 
ref array< ResourceName > m_aModelsToProcess
 
ref array< string > m_aNewNames
 
bool m_bGenerateNames
 
ref array< ResourceName > m_aPrefabsToProcess
 
ResourceName m_sDirectoryToProcess
 
ResourceName m_sPrefabConfig
 

Detailed Description

Workbench tool for generation of windows & glass prefabs.

With this tool you can either create dozens of prefabs with selected configuration from XOB models by pressing "Create" button or modify configuration of existing prefabs with "Modify" button.

Member Function Documentation

◆ Execute()

void SCR_BatchPrefabsOperationsTool.Execute ( )

Create bunch of inherited prefabs with selected models in m_aModelsToProcess array.

By minimum, new prefabs will have attached models in MeshObject component and will inherit from m_sBaseClass prefab. They will be located in folder selected in m_sPathToSave & will have name based on XOB file.

Optionally, you can also use m_sPrefabConfig to apply more values to your new prefab.

If m_aNewNames array is used, number of entries in this array must match the number of models

◆ ExecuteModify()

void SCR_BatchPrefabsOperationsTool.ExecuteModify ( )

Modify all prefabs listed in m_aPrefabsToProcess with instructions contained in m_sPrefabConfig.

After values are changed, function is also triggering saving of currently open scene World Editor to store all changes on the user drive.

◆ ProcessAttributes()

void SCR_BatchPrefabsOperationsTool.ProcessAttributes ( IEntitySource  entSrc,
IEntitySource  entSrcAttribute,
array< ref ContainerIdPathEntry >  containerPath,
array< ref SCR_BatchPrefabTemplatesAttributes TemplateData 
)

Process all attributes listed in config and apply change to selected entity source.

Function supports basic math (multiplying, dividing & adding) & bitwise operations.

Parameters
[in]entSrcEntity Source where new values should be stored
[in]entSrcAttributeEntity Source from which script should read values
[in]containerPathPath to container where values will be stored
[in]TemplateDataArray of values to be processed

◆ ProcessComponents()

void SCR_BatchPrefabsOperationsTool.ProcessComponents ( IEntitySource  entSrc,
SCR_BatchPrefabTemplates  prefabGeneratorConfig 
)

Process all components listed in config and try to apply all changes defined in m_ComponentAttributesArray by calling ProcessAttributes function.

If component is not found, new one is created.

Parameters
[in]entSrcEntity Source from which components should be read
[in]m_PrefabGeneratorConfigHandle to config file containing instructions for the tool

Member Data Documentation

◆ m_aModelsToProcess

ref array<ResourceName> SCR_BatchPrefabsOperationsTool.m_aModelsToProcess
protected

◆ m_aNewNames

ref array<string> SCR_BatchPrefabsOperationsTool.m_aNewNames
protected

◆ m_aPrefabsToProcess

ref array<ResourceName> SCR_BatchPrefabsOperationsTool.m_aPrefabsToProcess
protected

◆ m_bGenerateNames

bool SCR_BatchPrefabsOperationsTool.m_bGenerateNames
protected

◆ m_iAddonToUse

int SCR_BatchPrefabsOperationsTool.m_iAddonToUse
protected

◆ m_sBaseClass

ResourceName SCR_BatchPrefabsOperationsTool.m_sBaseClass
protected

◆ m_sDirectoryToProcess

ResourceName SCR_BatchPrefabsOperationsTool.m_sDirectoryToProcess
protected

◆ m_sPathToSave

ResourceName SCR_BatchPrefabsOperationsTool.m_sPathToSave
protected

◆ m_sPrefabConfig

ResourceName SCR_BatchPrefabsOperationsTool.m_sPrefabConfig
protected

The documentation for this interface was generated from the following file: