Change label and/or colour of DzContentFolder?

desleadeslea Posts: 27

I'd like to build a script with the following behaviour.

1. I select a folder in Content Library.
2. I either right-click and select an option, or go to the scripts menu and select an option.
3. Something happens to make the folder visibly different without changing the file path or breaking any internal references - a highlight colour, the ability to change the label, etc.

Application: I want to go through my Content Directory and in some way flag the ones that aren't in the Product Library so I can go in later and manually add them (or pay my kid to do it, or something).

I can see that there is a string variable for a label on DzContentFolder, but I can't figure out how I can (a) connect the dots to a selected folder and (b) modify the label.

Is what I want to do possible?

Many thanks

Comments

  • rbtwhizrbtwhiz Posts: 2,250
    edited October 2014

    Samples:
    - Set Content Library Container
    - Render To Asset Icon

    The first shows the various ways to set the current container in the Content Library pane. The second shows how to access the currently selected assets in the Content Library pane; roughly 2/3 through is a loop that iterates over selected assets. The DzAsset API is [thus far] undocumented, but can be explored [like any object] using a "for...in" loop to print member signatures. One of the script accessible methods on a DzAsset object is getMetadata(), which returns a DzAssetMetadata object. This object has a newItem property that, when true, causes the item to be marked "new" (i.e. be visually distinguishable).

    There are a few other details that would likely cause a little frustration without documentation, so I went ahead and filled in the blanks...

    Mark Selected Assets As New

    -Rob

    Post edited by rbtwhiz on
  • desleadeslea Posts: 27
    edited December 1969

    Wow, that's awesome, Rob; I'll go and play with this. Thanks so much for the head start - I'll keep you posted.

    Cheers - Deslea

Sign In or Register to comment.