Skip to main content
deleted 367 characters in body
Source Link
Scott
  • 11
  • 2

I am new to blender/python api. I am trying to import an object into blender using python api, and I keep getting syntax errors. Here is what it looks like:

bpy.ops.import_scene.obj(obj() ... bpy.ops.import_scene.obj(filepath="//OBJECTS/Boat_OBJ.rar Folder/Boat.obj", filter_glob=".obj", use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0, axis_forward='-Z', axis_up='Y') File "<blender_console>", line 2 bpy.ops.import_scene.obj(filepath="//OBJECTS/Boat_OBJ.rar Folder/Boat.obj", filter_glob=".obj", use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0, axis_forward='-Z', axis_up='Y') ^ SyntaxError: invalid syntax

import bpy
from mathutils import Matrix, Vector
from math import radians

context = bpy.context
scene = context.scene

bpy.ops.import_scene.obj(obj()
bpy.ops.import_scene.obj(filepath="//OBJECTS/Boat_OBJ.rar Folder/Boat.obj", filter_glob="*.obj", use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0, axis_forward='-Z', axis_up='Y')

The above gives me syntax errors. Thanks in advance for any help!

I am new to blender/python api. I am trying to import an object into blender using python api, and I keep getting syntax errors. Here is what it looks like:

bpy.ops.import_scene.obj(obj() ... bpy.ops.import_scene.obj(filepath="//OBJECTS/Boat_OBJ.rar Folder/Boat.obj", filter_glob=".obj", use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0, axis_forward='-Z', axis_up='Y') File "<blender_console>", line 2 bpy.ops.import_scene.obj(filepath="//OBJECTS/Boat_OBJ.rar Folder/Boat.obj", filter_glob=".obj", use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0, axis_forward='-Z', axis_up='Y') ^ SyntaxError: invalid syntax

Thanks in advance for any help!

I am new to blender/python api. I am trying to import an object into blender using python api, and I keep getting syntax errors. Here is what it looks like:

import bpy
from mathutils import Matrix, Vector
from math import radians

context = bpy.context
scene = context.scene

bpy.ops.import_scene.obj(obj()
bpy.ops.import_scene.obj(filepath="//OBJECTS/Boat_OBJ.rar Folder/Boat.obj", filter_glob="*.obj", use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0, axis_forward='-Z', axis_up='Y')

The above gives me syntax errors. Thanks in advance for any help!

Source Link
Scott
  • 11
  • 2

how do I import .obj using python/blender api

I am new to blender/python api. I am trying to import an object into blender using python api, and I keep getting syntax errors. Here is what it looks like:

bpy.ops.import_scene.obj(obj() ... bpy.ops.import_scene.obj(filepath="//OBJECTS/Boat_OBJ.rar Folder/Boat.obj", filter_glob=".obj", use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0, axis_forward='-Z', axis_up='Y') File "<blender_console>", line 2 bpy.ops.import_scene.obj(filepath="//OBJECTS/Boat_OBJ.rar Folder/Boat.obj", filter_glob=".obj", use_ngons=True, use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0, axis_forward='-Z', axis_up='Y') ^ SyntaxError: invalid syntax

Thanks in advance for any help!