Export Paper Model: Wrong get and set parameters for the output_margin property #52261

Closed
opened 2017-08-04 14:48:22 +02:00 by Vuk Gardašević · 5 comments

System Information
Windows 7

Blender Version
Broken: 2.79 RC1 and previous builds

Short description of error
The functions for get and set for the property output_margin have a wrong structure / calls which leads to errors

Exact steps for others to reproduce the error
Enable Export Paper Model > with an object selected go to Export Menu> Select the Paper Model from it > the errors will show up in the cmd / terminal.

Traceback (most recent call last):
  File "2.78\scripts\addons\io_export_paper_model.py", line 2051, in <lambda>
    return lambda self: self[name] / bpy.context.scene.unit_settings.scale_length
KeyError: 'bpy_struct[key]: key "output_margin" not found'
}

If the problem is fixed by taking the lambda from a separate function block into the property itself, it will end up in the infinite recursion.
The structure of input parameters and return values doesn't match with the current API for get and set related to Properties.

I'm not sure what is the intention/scope of the margin so I cannot fix the issue as the margin in the current code takes it's own values and updates them while in other cases in other add-ons other properties/ functions are used.

**System Information** Windows 7 **Blender Version** Broken: 2.79 RC1 and previous builds **Short description of error** The functions for get and set for the property `output_margin` have a wrong structure / calls which leads to errors **Exact steps for others to reproduce the error** Enable Export Paper Model > with an object selected go to Export Menu> Select the Paper Model from it > the errors will show up in the cmd / terminal. ``` Traceback (most recent call last): File "2.78\scripts\addons\io_export_paper_model.py", line 2051, in <lambda> return lambda self: self[name] / bpy.context.scene.unit_settings.scale_length KeyError: 'bpy_struct[key]: key "output_margin" not found' } ``` If the problem is fixed by taking the lambda from a separate function block into the property itself, it will end up in the infinite recursion. The structure of input parameters and return values doesn't match with the current API for get and set related to Properties. I'm not sure what is the intention/scope of the margin so I cannot fix the issue as the margin in the current code takes it's own values and updates them while in other cases in other add-ons other properties/ functions are used.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @VukGardasevic

Added subscriber: @VukGardasevic
Author
Member

Added subscriber: @emu-3

Added subscriber: @emu-3
Adam Dominec self-assigned this 2017-08-06 10:21:19 +02:00
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

The problem was that blender-addons repository contains a completely wrong version of the script. Apparently I forgot to update it for a long time. Sorry, and thank you for the report.

Fixed in c960569: updated to github version.

The problem was that `blender-addons` repository contains a completely wrong version of the script. Apparently I forgot to update it for a long time. Sorry, and thank you for the report. Fixed in c960569: updated to github version.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#52261
No description provided.