solbaver
(solbaver)
August 28, 2016, 8:02pm
1
Basic .3mf import and export scripts (no textures so far, only mesh).
For import script:
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
import bpy
import zipfile
This file has been truncated. show original
1)BeautifulSoup library should be installed. It is super easy: https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-beautiful-soup
2)just type in console:
blender --background --python import.py ‘YOUR_FILE_PATH’ ‘YOUR_FILE_NAME’
For export script:
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
import bpy
import zipfile
This file has been truncated. show original
1)not well-tested yet
2)just type in console:
blender --background --python export.py ‘YOUR_FILE_PATH’ ‘YOUR_FILE_NAME’
NoHands
(NoHands)
October 10, 2019, 11:06pm
2
Hi all
do I just copy import script open note pad save as import.py into scrips?
thanks
Shane
svankirk
(svankirk)
November 11, 2019, 3:32pm
3
Don’t bother, it doesn’t work. When I run the script, I get the error that it cannot get bs4 from beautiful soup. Might be my setup, but it’s easier to just use 3d builder if you run windows.
1 Like