12 import maya.api.OpenMaya
as om
13 import maya.api.OpenMayaUI
as omui
14 import maya.api.OpenMayaRender
as omr
18 The presence of this function tells Maya that the plugin produces, and
19 expects to be passed, objects created using the Maya Python API 2.0.
32 class uiDrawManager(omui.MPxLocatorNode):
33 id = om.MTypeId(0x0008002A)
34 drawDbClassification =
"drawdb/geometry/uiDrawManager"
35 drawRegistrantId =
"uiDrawManagerPlugin"
41 aPrimitiveColor =
None
42 aPrimitiveTransparency =
None
67 aTextBoxTransparency =
None
75 aLineStartPoint =
None
84 aQuadVertex = [
None,
None,
None,
None]
97 omui.MPxLocatorNode.__init__(self)
101 return uiDrawManager()
105 nAttr = om.MFnNumericAttribute()
106 eAttr = om.MFnEnumAttribute()
107 typedAttr = om.MFnTypedAttribute()
110 uiDrawManager.aUIType = eAttr.create(
"uiType",
"ut", kText)
111 eAttr.addField(
"text", kText)
112 eAttr.addField(
"line", kLine)
113 eAttr.addField(
"point", kPoint)
114 eAttr.addField(
"rect", kRect)
115 eAttr.addField(
"quad", kQuad)
116 eAttr.addField(
"sphere", kSphere)
117 eAttr.addField(
"circle", kCircle)
118 eAttr.addField(
"arc", kArc)
119 om.MPxNode.addAttribute(uiDrawManager.aUIType)
122 uiDrawManager.aPrimitiveColor = nAttr.create(
"primitiveColor",
"pc", om.MFnNumericData.k3Float)
123 nAttr.default = (1.0, 0.0, 0.0)
124 nAttr.usedAsColor =
True
125 om.MPxNode.addAttribute(uiDrawManager.aPrimitiveColor)
128 uiDrawManager.aPrimitiveTransparency = nAttr.create(
"primitiveTransparency",
"pt", om.MFnNumericData.kFloat, 0.0)
129 nAttr.setSoftMin(0.0)
130 nAttr.setSoftMax(1.0)
131 om.MPxNode.addAttribute(uiDrawManager.aPrimitiveTransparency)
134 uiDrawManager.aLineWidth = nAttr.create(
"lineWidth",
"lw", om.MFnNumericData.kFloat, 2.0)
135 om.MPxNode.addAttribute(uiDrawManager.aLineWidth)
137 uiDrawManager.aLineStyle = eAttr.create(
"lineStyle",
"ls", omr.MUIDrawManager.kSolid)
138 eAttr.addField(
"solid", omr.MUIDrawManager.kSolid)
139 eAttr.addField(
"shortdotted", omr.MUIDrawManager.kShortDotted)
140 eAttr.addField(
"shortdashed", omr.MUIDrawManager.kShortDashed)
141 eAttr.addField(
"dashed", omr.MUIDrawManager.kDashed)
142 eAttr.addField(
"dotted", omr.MUIDrawManager.kDotted)
143 om.MPxNode.addAttribute(uiDrawManager.aLineStyle)
146 uiDrawManager.aIsFilled = nAttr.create(
"isFilled",
"if", om.MFnNumericData.kBoolean, 0)
147 om.MPxNode.addAttribute(uiDrawManager.aIsFilled)
150 uiDrawManager.aRadius = nAttr.create(
"radius",
"ra", om.MFnNumericData.kDouble, 1.0)
151 om.MPxNode.addAttribute(uiDrawManager.aRadius)
154 uiDrawManager.aDraw2D = nAttr.create(
"draw2D",
"d2", om.MFnNumericData.kBoolean, 0)
155 om.MPxNode.addAttribute(uiDrawManager.aDraw2D)
157 uiDrawManager.aPosition = nAttr.create(
"position",
"pos", om.MFnNumericData.k3Double)
158 nAttr.default = (0.0, 0.0, 0.001)
159 om.MPxNode.addAttribute(uiDrawManager.aPosition)
162 stringFn = om.MFnStringData()
163 defaultText = stringFn.create(
"uiDrawManager-Text")
164 uiDrawManager.aText = typedAttr.create(
"text",
"t", om.MFnData.kString, defaultText)
165 om.MPxNode.addAttribute(uiDrawManager.aText)
167 uiDrawManager.aTextFontSize = nAttr.create(
"textFontSize",
"tfs", om.MFnNumericData.kInt, omr.MUIDrawManager.kDefaultFontSize)
170 om.MPxNode.addAttribute(uiDrawManager.aTextFontSize)
172 uiDrawManager.fFontList = omr.MUIDrawManager.getFontList()
173 if len(uiDrawManager.fFontList) == 0:
174 sys.stderr.write(
"No font available!\n")
176 uiDrawManager.aFontFaceName = eAttr.create(
"fontFaceName",
"ffn", 0)
177 for i
in range(len(uiDrawManager.fFontList)):
178 faceName = uiDrawManager.fFontList[i]
179 eAttr.addField(faceName, i)
180 om.MPxNode.addAttribute(uiDrawManager.aFontFaceName)
182 uiDrawManager.aTextAlignment = eAttr.create(
"textAlignment",
"ta", omr.MUIDrawManager.kLeft)
183 eAttr.addField(
"left", omr.MUIDrawManager.kLeft)
184 eAttr.addField(
"center", omr.MUIDrawManager.kCenter)
185 eAttr.addField(
"right", omr.MUIDrawManager.kRight)
186 om.MPxNode.addAttribute(uiDrawManager.aTextAlignment)
188 uiDrawManager.eTextIncline = eAttr.create(
"textIncline",
"tic", omr.MUIDrawManager.kInclineNormal)
189 eAttr.addField(
"normal", omr.MUIDrawManager.kInclineNormal)
190 eAttr.addField(
"italic", omr.MUIDrawManager.kInclineItalic)
191 om.MPxNode.addAttribute(uiDrawManager.eTextIncline)
193 uiDrawManager.aTextWeight = eAttr.create(
"textWeight",
"tw", omr.MUIDrawManager.kWeightBold)
194 eAttr.addField(
"light", omr.MUIDrawManager.kWeightLight)
195 eAttr.addField(
"bold", omr.MUIDrawManager.kWeightBold)
196 om.MPxNode.addAttribute(uiDrawManager.aTextWeight)
198 uiDrawManager.aTextStretch = nAttr.create(
"textStretch",
"ts", om.MFnNumericData.kInt, omr.MUIDrawManager.kStretchUnstretched)
201 om.MPxNode.addAttribute(uiDrawManager.aTextStretch)
203 uiDrawManager.aTextLine = eAttr.create(
"textLine",
"tl", 0)
204 eAttr.addField(
"none", 0)
205 eAttr.addField(
"overline", omr.MUIDrawManager.kLineOverline)
206 eAttr.addField(
"underline", omr.MUIDrawManager.kLineUnderline)
207 eAttr.addField(
"strikeout", omr.MUIDrawManager.kLineStrikeoutLine)
208 om.MPxNode.addAttribute(uiDrawManager.aTextLine)
210 uiDrawManager.aTextBoxSize = nAttr.create(
"textBoxSize",
"tbs", om.MFnNumericData.k2Int)
211 nAttr.default = (0, 0)
212 om.MPxNode.addAttribute(uiDrawManager.aTextBoxSize)
214 uiDrawManager.aTextBoxColor = nAttr.create(
"textBoxColor",
"tbc", om.MFnNumericData.k3Float)
215 nAttr.default = (0.0, 1.0, 1.0)
216 nAttr.usedAsColor =
True
217 om.MPxNode.addAttribute(uiDrawManager.aTextBoxColor)
219 uiDrawManager.aTextBoxTransparency = nAttr.create(
"textBoxTransparency",
"tbt", om.MFnNumericData.kFloat, 0.0)
220 nAttr.setSoftMin(0.0)
221 nAttr.setSoftMax(1.0)
222 om.MPxNode.addAttribute(uiDrawManager.aTextBoxTransparency)
225 uiDrawManager.aPointSize = nAttr.create(
"pointSize",
"ps", om.MFnNumericData.kFloat, 2.0)
226 om.MPxNode.addAttribute(uiDrawManager.aPointSize)
229 uiDrawManager.aLineStartPoint = nAttr.create(
"lineStartPoint",
"lsp", om.MFnNumericData.k3Double)
230 nAttr.default = (0.0, 0.0, 0.0)
231 om.MPxNode.addAttribute(uiDrawManager.aLineStartPoint)
233 uiDrawManager.aLineEndPoint = nAttr.create(
"lineEndPoint",
"lep", om.MFnNumericData.k3Double)
234 nAttr.default = (1.0, 1.0, 1.0)
235 om.MPxNode.addAttribute(uiDrawManager.aLineEndPoint)
238 uiDrawManager.aRectUp = nAttr.create(
"rectUp",
"ru", om.MFnNumericData.k3Double)
239 nAttr.default = (0.0, 1.0, 0.0)
240 om.MPxNode.addAttribute(uiDrawManager.aRectUp)
242 uiDrawManager.aRectNormal = nAttr.create(
"rectNormal",
"rn", om.MFnNumericData.k3Double)
243 nAttr.default = (0.0, 0.0, 1.0)
244 om.MPxNode.addAttribute(uiDrawManager.aRectNormal)
246 uiDrawManager.aRectScale = nAttr.create(
"rectScale",
"rs", om.MFnNumericData.k2Double)
247 nAttr.default = (1.0, 1.0)
248 om.MPxNode.addAttribute(uiDrawManager.aRectScale)
251 defaultPosition = [ (0.0, 0.0, 0.0), (1.0, 0.0, 0.0), (1.0, 1.0, 0.0), (0.0, 1.0, 0.0) ]
253 fullName =
"quadVertex" + str(i)
254 shortName =
"qv" + str(i)
255 uiDrawManager.aQuadVertex[i] = nAttr.create(fullName, shortName, om.MFnNumericData.k3Double)
256 nAttr.default = defaultPosition[i]
257 om.MPxNode.addAttribute(uiDrawManager.aQuadVertex[i])
260 uiDrawManager.aCircleNormal = nAttr.create(
"circleNormal",
"cn", om.MFnNumericData.k3Double)
261 nAttr.default = (0.0, 0.0, 1.0)
262 om.MPxNode.addAttribute(uiDrawManager.aCircleNormal)
265 uiDrawManager.aArcStart = nAttr.create(
"arcStartVector",
"asv", om.MFnNumericData.k3Double)
266 nAttr.default = (1.0, 0.0, 0.0)
267 om.MPxNode.addAttribute(uiDrawManager.aArcStart)
269 uiDrawManager.aArcEnd = nAttr.create(
"arcEndVector",
"aev", om.MFnNumericData.k3Double)
270 nAttr.default = (0.0, 1.0, 0.0)
271 om.MPxNode.addAttribute(uiDrawManager.aArcEnd)
273 uiDrawManager.aArcNormal = nAttr.create(
"arcNormal",
"an", om.MFnNumericData.k3Double)
274 nAttr.default = (0.0, 0.0, 1.0)
275 om.MPxNode.addAttribute(uiDrawManager.aArcNormal)
283 class uiDrawManagerData(om.MUserData):
285 om.MUserData.__init__(self,
False)
287 self.fColor = om.MColor((1., 0., 0., 1.))
289 self.fLineStyle = omr.MUIDrawManager.kSolid
290 self.fIsFilled =
False
293 self.fPosition = om.MPoint(0.0, 0.0, 0.001)
295 self.fText =
"uiDrawManager-Text"
296 self.fTextFontSize = omr.MUIDrawManager.kDefaultFontSize
297 self.fFontFaceIndex = 0
298 self.fTextAlignment = omr.MUIDrawManager.kLeft
299 self.fTextIncline = omr.MUIDrawManager.kInclineNormal
300 self.fTextWeight = omr.MUIDrawManager.kWeightBold
301 self.fTextStretch = omr.MUIDrawManager.kStretchUnstretched
303 self.fTextBoxSize = [0, 0]
304 self.fTextBoxColor = om.MColor((0., 1., 1., 1.))
308 self.fLineStartPoint = om.MPoint(0.0, 0.0, 0.0)
309 self.fLineEndPoint = om.MPoint(1.0, 1.0, 1.0)
311 self.fRectUp = om.MVector(0.0, 1.0, 0.0)
312 self.fRectNormal = om.MVector(0.0, 0.0, 1.0)
313 self.fRectScale = [1., 1.]
315 self.fQuadVertex = [ om.MPoint(0.0, 0.0, 0.0), om.MPoint(1.0, 0.0, 0.0), om.MPoint(1.0, 1.0, 0.0), om.MPoint(0.0, 1.0, 0.0) ]
317 self.fCircleNormal = om.MVector(0.0, 0.0, 1.0)
319 self.fArcStart = om.MVector(1.0, 0.0, 0.0)
320 self.fArcEnd = om.MVector(0.0, 1.0, 0.0)
321 self.fArcNormal = om.MVector(0.0, 0.0, 1.0)
325 class uiDrawManagerDrawOverride(omr.MPxDrawOverride):
326 def __init__(self, obj):
327 omr.MPxDrawOverride.__init__(self, obj, uiDrawManagerDrawOverride.draw)
331 return uiDrawManagerDrawOverride(obj)
334 def draw(context, data):
337 def supportedDrawAPIs(self):
338 return (omr.MRenderer.kOpenGL | omr.MRenderer.kDirectX11)
340 def isBounded(self, objPath, cameraPath):
343 def boundingBox(self, objPath, cameraPath):
344 return om.MBoundingBox()
346 def prepareForDraw(self, objPath, cameraPath, frameContext, oldData):
348 if not isinstance(data, uiDrawManagerData):
349 data = uiDrawManagerData()
351 uiDrawManagerNode = objPath.node()
352 if uiDrawManagerNode.isNull():
356 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aUIType)
357 data.fUIType = plug.asShort()
361 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aPrimitiveColor)
363 nData = om.MFnNumericData(o)
364 data.fColor = om.MColor(nData.getData())
367 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aPrimitiveTransparency)
368 data.fColor.a = 1.0 - plug.asFloat()
371 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aLineWidth)
372 data.fLineWidth = plug.asFloat()
375 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aLineStyle)
376 data.fLineStyle = plug.asShort()
379 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aIsFilled)
380 data.fIsFilled = plug.asBool()
383 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aRadius)
384 data.fRadius = plug.asDouble()
387 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aDraw2D)
388 data.fDraw2D = plug.asBool()
391 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aPosition)
393 nData = om.MFnNumericData(o)
394 data.fPosition = om.MPoint(nData.getData())
395 data.fPosition.w = 1.0
397 if data.fUIType == kText:
399 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aText)
400 data.fText = plug.asString()
403 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aTextFontSize)
404 data.fTextFontSize = max(plug.asInt(), 0)
407 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aFontFaceName)
408 data.fFontFaceIndex = plug.asInt()
411 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aTextAlignment)
412 data.fTextAlignment = plug.asShort()
415 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.eTextIncline)
416 data.fTextIncline = plug.asInt()
419 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aTextWeight)
420 data.fTextWeight = plug.asInt()
423 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aTextStretch)
424 data.fTextStretch = plug.asInt()
427 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aTextLine)
428 data.fTextLine = plug.asInt()
431 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aTextBoxSize)
433 nData = om.MFnNumericData(o)
434 data.fTextBoxSize = nData.getData()
437 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aTextBoxColor)
439 nData = om.MFnNumericData(o)
440 data.fTextBoxColor = om.MColor(nData.getData())
443 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aTextBoxTransparency)
444 data.fTextBoxColor.a = 1.0 - plug.asFloat()
446 elif data.fUIType == kPoint:
448 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aPointSize)
449 data.fPointSize = plug.asFloat()
451 elif data.fUIType == kLine:
453 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aLineStartPoint)
455 nData = om.MFnNumericData(o)
456 data.fLineStartPoint = om.MPoint(nData.getData())
457 data.fLineStartPoint.w = 1.0
460 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aLineEndPoint)
462 nData = om.MFnNumericData(o)
463 data.fLineEndPoint = om.MPoint(nData.getData())
464 data.fLineEndPoint.w = 1.0
466 elif data.fUIType == kRect:
468 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aRectUp)
470 nData = om.MFnNumericData(o)
471 data.fRectUp = om.MVector(nData.getData())
474 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aRectNormal)
476 nData = om.MFnNumericData(o)
477 data.fRectNormal = om.MVector(nData.getData())
480 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aRectScale)
482 nData = om.MFnNumericData(o)
483 data.fRectScale = nData.getData()
485 elif data.fUIType == kQuad:
488 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aQuadVertex[i])
490 nData = om.MFnNumericData(o)
491 data.fQuadVertex[i] = om.MPoint(nData.getData())
493 elif data.fUIType == kCircle:
495 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aCircleNormal)
497 nData = om.MFnNumericData(o)
498 data.fCircleNormal = om.MVector(nData.getData())
500 elif data.fUIType == kArc:
502 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aArcStart)
504 nData = om.MFnNumericData(o)
505 data.fArcStart = om.MVector(nData.getData())
508 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aArcEnd)
510 nData = om.MFnNumericData(o)
511 data.fArcEnd = om.MVector(nData.getData())
514 plug = om.MPlug(uiDrawManagerNode, uiDrawManager.aArcNormal)
516 nData = om.MFnNumericData(o)
517 data.fArcNormal = om.MVector(nData.getData())
519 elif data.fUIType == kSphere:
523 sys.stderr.write(
"unhandled ui type.\n")
527 def hasUIDrawables(self):
530 def addUIDrawables(self, objPath, drawManager, frameContext, data):
531 if not isinstance(data, uiDrawManagerData):
534 if data.fUIType == kText:
538 drawManager.beginDrawable()
540 drawManager.setColor(data.fColor)
541 drawManager.setFontSize(data.fTextFontSize)
542 drawManager.setFontIncline(data.fTextIncline)
543 drawManager.setFontWeight(data.fTextWeight)
544 drawManager.setFontStretch(data.fTextStretch)
545 drawManager.setFontLine(data.fTextLine)
547 faceName = uiDrawManager.fFontList[data.fFontFaceIndex]
548 drawManager.setFontName(faceName)
550 boxSize = data.fTextBoxSize
551 if boxSize[0] + boxSize[1] == 0:
557 drawManager.text2d(data.fPosition, data.fText, data.fTextAlignment, boxSize, data.fTextBoxColor,
False)
561 drawManager.text(data.fPosition, data.fText, data.fTextAlignment, boxSize, data.fTextBoxColor,
False)
563 drawManager.endDrawable()
565 elif data.fUIType == kLine:
566 drawManager.beginDrawable()
568 drawManager.setColor(data.fColor)
569 drawManager.setLineWidth(data.fLineWidth)
570 drawManager.setLineStyle(data.fLineStyle)
573 drawManager.line2d(data.fLineStartPoint, data.fLineEndPoint)
576 drawManager.line(data.fLineStartPoint, data.fLineEndPoint)
578 drawManager.endDrawable()
580 elif data.fUIType == kPoint:
581 drawManager.beginDrawable()
583 drawManager.setColor(data.fColor)
584 drawManager.setPointSize(data.fPointSize)
587 drawManager.point2d(data.fPosition)
590 drawManager.point(data.fPosition)
592 drawManager.endDrawable()
594 elif data.fUIType == kRect:
595 drawManager.beginDrawable()
597 drawManager.setColor(data.fColor)
598 drawManager.setLineWidth(data.fLineWidth)
599 drawManager.setLineStyle(data.fLineStyle)
605 drawManager.rect2d(data.fPosition, data.fRectUp, data.fRectScale[0], data.fRectScale[1], data.fIsFilled)
609 drawManager.rect(data.fPosition, data.fRectUp, data.fRectNormal, data.fRectScale[0], data.fRectScale[1], data.fIsFilled)
611 drawManager.endDrawable()
613 elif data.fUIType == kQuad:
615 drawManager.beginDrawable()
617 drawManager.setColor(data.fColor)
618 drawManager.setLineWidth(data.fLineWidth)
619 drawManager.setLineStyle(data.fLineStyle)
622 mode = omr.MUIDrawManager.kClosedLine
624 mode = omr.MUIDrawManager.kTriStrip
627 position = om.MPointArray()
628 index = om.MUintArray()
630 position.append(data.fQuadVertex[i])
633 if not data.fIsFilled:
638 drawManager.mesh2d(mode, position,
None, index)
641 drawManager.mesh(mode, position,
None,
None, index)
643 drawManager.endDrawable()
645 elif data.fUIType == kSphere:
646 drawManager.beginDrawable()
648 drawManager.setColor(data.fColor)
649 drawManager.setLineWidth(data.fLineWidth)
650 drawManager.setLineStyle(data.fLineStyle)
652 drawManager.sphere(data.fPosition, data.fRadius, data.fIsFilled)
654 drawManager.endDrawable()
656 elif data.fUIType == kCircle:
657 drawManager.beginDrawable()
659 drawManager.setColor(data.fColor)
660 drawManager.setLineWidth(data.fLineWidth)
661 drawManager.setLineStyle(data.fLineStyle)
665 drawManager.circle2d(data.fPosition, data.fRadius, data.fIsFilled)
668 drawManager.circle(data.fPosition, data.fCircleNormal, data.fRadius, data.fIsFilled)
670 drawManager.endDrawable()
672 elif data.fUIType == kArc:
673 drawManager.beginDrawable()
675 drawManager.setColor(data.fColor)
676 drawManager.setLineWidth(data.fLineWidth)
677 drawManager.setLineStyle(data.fLineStyle)
682 drawManager.arc2d(data.fPosition, data.fArcStart, data.fArcEnd, data.fRadius, data.fIsFilled)
687 drawManager.arc(data.fPosition, data.fArcStart, data.fArcEnd, data.fArcNormal, data.fRadius, data.fIsFilled)
689 drawManager.endDrawable()
692 sys.stderr.write(
"unhandled ui type.\n")
695 def initializePlugin(obj):
696 plugin = om.MFnPlugin(obj,
"Autodesk",
"3.0",
"Any")
698 plugin.registerNode(
"uiDrawManager", uiDrawManager.id, uiDrawManager.creator, uiDrawManager.initialize, om.MPxNode.kLocatorNode, uiDrawManager.drawDbClassification)
700 sys.stderr.write(
"Failed to register node\n")
704 omr.MDrawRegistry.registerDrawOverrideCreator(uiDrawManager.drawDbClassification, uiDrawManager.drawRegistrantId, uiDrawManagerDrawOverride.creator)
706 sys.stderr.write(
"Failed to register override\n")
709 def uninitializePlugin(obj):
710 plugin = om.MFnPlugin(obj)
712 plugin.deregisterNode(uiDrawManager.id)
714 sys.stderr.write(
"Failed to deregister node\n")
718 omr.MDrawRegistry.deregisterGeometryOverrideCreator(uiDrawManager.drawDbClassification, uiDrawManager.drawRegistrantId)
720 sys.stderr.write(
"Failed to deregister override\n")