* [Codebase] Fix setOrigin AGAIN
transform_apply was not neeeded, typehint was missing and offset was being affected by obj.location, we actually just zero it out now before applying the world matrix.
also removed the temp_override cause transform already does that.
* Update utility.py
* Update utility.py
* add doc string, use the original matrix as a base and apply the inverted original to the mesh (im stupid)
add doc string instead of a comment mentioning the behavior
* black
* another tryy
* [Codebase] Restore original functionality to setOrigin
the remade version of set origin was not equivalent to the previous one, breaking SM64.
we were applying -target_loc instead of the offset between target loc and the original location
* uhh comment was still :true:, sorry
* implement prop
* first iter of custom cmd exporting
* let rovert fly
* Update sm64_objects.py
* Update sm64_objects.py
* Update sm64_objects.py
* upgrade existing custom geo into new custom type
* Hack for geo because
* [SM64] Add depth arg and remove comma from existing cmds
* [SM64] add depth arg to level and collision objects
* change unused depth to _depth and add my stashed changes.. oops
* some code clean up and ui improvement
* Allow custom geo to have children
* command preset system (WIP)
allows you to create presets for your repo.
missing auto updates to presets
* detect changes via a hash
* fix last remaining bugs
* fix preset edit preview
* add draw layers
* basic example macro
* boolean support and fixes
* world's most over enginered way to handle numbers
* bugs and visual fixes
* make color serializable
* dont use PRESET_EDIT if presumably there is no edit data
* use degrees
* inital support for bones
* dont require transform to be inherented, fixes bone using scale arg
* remove sys, last few bits of code tomorrow
* move custom args into a folder
* lock
* typing fixes
* use dict for exports
* early binary support
* Missing dl ext and animated
* dl ext impl
* make is animatable work
* update updateBone to suit my new needs
* finish upgrade code
* dl ext now dl cmd, example macros for dl cmds
* SM64_CustomArgProperties
* enum property support to really hammer in the scope creep
* Nice move by SpongeBob! This match is just about over.
checked for mesh, removed one indent, changed Special to Collision
* some fixes to the ops
* make binary more flexiable by introducing eval expressions
Now behavior that would require a macro can be written in an eval statement, this is peak over engineering. It's also present in c under a toggle because SCALE GEO CMD COMPATABILITY!!!
* make hard defined int types for binary
* one last fix
* allow color quant for background node compat, fix enum ops
* impl last translate/rotate name in custom
* undo export color
* fix area root UI
* fix commas
* add order, fix up a couple of nits
* lila did a stupid
* fix transforms
* conventional rotation in macros is not scaled to s16
* let eval run on tuples
* implement generators
* add cast_integer
* Update properties.py
* round to conventional for scale
* document collection operator base more, fix bug with scale rounding
also add copy_on_add
* undo repo settings ver change since there has been no breaking changes
* remove unused
* implement top level level script commands
* make clean color into tuple, run eval on lists
* update base displaylist node
* little thing i noticed missing
* unnecessary names removed
* Fix transforms in level
* fix parameter
* show animatable toggle in presets
* More control of the level script section
* copy enum example
* over engineered description code
* update preset instead of changing to NONE
* fix number updates
* typo
* fix crash
* VERY IMPORTANT FIX
* link to docs
* add comment about updating existing animation pr ops
* fix animation command checks
* [SM64] Animations Rewrite/Rework
* [SM64] Animations Rewrite/Rework
* Remove animation docs from README until I write new ones in fast64_docs
* remove accidental exports
* merge conflicts?
* Fix level export includes dups
* Fixed comment adjust function
* change table properties to only have elements
* Update properties.py
* Rename
* bounds check
* keep default action name consistent with blender
* as_posix fix and clean up
* designated is include in repo settings, include in tooltip
* Fix empty text files
* fix peach's address
* Some attempts at tasteful comments
Verbose documentation like docstrings is.. not my strong suite
* allow str, use path in f3d writer
* better valid filename func
* fix things!
* review and a personal nit
* Add docs link
* [SM64] Implement someone level template styled bounding boxes
* parent to level instead
I forgot fast64 keeps the offset from the level instead of from the area
There is only one level enum (which I took the time to organize), binary will simply error out with Custom (tho it is not fully out of the possibility to support custom levels in binary in the future), upgrade code added.
Dl and animation now share props with combined, animation rework actually uses these but for now both just redraw the prop to keep the ui the same.
Imports and address converter left untouched besides enum change, these should not be per scene.
Convert to str in getPathAndLevel to avoid issues with posix paths -> abspath
Alternatively, should this be just a pr for level enums?
Closes#498
* seg 8 loading for yay0 and geo segments
* update replaceScriptLoads to add new script loads if missing
* change grid layout
* add global write/don't write toggle for actor loads and 'None' option for individual segment loads
* reappend any JUMP_LINK commands that do not contain 'script_func_global'
* formatting lol
* some code quality changes
* move write actor loads to the correct place, clean up the UI a little
(grid wasn´t even being used properly aha)
* replace yay0 or mio0 equivelent commands to current compression method
---------
Co-authored-by: Lila <[email protected]>
* [SM64] Smarter includes
Added new functions, write_includes and update_actor_includes.
write_includes is a smarter version of writeIfNotFound specifically for includes and externs, it removes comments prior to searching (but doesn't remove comments from the actual file of course) and allows whitespace (where possible, a path including whitespace won´t be found when searching for a file with no whitespace), futhermore it adds a trailing newline to the file instead of adding a leading newline for each include, the logic that finds the `#endif` of .h files is also improved like the logic to find includes and externs (whitespace is tolerated, comments are ignored) but it also allows no endif for files that use the GCC `#pragma once` macro
update_actor_includes standardizes group and level includes into one place for ease of editing, one of the major differences is that level exports no longer use the full path (levels/actor/my_file.c would instead be /actor/my_file.c) this should allow level header type actors to actually update headers on custom non decomp levels but that is not done here
* find_includes_and_externs
* as_posix
* New versatile write_or_delete_if_found function
* Ok I lied, seperate out comment map func, use string IO
* more type hints!
* seperate comment start end adjust into function
* Fix level export includes dups
* Fixed comment adjust function
* as_posix fix and clean up
* Fix empty text files
* Some attempts at tasteful comments
Verbose documentation like docstrings is.. not my strong suite
* allow str, use path in f3d writer
* header footer doc string
* Update sm64_utility.py
* gamedata update on load and game change
* cs index stuff
* gameeditormode and update panels
* format
* add versions
* comment MM game editor mode to avoid confusing users
* [SM64] Make switch material override stackable and apply layer reverts
* fix override mat + layer adapt, improve hashing method
* fix override mat + layer adapt, improve hashing method
* make non dl nodes have the correct layer
* account for layer override in reverts
* some final details
* fix bleed issue
* fix bad reverts in option 0
* make bleed support checking for reverts
* [OoT] Add move cutscene bone operator
* fixup
* No longer sort bones by name for computing the camera shot preview (which was different from what the exporter did anyway)
* Update fast64_internal/oot/cutscene/motion/properties.py
Co-authored-by: Yanis <[email protected]>
---------
Co-authored-by: Yanis <[email protected]>
* cutscene fixes
* add missing includes in cs exporter
* use CS_FLOAT
* don't use cs_float for actor cues and use it for the unused values
* review
---------
Co-authored-by: Dragorn421 <[email protected]>
* [SM64/F3D] Use WriteDifferingAndRevert for bleed
Write all logic remains unaffected, obviously.
A new dict was added to map each mode cmd to its default.
For the actual bleed part, we fIrst need to add geo mode reverts of the last material to the geo mode of the current material, since the current material may not set them now. For othermodes we do something different, get all reverts and add any that doesn´t get set again by the current material ignoring bleeding.
For the geo mode revert, we keep track of one geo mode command for set and clear, updating it as we go. For othermodes we keep track of all of the command types and then revert them using the new dict.
* remove this
* scut sabotage
* Port over #462
We cannot just assume that othermodeh or othermodel are always setting the same bits, so instead we write the diff of the current cmd to the one already in the reset dict, this means that if a materials sets rendermode and another sets alpha compare (for example) it will still revert the rendermode because those bits will be carried over in the reset dict
* make write different optional, as it can lead to bigger dls
* clean up sm64 repo settings
* im gonna have to rework a bunch of othermode stuff i actually dispise fast64 so much
* RendermodeBlender class
* Update f3d_bleed.py
* i just want to be done with this
* [Repo Settings] Only set if different
Fixes lag at start up from draw layers being set unnecessarily.
Some clean up that I already did in #461
* Update utility.py
* is_rendermode_cmd to def
* fix rendermode
* return RendermodeBlender instead of temp list
* instead of using a revert, set when no render mode
* make rendermode command hashable, check for default
* pick appropriate geo cmd, make geo cmds use sets
makes dls just a bit cleaner and makes ex1 work correctly
* implement render mode reset fix
* Update f3d_bleed.py
* undo dumb change
* respect write method
* only revert as needed, i feel like a god
* make switchs work super well
* fix setting rendermode
* remove repeated resets in switch options and add options for reverts in bones
* use last_mat by default
* comment out occlusion plane code to show bleed indep
* functions already work
* fix load othermodes
these work more like write diffs, so we do that
* someone forgot
* fix prev node issue
* create our own pipe syncs
* Update f3d_bleed.py
* fix disgusting broken late night code
* Revert "fix disgusting broken late night code"
This reverts commit 9ece1511595678a551fae02f906a998fbde1ffba.
* Update sm64_geolayout_classes.py
* something is wrong but i cant figure it out
* dont remove lighting
* fix DPSetRenderMode
* fix write all rendermode
* fix this bug once and for all
* write all get_flags impl
* get_flags
* forgot to do diff in reverts in write all
* add back prim depth, accidentally removed
* comments (not ready)
* not a union
* not a tuple
Co-authored-by: Dragorn421 <[email protected]>
* proper formatting
Co-authored-by: Dragorn421 <[email protected]>
* use load sync
* oopsie dasie
* use pipe syncs again
---------
Co-authored-by: Dragorn421 <[email protected]>
* add missing versions and improve quick import
* remove debug print
* add ignore cs stop preview setting
* lilaa's suggestion + added ique-cn
* throw a warning when trying to import a cutscene which already exists in the data