From 4169bb16c849ae3a05f52825e0b96e9d734c6b44 Mon Sep 17 00:00:00 2001 From: Skyler Lehmkuhl Date: Fri, 4 Jan 2013 22:08:56 -0500 Subject: [PATCH] Visual representation if one is "inside" a movie clip --- lightningbeam.py | 7 ++++--- svlgui.py | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lightningbeam.py b/lightningbeam.py index 464b7b0..2ec69b6 100755 --- a/lightningbeam.py +++ b/lightningbeam.py @@ -166,7 +166,8 @@ def onMouseDownText(self,x,y,button=1,clicks=1): def onMouseDownFrame(self, x, y,button=1,clicks=1): pass def onMouseDownMC(self, x, y, button=1, clicks=1): - print clicks + if clicks==2: + self.obj.level = True def onMouseUpGroup(self, x, y,button=1,clicks=1): self.clicked = False if svlgui.MODE in ["r", "e"]: @@ -429,8 +430,8 @@ def run_html(self=None): except IOError: svlgui.alert("Couldn't copy base.js to "+os.getenv('HOME')+"/base.js!") webbrowser.open("file://"+os.getenv('HOME')+"/test.html") - - + + def box(x, y, width, height, fill=None): global objects diff --git a/svlgui.py b/svlgui.py index db012bf..8e1bb99 100644 --- a/svlgui.py +++ b/svlgui.py @@ -2510,10 +2510,14 @@ class Group (object): self.dragging = False self.selecting = False self.tempgroup = None + self.is_mc = False self.name = "g"+str(int(random.random()*10000))+str(SITER) if "onload" in kwargs: kwargs["onload"](self) def draw(self,cr=None,transform=None,rect=None): + if self.is_mc and self.level: + cr.fillcolor = Color([1,1,1,0.5]).pygui + cr.fill_rect([0,0,1000,1000]) for i in self.layers: if not i.hidden: i.x = self.x @@ -3152,6 +3156,7 @@ class ConvertToSymbolWindow: symbol = Group() symbol.add(self.root.descendItem().activelayer.currentselect.obj) symbol.name = self.ntry.text + symbol.is_mc = True self.root.descendItem().activelayer.delete(self.root.descendItem().activelayer.currentselect) print self.root.descendItem().activelayer.currentFrame() self.root.descendItem().activelayer.add(symbol)