INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Auto import & Auto tagging on Sub Folders?  (Read 2293 times)

Raimy

  • Recent member
  • *
  • Posts: 31
Auto import & Auto tagging on Sub Folders?
« on: May 11, 2012, 05:35:38 pm »

It appears that MC won't watch a child folder if it's parent folder is also in the watched folders list. Using a Trains Planes & Automobiles analogy, you can't set it up so Mc will Auto Tag clips of a DC10 with auto tags of

"Plane" & "DC10" i.e Parent/Child with the "Plane" tag being set up to import with the Parent folder & DC10 with the Child folder. It just deletes the Child folder from the watched Folders  list.

Consequently i have to put a lot more effort into setting up tags to auto import by adding the Parent tag to each Child Folder i want to import from.

Firstly am i understanding things correctly and is this the way it's suppose to be, i am struggling to see an upside to this implementation, although i'm sure there will be one. Can anyone else see a use for an "Include tags of Parent folders" Option?

Secondly, i wonder if anyone would be kind enough to suggest a work around?

Thanks, and i have had MC for 4 months and this is my one and only gripe on a piece of software which in my view, puts the rest to shame.



Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Auto import & Auto tagging on Sub Folders?
« Reply #1 on: May 11, 2012, 05:44:01 pm »

You can use the auto-tagging rules, that base decisions on Filename (path).  Would you like help with that?
Logged
The opinions I express represent my own folly.

Raimy

  • Recent member
  • *
  • Posts: 31
Re: Auto import & Auto tagging on Sub Folders?
« Reply #2 on: May 11, 2012, 05:51:57 pm »

Yes please MrC!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Auto import & Auto tagging on Sub Folders?
« Reply #3 on: May 11, 2012, 06:16:18 pm »

So, let's assume your directory structure of :

   ...\Trains Planes & Automobiles\Planes
   ...\Trains Planes & Automobiles\Trains
   ...\Trains Planes & Automobiles\Automobiles

Here's an auto-import rule you can configure for your parent folder "Trains Planes & Automobiles".  The rule will use matches on the folder path to trigger setting a value to some tag.  Here, I've set Keywords to either Planes, Trains, or Automobiles, depending upon which folder the media lives in.

ifelse(
  isequal([Filename (path)], \Trains Planes & Automobiles\Planes, 8),
     Planes,
  isequal([Filename (path)], \Trains Planes & Automobiles\Trains, 8),
     Trains,
  isequal([Filename (path)], \Trains Planes & Automobiles\Automobiles, 8),
     Automobiles
)

This can likely be simplified greatly in several ways, but this should give you the idea of what you can do.

The rules are configured in Tools > Import... > Configure Auto-Import, where you Edit a folder and add a new tag rule.  The attached image shows how Keywords was set automatically upon import.
Logged
The opinions I express represent my own folly.

Raimy

  • Recent member
  • *
  • Posts: 31
Re: Auto import & Auto tagging on Sub Folders?
« Reply #4 on: May 11, 2012, 06:51:21 pm »

Thanks for your time MrC, that's exactly what i was looking for. I assume their is some default (no need to script it) behavior going on here because their is no reference to the "Keyword" field? How would i apply it to a "Vehicle Type" field. And i wonder if it's possible in Mc to add Folder names as Tags and making this work for any new folder that appears in the Main Directory?


Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Auto import & Auto tagging on Sub Folders?
« Reply #5 on: May 11, 2012, 07:06:51 pm »

In the tag rule pull down, you select the field you want tagged.  I happened to select Keywords (but didn't show that - you'll see it when you try to configure a rule).  You'd select your Vehicle Type field.

MC already has Folder names contained in its metadata.  It has:

  Filename
  Filename (path)
  Filename (name)

which are the full path, path-only, and name-only portions, respectively.  You can grab portions of those for use if necessary, or like we did above, use rules to tag.

I hard-coded those three folders in the expression above, just so you can easily see what was going on.  As I mentioned, we could generalize or simplify the expression to grab some portion of the path (e.g. automobiles, trains).  In order to provide a more specific solution, you'll need to provide more specific details of your setup and what you want to accomplish.  The more specific, the better.
Logged
The opinions I express represent my own folly.

Raimy

  • Recent member
  • *
  • Posts: 31
Re: Auto import & Auto tagging on Sub Folders?
« Reply #6 on: May 12, 2012, 12:34:04 pm »

I use Fraps to record in-game play video for editing & Movie creation. Route folder for all recordings is
"D:\Archive\Media\Game Footage\MW2\Video"

I'd like all files located inside route or inside any sub-folders to be tagged:
Field = "Media Sub Type" Value = "Other"
Field = "Category" Value = "Game"

And if possible for files living inside just the route:
Field = "Keyword" Value = "Raw"

Typically i'd use the "Raw" keyword to display potential files to drag n drop into my Editor Sony Vegas.
Then i set up a Project folder inside the same route as before for Vegas Completed movies =
"Route\Project Name"
Field = "Projects" Value = "Project Folders Name"
 
And a Sub folder for Previews =
"Route\Project Name\Preview"
Field = "Projects" Value = "Project Folders Name"
Field = "Keyword" Value = "Preview"

The ideal is to take away from MC any micro-management whilst editing, i tend to get side tracked easily with tweaking MC to the above ends, and forget about the Project at hand.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Auto import & Auto tagging on Sub Folders?
« Reply #7 on: May 12, 2012, 01:37:21 pm »

Some things to keep in mind or consider:

1) auto-import tag rules run only when *importing*.  So they can't be run later as a matter of routine.  You'd have to remove the file from MC's database and then re-import.  So these rules are not good for transitions, such as from Raw to Completed.  If you are creating a new copy of a file in a different location, then of course, auto-import tagging rules will affect the soon-to-be-imported files.

2) some "tagging" that you're asking about may be better accomplished by setting up views instead.  Since you already know your hard-coded folder scheme, you can create views that show your file categories, such as Preview, Raw, and therefore any file that meets that criteria automatically shows up in the proper place in the view.

I'm not sure precisely what you mean by "micro-management".  If MC has imported the file, and auto-import is configured to look inside your work area, it will import what's there.  Many users decide to have a work area not visible to MC's auto-import, and then they manually move files into an MC-monitored directory for import.
Logged
The opinions I express represent my own folly.

Raimy

  • Recent member
  • *
  • Posts: 31
Re: Auto import & Auto tagging on Sub Folders?
« Reply #8 on: May 12, 2012, 05:07:09 pm »

I may of explained that badly. There are no copies of any files

The files in the Route folder would be imported with the Raw tag, and remain as such, these files will always be "Raw" & un-edited.

The files in the Project folder is where i'd like to script into Mc's Auto Import Rules the flexibility to read the folder name & tag all contents including files in sub folders with the folder name as a tag. The files in the Project folder are completed movies placed there from Vegas. On import to MC these files would inherit the tags from it's parents and have additional ones including the folder name.

The Files in the Preview Folder would also only contain new files placed there via Vegas, and on import would inherit tags from all parents, and additionally have the folder name as a tag.

If auto-import is configured to look inside my work area, it will import everything that's there but it doesn't afford me the ability to auto-tag Sub-Folders differently to the configured Folder. The only way, discounting for a second, your snippet above, i have found to auto tag the Preview Folder's contents with the tag "Preview" is by forgoing the auto-import & auto-tagging of it's parent folders files and adding the Preview folder. If i try to add both, one of them disappears. If i just add the Parent folder i shouldn't be adding the Auto-tag "Preview"

True in some cases it would be simple enough to manually tag said files in a view, however the difference in this case i find is the files i am talking about have barely any distinguishing identifiers, the thumbnails are often identical, as they are often of the same scene, and their names are auto generated by Vegas and differ by 1 or 2 digits from a very long name, and it's tedious enough to look for a way to automate the addition of these particular tags.

Anyhow i will thank you for your Snippet above and put it to good use. :)



 
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Auto import & Auto tagging on Sub Folders?
« Reply #9 on: May 12, 2012, 09:13:18 pm »

Is there a particular reason you want to "tag" the files (with, say, "Preview") rather than using the folder hierarchy to drive view presentation?  I ask mostly to ascertain if you're understanding that Views can be based on the already-present properties of each file imported into MC (and since Filename, etc. is available, the data is already there - there may be no need to create an import rule to tag).

So that you can get an idea of what data is already available for imported files, open Tag Action Window and expand the list to Show All Tags (the pull down icon left of the header "Tag").  Anything there (and more) can be used to construct views.
Logged
The opinions I express represent my own folly.

Raimy

  • Recent member
  • *
  • Posts: 31
Re: Auto import & Auto tagging on Sub Folders?
« Reply #10 on: May 13, 2012, 02:14:48 am »

Is there a particular reason you want to "tag" the files (with, say, "Preview") rather than using the folder hierarchy to drive view presentation?  I ask mostly to ascertain if you're understanding that Views can be based on the already-present properties of each file imported into MC (and since Filename, etc. is available, the data is already there - there may be no need to create an import rule to tag).

So that you can get an idea of what data is already available for imported files, open Tag Action Window and expand the list to Show All Tags (the pull down icon left of the header "Tag").  Anything there (and more) can be used to construct views.

Not so much the "Preview" files but the "Project Name" files yes. Maybe a parculiarity in the way i use some tags, The Project name tag is not just used to describe where it's files are, which as you say could be better served with a Filename(path) view category. It's also used after import to manually tag, viewed Raw files in the route and identify those that have something to contribute to that project. After-which i can select the Project Name in the Project field and see all relevant files regardless of where it resides, then refine the selection with the other two relevant tags "Raw","Preview" depending on my intentions. No reason why

Iv set up a view including the Filename(path) category as you have suggested to see if it would work for me and was pretty amazed to see those check boxes which allow you to move the selected file from one location to another, really hadn't expected that. I could move relevant Raw files into the Project folder, instead of tagging them, but one Raw file can contribute to many projects so that's not a good idea. No reason why Tag "Preview" can't be taken out of the equation though, for just the reasons you've explained, same goes for the "Raw" tag as well. I think the "Project Name" tag is necessary because of it's dual purpose. What do you think?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Auto import & Auto tagging on Sub Folders?
« Reply #11 on: May 13, 2012, 03:32:45 am »

Ok, sounds like you're understanding the essentials.  So, here are some ideas to get you going.

First, since you're going to use your Route folder many times, create a new user-defined field called _fRoute, which is a calculated field, and define the expression to be the full path of your Route folder, including the trailing backslash:

Field: _fRoute: Calculated:
    D:\Archive\Media\Game Footage\MW2\Video\

Now, the following expressions (untested) can be used as auto-import rules for the given fields to set values as you've asked, and they'll all use the [_fRoute] field so that you don't have to change all the expression should you someday change the Route path.  You'll have to define a auto-tag rule for each field you want set, unfortunately.  You can test each in a Panes view, as expression columns:

Quote from: Raimy
I'd like all files located inside route or inside any sub-folders to be tagged:
Field = "Media Sub Type" Value = "Other"
Field = "Category" Value = "Game"

Field: Media Sub Type: Value: Other

    ifelse(isequal([Filename], [_fRoute], 8), Other)

Field: Category: Value: Game

    if(isequal([Filename], [_fRoute], 8), Game)

Quote from: Raimy
And if possible for files living inside just the route:
Field = "Keyword" Value = "Raw"

Field: Keyword: Value: Raw

    ifelse(isequal([Filename (path)], [_fRoute]), Raw)

Quote from: Raimy
Then i set up a Project folder inside the same route as before for Vegas Completed movies = "Route\Project Name"
Field = "Projects" Value = "Project Folders Name"

Field: Projects: project's folder name

    ifelse(isequal([Filename], [_fRoute], 8),
      ifelse(compare(listcount([Filename (path)], \), >, listcount([_fRoute], \)),
          if(isequal(FileFolder(,0), Preview),
              FileFolder(,1)),
              FileFolder(,0)))

Note: this one looks to see if the route is a substring of the Filename, and then verifies the existence of sub-folders (by comparing the number of path components), and sets the project name to either the folder name of the parent or parent's parent (in the case of previews).
 
Quote from: Raimy
And a Sub folder for Previews = "Route\Project Name\Preview"
Field: "Keyword" Value = "Preview"
   ifelse(isequal([Filename], [_fRoute], 8),
      ifelse(compare(listcount([Filename (path)],\), >, listcount([_fRoute], \)),
          ifelse(isequal(FileFolder(,0), Preview), Preview)
Logged
The opinions I express represent my own folly.

Raimy

  • Recent member
  • *
  • Posts: 31
Re: Auto import & Auto tagging on Sub Folders?
« Reply #12 on: May 15, 2012, 01:32:22 pm »

Thanks MrC, that works great
Logged
Pages: [1]   Go Up