25 RENDERMODE_ATTRIBUTE_NAME =
"RenderMode"
26 KEEP_ATTRIBUTE_NAME =
"Keep"
27 FLAGS_ATTRIBUTE_NAME =
"Flags"
29 def __init__(self, render_mode, selection, flags, keep=False):
36 return "Render mode: %s"%str(self.
GetRenderModeGetRenderMode())
57 self.
keep_keep_ = keep
60 return self.
keep_keep_
63 if (entity
is not None)
and isinstance(entity,
gfx.Entity):
67 group.SetAttribute(RenderOp.RENDERMODE_ATTRIBUTE_NAME, str(self.
GetRenderModeGetRenderMode().name))
68 group.SetAttribute(RenderOp.KEEP_ATTRIBUTE_NAME, str(int(self.
IsKeptIsKept())))
69 group.SetAttribute(RenderOp.FLAGS_ATTRIBUTE_NAME, str(self.
GetSelectionFlagsGetSelectionFlags()))
75 if (group.HasAttribute(RenderOp.RENDERMODE_ATTRIBUTE_NAME)
76 and group.HasAttribute(RenderOp.KEEP_ATTRIBUTE_NAME)):
77 render_mode = getattr(gfx.RenderMode, group.GetAttribute(RenderOp.RENDERMODE_ATTRIBUTE_NAME))
78 keep = bool(int(group.GetAttribute(RenderOp.KEEP_ATTRIBUTE_NAME)))
80 if group.HasAttribute(RenderOp.FLAGS_ATTRIBUTE_NAME):
81 flags = int(group.GetAttribute(RenderOp.FLAGS_ATTRIBUTE_NAME))
82 selection = group.GetTextData()
83 render_op =
RenderOp(render_mode,selection,flags,keep)
graphical rendering of mol::EntityHandle entites
def SetSelectionFlags(self, flags)
def SetSelection(self, selection)
def ApplyOn(self, entity)
def SetRenderMode(self, render_mode)
def GetSelectionFlags(self)
def __init__(self, render_mode, selection, flags, keep=False)