-
Notifications
You must be signed in to change notification settings - Fork 11
Preserve UV Maps #293
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
base: v3-dev
Are you sure you want to change the base?
Preserve UV Maps #293
Conversation
# First, collect UV mapping data from property groups before they are cleared | ||
uv_mapping_data = {} | ||
for s_obj in model_card.objects: | ||
if s_obj.uv_data_serialized: # Only process objects that have UV data stored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question... why do serialise and store the uvs to the model card.
Are the original meshes not still in the file, can we pull the UVs from them?
# Restore UV coordinates | ||
expected_coords = len(mesh.loops) * 2 # 2 coords per loop | ||
|
||
if len(uv_coords) == expected_coords: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the number of loops on the new mesh is different?
DO NOT MERGE BEFORE #290
This PR adds UV mapping preservation functionality.
store_uv_mappings()
function to capture UV layer data before object deletionrestore_uv_mappings()
function to apply stored UV data to newly loaded objectsblender.uv.mapping.mp4