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

Script via ZIP import doesn't work #4

Closed
Taroslord opened this issue Oct 22, 2021 · 3 comments
Closed

Script via ZIP import doesn't work #4

Taroslord opened this issue Oct 22, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Taroslord
Copy link

Scripts are imported wrong. See the example below. Looks like you place UTF code.
The original code is this:

import bpy

selection = bpy.context.selected_objects #Get selected objects

for o in selection: #Loop through selected objects
    bpy.context.view_layer.objects.active = o #Set object in loop as active 
    if bpy.context.view_layer.objects.active.type == 'MESH': #if object type is MESH then...
        bpy.ops.mesh.customdata_custom_splitnormals_clear()

The version you import looks like this:
b"import bpy\r\n\r\nselection = bpy.context.selected_objects #Get selected objects\r\n\r\nfor o in selection: #Loop through selected objects\r\n bpy.context.view_layer.objects.active = o #Set object in loop as active \r\n if bpy.context.view_layer.objects.active.type == 'MESH': #if object type is MESH then...\r\n bpy.ops.mesh.customdata_custom_splitnormals_clear()\r\n"

The ZIP file include the right code.

Info: Importing Python files works fine.

@Taroslord Taroslord changed the title Cript via ZIP import doesn't work Script via ZIP import doesn't work Oct 22, 2021
@RivinHD RivinHD added the bug Something isn't working label Oct 27, 2021
@RivinHD
Copy link
Owner

RivinHD commented Oct 27, 2021

Thanks for the report, I will try to fix it this week.

@RivinHD
Copy link
Owner

RivinHD commented Nov 2, 2021

Solved in Version 2.1.3

@RivinHD RivinHD closed this as completed Nov 2, 2021
@Taroslord
Copy link
Author

Looks good so far!
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants