API:Class/Plugin

"Plugin" redirects here. For a tutorial on plugins, see Tutorial:Plugins.
Filtered-inheritance mode: While this class technically inherits all Instance class members, some (if not all) have been hidden because they serve no purpose for this object.
Plugin class: This object has been marked as a plugin class. Most if not all of its members are exclusive to the PluginSecurity level.

Plugin.pngPlugin : Object Icon.pngInstance

Plugin is the main object responsible for creating basic studio widgets.

Properties

Properties [toggle]

boolCollisionEnabled [readonly]

Returns whether the user enabled Collisions in studio under the Model tab.

|RMD member="API:Class/Plugin/CollisionEnabled"|Returns whether the user enabled Collisions in studio under the Model tab.|/RMD|
floatGridSize [readonly]

Returns the grid size the user has set in studio under the Model tab.

|RMD member="API:Class/Plugin/GridSize"|Returns the grid size the user has set in studio under the Model tab.|/RMD|
CollisionEnabled [readonly]
Returns whether the user enabled Collisions in studio under the Model tab.
GridSize [readonly]
Returns the grid size the user has set in studio under the Model tab.

Functions

Functions [toggle]

voidActivate ( bool exclusiveMouse ) [PluginSecurity]

Sets the state of the calling plugin to activated. Allows mouse control through the GetMouse method.

|RMD member="API:Class/Plugin/Activate"|Sets the state of the calling plugin to activated. Allows mouse control through the GetMouse method.|/RMD|
ToolbarCreateToolbar ( string name ) [PluginSecurity]

Gets or creates a new Toolbar with the specified name, which is then used to create a plugin button.

|RMD member="API:Class/Plugin/CreateToolbar"|Gets or creates a new Toolbar with the specified name, which is then used to create a plugin button.|/RMD|
JointCreationModeGetJoinMode ( ) [PluginSecurity]

Returns the JointCreationMode the user has set in studio under the Model tab.

|RMD member="API:Class/Plugin/GetJoinMode"|Returns the JointCreationMode the user has set in studio under the Model tab.|/RMD|
PluginMouseGetMouse ( ) [PluginSecurity]

Returns a mouse that can be used with the plugin.

|RMD member="API:Class/Plugin/GetMouse"|Returns a mouse that can be used with the plugin.|/RMD|
RibbonToolGetSelectedRibbonTool ( ) [PluginSecurity]

Returns the currently selected RibbonTool.

|RMD member="API:Class/Plugin/GetSelectedRibbonTool"|Returns the currently selected RibbonTool.|/RMD|
VariantGetSetting ( string key ) [PluginSecurity]

Retrieves a previously stored value with the given key, or nil if the given key doesn't exist.

|RMD member="API:Class/Plugin/GetSetting"|Retrieves a previously stored value with the given key, or nil if the given key doesn't exist.|/RMD|
intGetStudioUserId ( ) [PluginSecurity]

Returns the studio user’s userId if they're logged in, otherwise returns 0.

|RMD member="API:Class/Plugin/GetStudioUserId"|Returns the studio user’s userId if they're logged in, otherwise returns 0.|/RMD|
array<NegateOperation>Negate ( array<BasePart> objects ) [PluginSecurity]

Negates the given parts and returns the resulting NegateOperations.

|RMD member="API:Class/Plugin/Negate"|Negates the given parts and returns the resulting NegateOperations.|/RMD|
voidOpenScript ( LuaSourceContainer script, int lineNumber = 1 ) [PluginSecurity]

Used to open the given script instance in an editor window, in ROBLOX studio, at the given line. If no line is given as an argument it will default to 0.

|RMD member="API:Class/Plugin/OpenScript"|Used to open the given script instance in an editor window, in ROBLOX studio, at the given line. If no line is given as an argument it will default to 0.|/RMD|
voidOpenWikiPage ( string url ) [PluginSecurity]

Opens the context help window to the wiki page that url links to.

|RMD member="API:Class/Plugin/OpenWikiPage"|Opens the context help window to the wiki page that url links to.|/RMD|
voidSaveSelectedToRoblox ( ) [PluginSecurity]

Opens an upload window for the user's current selection.

|RMD member="API:Class/Plugin/SaveSelectedToRoblox"|Opens an upload window for the user's current selection.|/RMD|
voidSelectRibbonTool ( RibbonTool tool, UDim2 position ) [PluginSecurity]

Activates the specified Roblox Studio tool. If the tool opens a window, the position parameter specifies where it should be shown on the screen.

|RMD member="API:Class/Plugin/SelectRibbonTool"|Activates the specified Roblox Studio tool.

If the tool opens a window, the position parameter specifies where it should be shown on the screen.|/RMD|

array<BasePart>Separate ( array<PartOperation> objects ) [PluginSecurity]

Separates the given UnionOperations and returns the resulting parts.

|RMD member="API:Class/Plugin/Separate"|Separates the given UnionOperations and returns the resulting parts.|/RMD|
voidSetSetting ( string key, Variant value ) [PluginSecurity]

Stores a given value for later use under the given key. The value will persist even after studio is closed.

|RMD member="API:Class/Plugin/SetSetting"|Stores a given value for later use under the given key. The value will persist even after studio is closed.|/RMD|
Ref<UnionOperation>Union ( array<BasePart> objects ) [PluginSecurity]

Unions the given parts and returns the resulting UnionOperation.

|RMD member="API:Class/Plugin/Union"|Unions the given parts and returns the resulting UnionOperation.|/RMD|
Activate ( bool exclusiveMouse ) [PluginSecurity]
Sets the state of the calling plugin to activated. Allows mouse control through the GetMouse method.
CreateToolbar ( string name ) [PluginSecurity]
Gets or creates a new Toolbar with the specified name, which is then used to create a plugin button.
GetJoinMode ( ) [PluginSecurity]
Returns the JointCreationMode the user has set in studio under the Model tab.
GetMouse ( ) [PluginSecurity]
Returns a mouse that can be used with the plugin.
GetSelectedRibbonTool ( ) [PluginSecurity]
Returns the currently selected RibbonTool.
GetSetting ( string key ) [PluginSecurity]
Retrieves a previously stored value with the given key, or nil if the given key doesn't exist.
GetStudioUserId ( ) [PluginSecurity]
Returns the studio user’s userId if they're logged in, otherwise returns 0.
Negate ( array<BasePart> objects ) [PluginSecurity]
Negates the given parts and returns the resulting NegateOperations.
OpenScript ( LuaSourceContainer script, int lineNumber = 1 ) [PluginSecurity]
Used to open the given script instance in an editor window, in ROBLOX studio, at the given line. If no line is given as an argument it will default to 0.
OpenWikiPage ( string url ) [PluginSecurity]
Opens the context help window to the wiki page that url links to.
SaveSelectedToRoblox ( ) [PluginSecurity]
Opens an upload window for the user's current selection.
SelectRibbonTool ( RibbonTool tool, UDim2 position ) [PluginSecurity]
Activates the specified Roblox Studio tool. If the tool opens a window, the position parameter specifies where it should be shown on the screen.
Separate ( array<PartOperation> objects ) [PluginSecurity]
Separates the given UnionOperations and returns the resulting parts.
SetSetting ( string key, Variant value ) [PluginSecurity]
Stores a given value for later use under the given key. The value will persist even after studio is closed.
Union ( array<BasePart> objects ) [PluginSecurity]
Unions the given parts and returns the resulting UnionOperation.

YieldFunctions

YieldFunctions [toggle]

intPromptForExistingAssetId ( string assetType ) [PluginSecurity]

Opens a window in Roblox Studio, which prompts the user to select an asset based on the assetType specified. Returns what assetId was selected, or -1 if the window was closed.

|RMD member="API:Class/Plugin/PromptForExistingAssetId"|Opens a window in Roblox Studio, which prompts the user to select an asset based on the assetType specified. Returns what assetId was selected, or -1 if the window was closed.|/RMD|
boolPromptSaveSelection ( string suggestedFileName = "" ) [PluginSecurity]

Prompts the user to save their current selection with the specified file name. Returns true if the user did save the file.

|RMD member="API:Class/Plugin/PromptSaveSelection"|Prompts the user to save their current selection with the specified file name. Returns true if the user did save the file.|/RMD|
PromptForExistingAssetId ( string assetType ) [PluginSecurity]
Opens a window in Roblox Studio, which prompts the user to select an asset based on the assetType specified. Returns what assetId was selected, or -1 if the window was closed.
PromptSaveSelection ( string suggestedFileName = "" ) [PluginSecurity]
Prompts the user to save their current selection with the specified file name. Returns true if the user did save the file.

Events

Events [toggle]

Deactivation ( ) [PluginSecurity]

Fired when the plugin is deactivated either by the player toggling the button or selecting a different plugin.

|RMD member="API:Class/Plugin/Deactivation"|Fired when the plugin is deactivated either by the player toggling the button or selecting a different plugin.|/RMD|
Deactivation ( ) [PluginSecurity]
Fired when the plugin is deactivated either by the player toggling the button or selecting a different plugin.

|RMD member="API:Class/Plugin"|Plugin is the main object responsible for creating basic studio widgets. |/RMD|