Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Oct 16, 2024
1 parent 3e06374 commit 60e6ee2
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from . import addon_updater_ops

from .fast64_internal.utility import prop_split
from .fast64_internal.utility import prop_split, multilineLabel, draw_and_check_tab

from .fast64_internal.repo_settings import (
draw_repo_settings,
Expand Down Expand Up @@ -72,6 +72,36 @@
)


class F3D_GlobalSettingsPanel(bpy.types.Panel):
bl_idname = "F3D_PT_global_settings"
bl_label = "F3D Global Settings"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = "Fast64"

@classmethod
def poll(cls, context):
return True

# called every frame
def draw(self, context):
col = self.layout.column()
col.scale_y = 1.1 # extra padding
prop_split(col, context.scene, "f3d_type", "F3D Microcode")
col.prop(context.scene, "saveTextures")
col.prop(context.scene, "f3d_simple", text="Simple Material UI")
col.prop(context.scene, "exportInlineF3D", text="Bleed and Inline Material Exports")
if context.scene.exportInlineF3D:
multilineLabel(
col.box(),
"While inlining, all meshes will be restored to world default values.\n You can configure these values in the world properties tab.",
icon="INFO",
)
col.prop(context.scene, "ignoreTextureRestrictions")
if context.scene.ignoreTextureRestrictions:
col.box().label(text="Width/height must be < 1024. Must be png format.")


class Fast64_GlobalSettingsPanel(bpy.types.Panel):
bl_idname = "FAST64_PT_global_settings"
bl_label = "Fast64 Global Settings"
Expand Down Expand Up @@ -298,7 +328,9 @@ def draw(self, context):
Fast64_Properties,
Fast64_BoneProperties,
Fast64_ObjectProperties,
F3D_GlobalSettingsPanel,
Fast64_GlobalSettingsPanel,
Fast64_GlobalToolsPanel,
UpgradeF3DMaterialsDialog,
)

Expand Down Expand Up @@ -444,7 +476,10 @@ def register():
# called on add-on disabling
def unregister():
utility_anim_unregister()
f3d_unregister(True)
op_largetexture_unregister()
flipbook_unregister()
f3d_writer_unregister()
f3d_parser_unregister()
sm64_unregister(True)
oot_unregister(True)
mk64_unregister(True)
Expand Down

0 comments on commit 60e6ee2

Please sign in to comment.