Visual representation if one is "inside" a movie clip

This commit is contained in:
Skyler Lehmkuhl 2013-01-04 22:08:56 -05:00
parent b2e6b88f5e
commit 4169bb16c8
2 changed files with 9 additions and 3 deletions

View File

@ -166,7 +166,8 @@ def onMouseDownText(self,x,y,button=1,clicks=1):
def onMouseDownFrame(self, x, y,button=1,clicks=1): def onMouseDownFrame(self, x, y,button=1,clicks=1):
pass pass
def onMouseDownMC(self, x, y, button=1, clicks=1): 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): def onMouseUpGroup(self, x, y,button=1,clicks=1):
self.clicked = False self.clicked = False
if svlgui.MODE in ["r", "e"]: if svlgui.MODE in ["r", "e"]:

View File

@ -2510,10 +2510,14 @@ class Group (object):
self.dragging = False self.dragging = False
self.selecting = False self.selecting = False
self.tempgroup = None self.tempgroup = None
self.is_mc = False
self.name = "g"+str(int(random.random()*10000))+str(SITER) self.name = "g"+str(int(random.random()*10000))+str(SITER)
if "onload" in kwargs: if "onload" in kwargs:
kwargs["onload"](self) kwargs["onload"](self)
def draw(self,cr=None,transform=None,rect=None): 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: for i in self.layers:
if not i.hidden: if not i.hidden:
i.x = self.x i.x = self.x
@ -3152,6 +3156,7 @@ class ConvertToSymbolWindow:
symbol = Group() symbol = Group()
symbol.add(self.root.descendItem().activelayer.currentselect.obj) symbol.add(self.root.descendItem().activelayer.currentselect.obj)
symbol.name = self.ntry.text symbol.name = self.ntry.text
symbol.is_mc = True
self.root.descendItem().activelayer.delete(self.root.descendItem().activelayer.currentselect) self.root.descendItem().activelayer.delete(self.root.descendItem().activelayer.currentselect)
print self.root.descendItem().activelayer.currentFrame() print self.root.descendItem().activelayer.currentFrame()
self.root.descendItem().activelayer.add(symbol) self.root.descendItem().activelayer.add(symbol)