Convert To Fusion: Turn any instance into a Fusion description instantly

Hey there! I’ve released a plugin which allows you to convert instances to Fusion (by Elttob) modules.

Usage

Simply select a GUI and press the Convert To Fusion button in the toolbar
image

Limitations

  • This plugin will only convert members that can be acessed and modified by regular context scripts
  • Since this just reads and casts properties, there will be a lot of redundant code that could be refactored. However, it does respect the default properties from Instance.new()
  • There’s no icon (uncertaintly about licensing)`

Be sure to check it out!

15 Likes

Just check if the value typeof is Axes and then reconstruct it using the Axes constructor. I’ve made a detailed post about Axes here.

1 Like

I already know how the Axes and Faces datatypes work, the issue is casting them back to a string that doesn’t become Axes.new(nil, nil, Enum.Axis.Z) or whatever

Even though the plugin itself generates redundant code, I’d still like to have my casting module output clean results.

There is an Enum called Enum.NormalId that you can use. Do something like this:

function toString(obj)
    function choose(typeofaxis)
        if typeofaxis == 'x' then
            return "Enum.NormalId.Left, Enum.NormalId.Right"
        elseif typeofaxis == 'y' then
            return "Enum.NormalId.Top, Enum.NormalId.Bottom"
        elseif typeofaxis == 'z' then
            return "Enum.NormalId.Front, Enum.NormalId.Back"
        end
    end
    local str = "Axes.new("
    if obj['PROPERTYNAMETHATUSESAXES'].X then
        str += choose('x') .. ","
    end
    if obj['PROPERTYNAMETHATUSESAXES'].Y then
        str += choose('y') .. ","
    end
    if obj['PROPERTYNAMETHATUSESAXES'].Z then
        str += choose('z')
    end
    if str:split("")[table.getn(str:split(""))]  == "," then
        str = str:gsub(".$", "")
    end
    return str .. ")"
end
-- Sorry for inconsistent use of quotes lol

Nice plugin. Is this any different from Hydrogen?

Hey, I made an icon if you wanna use it. Sent it to you in your DMs. It’s not the best but if you wanna use it, go ahead!

If this is in reference to licensing concerns around the Fusion logo, name or brand assets, I’ve just added in a section on the Fusion website to address this :slight_smile:

Brand Guidelines - Fusion (elttob.github.io)

1 Like

You’ve just made porting my guis to using Fusion literally 10 times faster, as I’ve recently took interest in Fusion since it just seemed interesting, I decided to thought about using Fusion in one of my games but converting the gui would be pain since I’m essentially recreating a gui except it’s now Luau code.

In short, thanks for the plugin!

why is it privated…??

i rly need it currently.