addam / Export-Paper-Model-from-Blender

Python addon for creating paper models in Blender (development version)
https://blenderartists.org/t/export-paper-model/476597
405 stars 53 forks source link

Exporting using python console #65

Closed MahmoudAshraf-CIS closed 5 years ago

MahmoudAshraf-CIS commented 5 years ago

am trying to export the default cube as a paper model but I got the following error AttributeError: 'ExportPaperModel' object has no attribute 'object' and here is a screenshot of blender image

steps :- first openup blender and go to the python console then ran the following lines in order

import bpy
bpy.data.objects['Cube'].select = True # Select the default Blender Cube
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.editmode_toggle()
bpy.ops.export_mesh.paper_model(filepath='D:\\')

windows 10 - 64bit - blender version 2.79

sorry if it's a naive problem but am new at both blender and python, so any pointers would be great thanks in advance

addam commented 5 years ago

You are right, the script cannot be used from console. I have it on my task list for blender 2.80.

addam commented 5 years ago

Fixed in branch blender28