Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed how skipped objects behave #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slebed
Copy link

@slebed slebed commented Aug 16, 2024

This changes how skipped objects are processed.
Spline primitives are replaced with empties in blender using the transforms they have. This helps keep hierarchies intact.
Camera targets are parented to their camera's.
Point objects are converted to arrowed empties.
Dummy objects are converted to crosses.
The .max file unit scale is read and Blender's unit scale is changed to match.

This changes how skipped objects are processed.  Spline primitives are replaced with empties in blender using the transforms they have.  This helps keep hierarchies intact.   Camera targets are parented to their camera's.
The ,max file unit scale is read and Blender's unit scale is changed to match.
@slebed
Copy link
Author

slebed commented Aug 16, 2024

I hope you don't mind me modifying your script. I tried it with a couple of my max scene files and had issues with parenting. Some of the skipped objects were needed to maintain my hierarchy. After I got that working I started having fun with other things like parenting camera targets to their cameras. I also started looking into seeing if there's a way to adjust Blender to the 3dsmax scene scale and units automatically so you wouldn't need to type in a scale on import.

Copy link
Owner

@nrgsille76 nrgsille76 left a comment

Choose a reason for hiding this comment

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

I commented some parts, the rest seems okay

@@ -875,21 +876,21 @@ def get_metadata(index):

def get_guid(chunk):
clid = get_class(chunk)
if (clid and clid.get_first(0x2060)):
Copy link
Owner

Choose a reason for hiding this comment

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

This will fail in some files, it has to check if class id is None

return clid.get_first(0x2060).data[1]
return chunk.types


def get_super_id(chunk):
clid = get_class(chunk)
if (clid and clid.get_first(0x2060)):
Copy link
Owner

Choose a reason for hiding this comment

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

same here

return clid.get_first(0x2060).data[2]
return None


def get_cls_name(chunk):
clid = get_class(chunk)
if (clid and clid.get_first(0x2042)):
Copy link
Owner

Choose a reason for hiding this comment

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

and here

@slebed
Copy link
Author

slebed commented Aug 17, 2024

Thanks,, I'll test out those changes. Is there anything you'd like me to focus on next? Do you have a list of features you'd like to add or are you finished with this project?

BTW, I really appreciate this script. I don't have access to my copy of 3dsmax2014 since the licenses can't be retrieved anymore. I thought all my old projects were lost forever. Now I've been able to load them up and save them.

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.

2 participants