Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
1ccf49f
General settings rework, tools rework, level layout operator, etc
Lilaa3 Dec 12, 2023
8793dff
Undid a sin
Lilaa3 Jan 6, 2024
e0713b0
fixed a thing
Lilaa3 Jan 6, 2024
f455153
oops
Lilaa3 Jan 6, 2024
70d1a1a
Another oopsie
Lilaa3 Jan 6, 2024
ee0d63c
black
Lilaa3 Jan 7, 2024
4e833f6
register and unregister settings at the end
Lilaa3 Jan 7, 2024
5a5e2d1
Merge commit '70310474e4627ae3f0a3a43a81aced4aa1200cf3^' into setting…
Lilaa3 Jan 7, 2024
dd77415
Merge commit '70310474e4627ae3f0a3a43a81aced4aa1200cf3' into settings…
Lilaa3 Jan 7, 2024
033c992
Merge remote-tracking branch 'upstream/main' into settings_changes
Lilaa3 Jan 7, 2024
36d13e0
the black reformater errors are hard to read
Lilaa3 Jan 7, 2024
ee9cb1b
is it correct now?
Lilaa3 Jan 7, 2024
da2e667
suggested changes and seperate import panel bool
Lilaa3 Jan 7, 2024
d09cf59
no more f strings....
Lilaa3 Jan 8, 2024
7eb9d6d
remove dumb import
Lilaa3 Jan 8, 2024
c8a750c
me when im in a making bad comments competition and my opponent is my…
Lilaa3 Jan 8, 2024
e8f3445
false
Lilaa3 Jan 8, 2024
d4e77af
unnecessary traces are not a good thing
Lilaa3 Jan 8, 2024
ce265d6
removed the export part of goals (all of them for consistency)
Lilaa3 Jan 8, 2024
a65c5bc
black formatting my nemesis
Lilaa3 Jan 8, 2024
b4ce8c6
AAAAAAAAAAAAAA
Lilaa3 Jan 8, 2024
135bc06
updated read me
Lilaa3 Jan 8, 2024
2266656
suggested
Lilaa3 Jan 8, 2024
5489fd7
force extended ram toggle (to free the 4 mb people of this bull)
Lilaa3 Jan 8, 2024
785820c
Matstack complient export toggle
Lilaa3 Jan 8, 2024
d1b28f3
ok ok fine i will turn on format on save
Lilaa3 Jan 8, 2024
d3c754e
new lines :))))))))))))))))))
Lilaa3 Jan 8, 2024
3b4dbf3
small spelling mistake
Lilaa3 Jan 8, 2024
7b619ec
lighting engine presets
Lilaa3 Jan 8, 2024
7214167
Moved tools and settings into their own folders
Lilaa3 Jan 22, 2024
dcd1c84
remove more imports
Lilaa3 Jan 22, 2024
5849c00
forgot to move this
Lilaa3 Apr 6, 2024
e2d882b
format
Lilaa3 Apr 6, 2024
25f83fa
Merge branch 'main' into move_for_settings_rework
Lilaa3 Apr 6, 2024
50f4630
small mistakes
Lilaa3 Apr 7, 2024
0190158
General settings rework, tools rework, level layout operator, etc
Lilaa3 Dec 12, 2023
b46507a
Undid a sin
Lilaa3 Jan 6, 2024
2d5052e
fixed a thing
Lilaa3 Jan 6, 2024
2c4eb0e
oops
Lilaa3 Jan 6, 2024
5b2aeb7
Another oopsie
Lilaa3 Jan 6, 2024
4b43898
register and unregister settings at the end
Lilaa3 Jan 7, 2024
e4484e0
is it correct now?
Lilaa3 Jan 7, 2024
9b26660
suggested changes and seperate import panel bool
Lilaa3 Jan 7, 2024
6369175
no more f strings....
Lilaa3 Jan 8, 2024
5c1d767
remove dumb import
Lilaa3 Jan 8, 2024
cce6823
me when im in a making bad comments competition and my opponent is my…
Lilaa3 Jan 8, 2024
c6d7a85
false
Lilaa3 Jan 8, 2024
cbf751d
unnecessary traces are not a good thing
Lilaa3 Jan 8, 2024
372c876
removed the export part of goals (all of them for consistency)
Lilaa3 Jan 8, 2024
5a59cb3
black formatting my nemesis
Lilaa3 Jan 8, 2024
1b63d24
AAAAAAAAAAAAAA
Lilaa3 Jan 8, 2024
321dbc9
updated read me
Lilaa3 Jan 8, 2024
bc5e9f9
suggested
Lilaa3 Jan 8, 2024
bc5263a
force extended ram toggle (to free the 4 mb people of this bull)
Lilaa3 Jan 8, 2024
c159e64
Matstack complient export toggle
Lilaa3 Jan 8, 2024
5b6a243
ok ok fine i will turn on format on save
Lilaa3 Jan 8, 2024
d443b41
new lines :))))))))))))))))))
Lilaa3 Jan 8, 2024
39ec2fb
small spelling mistake
Lilaa3 Jan 8, 2024
eb6d841
lighting engine presets
Lilaa3 Jan 8, 2024
64c132d
small mistakes
Lilaa3 Apr 7, 2024
a902183
finish rebase
Lilaa3 May 10, 2024
3e8bd21
fix conflicts?
Lilaa3 May 10, 2024
6800bfc
Merge branch 'main' into settings_changes
Lilaa3 May 10, 2024
5cf0f92
format
Lilaa3 May 10, 2024
9482d96
Undo new presets to reduce pr size
Lilaa3 May 10, 2024
9816ff2
clean changes
Lilaa3 May 10, 2024
67c7037
[SM64] - Settings Rework
Lilaa3 May 10, 2024
33402a1
Merge branch 'settings_changes' of https://github.com/Lilaa3/fast64 i…
Lilaa3 May 10, 2024
b1177e8
Add OperatorBase
Lilaa3 May 12, 2024
5191308
Some more clean up
Lilaa3 May 12, 2024
f0ab73e
More clean up
Lilaa3 May 12, 2024
737b21c
More UI improvements being worked on
Lilaa3 May 12, 2024
14a8efb
draw_props in operator base
Lilaa3 May 12, 2024
97eedc9
Use split, expect 0x for hex values
Lilaa3 May 12, 2024
dddf2ec
Less reduncancy
Lilaa3 May 12, 2024
16fc730
New warning function
Lilaa3 May 12, 2024
bf95a6e
ui warnings to not rely on exceptions in the middle of ui code
Lilaa3 May 12, 2024
386348a
More
Lilaa3 May 12, 2024
89d57db
Use @property
Lilaa3 May 12, 2024
c905dd7
Memory icon
Lilaa3 May 12, 2024
5b13d43
Move into sm64_utility
Lilaa3 May 13, 2024
600f57c
Comma
Lilaa3 May 13, 2024
fdda9ac
make this look cleaner
Lilaa3 May 17, 2024
249fa23
Seperate draw_props from just the operator draw logic
Lilaa3 May 17, 2024
c28980d
revert the seperation as its not really necessary
Lilaa3 May 17, 2024
f37be54
string_int_prop
Lilaa3 May 21, 2024
142e7ae
check existing context mode
Lilaa3 May 21, 2024
cb69c13
remove old repo properties dict
Lilaa3 May 21, 2024
bbeffea
Some more patterns ive been following
Lilaa3 May 21, 2024
34832af
icons and stuff
Lilaa3 May 21, 2024
dc1ec58
Just general stuff, im out of names
Lilaa3 May 21, 2024
5d924f9
show rdp defaults in the repo settings tab
Lilaa3 May 21, 2024
3d03100
Remove boxing
Lilaa3 May 21, 2024
9c995f3
check if auto pick is on
Lilaa3 May 21, 2024
1badb41
black
Lilaa3 May 22, 2024
82aefb1
custom int_from_str
Lilaa3 May 24, 2024
ae81d6f
Address converter into its own property class
Lilaa3 May 24, 2024
229e17e
split, improve string int prop
Lilaa3 May 24, 2024
a7b844e
put into col
Lilaa3 May 24, 2024
f203cda
Add support for objects to use SM64_Panel
Lilaa3 May 25, 2024
d03a0e1
Fix bug, make goal behavior more explicit
Lilaa3 May 25, 2024
ec2085a
Merge branch 'main' into settings_changes
Lilaa3 May 25, 2024
94f1b9f
Remove extra new line
Lilaa3 May 25, 2024
1a3cda9
Improve path checks, improve expanded error
Lilaa3 May 25, 2024
9447f8d
add back useless comment for this pr, use context to make line shorter
Lilaa3 May 25, 2024
a58bf49
fixed an issue i caused when rebasing
Lilaa3 May 25, 2024
d66c500
?
Lilaa3 May 25, 2024
60c41b1
And don´t forget to black format
Lilaa3 May 25, 2024
88725bb
no longer silently fail
Lilaa3 May 25, 2024
a63e8a6
Let me inspect my todo first before trying to solve so dependicie stuff
Lilaa3 May 25, 2024
1e864da
Implemented suggestions except for OperatorBase which has a new method
Lilaa3 May 28, 2024
627ca0a
upgrade to version 1
Lilaa3 Jun 17, 2024
28a2b7d
Merge branch 'main' into settings_changes
Lilaa3 Jun 17, 2024
f3c62f3
ported over rdp settings to json from glTF2
Lilaa3 Jun 29, 2024
7d34882
Fix importing
Lilaa3 Jun 29, 2024
44dfbb6
use cameCase for repo settings
Lilaa3 Jun 29, 2024
0f2312b
static method
Lilaa3 Jun 30, 2024
66696ef
Also upgrade conversion proprety group
Lilaa3 Jun 30, 2024
8c3f0c7
Fix int_from_str prefix check
Lilaa3 Jun 30, 2024
2e2586c
Undo accidental rename
Lilaa3 Jun 30, 2024
943c4ef
Important fix
Lilaa3 Jul 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import bpy
from bpy.utils import register_class, unregister_class
from bpy.path import abspath

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

from .fast64_internal.utility import prop_split, multilineLabel, draw_and_check_tab

from .fast64_internal.repo_settings import (
draw_repo_settings,
load_repo_settings,
repo_settings_operators_register,
repo_settings_operators_unregister,
)

from .fast64_internal.sm64 import sm64_register, sm64_unregister
from .fast64_internal.sm64.settings.properties import SM64_Properties
Expand Down Expand Up @@ -105,13 +115,14 @@ def draw(self, context):
prop_split(col, scene, "gameEditorMode", "Game")
col.prop(scene, "exportHiddenGeometry")
col.prop(scene, "fullTraceback")
prop_split(col, fast64_settings, "anim_range_choice", "Anim Range")

col.separator()
prop_split(col, fast64_settings, "anim_range_choice", "Anim Range")

col.prop(fast64_settings, "auto_pick_texture_format")
if fast64_settings.auto_pick_texture_format:
col.prop(fast64_settings, "prefer_rgba_over_ci")
draw_repo_settings(col.box(), context)
if not fast64_settings.repo_settings_tab:
col.prop(fast64_settings, "auto_pick_texture_format")
if fast64_settings.auto_pick_texture_format:
col.prop(fast64_settings, "prefer_rgba_over_ci")


class Fast64_GlobalToolsPanel(bpy.types.Panel):
Expand All @@ -134,6 +145,10 @@ def draw(self, context):
addon_updater_ops.update_notice_box_ui(self, context)


def repo_path_update(self, context):
load_repo_settings(context.scene, abspath(self.repo_settings_path), True)


class Fast64Settings_Properties(bpy.types.PropertyGroup):
"""Settings affecting exports for all games found in scene.fast64.settings"""

Expand Down Expand Up @@ -176,6 +191,14 @@ class Fast64Settings_Properties(bpy.types.PropertyGroup):
description="When enabled, fast64 will default colored textures's format to RGBA even if they fit CI requirements, with the exception of textures that would not fit into TMEM otherwise",
)

repo_settings_tab: bpy.props.BoolProperty(default=True, name="Repo Settings")
repo_settings_path: bpy.props.StringProperty(name="Path", subtype="FILE_PATH", update=repo_path_update)
auto_repo_load_settings: bpy.props.BoolProperty(
name="Auto Load Repo's Settings",
description="When enabled, this will make fast64 automatically load repo settings if they are found after picking a decomp path",
default=True,
)


class Fast64_Properties(bpy.types.PropertyGroup):
"""
Expand Down Expand Up @@ -363,6 +386,8 @@ def register():
sm64_register(True)
oot_register(True)

repo_settings_operators_register()

for cls in classes:
register_class(cls)

Expand Down Expand Up @@ -424,6 +449,8 @@ def unregister():
del bpy.types.Bone.fast64
del bpy.types.Object.fast64

repo_settings_operators_unregister()

for cls in classes:
unregister_class(cls)

Expand Down
10 changes: 7 additions & 3 deletions fast64_internal/f3d/f3d_gbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2328,6 +2328,7 @@ def __init__(
self.LODGroups: dict[str, FLODGroup] = {}
self.DLFormat: "DLFormat" = DLFormat
self.matWriteMethod: GfxMatWriteMethod = matWriteMethod
self.no_light_direction = False
self.global_data: FGlobalData = FGlobalData()
self.texturesSavedLastExport: int = 0 # hacky

Expand Down Expand Up @@ -4010,16 +4011,19 @@ def to_binary(self, f3d, segments):
class SPLightColor(GbiMacro):
# n is macro name (string)
n: str
col: int
col: Sequence[int]

def color_to_int(self):
return self.col[0] * 0x1000000 + self.col[1] * 0x10000 + self.col[2] * 0x100 + 0xFF

def to_binary(self, f3d, segments):
return gsMoveWd(f3d.G_MW_LIGHTCOL, f3d.getLightMWO_a(self.n), self.col, f3d) + gsMoveWd(
return gsMoveWd(f3d.G_MW_LIGHTCOL, f3d.getLightMWO_a(self.n), self.color_to_int(), f3d) + gsMoveWd(
f3d.G_MW_LIGHTCOL, f3d.getLightMWO_b(self.n), self.col, f3d
)

def to_c(self, static=True):
header = "gsSPLightColor(" if static else "gSPLightColor(glistp++, "
return header + str(self.n) + ", 0x" + format(self.col, "08X") + ")"
return header + f"{self.n}, 0x" + format(self.color_to_int(), "08X") + ")"


@dataclass(unsafe_hash=True)
Expand Down
Loading