Example #1
0
def main(argv):

    from dddUtils.blender import Obj

    name = argv[0]
    fn_out = argv[1]

    print('importing: ' + name)

    O = Obj(name, 'a')
    O.smooth()
    O.set_smooth_shade()
    O.move_rescale(set_pivot=[0.5, -0.5, 0.5], pos=[0, 0, 0], scale=100)
    O.apply_mat()

    bpy.ops.wm.save_as_mainfile(filepath=fn_out)
Example #2
0
def main(argv):

  from dddUtils.blender import Obj

  name = argv[0]
  fn_out = argv[1]

  print('importing: ' + name)

  O = Obj(name, 'a')
  O.smooth()
  O.set_smooth_shade()
  O.move_rescale(set_pivot=[0.5,-0.5,0.5], pos=[0,0,0], scale=100)
  O.apply_mat()

  bpy.ops.wm.save_as_mainfile(filepath=fn_out)
def main(argv):

    from glob import glob
    from dddUtils.blender import Obj

    prefix = argv[0]
    fn_out = argv[1]

    objs = []
    count = 0

    for fn in sorted(glob("{:s}*.obj".format(prefix))):

        print("importing: " + fn)

        O = Obj(fn, "a")
        O.set_smooth_shade()
        O.move_rescale(set_pivot=[0.5, -0.5, 0.5], pos=[0, 0, 0], scale=100)
        O.smooth()
        O.animate_vis(count, count + 1)
        O.apply_mat()
        objs.append(O)

        count += 1

    bpy.data.scenes["Scene"].frame_current = 1
    bpy.data.scenes["Scene"].frame_end = count - 1

    bpy.ops.wm.save_as_mainfile(filepath=fn_out)
Example #4
0
def main(argv):

    from glob import glob
    from dddUtils.blender import Obj

    prefix = argv[0]
    fn_out = argv[1]

    objs = []
    count = 0

    for fn in sorted(glob('{:s}*.obj'.format(prefix))):

        print('importing: ' + fn)

        O = Obj(fn, 'a')
        O.set_smooth_shade()
        O.move_rescale(set_pivot=[0.5, -0.5, 0.5], pos=[0, 0, 0], scale=100)
        O.smooth()
        O.animate_vis(count, count + 1)
        O.apply_mat()
        objs.append(O)

        count += 1

    bpy.data.scenes['Scene'].frame_current = 1
    bpy.data.scenes['Scene'].frame_end = count - 1

    bpy.ops.wm.save_as_mainfile(filepath=fn_out)