I want to make my two sided (input model is collada). so, for that i want to duplicate all the faces in edit mode and then flip normals, and then export the model as fbx. i want to do this using python script.
my command to run the python script is
blender --background --python MeshDuplicate.py
Below is the .py file i am calling:
import bpy
import sys
object = bpy.ops.wm.collada_import(filepath="H:\\models\\armour.dae")
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_all(action='SELECT')
dup_object = bpy.data.objects.get("object")
object_d = dup_object.copy()
object_d.data = object.data.copy()
scene = bpy.context.scene
scene.objects.link(dup_object)
scene.update()
bpy.ops.export_scene.fbx(filepath="H:\\models\\armour.fbx", axis_forward='-Z', axis_up='Y')
i am getting this error.
Read new prefs: C:\Users\Lee\AppData\Roaming\Blender Foundation\Blender\2.76\config\userpref.blend AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 96000hz instead found bundled python: C:\Program Files\Blender Foundation\Blender\2.76\python Writing node id='node', name='node' Traceback (most recent call last): File "", line 2, in File "C:\Program Files\Blender Foundation\Blender\MeshDuplicate_Flip.py", line 11, in object_d = dup_object.copy() AttributeError: 'NoneType' object has no attribute 'copy'