Skip to content

Python accessibility and graph-resource filter changes

David Thompson requested to merge dcthomp/smtk:regex-explorer into master

Python changes

Add methods and python bindings to make scripting simpler:

import smtk
import smtk.common
import smtk.plugin
loaded, skipped = smtk.loadPlugins()
mgrs = smtk.common.Managers.create()
smtk.plugin.registerPluginsTo(mgrs)
operMgr = mgrs.get('smtk.operation.Manager')
rsrcMgr = mgrs.get('smtk.resource.Manager')

will load plugins for you, create an "application context" (i.e., smtk.common.Managers), and populate it with all the objects that plugins create for you (such as resource and operation managers).

Graph-resource

This MR also changes the filter-query grammar for graph resources. Now, in addition to previous rules for matching component names, "bare" component type-names are accepted.

For example, if your filter-query was 'SomeNodeType [string{'name'='foo'}], it is now also legal to write SomeNodeType [string{'name'='foo'}] (i.e., no single-quotes required around the node's type-name). This simplifies some upcoming changes for run-time arcs.

Edited by David Thompson

Merge request reports