def __init__(self, set, **kwargs): fn = "" for item in set: # Remove :mrc if present fn += " " + item.getFirstItem().getFileName().split(':')[0] pwviewer.CommandView.__init__( self, "%s %s" % (Plugin.getImodCmd('3dmod'), fn)) self.show()
def __init__(self, obj, **kwargs): # Remove :mrc if present if isinstance(obj, tomo.objects.LandmarkModel): tsId = os.path.basename(obj.getFileName()).split('_')[0] if os.path.exists(os.path.join(os.path.split(obj.getModelName())[0], "%s_preali.st" % tsId)): prealiTSPath = os.path.join(os.path.split(obj.getModelName())[0], "%s_preali.st" % tsId) elif os.path.exists(os.path.join(os.path.split(obj.getModelName())[0], "%s.preali" % tsId)): prealiTSPath = os.path.join(os.path.split(obj.getModelName())[0], "%s.preali" % tsId) else: prealiTSPath = "" fn = Plugin.getImodCmd('3dmod') + " -m " + prealiTSPath + " " + obj.getModelName() + " ; " else: fn = Plugin.getImodCmd('3dmod') + ' ' + obj.getFileName().split(':')[0] pwviewer.CommandView.__init__(self, fn)
def __init__(self, set, **kwargs): fn = "" for item in set: tsId = os.path.basename(item.getFileName()).split('_')[0] if os.path.exists( os.path.join( os.path.split(item.getModelName())[0], "%s_preali.st" % tsId)): prealiTSPath = os.path.join( os.path.split(item.getModelName())[0], "%s_preali.st" % tsId) elif os.path.exists( os.path.join( os.path.split(item.getModelName())[0], "%s.preali" % tsId)): prealiTSPath = os.path.join( os.path.split(item.getModelName())[0], "%s.preali" % tsId) else: prealiTSPath = "" fn += Plugin.getImodCmd( '3dmod') + " -m " + prealiTSPath + " " + item.getModelName( ) + " ; " pwviewer.CommandView.__init__(self, fn) self.show()
def __init__(self, set, **kwargs): fn = " -s 0,0 " for item in set: fn += " " + item.getLocation()[1] pwviewer.CommandView.__init__(self, Plugin.getImodCmd('3dmod') + fn) self.show()