MCPcopy Create free account
hub / github.com/ImageEngine/cortex / getDefaultVersion

Method getDefaultVersion

python/IECore/ClassLoader.py:120–130  ·  view source on GitHub ↗
( self, name )

Source from the content-addressed store, hash-verified

118 # been set explicitly with setDefaultVersion() then
119 # it defaults to the highest available version.
120 def getDefaultVersion( self, name ) :
121
122 c = self.__findClass( name )
123
124 v = self.__defaultVersions.get( name, c["versions"][-1] )
125 if not v in c["versions"] :
126 msg( Msg.Level.Warning, "ClassLoader.getDefaultVersion", "Version %d doesn't exist, reverting to version %d." % ( v, c["versions"][-1] ) )
127 v = c["versions"][-1]
128 self.__defaultVersions[name] = v
129
130 return v
131
132 ## Loads the specified version of the named class.
133 # Version defaults to getDefaultVersion( name ) if

Callers 3

loadMethod · 0.95
testMethod · 0.95
testRefreshMethod · 0.95

Calls 2

__findClassMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected