'bam deps' command - working on basic level

This commit is contained in:
2014-11-05 15:36:10 +01:00
parent cbe3d1693f
commit 2ca9bc1d46
2 changed files with 24 additions and 7 deletions

View File

@@ -330,17 +330,25 @@ class bam_utils:
if file_type != "dir":
print(" %s" % name_short)
@staticmethod
def deps(paths, recursive=False):
import blendfile_path_walker
import os
# TODO(cam) multiple paths
for blendfile_src in paths:
blendfile_src = blendfile_src.encode('utf-8')
for fp, (rootdir, fp_blend_basename) in blendfile_path_walker.FilePath.visit_from_blend(
blendfile_src,
readonly=True,
recursive=recursive,
):
print(" %r -> %r" % (os.path.join(fp.basedir, fp_blend_basename), fp.filepath))
def subcommand_init_cb(args):
bam_utils.init(args.url, args.directory_name)
@staticmethod
def deps(paths):
# TODO(cam) multiple paths
path = paths[0]
def subcommand_checkout_cb(args):
bam_utils.checkout(args.paths)