bs_tags

bs_tags.add_asset_tags(astRoot, name=None, category=None, context=None, version=None, sk=None)
bs_tags.add_tags(shapes=False, selected=False, context='', category='', asset_name='', mat='', vary=None, shd='', version='', phz='')

Description:

Adds the required tag for all/selected or passed scene shapes.

It checks for a given taskID, if not, the global sessionTaskID is used, if not exist,

an error occurs asking the user to connect the session a task from tactic first.

optional args:

shapes list default=[] if given, given shapes list are processed, ‘selected’ arg is ignored.

selected bool default=False apply on selected objects otherwise on all the shapes in the scene.

dir string default=”” if given, it sets the dir tag.

name string default=”” if given, it sets the name tag.

mat string default=”” if given, it sets the mat tag.

version string default=”001” if given, it sets the version tag.

vary[] list this is not given as argument, but it’s been set internally to rand(0,1) color.

Returns a list of objects that were already have Tags.

bs_tags.create_empty_tags(shapes=[], selected=False, category='', name='', mat='', shd='', version='001')

Description:

Adds the required tag for all/selected or passed scene shapes.

It checks for a given taskID, if not, the global sessionTaskID is used, if not exist,

an error occurs asking the user to connect the session a task from tactic first.

optional args:

shapes list default=[] if given, given shapes list are processed, ‘selected’ arg is ignored.

selected bool default=False apply on selected objects otherwise on all the shapes in the scene.

dir string default=”” if given, it sets the dir tag.

name string default=”” if given, it sets the name tag.

mat string default=”” if given, it sets the mat tag.

version string default=”001” if given, it sets the version tag.

vary[] list this is not given as argument, but it’s been set internally to rand(0,1) color.

Returns a list of objects that were already have Tags.

bs_tags.del_tags(shapes)
bs_tags.getAttributes(geo)
bs_tags.load_shape_tags()
bs_tags.load_tags()
bs_tags.predefined_attrs()
bs_tags.retarget_tags(shapes, ast, category='', name='', born='', phz='', mat='', shd='', version='')

Description:

Retargets the current asset to different task.

Quation:

This should only be used in cases when you want to use this asset for another project as a new asset or when

you want to modify this asset and publish it out into a completely new asset that will have different shaders

and textures or will pass through different production stages that were not started yet.

Warning:

Do never use this function to modify ‘tags’ for an asset that is already in use in production unless you are sure

you will be publishing it out into a new asset with a new TaskID that will be used for a new production stages.

Examples on when you can use this function:

  • When you want to import a character model to modify it to be a different needed character.

    in this case, you should also consider resubmitting the model textures into the new task structure in case they

    are needed.

  • When you import an asset from an old project database to use it into the current project.

optional args:

selected bool default=False apply on selected objects otherwise on all the shapes in the scene.

ast string default=”” if given, it sets the assetName of the object astID string default=”” if given, it sets the assetID.

otherwise from sessionAssetID.

name string default=”” if given, it sets the name tag.

mat string default=”” if given, it sets the mat tag.

version string default=”001”, if not given, the default of 001 will be set to the retargeted object.

Returns list of objects that doesn’t have tags to be retargeted.

bs_tags.set_tags(shapes=None, selected=True, ast='', category='', name='', context='', born='', phz='', mat='', shd='', vary=None, version='', fix_names=False)

Description:

sets the given tasks for selected/all objects, the command doesn’t support

modifying the ‘born’, ‘dir’ and ‘name’ tags since it supposed to be created once on tag creation

for the first time using add_tags() when this is a newley created object.

optional args:

selected True by default will set tags for the selected object only.

mat “”

vary[] a vector attribute RGB/XYZ that can be used for shader variations.

version “”

Returns a list of the invalid objects that doesn’t have tags.

bs_tags.set_task_details(ast, currentTaskCode, taskContext, taskDescription)