Skip to content

Refactor#5

Open
Wiechciu wants to merge 4 commits into
RaidTheory:mainfrom
Wiechciu:refactor
Open

Refactor#5
Wiechciu wants to merge 4 commits into
RaidTheory:mainfrom
Wiechciu:refactor

Conversation

@Wiechciu

@Wiechciu Wiechciu commented Aug 18, 2025

Copy link
Copy Markdown

A couple of refactors:

  • Refactored context menu item creation to use much easier EditorContextMenuPlugin instead of manually manipulating the popup menu.
  • Added check for .fbx files so that context menu item is added only when at least one .fbx file is selected and not every time like it is now.
  • Changed some methods like to_snake_case() to use the built in logic instead of the custom made.
  • Removed the destination direction selection, using the source location by default - makes the process much quicker, users can move the files later if they want.
  • Removed unused and unnecessary methods.
  • Left unchanged the main logic of the _process_fbx_file() method.

@Wiechciu Wiechciu marked this pull request as ready for review August 20, 2025 18:32
@Wiechciu

Copy link
Copy Markdown
Author

Hi @mattmarcin
Can you review and test on your side?
Let me know if something is unclear, if you don't feel like this is a good approach to take with this addon, or anything else. I'm happy to revisit the idea and help you develop a better solution.

Thanks!

@mattmarcin

Copy link
Copy Markdown
Contributor

Will review this week. Thanks for the contributions!

@DigitallyTailored

Copy link
Copy Markdown

It would be great to get these bits in

@Wiechciu

Copy link
Copy Markdown
Author

Hi @mattmarcin, any progress on this topic?
I haven't tested myself, but apparently your version breaks in 4.6, while my refactors make it still work
https://bsky.app/profile/mieko.dev/post/3malpthx7js26

Thanks in advance!

@geri1245 geri1245 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, changes, thanks for fixing this for 4.6!

Comment on lines +21 to +26
func _validate_paths(paths: Array) -> bool:
for path: String in paths:
if path.get_extension() == "fbx":
return true

return false

@geri1245 geri1245 Feb 14, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will return true if the first file is fbx, even if the rest is not. I think, this is what you were looking for:

Suggested change
func _validate_paths(paths: Array) -> bool:
for path: String in paths:
if path.get_extension() == "fbx":
return true
return false
func _validate_paths(paths: Array) -> bool:
for path: String in paths:
if path.get_extension() != "fbx":
return false
return true

Oh, I see that this is only for the context menu to appear. Still, I think that the retarget option should only be shown if only fbx files are selected. But it also works as it is 👍

@ssebs

ssebs commented Feb 20, 2026

Copy link
Copy Markdown

Hey just wanted to chime in here, I've spent some time trying to get this working, I had to make 2 changes for my setup (after copying the changes in #5)

  1. Enable subresources["animations"]["mixamo_com"]["save_to_file/keep_custom_tracks"] = true
  2. Create a brand new BoneMap + SkeletonProfileHumanoid in my FBX, overwrite the default one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants