Socket Spawner - GUID-based Workbench plugin Processes selected prefab (.et) assets from the Resource Browser.
More...
|
| override void | Configure () |
| | Display configuration dialog with plugin settings and usage instructions.
|
| |
| override void | Run () |
| | Main execution method - processes selected prefabs and spawns entities at socket bones.
|
| |
|
| void | Execute () |
| | Execute button handler - triggers the plugin execution.
|
| |
| bool | Close () |
| | Close button handler - closes the configuration dialog.
|
| |
| void | GetSelectedResources (out array< ResourceName > selectedResources) |
| | Get selected resources from Resource Browser Can be overridden by inherited classes to use different selection methods.
|
| |
| bool | ProcessSelectedPrefabs (out array< ResourceName > outPrefabs) |
| | Collect selected resources from Resource Browser and filter to .et prefabs.
|
| |
| bool | ProcessSinglePrefab (ResourceName prefabResource, WorldEditor worldEditor, bool clearExistingChildren) |
| | Process a single prefab: create temp entity, optionally clear children, scan bones, spawn children.
|
| |
| bool | RefreshBoneMatrixMap (notnull IEntitySource entitySource, notnull out map< string, ref array< vector > > boneMatrixMap, WorldEditorAPI api) |
| | Build a map of bone names to their transformation matrices from entity animation data Based on RefreshBoneMatrixMap pattern used in SCR_PrefabSocketProcessorPlugin.c.
|
| |
| bool | ExtractGuidFromBoneName (string boneName, out string guid16, out string suffix) |
| | Extract GUID16 from bone name pattern: "socket_<GUID16>_<suffix>" (case-insensitive)
|
| |
| bool | CreateEntityAtBone (string boneName, string guid16, vector position, array< vector > boneMatrix, WorldEditor worldEditor, IEntitySource parentEntitySource) |
| | Create a child entity at a bone location using GUID-based ResourceName "{GUID16}".
|
| |
| void | ShowResults () |
| | Display results summary in console and dialog box.
|
| |
Socket Spawner - GUID-based Workbench plugin Processes selected prefab (.et) assets from the Resource Browser.
Scans bones named like "socket_<GUID16>_<suffix>" and spawns children using ResourceName "{GUID}".
◆ Close()
| bool SCR_SocketSpawnerPlugin.Close |
( |
| ) |
|
|
protected |
Close button handler - closes the configuration dialog.
◆ Configure()
| override void SCR_SocketSpawnerPlugin.Configure |
( |
| ) |
|
Display configuration dialog with plugin settings and usage instructions.
◆ CreateEntityAtBone()
| bool SCR_SocketSpawnerPlugin.CreateEntityAtBone |
( |
string | boneName, |
|
|
string | guid16, |
|
|
vector | position, |
|
|
array< vector > | boneMatrix, |
|
|
WorldEditor | worldEditor, |
|
|
IEntitySource | parentEntitySource ) |
|
protected |
Create a child entity at a bone location using GUID-based ResourceName "{GUID16}".
- Parameters
-
| boneName | Name of the socket bone (for logging) |
| guid16 | 16-character GUID hex string to construct resource name |
| position | World position for the new entity |
| boneMatrix | 4x4 transformation matrix from bone (used for rotation) |
| worldEditor | WorldEditor module instance |
| parentEntitySource | Parent entity source to attach the new entity to |
- Returns
- True if entity created successfully, false on error
◆ Execute()
| void SCR_SocketSpawnerPlugin.Execute |
( |
| ) |
|
|
protected |
Execute button handler - triggers the plugin execution.
◆ ExtractGuidFromBoneName()
| bool SCR_SocketSpawnerPlugin.ExtractGuidFromBoneName |
( |
string | boneName, |
|
|
out string | guid16, |
|
|
out string | suffix ) |
|
protected |
Extract GUID16 from bone name pattern: "socket_<GUID16>_<suffix>" (case-insensitive)
- Parameters
-
| boneName | The bone name to parse |
| guid16 | Output: extracted GUID as uppercase hex string (16 characters) |
| suffix | Output: optional suffix after the GUID (text after second underscore) |
- Returns
- True if valid GUID16 pattern found, false otherwise
◆ GetSelectedResources()
| void SCR_SocketSpawnerPlugin.GetSelectedResources |
( |
out array< ResourceName > | selectedResources | ) |
|
|
protected |
Get selected resources from Resource Browser Can be overridden by inherited classes to use different selection methods.
- Parameters
-
| selectedResources | Output array to receive selected resource names |
Implemented in SCR_SocketSpawnerPluginWE.
◆ ProcessSelectedPrefabs()
| bool SCR_SocketSpawnerPlugin.ProcessSelectedPrefabs |
( |
out array< ResourceName > | outPrefabs | ) |
|
|
protected |
Collect selected resources from Resource Browser and filter to .et prefabs.
- Parameters
-
| outPrefabs | Output array to receive filtered prefab resource names |
- Returns
- True if at least one prefab is found, false otherwise
◆ ProcessSinglePrefab()
| bool SCR_SocketSpawnerPlugin.ProcessSinglePrefab |
( |
ResourceName | prefabResource, |
|
|
WorldEditor | worldEditor, |
|
|
bool | clearExistingChildren ) |
|
protected |
Process a single prefab: create temp entity, optionally clear children, scan bones, spawn children.
- Parameters
-
| prefabResource | The prefab resource to process |
| worldEditor | WorldEditor module instance |
| clearExistingChildren | If true, removes existing prefab children before spawning new ones |
- Returns
- True if processing succeeded, false on error
◆ RefreshBoneMatrixMap()
| bool SCR_SocketSpawnerPlugin.RefreshBoneMatrixMap |
( |
notnull IEntitySource | entitySource, |
|
|
notnull out map< string, ref array< vector > > | boneMatrixMap, |
|
|
WorldEditorAPI | api ) |
|
protected |
Build a map of bone names to their transformation matrices from entity animation data Based on RefreshBoneMatrixMap pattern used in SCR_PrefabSocketProcessorPlugin.c.
- Parameters
-
| entitySource | The entity source to extract bone data from |
| boneMatrixMap | Output map of bone names to 4x4 transformation matrices (as array of 4 vectors) |
| api | WorldEditorAPI instance for entity operations |
- Returns
- True if at least one bone was found, false otherwise
◆ Run()
| override void SCR_SocketSpawnerPlugin.Run |
( |
| ) |
|
Main execution method - processes selected prefabs and spawns entities at socket bones.
◆ ShowResults()
| void SCR_SocketSpawnerPlugin.ShowResults |
( |
| ) |
|
|
protected |
Display results summary in console and dialog box.
◆ m_aErrors
| ref array<string> SCR_SocketSpawnerPlugin.m_aErrors |
|
protected |
◆ m_bClearChildren
| bool SCR_SocketSpawnerPlugin.m_bClearChildren |
|
protected |
◆ m_bVerboseOutput
| bool SCR_SocketSpawnerPlugin.m_bVerboseOutput |
|
protected |
◆ m_iCreatedEntities
| int SCR_SocketSpawnerPlugin.m_iCreatedEntities |
|
protected |
◆ m_iProcessedPrefabs
| int SCR_SocketSpawnerPlugin.m_iProcessedPrefabs |
|
protected |
◆ m_iTotalSockets
| int SCR_SocketSpawnerPlugin.m_iTotalSockets |
|
protected |
The documentation for this interface was generated from the following file:
- WorkbenchGame/ResourceManager/SCR_SocketSpawnerPlugin.c