Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- File "<input>", line 1
- usr/bin/env python
- ^
- SyntaxError: invalid syntax
- >>> # -*- coding: utf-8 -*-
- >>>
- >>> """
- ... Copyright (C) 2016-2018, Douglas Vinicius
- ... douglvini@gmail.com
- ...
- ... Distributed under the terms of GNU GPL v3 (or lesser GPL) license.
- ...
- ... Fanim is an extention for GIMP thats implements a simple timeline that can
- ... be used to play in sequence and manipulate layers that works as each frame of an
- ... frame by frame animation.
- ...
- ... """
- '\n Copyright (C) 2016-2018, Douglas Vinicius\n douglvini@gmail.com\n\n Distributed under the terms of GNU GPL v3 (or lesser GPL) license.\n\nFanim is an extention for GIMP thats implements a simple timeline that can\nbe used to play in sequence and manipulate layers that works as each frame of an \nframe by frame animation.\n\n'
- >>> from gimpfu import register, main, gimp, pdb, \
- File "<input>", line 1
- SyntaxError: trailing comma not allowed without surrounding parentheses
- >>> TRANSPARENT_FILL, RGBA_IMAGE, NORMAL_MODE
- File "<input>", line 1
- TRANSPARENT_FILL, RGBA_IMAGE, NORMAL_MODE
- ^
- IndentationError: unexpected indent
- >>>
- >>> import pygtk
- >>> pygtk.require('2.0')
- >>> import gtk, array, time, os, json
- >>>
- >>> # general info
- >>> VERSION = 1.16
- >>> AUTHORS = ["Douglas Vinicius <douglvini@gmail.com>"]
- >>> NAME = "FAnim Timeline " + str(VERSION)
- >>> WINDOW_TITLE = ("GIMP %s "%NAME)+ "[%s]"
- >>> COPYRIGHT = "Copyright (C) 2016-2019 \nDouglas Vinicius"
- >>> WEBSITE = "https://github.com/douglasvini/gimp-fanim"
- >>> YEAR = "2016-2019"
- >>> DESCRIPTION = "Timeline to edit frames and play animations with some aditional functionality."
- >>> GIMP_LOCATION = "<Image>/FAnim/FAnim Timeline"
- >>>
- >>> # fixed frames prefix in the end to store visibility fix for the playback understand.
- >>> PREFIX="_fix"
- >>>
- >>> # playback macros
- >>> NEXT = 1
- >>> PREV = 2
- >>> END = 3
- >>> START = 4
- >>> NOWHERE = 5
- >>> POS = 6
- >>> GIMP_ACTIVE = 7
- >>>
- >>> # settings constant macros
- >>> WIN_WIDTH = "win_width"
- >>> WIN_HEIGHT = "win_height"
- >>> WIN_POSX = "win_posx"
- >>> WIN_POSY = "win_posy"
- >>> FRAMERATE = "framerate"
- >>> OSKIN_DEPTH = "oskin_depth"
- >>> OSKIN_ONPLAY = "oskin_onplay"
- >>> OSKIN_FORWARD = "oskin_forward"
- >>> OSKIN_BACKWARD = "oskin_backward"
- >>>
- >>> # state to disable the buttons
- >>> PLAYING = 1
- >>> NO_FRAMES = 2
- >>>
- >>> # onionskin constants
- >>> OSKIN_MAX_DEPTH = 6
- >>> OSKIN_MAX_OPACITY = 50.0
- >>>
- >>> CONF_FILENAME = "conf.json"
- >>>
- >>> class Utils:
- ...
- ... @staticmethod
- ... def add_fixed_prefix(layer):
- ... """
- ... add the prefix at the end of the layer name to store if the frae is
- ... visibly fixed or not.
- ... """
- ... if Utils.is_frame_fixed(layer): return
- ... layer.name = layer.name + PREFIX
- ...
- >>> @staticmethod
- File "<input>", line 1
- @staticmethod
- ^
- IndentationError: unexpected indent
- >>> def rem_fixed_prefix(layer):
- File "<input>", line 1
- def rem_fixed_prefix(layer):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> remove the prefix at the end of the layer name to store if the frae is
- File "<input>", line 1
- remove the prefix at the end of the layer name to store if the frae is
- ^
- IndentationError: unexpected indent
- >>> visibly fixed or not.
- File "<input>", line 1
- visibly fixed or not.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> if not Utils.is_frame_fixed(layer): return
- File "<input>", line 1
- if not Utils.is_frame_fixed(layer): return
- ^
- IndentationError: unexpected indent
- >>> layer.name = layer.name[:-4]
- File "<input>", line 1
- layer.name = layer.name[:-4]
- ^
- IndentationError: unexpected indent
- >>>
- >>> @staticmethod
- File "<input>", line 1
- @staticmethod
- ^
- IndentationError: unexpected indent
- >>> def is_frame_fixed(layer):
- File "<input>", line 1
- def is_frame_fixed(layer):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> get if the frame is visibly fixed or not based on the name of the layer.
- File "<input>", line 1
- get if the frame is visibly fixed or not based on the name of the layer.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> name = layer.name
- File "<input>", line 1
- name = layer.name
- ^
- IndentationError: unexpected indent
- >>> return name[-4:] == PREFIX
- File "<input>", line 1
- return name[-4:] == PREFIX
- ^
- IndentationError: unexpected indent
- >>>
- >>> @staticmethod
- File "<input>", line 1
- @staticmethod
- ^
- IndentationError: unexpected indent
- >>> def button_stock(stock,size):
- File "<input>", line 1
- def button_stock(stock,size):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Return a button with a image from stock items.
- File "<input>", line 1
- Return a button with a image from stock items.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> b = gtk.Button()
- File "<input>", line 1
- b = gtk.Button()
- ^
- IndentationError: unexpected indent
- >>> img = gtk.Image()
- File "<input>", line 1
- img = gtk.Image()
- ^
- IndentationError: unexpected indent
- >>> img.set_from_stock(stock,size)
- File "<input>", line 1
- img.set_from_stock(stock,size)
- ^
- IndentationError: unexpected indent
- >>> b.set_image(img)
- File "<input>", line 1
- b.set_image(img)
- ^
- IndentationError: unexpected indent
- >>> return b
- File "<input>", line 1
- return b
- ^
- IndentationError: unexpected indent
- >>>
- >>> @staticmethod
- File "<input>", line 1
- @staticmethod
- ^
- IndentationError: unexpected indent
- >>> def toggle_button_stock(stock,size):
- File "<input>", line 1
- def toggle_button_stock(stock,size):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Return a button with a image from stock items
- File "<input>", line 1
- Return a button with a image from stock items
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> b = gtk.ToggleButton()
- File "<input>", line 1
- b = gtk.ToggleButton()
- ^
- IndentationError: unexpected indent
- >>> img = gtk.Image()
- File "<input>", line 1
- img = gtk.Image()
- ^
- IndentationError: unexpected indent
- >>> img.set_from_stock(stock,size)
- File "<input>", line 1
- img.set_from_stock(stock,size)
- ^
- IndentationError: unexpected indent
- >>> b.set_image(img)
- File "<input>", line 1
- b.set_image(img)
- ^
- IndentationError: unexpected indent
- >>> return b
- File "<input>", line 1
- return b
- ^
- IndentationError: unexpected indent
- >>>
- >>> @staticmethod
- File "<input>", line 1
- @staticmethod
- ^
- IndentationError: unexpected indent
- >>> def spin_button(name="variable",number_type="int",value=0,min=1,max=100,advance=1):
- File "<input>", line 1
- def spin_button(name="variable",number_type="int",value=0,min=1,max=100,advance=1):
- ^
- IndentationError: unexpected indent
- >>> adjustment = gtk.Adjustment(value,min,max,advance,advance)
- File "<input>", line 1
- adjustment = gtk.Adjustment(value,min,max,advance,advance)
- ^
- IndentationError: unexpected indent
- >>> digits = 0
- File "<input>", line 1
- digits = 0
- ^
- IndentationError: unexpected indent
- >>> if number_type != "int":
- File "<input>", line 1
- if number_type != "int":
- ^
- IndentationError: unexpected indent
- >>> digits = 3
- File "<input>", line 1
- digits = 3
- ^
- IndentationError: unexpected indent
- >>> l = gtk.Label(name)
- File "<input>", line 1
- l = gtk.Label(name)
- ^
- IndentationError: unexpected indent
- >>> b = gtk.SpinButton(adjustment,0,digits)
- File "<input>", line 1
- b = gtk.SpinButton(adjustment,0,digits)
- ^
- IndentationError: unexpected indent
- >>>
- >>> h = gtk.HBox()
- File "<input>", line 1
- h = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>> h.pack_start(l)
- File "<input>", line 1
- h.pack_start(l)
- ^
- IndentationError: unexpected indent
- >>> h.pack_start(b)
- File "<input>", line 1
- h.pack_start(b)
- ^
- IndentationError: unexpected indent
- >>> return h,adjustment
- File "<input>", line 1
- return h,adjustment
- ^
- IndentationError: unexpected indent
- >>>
- >>> @staticmethod
- File "<input>", line 1
- @staticmethod
- ^
- IndentationError: unexpected indent
- >>> def load_conffile(filename):
- File "<input>", line 1
- def load_conffile(filename):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Load configuration from a file stored in gimp user folder.
- File "<input>", line 1
- Load configuration from a file stored in gimp user folder.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> directory = gimp.directory + "/fanim"
- File "<input>", line 1
- directory = gimp.directory + "/fanim"
- ^
- IndentationError: unexpected indent
- >>> if not os.path.exists(directory):
- File "<input>", line 1
- if not os.path.exists(directory):
- ^
- IndentationError: unexpected indent
- >>> os.mkdir(directory)
- File "<input>", line 1
- os.mkdir(directory)
- ^
- IndentationError: unexpected indent
- >>>
- >>> filepath = directory + "/" + filename
- File "<input>", line 1
- filepath = directory + "/" + filename
- ^
- IndentationError: unexpected indent
- >>> if os.path.exists(filepath):
- File "<input>", line 1
- if os.path.exists(filepath):
- ^
- IndentationError: unexpected indent
- >>> f = open(filepath,'r')
- File "<input>", line 1
- f = open(filepath,'r')
- ^
- IndentationError: unexpected indent
- >>> dic = json.load(f)
- File "<input>", line 1
- dic = json.load(f)
- ^
- IndentationError: unexpected indent
- >>> f.close()
- File "<input>", line 1
- f.close()
- ^
- IndentationError: unexpected indent
- >>> return dic
- File "<input>", line 1
- return dic
- ^
- IndentationError: unexpected indent
- >>>
- >>> else:
- File "<input>", line 1
- else:
- ^
- IndentationError: unexpected indent
- >>> return None
- File "<input>", line 1
- return None
- ^
- IndentationError: unexpected indent
- >>>
- >>> @staticmethod
- File "<input>", line 1
- @staticmethod
- ^
- IndentationError: unexpected indent
- >>> def save_conffile(filename,conf={}):
- File "<input>", line 1
- def save_conffile(filename,conf={}):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Save a configuration dictionary in a json file on user folder.
- File "<input>", line 1
- Save a configuration dictionary in a json file on user folder.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> directory = gimp.directory + "/fanim"
- File "<input>", line 1
- directory = gimp.directory + "/fanim"
- ^
- IndentationError: unexpected indent
- >>> if not os.path.exists(directory):
- File "<input>", line 1
- if not os.path.exists(directory):
- ^
- IndentationError: unexpected indent
- >>> os.mkdir(directory)
- File "<input>", line 1
- os.mkdir(directory)
- ^
- IndentationError: unexpected indent
- >>>
- >>> filepath = directory + "/" + filename
- File "<input>", line 1
- filepath = directory + "/" + filename
- ^
- IndentationError: unexpected indent
- >>> f = open(filepath,'w')
- File "<input>", line 1
- f = open(filepath,'w')
- ^
- IndentationError: unexpected indent
- >>> json.dump(conf,f)
- File "<input>", line 1
- json.dump(conf,f)
- ^
- IndentationError: unexpected indent
- >>> f.close()
- File "<input>", line 1
- f.close()
- ^
- IndentationError: unexpected indent
- >>>
- >>>
- >>>
- >>> class ConfDialog(gtk.Dialog):
- ... """
- ... Create a configuration dialog to the user change the variables.
- ... """
- ... def __init__(self,title="Config",parent=None,config = None):
- ... gtk.Dialog.__init__(self,title,parent, gtk.DIALOG_DESTROY_WITH_PARENT,
- ... ('Apply',gtk.RESPONSE_APPLY,'Cancel',gtk.RESPONSE_CANCEL))
- ...
- >>> self.set_keep_above(True)
- File "<input>", line 1
- self.set_keep_above(True)
- ^
- IndentationError: unexpected indent
- >>> self.set_position(gtk.WIN_POS_CENTER)
- File "<input>", line 1
- self.set_position(gtk.WIN_POS_CENTER)
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.last_config= config # settings
- File "<input>", line 1
- self.last_config= config # settings
- ^
- IndentationError: unexpected indent
- >>> self.atual_config = config
- File "<input>", line 1
- self.atual_config = config
- ^
- IndentationError: unexpected indent
- >>>
- >>> # setup all widgets
- >>> self._setup_widgets()
- File "<input>", line 1
- self._setup_widgets()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def update_config(self,widget,var_type=None):
- File "<input>", line 1
- def update_config(self,widget,var_type=None):
- ^
- IndentationError: unexpected indent
- >>> if isinstance(widget,gtk.Adjustment):
- File "<input>", line 1
- if isinstance(widget,gtk.Adjustment):
- ^
- IndentationError: unexpected indent
- >>> value = widget.get_value()
- File "<input>", line 1
- value = widget.get_value()
- ^
- IndentationError: unexpected indent
- >>> elif isinstance(widget,gtk.CheckButton):
- File "<input>", line 1
- elif isinstance(widget,gtk.CheckButton):
- ^
- IndentationError: unexpected indent
- >>> value = widget.get_active()
- File "<input>", line 1
- value = widget.get_active()
- ^
- IndentationError: unexpected indent
- >>> self.atual_config[var_type] = value
- File "<input>", line 1
- self.atual_config[var_type] = value
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _setup_widgets(self):
- File "<input>", line 1
- def _setup_widgets(self):
- ^
- IndentationError: unexpected indent
- >>>
- >>> h_space = 4 # horizontal space
- File "<input>", line 1
- h_space = 4 # horizontal space
- ^
- IndentationError: unexpected indent
- >>>
- >>> # create the frames to contein the diferent settings.
- >>> f_time = gtk.Frame(label="Time")
- File "<input>", line 1
- f_time = gtk.Frame(label="Time")
- ^
- IndentationError: unexpected indent
- >>> f_oskin = gtk.Frame(label="Onion Skin")
- File "<input>", line 1
- f_oskin = gtk.Frame(label="Onion Skin")
- ^
- IndentationError: unexpected indent
- >>> self.set_size_request(300,-1)
- File "<input>", line 1
- self.set_size_request(300,-1)
- ^
- IndentationError: unexpected indent
- >>> self.vbox.pack_start(f_time,True,True,h_space)
- File "<input>", line 1
- self.vbox.pack_start(f_time,True,True,h_space)
- ^
- IndentationError: unexpected indent
- >>> self.vbox.pack_start(f_oskin,True,True,h_space)
- File "<input>", line 1
- self.vbox.pack_start(f_oskin,True,True,h_space)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # create the time settings.
- >>> th = gtk.HBox()
- File "<input>", line 1
- th = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>> fps,fps_spin = Utils.spin_button("Framerate",'int',self.last_config[FRAMERATE],1,100) #conf fps
- File "<input>", line 1
- fps,fps_spin = Utils.spin_button("Framerate",'int',self.last_config[FRAMERATE],1,100) #conf fps
- ^
- IndentationError: unexpected indent
- >>>
- >>> th.pack_start(fps,True,True,h_space)
- File "<input>", line 1
- th.pack_start(fps,True,True,h_space)
- ^
- IndentationError: unexpected indent
- >>>
- >>> f_time.add(th)
- File "<input>", line 1
- f_time.add(th)
- ^
- IndentationError: unexpected indent
- >>> # create onion skin settings
- >>> ov = gtk.VBox()
- File "<input>", line 1
- ov = gtk.VBox()
- ^
- IndentationError: unexpected indent
- >>> f_oskin.add(ov)
- File "<input>", line 1
- f_oskin.add(ov)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # fist line
- >>> oh1 = gtk.HBox()
- File "<input>", line 1
- oh1 = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>> #conf depth
- >>> depth,depth_spin=Utils.spin_button("Depth",'int',
- File "<input>", line 1
- depth,depth_spin=Utils.spin_button("Depth",'int',
- ^
- IndentationError: unexpected indent
- >>> self.last_config[OSKIN_DEPTH],1,OSKIN_MAX_DEPTH,1)
- File "<input>", line 1
- self.last_config[OSKIN_DEPTH],1,OSKIN_MAX_DEPTH,1)
- ^
- IndentationError: unexpected indent
- >>>
- >>> on_play = gtk.CheckButton("On Play")
- File "<input>", line 1
- on_play = gtk.CheckButton("On Play")
- ^
- IndentationError: unexpected indent
- >>> on_play.set_active(self.last_config[OSKIN_ONPLAY])
- File "<input>", line 1
- on_play.set_active(self.last_config[OSKIN_ONPLAY])
- ^
- IndentationError: unexpected indent
- >>>
- >>> oh1.pack_start(depth,True,True,h_space)
- File "<input>", line 1
- oh1.pack_start(depth,True,True,h_space)
- ^
- IndentationError: unexpected indent
- >>> oh1.pack_start(on_play,True,True,h_space)
- File "<input>", line 1
- oh1.pack_start(on_play,True,True,h_space)
- ^
- IndentationError: unexpected indent
- >>> ov.pack_start(oh1)
- File "<input>", line 1
- ov.pack_start(oh1)
- ^
- IndentationError: unexpected indent
- >>> # second line
- >>> oh2 = gtk.HBox()
- File "<input>", line 1
- oh2 = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>> forward = gtk.CheckButton("Forward")
- File "<input>", line 1
- forward = gtk.CheckButton("Forward")
- ^
- IndentationError: unexpected indent
- >>> forward.set_active(self.last_config[OSKIN_FORWARD])
- File "<input>", line 1
- forward.set_active(self.last_config[OSKIN_FORWARD])
- ^
- IndentationError: unexpected indent
- >>>
- >>> backward = gtk.CheckButton("Backward")
- File "<input>", line 1
- backward = gtk.CheckButton("Backward")
- ^
- IndentationError: unexpected indent
- >>> backward.set_active(self.last_config[OSKIN_BACKWARD])
- File "<input>", line 1
- backward.set_active(self.last_config[OSKIN_BACKWARD])
- ^
- IndentationError: unexpected indent
- >>>
- >>> oh2.pack_start(forward,True,True,h_space)
- File "<input>", line 1
- oh2.pack_start(forward,True,True,h_space)
- ^
- IndentationError: unexpected indent
- >>> oh2.pack_start(backward,True,True,h_space)
- File "<input>", line 1
- oh2.pack_start(backward,True,True,h_space)
- ^
- IndentationError: unexpected indent
- >>>
- >>> ov.pack_start(oh2)
- File "<input>", line 1
- ov.pack_start(oh2)
- ^
- IndentationError: unexpected indent
- >>> # last line
- >>>
- >>> # connect a callback to all
- >>>
- >>> fps_spin.connect("value_changed",self.update_config,FRAMERATE)
- File "<input>", line 1
- fps_spin.connect("value_changed",self.update_config,FRAMERATE)
- ^
- IndentationError: unexpected indent
- >>> depth_spin.connect("value_changed",self.update_config,OSKIN_DEPTH)
- File "<input>", line 1
- depth_spin.connect("value_changed",self.update_config,OSKIN_DEPTH)
- ^
- IndentationError: unexpected indent
- >>> on_play.connect("toggled",self.update_config,OSKIN_ONPLAY)
- File "<input>", line 1
- on_play.connect("toggled",self.update_config,OSKIN_ONPLAY)
- ^
- IndentationError: unexpected indent
- >>> forward.connect("toggled",self.update_config,OSKIN_FORWARD)
- File "<input>", line 1
- forward.connect("toggled",self.update_config,OSKIN_FORWARD)
- ^
- IndentationError: unexpected indent
- >>> backward.connect("toggled",self.update_config,OSKIN_BACKWARD)
- File "<input>", line 1
- backward.connect("toggled",self.update_config,OSKIN_BACKWARD)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # show all
- >>> self.show_all()
- File "<input>", line 1
- self.show_all()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def run(self):
- File "<input>", line 1
- def run(self):
- ^
- IndentationError: unexpected indent
- >>> result = super(ConfDialog,self).run()
- File "<input>", line 1
- result = super(ConfDialog,self).run()
- ^
- IndentationError: unexpected indent
- >>> conf = self.last_config
- File "<input>", line 1
- conf = self.last_config
- ^
- IndentationError: unexpected indent
- >>>
- >>> if result == gtk.RESPONSE_APPLY:
- File "<input>", line 1
- if result == gtk.RESPONSE_APPLY:
- ^
- IndentationError: unexpected indent
- >>> conf = self.atual_config
- File "<input>", line 1
- conf = self.atual_config
- ^
- IndentationError: unexpected indent
- >>>
- >>> return result, conf
- File "<input>", line 1
- return result, conf
- ^
- IndentationError: unexpected indent
- >>>
- >>> class Player():
- ... """
- ... This class will implement a loop to play the frames through time, after
- ... play each frame, a gtk event handler is called to not freaze the UI.
- ... """
- ... def __init__(self,timeline,play_button):
- ...
- ... self.timeline = timeline
- ... self.play_button = play_button
- ... self.cnt = 0
- ...
- >>> def start(self):
- File "<input>", line 1
- def start(self):
- ^
- IndentationError: unexpected indent
- >>>
- >>> while self.timeline.is_playing:
- File "<input>", line 1
- while self.timeline.is_playing:
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.timeline.on_goto(None,NEXT)
- File "<input>", line 1
- self.timeline.on_goto(None,NEXT)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # while has fixed frames jump to the next
- >>> while self.timeline.frames[self.timeline.active].fixed \
- File "<input>", line 1
- while self.timeline.frames[self.timeline.active].fixed \
- ^
- IndentationError: unexpected indent
- >>> and self.timeline.active < len(self.timeline.frames):
- File "<input>", line 1
- and self.timeline.active < len(self.timeline.frames):
- ^
- IndentationError: unexpected indent
- >>> self.timeline.on_goto(None,NEXT)
- File "<input>", line 1
- self.timeline.on_goto(None,NEXT)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # see if is the end of the timeline when theres no replay.
- >>> if not self.timeline.is_replay and self.timeline.active == \
- File "<input>", line 1
- if not self.timeline.is_replay and self.timeline.active == \
- ^
- IndentationError: unexpected indent
- >>> len(self.timeline.frames)-1:
- File "<input>", line 1
- len(self.timeline.frames)-1:
- ^
- IndentationError: unexpected indent
- >>> self.timeline.on_toggle_play(self.play_button)
- File "<input>", line 1
- self.timeline.on_toggle_play(self.play_button)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # wait some time to emulate framerate choose by the user.
- >>> time.sleep(1.0/self.timeline.framerate)
- File "<input>", line 1
- time.sleep(1.0/self.timeline.framerate)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # call gtk event handler.
- >>> while gtk.events_pending():
- File "<input>", line 1
- while gtk.events_pending():
- ^
- IndentationError: unexpected indent
- >>> gtk.main_iteration()
- File "<input>", line 1
- gtk.main_iteration()
- ^
- IndentationError: unexpected indent
- >>>
- >>>
- >>> class AnimFrame(gtk.EventBox):
- ... """
- ... A Frame representation for gtk.
- ... """
- ... def __init__(self,layer,width=100,height=120):
- ... gtk.EventBox.__init__(self)
- ... self.set_size_request(width,height)
- ... #variables
- ... self.thumbnail = None
- ... self.label = None
- ... self.layer = layer
- ... self.fixed = False
- ...
- >>> self._fix_button_images = []
- File "<input>", line 1
- self._fix_button_images = []
- ^
- IndentationError: unexpected indent
- >>> self._fix_button = None
- File "<input>", line 1
- self._fix_button = None
- ^
- IndentationError: unexpected indent
- >>> self._setup()
- File "<input>", line 1
- self._setup()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def highlight(self,state):
- File "<input>", line 1
- def highlight(self,state):
- ^
- IndentationError: unexpected indent
- >>> if state:
- File "<input>", line 1
- if state:
- ^
- IndentationError: unexpected indent
- >>> self.set_state(gtk.STATE_SELECTED)
- File "<input>", line 1
- self.set_state(gtk.STATE_SELECTED)
- ^
- IndentationError: unexpected indent
- >>> else :
- File "<input>", line 1
- else :
- ^
- IndentationError: unexpected indent
- >>> self.set_state(gtk.STATE_NORMAL)
- File "<input>", line 1
- self.set_state(gtk.STATE_NORMAL)
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_toggle_fix(self,widget):
- File "<input>", line 1
- def on_toggle_fix(self,widget):
- ^
- IndentationError: unexpected indent
- >>> self.fixed = widget.get_active()
- File "<input>", line 1
- self.fixed = widget.get_active()
- ^
- IndentationError: unexpected indent
- >>> if widget.get_active():
- File "<input>", line 1
- if widget.get_active():
- ^
- IndentationError: unexpected indent
- >>> Utils.add_fixed_prefix(self.layer)
- File "<input>", line 1
- Utils.add_fixed_prefix(self.layer)
- ^
- IndentationError: unexpected indent
- >>> self._fix_button.set_image(self._fix_button_images[0])
- File "<input>", line 1
- self._fix_button.set_image(self._fix_button_images[0])
- ^
- IndentationError: unexpected indent
- >>> else:
- File "<input>", line 1
- else:
- ^
- IndentationError: unexpected indent
- >>> Utils.rem_fixed_prefix(self.layer)
- File "<input>", line 1
- Utils.rem_fixed_prefix(self.layer)
- ^
- IndentationError: unexpected indent
- >>> self._fix_button.set_image(self._fix_button_images[1])
- File "<input>", line 1
- self._fix_button.set_image(self._fix_button_images[1])
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _setup(self):
- File "<input>", line 1
- def _setup(self):
- ^
- IndentationError: unexpected indent
- >>> self.thumbnail = gtk.Image()
- File "<input>", line 1
- self.thumbnail = gtk.Image()
- ^
- IndentationError: unexpected indent
- >>> self.label = gtk.Label(self.layer.name)
- File "<input>", line 1
- self.label = gtk.Label(self.layer.name)
- ^
- IndentationError: unexpected indent
- >>> # creating the fix button, to anchor background frames.
- >>> icon_size = gtk.ICON_SIZE_MENU
- File "<input>", line 1
- icon_size = gtk.ICON_SIZE_MENU
- ^
- IndentationError: unexpected indent
- >>> self._fix_button = Utils.toggle_button_stock(gtk.STOCK_NO, icon_size)
- File "<input>", line 1
- self._fix_button = Utils.toggle_button_stock(gtk.STOCK_NO, icon_size)
- ^
- IndentationError: unexpected indent
- >>> self._fix_button.set_tooltip_text("toggle fixed visibility.")
- File "<input>", line 1
- self._fix_button.set_tooltip_text("toggle fixed visibility.")
- ^
- IndentationError: unexpected indent
- >>>
- >>> # update fixed variable
- >>> self.fixed = Utils.is_frame_fixed(self.layer)
- File "<input>", line 1
- self.fixed = Utils.is_frame_fixed(self.layer)
- ^
- IndentationError: unexpected indent
- >>> #images
- >>> self._fix_button_images = [gtk.Image(), gtk.Image()]
- File "<input>", line 1
- self._fix_button_images = [gtk.Image(), gtk.Image()]
- ^
- IndentationError: unexpected indent
- >>> self._fix_button_images[0].set_from_stock(gtk.STOCK_YES, icon_size)
- File "<input>", line 1
- self._fix_button_images[0].set_from_stock(gtk.STOCK_YES, icon_size)
- ^
- IndentationError: unexpected indent
- >>> self._fix_button_images[1].set_from_stock(gtk.STOCK_NO, icon_size)
- File "<input>", line 1
- self._fix_button_images[1].set_from_stock(gtk.STOCK_NO, icon_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> ## connect
- >>> self._fix_button.connect('clicked',self.on_toggle_fix)
- File "<input>", line 1
- self._fix_button.connect('clicked',self.on_toggle_fix)
- ^
- IndentationError: unexpected indent
- >>>
- >>> if self.fixed:
- File "<input>", line 1
- if self.fixed:
- ^
- IndentationError: unexpected indent
- >>> self._fix_button.set_image(self._fix_button_images[0])
- File "<input>", line 1
- self._fix_button.set_image(self._fix_button_images[0])
- ^
- IndentationError: unexpected indent
- >>> self._fix_button.set_active(True)
- File "<input>", line 1
- self._fix_button.set_active(True)
- ^
- IndentationError: unexpected indent
- >>> else :
- File "<input>", line 1
- else :
- ^
- IndentationError: unexpected indent
- >>> self._fix_button.set_image(self._fix_button_images[1])
- File "<input>", line 1
- self._fix_button.set_image(self._fix_button_images[1])
- ^
- IndentationError: unexpected indent
- >>> self._fix_button.set_active(False)
- File "<input>", line 1
- self._fix_button.set_active(False)
- ^
- IndentationError: unexpected indent
- >>>
- >>> frame = gtk.Frame()
- File "<input>", line 1
- frame = gtk.Frame()
- ^
- IndentationError: unexpected indent
- >>> layout = gtk.VBox()
- File "<input>", line 1
- layout = gtk.VBox()
- ^
- IndentationError: unexpected indent
- >>> # add frame to this widget
- >>> self.add(frame)
- File "<input>", line 1
- self.add(frame)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # add layout manager to the frame
- >>> frame.add(layout)
- File "<input>", line 1
- frame.add(layout)
- ^
- IndentationError: unexpected indent
- >>>
- >>> layout.pack_start(self.label)
- File "<input>", line 1
- layout.pack_start(self.label)
- ^
- IndentationError: unexpected indent
- >>> layout.pack_start(self.thumbnail)
- File "<input>", line 1
- layout.pack_start(self.thumbnail)
- ^
- IndentationError: unexpected indent
- >>> layout.pack_start(self._fix_button)
- File "<input>", line 1
- layout.pack_start(self._fix_button)
- ^
- IndentationError: unexpected indent
- >>> self._get_thumb_image()
- File "<input>", line 1
- self._get_thumb_image()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _get_thumb_image(self):
- File "<input>", line 1
- def _get_thumb_image(self):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> convert the pixel info returned by python into a gtk image to be
- File "<input>", line 1
- convert the pixel info returned by python into a gtk image to be
- ^
- IndentationError: unexpected indent
- >>> showed.
- File "<input>", line 1
- showed.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> width = 100
- File "<input>", line 1
- width = 100
- ^
- IndentationError: unexpected indent
- >>> height = 100
- File "<input>", line 1
- height = 100
- ^
- IndentationError: unexpected indent
- >>> image_data = pdb.gimp_drawable_thumbnail(self.layer,width,height)
- File "<input>", line 1
- image_data = pdb.gimp_drawable_thumbnail(self.layer,width,height)
- ^
- IndentationError: unexpected indent
- >>>
- >>> w,h,c,data = image_data[0],image_data[1],image_data[2],image_data[4]
- File "<input>", line 1
- w,h,c,data = image_data[0],image_data[1],image_data[2],image_data[4]
- ^
- IndentationError: unexpected indent
- >>>
- >>> # create a array of unsigned 8bit data.
- >>> image_array = array.array('B',data)
- File "<input>", line 1
- image_array = array.array('B',data)
- ^
- IndentationError: unexpected indent
- >>>
- >>> pixbuf = gtk.gdk.pixbuf_new_from_data(image_array,gtk.gdk.COLORSPACE_RGB,c>3,8,w,h,w*c)
- File "<input>", line 1
- pixbuf = gtk.gdk.pixbuf_new_from_data(image_array,gtk.gdk.COLORSPACE_RGB,c>3,8,w,h,w*c)
- ^
- IndentationError: unexpected indent
- >>> self.thumbnail.set_from_pixbuf(pixbuf)
- File "<input>", line 1
- self.thumbnail.set_from_pixbuf(pixbuf)
- ^
- IndentationError: unexpected indent
- >>>
- >>> def update_layer_info(self):
- File "<input>", line 1
- def update_layer_info(self):
- ^
- IndentationError: unexpected indent
- >>> self._get_thumb_image()
- File "<input>", line 1
- self._get_thumb_image()
- ^
- IndentationError: unexpected indent
- >>>
- >>> class Timeline(gtk.Window):
- ... def __init__(self,title,image):
- ... gtk.Window.__init__(self,gtk.WINDOW_TOPLEVEL)
- ...
- >>> self.set_title(title)
- File "<input>", line 1
- self.set_title(title)
- ^
- IndentationError: unexpected indent
- >>> self.image = image
- File "<input>", line 1
- self.image = image
- ^
- IndentationError: unexpected indent
- >>> self.frame_bar = None
- File "<input>", line 1
- self.frame_bar = None
- ^
- IndentationError: unexpected indent
- >>> # variables
- >>> self.is_playing = False
- File "<input>", line 1
- self.is_playing = False
- ^
- IndentationError: unexpected indent
- >>> self.is_replay = False
- File "<input>", line 1
- self.is_replay = False
- ^
- IndentationError: unexpected indent
- >>> # modifiable widgets
- >>> self.play_button_images = []
- File "<input>", line 1
- self.play_button_images = []
- ^
- IndentationError: unexpected indent
- >>> self.widgets_to_disable = [] # widgets to disable when playing
- File "<input>", line 1
- self.widgets_to_disable = [] # widgets to disable when playing
- ^
- IndentationError: unexpected indent
- >>> self.play_bar = None
- File "<input>", line 1
- self.play_bar = None
- ^
- IndentationError: unexpected indent
- >>>
- >>> # frames
- >>> self.frames = [] # all frame widgets
- File "<input>", line 1
- self.frames = [] # all frame widgets
- ^
- IndentationError: unexpected indent
- >>> self.active = None # active frame / gimp layer
- File "<input>", line 1
- self.active = None # active frame / gimp layer
- ^
- IndentationError: unexpected indent
- >>> self.before_play = None # active frame before play
- File "<input>", line 1
- self.before_play = None # active frame before play
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.framerate = 30
- File "<input>", line 1
- self.framerate = 30
- ^
- IndentationError: unexpected indent
- >>>
- >>> # new frame.
- >>> self.new_layer_type = TRANSPARENT_FILL
- File "<input>", line 1
- self.new_layer_type = TRANSPARENT_FILL
- ^
- IndentationError: unexpected indent
- >>>
- >>> # onionskin variables
- >>> self.oskin = False
- File "<input>", line 1
- self.oskin = False
- ^
- IndentationError: unexpected indent
- >>> self.oskin_depth = 2
- File "<input>", line 1
- self.oskin_depth = 2
- ^
- IndentationError: unexpected indent
- >>> self.oskin_backward = True
- File "<input>", line 1
- self.oskin_backward = True
- ^
- IndentationError: unexpected indent
- >>> self.oskin_forward = False
- File "<input>", line 1
- self.oskin_forward = False
- ^
- IndentationError: unexpected indent
- >>> self.oskin_max_opacity = OSKIN_MAX_OPACITY
- File "<input>", line 1
- self.oskin_max_opacity = OSKIN_MAX_OPACITY
- ^
- IndentationError: unexpected indent
- >>> self.oskin_onplay= True
- File "<input>", line 1
- self.oskin_onplay= True
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.player = None
- File "<input>", line 1
- self.player = None
- ^
- IndentationError: unexpected indent
- >>>
- >>> # gtk window
- >>> self.win_pos = (20,20)
- File "<input>", line 1
- self.win_pos = (20,20)
- ^
- IndentationError: unexpected indent
- >>> self.win_size = (200,200)
- File "<input>", line 1
- self.win_size = (200,200)
- ^
- IndentationError: unexpected indent
- >>> # create all widgets
- >>> self._setup_widgets()
- File "<input>", line 1
- self._setup_widgets()
- ^
- IndentationError: unexpected indent
- >>> def undo(self, state):
- File "<input>", line 1
- def undo(self, state):
- ^
- IndentationError: unexpected indent
- >>> if state:
- File "<input>", line 1
- if state:
- ^
- IndentationError: unexpected indent
- >>> self.image.undo_thaw()
- File "<input>", line 1
- self.image.undo_thaw()
- ^
- IndentationError: unexpected indent
- >>> else:
- File "<input>", line 1
- else:
- ^
- IndentationError: unexpected indent
- >>> self.image.undo_freeze()
- File "<input>", line 1
- self.image.undo_freeze()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def destroy(self,widget):
- File "<input>", line 1
- def destroy(self,widget):
- ^
- IndentationError: unexpected indent
- >>> # if is closing and still playing try to stop and send a message with info.
- >>> if self.is_playing:
- File "<input>", line 1
- if self.is_playing:
- ^
- IndentationError: unexpected indent
- >>> self.is_playing = False
- File "<input>", line 1
- self.is_playing = False
- ^
- IndentationError: unexpected indent
- >>> gimp.message("Please do not close the image with FAnim playing the animation.")
- File "<input>", line 1
- gimp.message("Please do not close the image with FAnim playing the animation.")
- ^
- IndentationError: unexpected indent
- >>> if widget != False:# for when this function is called without valid image variable.
- File "<input>", line 1
- if widget != False:# for when this function is called without valid image variable.
- ^
- IndentationError: unexpected indent
- >>> # return to the normal layers order.
- >>> pdb.script_fu_reverse_layers(self.image,None)
- File "<input>", line 1
- pdb.script_fu_reverse_layers(self.image,None)
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,START)
- File "<input>", line 1
- self.on_goto(None,START)
- ^
- IndentationError: unexpected indent
- >>>
- >>> #save the settings before quit.
- >>> Utils.save_conffile(CONF_FILENAME,self.get_settings())
- File "<input>", line 1
- Utils.save_conffile(CONF_FILENAME,self.get_settings())
- ^
- IndentationError: unexpected indent
- >>>
- >>> gtk.main_quit()
- File "<input>", line 1
- gtk.main_quit()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def start(self):
- File "<input>", line 1
- def start(self):
- ^
- IndentationError: unexpected indent
- >>> gtk.main()
- File "<input>", line 1
- gtk.main()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _get_theme_gtkrc(self,themerc):
- File "<input>", line 1
- def _get_theme_gtkrc(self,themerc):
- ^
- IndentationError: unexpected indent
- >>> rcpath = ""
- File "<input>", line 1
- rcpath = ""
- ^
- IndentationError: unexpected indent
- >>> with open(themerc,'r') as trc:
- File "<input>", line 1
- with open(themerc,'r') as trc:
- ^
- IndentationError: unexpected indent
- >>> for l in trc.readlines():
- File "<input>", line 1
- for l in trc.readlines():
- ^
- IndentationError: unexpected indent
- >>> if l[:7] == "include":
- File "<input>", line 1
- if l[:7] == "include":
- ^
- IndentationError: unexpected indent
- >>> rcpath = l[9:-2]
- File "<input>", line 1
- rcpath = l[9:-2]
- ^
- IndentationError: unexpected indent
- >>> break
- File "<input>", line 1
- break
- ^
- IndentationError: unexpected indent
- >>> return rcpath
- File "<input>", line 1
- return rcpath
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_window_resize(self,*args):
- File "<input>", line 1
- def on_window_resize(self,*args):
- ^
- IndentationError: unexpected indent
- >>> # update the window position to save later on.
- >>> self.win_pos = self.get_position()
- File "<input>", line 1
- self.win_pos = self.get_position()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _setup_widgets(self):
- File "<input>", line 1
- def _setup_widgets(self):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> create all the window staticaly placed widgets.
- File "<input>", line 1
- create all the window staticaly placed widgets.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> #load the saved setting before start.
- >>> self.set_settings(Utils.load_conffile(CONF_FILENAME))
- File "<input>", line 1
- self.set_settings(Utils.load_conffile(CONF_FILENAME))
- ^
- IndentationError: unexpected indent
- >>>
- >>> # basic window definitions
- >>> self.connect("destroy",self.destroy)
- File "<input>", line 1
- self.connect("destroy",self.destroy)
- ^
- IndentationError: unexpected indent
- >>> self.connect("focus_in_event",self.on_window_focus)
- File "<input>", line 1
- self.connect("focus_in_event",self.on_window_focus)
- ^
- IndentationError: unexpected indent
- >>> self.connect("configure_event",self.on_window_resize)
- File "<input>", line 1
- self.connect("configure_event",self.on_window_resize)
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.set_default_size(self.win_size[0],self.win_size[1])
- File "<input>", line 1
- self.set_default_size(self.win_size[0],self.win_size[1])
- ^
- IndentationError: unexpected indent
- >>> self.set_keep_above(True)
- File "<input>", line 1
- self.set_keep_above(True)
- ^
- IndentationError: unexpected indent
- >>>
- >>> #self.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
- >>> self.move(self.win_pos[0],self.win_pos[1])
- File "<input>", line 1
- self.move(self.win_pos[0],self.win_pos[1])
- ^
- IndentationError: unexpected indent
- >>>
- >>> # parse gimp theme gtkrc
- >>> gtkrc_path = self._get_theme_gtkrc(gimp.personal_rc_file('themerc'))
- File "<input>", line 1
- gtkrc_path = self._get_theme_gtkrc(gimp.personal_rc_file('themerc'))
- ^
- IndentationError: unexpected indent
- >>>
- >>> if os.name != 'nt':# try apply the theme by parse a gtkrc file if is not a windows system.
- File "<input>", line 1
- if os.name != 'nt':# try apply the theme by parse a gtkrc file if is not a windows system.
- ^
- IndentationError: unexpected indent
- >>> gtk.rc_parse(gtkrc_path)
- File "<input>", line 1
- gtk.rc_parse(gtkrc_path)
- ^
- IndentationError: unexpected indent
- >>> else: # if error occur them parse the file in another way.
- File "<input>", line 1
- else: # if error occur them parse the file in another way.
- ^
- IndentationError: unexpected indent
- >>> gtk.rc_add_default_file(gtkrc_path)
- File "<input>", line 1
- gtk.rc_add_default_file(gtkrc_path)
- ^
- IndentationError: unexpected indent
- >>> gtk.rc_reparse_all()
- File "<input>", line 1
- gtk.rc_reparse_all()
- ^
- IndentationError: unexpected indent
- >>>
- >>> # start creating basic layout
- >>> base = gtk.VBox()
- File "<input>", line 1
- base = gtk.VBox()
- ^
- IndentationError: unexpected indent
- >>>
- >>> # commands bar widgets
- >>> cbar = gtk.HBox()
- File "<input>", line 1
- cbar = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>> cbar.pack_start(self._setup_playbackbar(),False,False,10)
- File "<input>", line 1
- cbar.pack_start(self._setup_playbackbar(),False,False,10)
- ^
- IndentationError: unexpected indent
- >>> cbar.pack_start(self._setup_editbar(),False,False,10)
- File "<input>", line 1
- cbar.pack_start(self._setup_editbar(),False,False,10)
- ^
- IndentationError: unexpected indent
- >>> cbar.pack_start(self._setup_onionskin(),False,False,10)
- File "<input>", line 1
- cbar.pack_start(self._setup_onionskin(),False,False,10)
- ^
- IndentationError: unexpected indent
- >>> cbar.pack_start(self._setup_config(),False,False,10)
- File "<input>", line 1
- cbar.pack_start(self._setup_config(),False,False,10)
- ^
- IndentationError: unexpected indent
- >>> cbar.pack_start(self._setup_generalbar(),False,False,10)
- File "<input>", line 1
- cbar.pack_start(self._setup_generalbar(),False,False,10)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # frames bar widgets
- >>> self.frame_bar = gtk.HBox()
- File "<input>", line 1
- self.frame_bar = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>> scroll_window = gtk.ScrolledWindow()
- File "<input>", line 1
- scroll_window = gtk.ScrolledWindow()
- ^
- IndentationError: unexpected indent
- >>> scroll_window.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
- File "<input>", line 1
- scroll_window.set_policy(gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
- ^
- IndentationError: unexpected indent
- >>> scroll_window.add_with_viewport(self.frame_bar)
- File "<input>", line 1
- scroll_window.add_with_viewport(self.frame_bar)
- ^
- IndentationError: unexpected indent
- >>> scroll_window.set_size_request(-1,140)
- File "<input>", line 1
- scroll_window.set_size_request(-1,140)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # mount the widgets together
- >>> base.pack_start(cbar,False,False,0)
- File "<input>", line 1
- base.pack_start(cbar,False,False,0)
- ^
- IndentationError: unexpected indent
- >>> base.pack_start(scroll_window,True,True,0)
- File "<input>", line 1
- base.pack_start(scroll_window,True,True,0)
- ^
- IndentationError: unexpected indent
- >>> self.add(base)
- File "<input>", line 1
- self.add(base)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # invert the image so onionskin can be used propely, with backward frames be
- >>> # above the actual frame, sinse GIMP upper layers are firstly visible they cant
- >>> # be backward frames.
- >>> pdb.script_fu_reverse_layers(self.image,None)
- File "<input>", line 1
- pdb.script_fu_reverse_layers(self.image,None)
- ^
- IndentationError: unexpected indent
- >>> # scan all layers
- >>> self._scan_image_layers()
- File "<input>", line 1
- self._scan_image_layers()
- ^
- IndentationError: unexpected indent
- >>> self.active = 0
- File "<input>", line 1
- self.active = 0
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,GIMP_ACTIVE)
- File "<input>", line 1
- self.on_goto(None,GIMP_ACTIVE)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # finalize showing all widgets
- >>> self.show_all()
- File "<input>", line 1
- self.show_all()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _scan_image_layers(self):
- File "<input>", line 1
- def _scan_image_layers(self):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> If exists frames this function destroys all, after that the image layers
- File "<input>", line 1
- If exists frames this function destroys all, after that the image layers
- ^
- IndentationError: unexpected indent
- >>> is scanned and the frames are recreated.
- File "<input>", line 1
- is scanned and the frames are recreated.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> self.undo(False)
- File "<input>", line 1
- self.undo(False)
- ^
- IndentationError: unexpected indent
- >>>
- >>> layers = self.image.layers
- File "<input>", line 1
- layers = self.image.layers
- ^
- IndentationError: unexpected indent
- >>>
- >>> if self.frames:
- File "<input>", line 1
- if self.frames:
- ^
- IndentationError: unexpected indent
- >>> for frame in self.frames:
- File "<input>", line 1
- for frame in self.frames:
- ^
- IndentationError: unexpected indent
- >>> self.frame_bar.remove(frame)
- File "<input>", line 1
- self.frame_bar.remove(frame)
- ^
- IndentationError: unexpected indent
- >>> frame.destroy()
- File "<input>", line 1
- frame.destroy()
- ^
- IndentationError: unexpected indent
- >>> self.frames = []
- File "<input>", line 1
- self.frames = []
- ^
- IndentationError: unexpected indent
- >>>
- >>> # here we get back the layers orders just in the timeline so the user can have
- >>> # a right interface.
- >>> for layer in reversed(layers):
- File "<input>", line 1
- for layer in reversed(layers):
- ^
- IndentationError: unexpected indent
- >>> # start properties
- >>> layer.mode = NORMAL_MODE
- File "<input>", line 1
- layer.mode = NORMAL_MODE
- ^
- IndentationError: unexpected indent
- >>> layer.opacity = 100.0
- File "<input>", line 1
- layer.opacity = 100.0
- ^
- IndentationError: unexpected indent
- >>>
- >>> # creating frame
- >>> f = AnimFrame(layer)
- File "<input>", line 1
- f = AnimFrame(layer)
- ^
- IndentationError: unexpected indent
- >>> f.connect("button_press_event",self.on_click_goto)
- File "<input>", line 1
- f.connect("button_press_event",self.on_click_goto)
- ^
- IndentationError: unexpected indent
- >>> self.frame_bar.pack_start(f,False,True,2)
- File "<input>", line 1
- self.frame_bar.pack_start(f,False,True,2)
- ^
- IndentationError: unexpected indent
- >>> self.frames.append(f)
- File "<input>", line 1
- self.frames.append(f)
- ^
- IndentationError: unexpected indent
- >>> f.show_all()
- File "<input>", line 1
- f.show_all()
- ^
- IndentationError: unexpected indent
- >>> self.undo(True)
- File "<input>", line 1
- self.undo(True)
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _setup_playbackbar(self):
- File "<input>", line 1
- def _setup_playbackbar(self):
- ^
- IndentationError: unexpected indent
- >>> playback_bar = gtk.HBox()
- File "<input>", line 1
- playback_bar = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>> button_size = 30
- File "<input>", line 1
- button_size = 30
- ^
- IndentationError: unexpected indent
- >>> stock_size = gtk.ICON_SIZE_BUTTON
- File "<input>", line 1
- stock_size = gtk.ICON_SIZE_BUTTON
- ^
- IndentationError: unexpected indent
- >>>
- >>> # play button
- >>> ## append the images to a list to be used later on
- >>> self.play_button_images = [gtk.Image(), gtk.Image()]
- File "<input>", line 1
- self.play_button_images = [gtk.Image(), gtk.Image()]
- ^
- IndentationError: unexpected indent
- >>> self.play_button_images[0].set_from_stock(gtk.STOCK_MEDIA_PLAY,stock_size)
- File "<input>", line 1
- self.play_button_images[0].set_from_stock(gtk.STOCK_MEDIA_PLAY,stock_size)
- ^
- IndentationError: unexpected indent
- >>> self.play_button_images[1].set_from_stock(gtk.STOCK_MEDIA_PAUSE,stock_size)
- File "<input>", line 1
- self.play_button_images[1].set_from_stock(gtk.STOCK_MEDIA_PAUSE,stock_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> ## button
- >>> b_play = gtk.Button()
- File "<input>", line 1
- b_play = gtk.Button()
- ^
- IndentationError: unexpected indent
- >>> b_play.set_image(self.play_button_images[0])
- File "<input>", line 1
- b_play.set_image(self.play_button_images[0])
- ^
- IndentationError: unexpected indent
- >>> b_play.set_size_request(button_size,button_size)
- File "<input>", line 1
- b_play.set_size_request(button_size,button_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> b_tostart = Utils.button_stock(gtk.STOCK_MEDIA_PREVIOUS,stock_size)
- File "<input>", line 1
- b_tostart = Utils.button_stock(gtk.STOCK_MEDIA_PREVIOUS,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_toend = Utils.button_stock(gtk.STOCK_MEDIA_NEXT,stock_size)
- File "<input>", line 1
- b_toend = Utils.button_stock(gtk.STOCK_MEDIA_NEXT,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_prev = Utils.button_stock(gtk.STOCK_MEDIA_REWIND,stock_size)
- File "<input>", line 1
- b_prev = Utils.button_stock(gtk.STOCK_MEDIA_REWIND,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_next = Utils.button_stock(gtk.STOCK_MEDIA_FORWARD,stock_size)
- File "<input>", line 1
- b_next = Utils.button_stock(gtk.STOCK_MEDIA_FORWARD,stock_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> b_repeat = Utils.toggle_button_stock(gtk.STOCK_REFRESH,stock_size)
- File "<input>", line 1
- b_repeat = Utils.toggle_button_stock(gtk.STOCK_REFRESH,stock_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # connecting the button with callback
- >>> b_play.connect('clicked',self.on_toggle_play)
- File "<input>", line 1
- b_play.connect('clicked',self.on_toggle_play)
- ^
- IndentationError: unexpected indent
- >>> b_repeat.connect('toggled',self.on_replay)
- File "<input>", line 1
- b_repeat.connect('toggled',self.on_replay)
- ^
- IndentationError: unexpected indent
- >>>
- >>> b_next.connect('clicked',self.on_goto,NEXT,True)
- File "<input>", line 1
- b_next.connect('clicked',self.on_goto,NEXT,True)
- ^
- IndentationError: unexpected indent
- >>> b_prev.connect('clicked',self.on_goto,PREV,True)
- File "<input>", line 1
- b_prev.connect('clicked',self.on_goto,PREV,True)
- ^
- IndentationError: unexpected indent
- >>> b_toend.connect('clicked',self.on_goto,END,True)
- File "<input>", line 1
- b_toend.connect('clicked',self.on_goto,END,True)
- ^
- IndentationError: unexpected indent
- >>> b_tostart.connect('clicked',self.on_goto,START,True)
- File "<input>", line 1
- b_tostart.connect('clicked',self.on_goto,START,True)
- ^
- IndentationError: unexpected indent
- >>>
- >>>
- >>> # add to the disable on play list
- >>> w = [b_repeat,b_prev,b_next,b_tostart,b_toend]
- File "<input>", line 1
- w = [b_repeat,b_prev,b_next,b_tostart,b_toend]
- ^
- IndentationError: unexpected indent
- >>> map(lambda x: self.widgets_to_disable.append(x),w)
- File "<input>", line 1
- map(lambda x: self.widgets_to_disable.append(x),w)
- ^
- IndentationError: unexpected indent
- >>> self.play_bar = playback_bar
- File "<input>", line 1
- self.play_bar = playback_bar
- ^
- IndentationError: unexpected indent
- >>>
- >>> # set the tooltips
- >>> b_play.set_tooltip_text("Animation play/pause")
- File "<input>", line 1
- b_play.set_tooltip_text("Animation play/pause")
- ^
- IndentationError: unexpected indent
- >>> b_repeat.set_tooltip_text("Animation replay active/deactive")
- File "<input>", line 1
- b_repeat.set_tooltip_text("Animation replay active/deactive")
- ^
- IndentationError: unexpected indent
- >>> b_prev.set_tooltip_text("To the previous frame")
- File "<input>", line 1
- b_prev.set_tooltip_text("To the previous frame")
- ^
- IndentationError: unexpected indent
- >>> b_next.set_tooltip_text("To the next frame")
- File "<input>", line 1
- b_next.set_tooltip_text("To the next frame")
- ^
- IndentationError: unexpected indent
- >>> b_tostart.set_tooltip_text("To the start frame")
- File "<input>", line 1
- b_tostart.set_tooltip_text("To the start frame")
- ^
- IndentationError: unexpected indent
- >>> b_toend.set_tooltip_text("To the end frame")
- File "<input>", line 1
- b_toend.set_tooltip_text("To the end frame")
- ^
- IndentationError: unexpected indent
- >>>
- >>> # packing everything in gbar
- >>> w = [b_tostart, b_prev, b_play, b_next, b_toend, b_repeat]
- File "<input>", line 1
- w = [b_tostart, b_prev, b_play, b_next, b_toend, b_repeat]
- ^
- IndentationError: unexpected indent
- >>> map(lambda x: playback_bar.pack_start(x,False,False,0), w)
- File "<input>", line 1
- map(lambda x: playback_bar.pack_start(x,False,False,0), w)
- ^
- IndentationError: unexpected indent
- >>> return playback_bar
- File "<input>", line 1
- return playback_bar
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _setup_editbar(self):
- File "<input>", line 1
- def _setup_editbar(self):
- ^
- IndentationError: unexpected indent
- >>> stock_size = gtk.ICON_SIZE_BUTTON
- File "<input>", line 1
- stock_size = gtk.ICON_SIZE_BUTTON
- ^
- IndentationError: unexpected indent
- >>> edit_bar = gtk.HBox()
- File "<input>", line 1
- edit_bar = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>>
- >>> b_back = Utils.button_stock(gtk.STOCK_GO_BACK,stock_size)
- File "<input>", line 1
- b_back = Utils.button_stock(gtk.STOCK_GO_BACK,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_forward = Utils.button_stock(gtk.STOCK_GO_FORWARD,stock_size)
- File "<input>", line 1
- b_forward = Utils.button_stock(gtk.STOCK_GO_FORWARD,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_rem = Utils.button_stock(gtk.STOCK_REMOVE,stock_size)
- File "<input>", line 1
- b_rem = Utils.button_stock(gtk.STOCK_REMOVE,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_add = Utils.button_stock(gtk.STOCK_ADD,stock_size)
- File "<input>", line 1
- b_add = Utils.button_stock(gtk.STOCK_ADD,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_copy = Utils.button_stock(gtk.STOCK_COPY,stock_size)
- File "<input>", line 1
- b_copy = Utils.button_stock(gtk.STOCK_COPY,stock_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # add to the disable on play list
- >>> w = [b_back,b_forward,b_rem,b_add,b_copy]
- File "<input>", line 1
- w = [b_back,b_forward,b_rem,b_add,b_copy]
- ^
- IndentationError: unexpected indent
- >>> map(lambda x: self.widgets_to_disable.append(x),w)
- File "<input>", line 1
- map(lambda x: self.widgets_to_disable.append(x),w)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # connect callbacks:
- >>> b_rem.connect("clicked",self.on_remove) # remove frame
- File "<input>", line 1
- b_rem.connect("clicked",self.on_remove) # remove frame
- ^
- IndentationError: unexpected indent
- >>> b_add.connect("clicked",self.on_add) # add frame
- File "<input>", line 1
- b_add.connect("clicked",self.on_add) # add frame
- ^
- IndentationError: unexpected indent
- >>> b_copy.connect("clicked",self.on_add,True) # add frame
- File "<input>", line 1
- b_copy.connect("clicked",self.on_add,True) # add frame
- ^
- IndentationError: unexpected indent
- >>> b_back.connect("clicked",self.on_move,PREV)
- File "<input>", line 1
- b_back.connect("clicked",self.on_move,PREV)
- ^
- IndentationError: unexpected indent
- >>> b_forward.connect("clicked",self.on_move,NEXT)
- File "<input>", line 1
- b_forward.connect("clicked",self.on_move,NEXT)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # tooltips
- >>> b_rem.set_tooltip_text("Remove a frame/layer")
- File "<input>", line 1
- b_rem.set_tooltip_text("Remove a frame/layer")
- ^
- IndentationError: unexpected indent
- >>> b_add.set_tooltip_text("Add a frame/layer")
- File "<input>", line 1
- b_add.set_tooltip_text("Add a frame/layer")
- ^
- IndentationError: unexpected indent
- >>> b_copy.set_tooltip_text("Duplicate the atual selected frame")
- File "<input>", line 1
- b_copy.set_tooltip_text("Duplicate the atual selected frame")
- ^
- IndentationError: unexpected indent
- >>> b_back.set_tooltip_text("Move the atual selected frame backward")
- File "<input>", line 1
- b_back.set_tooltip_text("Move the atual selected frame backward")
- ^
- IndentationError: unexpected indent
- >>> b_forward.set_tooltip_text("Move the atual selected frame forward")
- File "<input>", line 1
- b_forward.set_tooltip_text("Move the atual selected frame forward")
- ^
- IndentationError: unexpected indent
- >>>
- >>> # packing everything in gbar
- >>> map(lambda x: edit_bar.pack_start(x,False,False,0),w)
- File "<input>", line 1
- map(lambda x: edit_bar.pack_start(x,False,False,0),w)
- ^
- IndentationError: unexpected indent
- >>> return edit_bar
- File "<input>", line 1
- return edit_bar
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _setup_config(self):
- File "<input>", line 1
- def _setup_config(self):
- ^
- IndentationError: unexpected indent
- >>> stock_size = gtk.ICON_SIZE_BUTTON
- File "<input>", line 1
- stock_size = gtk.ICON_SIZE_BUTTON
- ^
- IndentationError: unexpected indent
- >>> config_bar = gtk.HBox()
- File "<input>", line 1
- config_bar = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>>
- >>> b_to_gif = Utils.button_stock(gtk.STOCK_CONVERT,stock_size)
- File "<input>", line 1
- b_to_gif = Utils.button_stock(gtk.STOCK_CONVERT,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_to_sprite = Utils.button_stock(gtk.STOCK_CONVERT,stock_size)
- File "<input>", line 1
- b_to_sprite = Utils.button_stock(gtk.STOCK_CONVERT,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_conf = Utils.button_stock(gtk.STOCK_PREFERENCES,stock_size)
- File "<input>", line 1
- b_conf = Utils.button_stock(gtk.STOCK_PREFERENCES,stock_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # connect
- >>> b_conf.connect("clicked",self.on_config)
- File "<input>", line 1
- b_conf.connect("clicked",self.on_config)
- ^
- IndentationError: unexpected indent
- >>> b_to_gif.connect('clicked',self.create_formated_version,'gif')
- File "<input>", line 1
- b_to_gif.connect('clicked',self.create_formated_version,'gif')
- ^
- IndentationError: unexpected indent
- >>> b_to_sprite.connect('clicked',self.create_formated_version,'spritesheet')
- File "<input>", line 1
- b_to_sprite.connect('clicked',self.create_formated_version,'spritesheet')
- ^
- IndentationError: unexpected indent
- >>>
- >>> # tooltips
- >>> b_conf.set_tooltip_text("open configuration dialog")
- File "<input>", line 1
- b_conf.set_tooltip_text("open configuration dialog")
- ^
- IndentationError: unexpected indent
- >>> b_to_gif.set_tooltip_text("Create a formated Image to export as gif animation")
- File "<input>", line 1
- b_to_gif.set_tooltip_text("Create a formated Image to export as gif animation")
- ^
- IndentationError: unexpected indent
- >>> b_to_sprite.set_tooltip_text("Create a formated Image to export as spritesheet")
- File "<input>", line 1
- b_to_sprite.set_tooltip_text("Create a formated Image to export as spritesheet")
- ^
- IndentationError: unexpected indent
- >>>
- >>> # disable when is playing
- >>> w = [b_conf, b_to_gif,b_to_sprite]
- File "<input>", line 1
- w = [b_conf, b_to_gif,b_to_sprite]
- ^
- IndentationError: unexpected indent
- >>> map(lambda x: self.widgets_to_disable.append(x),w)
- File "<input>", line 1
- map(lambda x: self.widgets_to_disable.append(x),w)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # pack into config_bar
- >>> map(lambda x: config_bar.pack_start(x,False,False,0),w)
- File "<input>", line 1
- map(lambda x: config_bar.pack_start(x,False,False,0),w)
- ^
- IndentationError: unexpected indent
- >>> return config_bar
- File "<input>", line 1
- return config_bar
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _setup_onionskin(self):
- File "<input>", line 1
- def _setup_onionskin(self):
- ^
- IndentationError: unexpected indent
- >>> stock_size = gtk.ICON_SIZE_BUTTON
- File "<input>", line 1
- stock_size = gtk.ICON_SIZE_BUTTON
- ^
- IndentationError: unexpected indent
- >>> button_size = 30
- File "<input>", line 1
- button_size = 30
- ^
- IndentationError: unexpected indent
- >>> onionskin_bar = gtk.HBox()
- File "<input>", line 1
- onionskin_bar = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>>
- >>> # active onionskin
- >>> b_active = Utils.toggle_button_stock(gtk.STOCK_DND_MULTIPLE,stock_size)
- File "<input>", line 1
- b_active = Utils.toggle_button_stock(gtk.STOCK_DND_MULTIPLE,stock_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # connect widgets
- >>> b_active.connect("clicked",self.on_onionskin)
- File "<input>", line 1
- b_active.connect("clicked",self.on_onionskin)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # tooltips
- >>> b_active.set_tooltip_text("enable/disable the onion skin effect")
- File "<input>", line 1
- b_active.set_tooltip_text("enable/disable the onion skin effect")
- ^
- IndentationError: unexpected indent
- >>>
- >>> # add to the disable on play list
- >>> w = [b_active]
- File "<input>", line 1
- w = [b_active]
- ^
- IndentationError: unexpected indent
- >>> map(lambda x: self.widgets_to_disable.append(x),w)
- File "<input>", line 1
- map(lambda x: self.widgets_to_disable.append(x),w)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # packing everything in gbar
- >>> map(lambda x: onionskin_bar.pack_start(x,False,False,0),w)
- File "<input>", line 1
- map(lambda x: onionskin_bar.pack_start(x,False,False,0),w)
- ^
- IndentationError: unexpected indent
- >>> return onionskin_bar
- File "<input>", line 1
- return onionskin_bar
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _setup_generalbar(self):
- File "<input>", line 1
- def _setup_generalbar(self):
- ^
- IndentationError: unexpected indent
- >>> stock_size = gtk.ICON_SIZE_BUTTON
- File "<input>", line 1
- stock_size = gtk.ICON_SIZE_BUTTON
- ^
- IndentationError: unexpected indent
- >>> general_bar = gtk.HBox()
- File "<input>", line 1
- general_bar = gtk.HBox()
- ^
- IndentationError: unexpected indent
- >>>
- >>> b_about = Utils.button_stock(gtk.STOCK_ABOUT,stock_size)
- File "<input>", line 1
- b_about = Utils.button_stock(gtk.STOCK_ABOUT,stock_size)
- ^
- IndentationError: unexpected indent
- >>> b_quit = Utils.button_stock(gtk.STOCK_QUIT,stock_size)
- File "<input>", line 1
- b_quit = Utils.button_stock(gtk.STOCK_QUIT,stock_size)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # callbacks
- >>> b_quit.connect('clicked',self.destroy)
- File "<input>", line 1
- b_quit.connect('clicked',self.destroy)
- ^
- IndentationError: unexpected indent
- >>> b_about.connect('clicked',self.on_about)
- File "<input>", line 1
- b_about.connect('clicked',self.on_about)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # tooltips
- >>> b_about.set_tooltip_text("About FAnim")
- File "<input>", line 1
- b_about.set_tooltip_text("About FAnim")
- ^
- IndentationError: unexpected indent
- >>> b_quit.set_tooltip_text("Exit")
- File "<input>", line 1
- b_quit.set_tooltip_text("Exit")
- ^
- IndentationError: unexpected indent
- >>>
- >>> # add to the disable on play list
- >>> w = [b_about, b_quit]
- File "<input>", line 1
- w = [b_about, b_quit]
- ^
- IndentationError: unexpected indent
- >>> map(lambda x: self.widgets_to_disable.append(x),w)
- File "<input>", line 1
- map(lambda x: self.widgets_to_disable.append(x),w)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # packing everything in general_bar
- >>> map(lambda x: general_bar.pack_start(x,False,False,0),w)
- File "<input>", line 1
- map(lambda x: general_bar.pack_start(x,False,False,0),w)
- ^
- IndentationError: unexpected indent
- >>> return general_bar
- File "<input>", line 1
- return general_bar
- ^
- IndentationError: unexpected indent
- >>>
- >>> def get_settings(self):
- File "<input>", line 1
- def get_settings(self):
- ^
- IndentationError: unexpected indent
- >>> s = {}
- File "<input>", line 1
- s = {}
- ^
- IndentationError: unexpected indent
- >>> s[FRAMERATE] = self.framerate
- File "<input>", line 1
- s[FRAMERATE] = self.framerate
- ^
- IndentationError: unexpected indent
- >>> s[OSKIN_DEPTH] = self.oskin_depth
- File "<input>", line 1
- s[OSKIN_DEPTH] = self.oskin_depth
- ^
- IndentationError: unexpected indent
- >>> s[OSKIN_FORWARD] = self.oskin_forward
- File "<input>", line 1
- s[OSKIN_FORWARD] = self.oskin_forward
- ^
- IndentationError: unexpected indent
- >>> s[OSKIN_BACKWARD] = self.oskin_backward
- File "<input>", line 1
- s[OSKIN_BACKWARD] = self.oskin_backward
- ^
- IndentationError: unexpected indent
- >>> s[OSKIN_ONPLAY] = self.oskin_onplay
- File "<input>", line 1
- s[OSKIN_ONPLAY] = self.oskin_onplay
- ^
- IndentationError: unexpected indent
- >>>
- >>> s[WIN_POSX] = self.win_pos[0]
- File "<input>", line 1
- s[WIN_POSX] = self.win_pos[0]
- ^
- IndentationError: unexpected indent
- >>> s[WIN_POSY] = self.win_pos[1]
- File "<input>", line 1
- s[WIN_POSY] = self.win_pos[1]
- ^
- IndentationError: unexpected indent
- >>> s[WIN_WIDTH] = self.get_allocation()[2]
- File "<input>", line 1
- s[WIN_WIDTH] = self.get_allocation()[2]
- ^
- IndentationError: unexpected indent
- >>> s[WIN_HEIGHT] = self.get_allocation()[3]
- File "<input>", line 1
- s[WIN_HEIGHT] = self.get_allocation()[3]
- ^
- IndentationError: unexpected indent
- >>> return s
- File "<input>", line 1
- return s
- ^
- IndentationError: unexpected indent
- >>>
- >>> def set_settings(self,conf):
- File "<input>", line 1
- def set_settings(self,conf):
- ^
- IndentationError: unexpected indent
- >>> if conf == None:
- File "<input>", line 1
- if conf == None:
- ^
- IndentationError: unexpected indent
- >>> return
- File "<input>", line 1
- return
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.framerate = int(conf[FRAMERATE])
- File "<input>", line 1
- self.framerate = int(conf[FRAMERATE])
- ^
- IndentationError: unexpected indent
- >>> self.oskin_depth = int(conf[OSKIN_DEPTH])
- File "<input>", line 1
- self.oskin_depth = int(conf[OSKIN_DEPTH])
- ^
- IndentationError: unexpected indent
- >>> self.oskin_forward = conf[OSKIN_FORWARD]
- File "<input>", line 1
- self.oskin_forward = conf[OSKIN_FORWARD]
- ^
- IndentationError: unexpected indent
- >>> self.oskin_backward = conf[OSKIN_BACKWARD]
- File "<input>", line 1
- self.oskin_backward = conf[OSKIN_BACKWARD]
- ^
- IndentationError: unexpected indent
- >>> self.oskin_onplay = conf[OSKIN_ONPLAY]
- File "<input>", line 1
- self.oskin_onplay = conf[OSKIN_ONPLAY]
- ^
- IndentationError: unexpected indent
- >>> self.win_size = (conf[WIN_WIDTH],conf[WIN_HEIGHT])
- File "<input>", line 1
- self.win_size = (conf[WIN_WIDTH],conf[WIN_HEIGHT])
- ^
- IndentationError: unexpected indent
- >>> self.win_pos = (conf[WIN_POSX],conf[WIN_POSY])
- File "<input>", line 1
- self.win_pos = (conf[WIN_POSX],conf[WIN_POSY])
- ^
- IndentationError: unexpected indent
- >>>
- >>> def _toggle_enable_buttons(self,state):
- File "<input>", line 1
- def _toggle_enable_buttons(self,state):
- ^
- IndentationError: unexpected indent
- >>> if state == PLAYING:
- File "<input>", line 1
- if state == PLAYING:
- ^
- IndentationError: unexpected indent
- >>> for w in self.widgets_to_disable:
- File "<input>", line 1
- for w in self.widgets_to_disable:
- ^
- IndentationError: unexpected indent
- >>> w.set_sensitive(not self.is_playing)
- File "<input>", line 1
- w.set_sensitive(not self.is_playing)
- ^
- IndentationError: unexpected indent
- >>> elif state == NO_FRAMES:
- File "<input>", line 1
- elif state == NO_FRAMES:
- ^
- IndentationError: unexpected indent
- >>> self.play_bar.set_sensitive(not self.play_bar.get_sensitive())
- File "<input>", line 1
- self.play_bar.set_sensitive(not self.play_bar.get_sensitive())
- ^
- IndentationError: unexpected indent
- >>>
- >>>
- >>> #----------------------Callback Functions----------------#
- >>> def on_window_focus(self,widget,other):
- File "<input>", line 1
- def on_window_focus(self,widget,other):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Update all timeline thumbnails.
- File "<input>", line 1
- Update all timeline thumbnails.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> # I discovered that gimp has a delay to update when the image are closed, putting
- >>> # a small delay here i make sure that my if will catch the lack of the image
- >>> # and close fanim correctly.
- >>> time.sleep(0.1)
- File "<input>", line 1
- time.sleep(0.1)
- ^
- IndentationError: unexpected indent
- >>> if not(self.image in gimp.image_list()):
- File "<input>", line 1
- if not(self.image in gimp.image_list()):
- ^
- IndentationError: unexpected indent
- >>> self.destroy(False)
- File "<input>", line 1
- self.destroy(False)
- ^
- IndentationError: unexpected indent
- >>> else:
- File "<input>", line 1
- else:
- ^
- IndentationError: unexpected indent
- >>> # fixing problem that happens after delete the last layer through gimp.
- >>> # and closing when theres no layers at all.
- >>> if not self.image.layers:
- File "<input>", line 1
- if not self.image.layers:
- ^
- IndentationError: unexpected indent
- >>> self.destroy(False)
- File "<input>", line 1
- self.destroy(False)
- ^
- IndentationError: unexpected indent
- >>> else:
- File "<input>", line 1
- else:
- ^
- IndentationError: unexpected indent
- >>> if self.active >= len(self.image.layers):
- File "<input>", line 1
- if self.active >= len(self.image.layers):
- ^
- IndentationError: unexpected indent
- >>> self.active = len(self.image.layers)-1
- File "<input>", line 1
- self.active = len(self.image.layers)-1
- ^
- IndentationError: unexpected indent
- >>> self._scan_image_layers()
- File "<input>", line 1
- self._scan_image_layers()
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,GIMP_ACTIVE)
- File "<input>", line 1
- self.on_goto(None,GIMP_ACTIVE)
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_about(self,widget):
- File "<input>", line 1
- def on_about(self,widget):
- ^
- IndentationError: unexpected indent
- >>> about = gtk.AboutDialog()
- File "<input>", line 1
- about = gtk.AboutDialog()
- ^
- IndentationError: unexpected indent
- >>>
- >>> about.set_authors(AUTHORS)
- File "<input>", line 1
- about.set_authors(AUTHORS)
- ^
- IndentationError: unexpected indent
- >>> about.set_program_name(NAME)
- File "<input>", line 1
- about.set_program_name(NAME)
- ^
- IndentationError: unexpected indent
- >>> about.set_copyright(COPYRIGHT)
- File "<input>", line 1
- about.set_copyright(COPYRIGHT)
- ^
- IndentationError: unexpected indent
- >>> about.set_website(WEBSITE)
- File "<input>", line 1
- about.set_website(WEBSITE)
- ^
- IndentationError: unexpected indent
- >>>
- >>> about.run()
- File "<input>", line 1
- about.run()
- ^
- IndentationError: unexpected indent
- >>> about.destroy()
- File "<input>", line 1
- about.destroy()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def create_formated_version(self,widget,format='gif'):
- File "<input>", line 1
- def create_formated_version(self,widget,format='gif'):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Create a formated version of the animation to export as a giff or as a spritesheet.
- File "<input>", line 1
- Create a formated version of the animation to export as a giff or as a spritesheet.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> # disabling the onionskin temporaly if is activated
- >>> oskin_disabled = False
- File "<input>", line 1
- oskin_disabled = False
- ^
- IndentationError: unexpected indent
- >>> if self.oskin:
- File "<input>", line 1
- if self.oskin:
- ^
- IndentationError: unexpected indent
- >>> self.on_onionskin(None)
- File "<input>", line 1
- self.on_onionskin(None)
- ^
- IndentationError: unexpected indent
- >>> oskin_disabled = True
- File "<input>", line 1
- oskin_disabled = True
- ^
- IndentationError: unexpected indent
- >>>
- >>> # get normal and visibly fixed frames.
- >>> normal_frames = filter(lambda x: x.fixed == False,self.frames)
- File "<input>", line 1
- normal_frames = filter(lambda x: x.fixed == False,self.frames)
- ^
- IndentationError: unexpected indent
- >>> fixed_frames = filter(lambda x: x.fixed == True,self.frames)
- File "<input>", line 1
- fixed_frames = filter(lambda x: x.fixed == True,self.frames)
- ^
- IndentationError: unexpected indent
- >>>
- >>> new_image = gimp.Image(self.image.width,self.image.height,self.image.base_type)
- File "<input>", line 1
- new_image = gimp.Image(self.image.width,self.image.height,self.image.base_type)
- ^
- IndentationError: unexpected indent
- >>>
- >>>
- >>> # reverse the normal frames.
- >>> normal_frames.reverse()
- File "<input>", line 1
- normal_frames.reverse()
- ^
- IndentationError: unexpected indent
- >>>
- >>> for fl in normal_frames:
- File "<input>", line 1
- for fl in normal_frames:
- ^
- IndentationError: unexpected indent
- >>> # create a group to put the normal and the fixed frames.
- >>> group = gimp.GroupLayer(new_image,fl.layer.name)
- File "<input>", line 1
- group = gimp.GroupLayer(new_image,fl.layer.name)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # copy normal layer
- >>> lcopy = pdb.gimp_layer_new_from_drawable(fl.layer,new_image)
- File "<input>", line 1
- lcopy = pdb.gimp_layer_new_from_drawable(fl.layer,new_image)
- ^
- IndentationError: unexpected indent
- >>> lcopy.visible = True
- File "<input>", line 1
- lcopy.visible = True
- ^
- IndentationError: unexpected indent
- >>>
- >>> new_image.add_layer(group,len(new_image.layers))
- File "<input>", line 1
- new_image.add_layer(group,len(new_image.layers))
- ^
- IndentationError: unexpected indent
- >>> new_image.insert_layer(lcopy,group,0)
- File "<input>", line 1
- new_image.insert_layer(lcopy,group,0)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # get the background and foreground frames.
- >>> up_fixed = filter(lambda x: self.frames.index(x) > self.frames.index(fl),fixed_frames)
- File "<input>", line 1
- up_fixed = filter(lambda x: self.frames.index(x) > self.frames.index(fl),fixed_frames)
- ^
- IndentationError: unexpected indent
- >>> bottom_fixed = filter(lambda x: self.frames.index(x) < self.frames.index(fl),fixed_frames)
- File "<input>", line 1
- bottom_fixed = filter(lambda x: self.frames.index(x) < self.frames.index(fl),fixed_frames)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # copy and insert the fixed visibility layers/frames
- >>> b =0
- File "<input>", line 1
- b =0
- ^
- IndentationError: unexpected indent
- >>> for ff in fixed_frames:
- File "<input>", line 1
- for ff in fixed_frames:
- ^
- IndentationError: unexpected indent
- >>> copy = pdb.gimp_layer_new_from_drawable(ff.layer,new_image)
- File "<input>", line 1
- copy = pdb.gimp_layer_new_from_drawable(ff.layer,new_image)
- ^
- IndentationError: unexpected indent
- >>> if ff in bottom_fixed:
- File "<input>", line 1
- if ff in bottom_fixed:
- ^
- IndentationError: unexpected indent
- >>> new_image.insert_layer(copy,group,len(group.layers)-b)
- File "<input>", line 1
- new_image.insert_layer(copy,group,len(group.layers)-b)
- ^
- IndentationError: unexpected indent
- >>> b+= 1
- File "<input>", line 1
- b+= 1
- ^
- IndentationError: unexpected indent
- >>> elif ff in up_fixed:
- File "<input>", line 1
- elif ff in up_fixed:
- ^
- IndentationError: unexpected indent
- >>> new_image.insert_layer(copy,group,0)
- File "<input>", line 1
- new_image.insert_layer(copy,group,0)
- ^
- IndentationError: unexpected indent
- >>>
- >>> if format == 'gif':
- File "<input>", line 1
- if format == 'gif':
- ^
- IndentationError: unexpected indent
- >>> # show the formated image to export as gif.
- >>> gimp.Display(new_image)
- File "<input>", line 1
- gimp.Display(new_image)
- ^
- IndentationError: unexpected indent
- >>>
- >>> elif format == 'spritesheet':
- File "<input>", line 1
- elif format == 'spritesheet':
- ^
- IndentationError: unexpected indent
- >>> simg = gimp.Image(len(new_image.layers) * self.image.width,self.image.height,self.image.base_type)
- File "<input>", line 1
- simg = gimp.Image(len(new_image.layers) * self.image.width,self.image.height,self.image.base_type)
- ^
- IndentationError: unexpected indent
- >>>
- >>> cnt = 0
- File "<input>", line 1
- cnt = 0
- ^
- IndentationError: unexpected indent
- >>> def novisible (x,state):
- File "<input>", line 1
- def novisible (x,state):
- ^
- IndentationError: unexpected indent
- >>> # change the visibility of the gimp layers.
- >>> x.visible = state
- File "<input>", line 1
- x.visible = state
- ^
- IndentationError: unexpected indent
- >>>
- >>> # copy each frame and position it side by side.
- >>> # put the layers order back to normal.
- >>> n_img_layers = new_image.layers
- File "<input>", line 1
- n_img_layers = new_image.layers
- ^
- IndentationError: unexpected indent
- >>> n_img_layers.reverse()
- File "<input>", line 1
- n_img_layers.reverse()
- ^
- IndentationError: unexpected indent
- >>>
- >>> for l in n_img_layers:
- File "<input>", line 1
- for l in n_img_layers:
- ^
- IndentationError: unexpected indent
- >>> cl = pdb.gimp_layer_new_from_drawable(l,simg)
- File "<input>", line 1
- cl = pdb.gimp_layer_new_from_drawable(l,simg)
- ^
- IndentationError: unexpected indent
- >>> simg.add_layer(cl,0)
- File "<input>", line 1
- simg.add_layer(cl,0)
- ^
- IndentationError: unexpected indent
- >>>
- >>> cl.transform_2d(0,0,1,1,0,-cnt * new_image.width,0,1,0)
- File "<input>", line 1
- cl.transform_2d(0,0,1,1,0,-cnt * new_image.width,0,1,0)
- ^
- IndentationError: unexpected indent
- >>> cnt +=1
- File "<input>", line 1
- cnt +=1
- ^
- IndentationError: unexpected indent
- >>> # merge the group as flat image.
- >>> map(lambda x:novisible(x,False),simg.layers)
- File "<input>", line 1
- map(lambda x:novisible(x,False),simg.layers)
- ^
- IndentationError: unexpected indent
- >>> cl.visible = True
- File "<input>", line 1
- cl.visible = True
- ^
- IndentationError: unexpected indent
- >>> simg.merge_visible_layers(1)
- File "<input>", line 1
- simg.merge_visible_layers(1)
- ^
- IndentationError: unexpected indent
- >>>
- >>> map(lambda x:novisible(x,True),simg.layers)
- File "<input>", line 1
- map(lambda x:novisible(x,True),simg.layers)
- ^
- IndentationError: unexpected indent
- >>> # show the formated image to export as spritesheet.
- >>> gimp.Display(simg)
- File "<input>", line 1
- gimp.Display(simg)
- ^
- IndentationError: unexpected indent
- >>> # return onionskin if was enabled
- >>> if oskin_disabled:
- File "<input>", line 1
- if oskin_disabled:
- ^
- IndentationError: unexpected indent
- >>> self.on_onionskin(None)
- File "<input>", line 1
- self.on_onionskin(None)
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_toggle_play(self,widget):
- File "<input>", line 1
- def on_toggle_play(self,widget):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> This method change the animation play state,
- File "<input>", line 1
- This method change the animation play state,
- ^
- IndentationError: unexpected indent
- >>> change the button image and will disable/enable the other buttons
- File "<input>", line 1
- change the button image and will disable/enable the other buttons
- ^
- IndentationError: unexpected indent
- >>> interation.
- File "<input>", line 1
- interation.
- ^
- IndentationError: unexpected indent
- >>> for that they need 2 image which is stored in self.play_button_images
- File "<input>", line 1
- for that they need 2 image which is stored in self.play_button_images
- ^
- IndentationError: unexpected indent
- >>> variable.
- File "<input>", line 1
- variable.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> # if onionskin on play is disable then disable remaining frames
- >>> if self.oskin_onplay:
- File "<input>", line 1
- if self.oskin_onplay:
- ^
- IndentationError: unexpected indent
- >>> self.layers_show(False)
- File "<input>", line 1
- self.layers_show(False)
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.is_playing = not self.is_playing
- File "<input>", line 1
- self.is_playing = not self.is_playing
- ^
- IndentationError: unexpected indent
- >>>
- >>> if self.is_playing:
- File "<input>", line 1
- if self.is_playing:
- ^
- IndentationError: unexpected indent
- >>> # saving the atual frame before start to play.
- >>> if self.before_play == None:
- File "<input>", line 1
- if self.before_play == None:
- ^
- IndentationError: unexpected indent
- >>> self.before_play = self.active
- File "<input>", line 1
- self.before_play = self.active
- ^
- IndentationError: unexpected indent
- >>>
- >>> widget.set_image(self.play_button_images[1]) # set pause image to the button
- File "<input>", line 1
- widget.set_image(self.play_button_images[1]) # set pause image to the button
- ^
- IndentationError: unexpected indent
- >>>
- >>> # start the player object to play the frames in a sequence.
- >>> if not self.player:
- File "<input>", line 1
- if not self.player:
- ^
- IndentationError: unexpected indent
- >>> self.player = Player(self,widget)
- File "<input>", line 1
- self.player = Player(self,widget)
- ^
- IndentationError: unexpected indent
- >>> # block every other button than pause.
- >>> self._toggle_enable_buttons(PLAYING)
- File "<input>", line 1
- self._toggle_enable_buttons(PLAYING)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # start the loop to play the frames.
- >>> self.player.start()
- File "<input>", line 1
- self.player.start()
- ^
- IndentationError: unexpected indent
- >>>
- >>> else :
- File "<input>", line 1
- else :
- ^
- IndentationError: unexpected indent
- >>> # restore last frame before play.
- >>> if self.before_play != None:
- File "<input>", line 1
- if self.before_play != None:
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,POS,index=self.before_play)
- File "<input>", line 1
- self.on_goto(None,POS,index=self.before_play)
- ^
- IndentationError: unexpected indent
- >>> self.before_play = None
- File "<input>", line 1
- self.before_play = None
- ^
- IndentationError: unexpected indent
- >>>
- >>> widget.set_image(self.play_button_images[0]) # set play image
- File "<input>", line 1
- widget.set_image(self.play_button_images[0]) # set play image
- ^
- IndentationError: unexpected indent
- >>> self._toggle_enable_buttons(PLAYING)
- File "<input>", line 1
- self._toggle_enable_buttons(PLAYING)
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,NOWHERE) # update atual frame.
- File "<input>", line 1
- self.on_goto(None,NOWHERE) # update atual frame.
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_replay(self,widget):
- File "<input>", line 1
- def on_replay(self,widget):
- ^
- IndentationError: unexpected indent
- >>> self.is_replay = widget.get_active()
- File "<input>", line 1
- self.is_replay = widget.get_active()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_onionskin(self,widget):
- File "<input>", line 1
- def on_onionskin(self,widget):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Toggle onionskin.
- File "<input>", line 1
- Toggle onionskin.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> self.layers_show(False) # clear remaining onionskin frames
- File "<input>", line 1
- self.layers_show(False) # clear remaining onionskin frames
- ^
- IndentationError: unexpected indent
- >>> if widget == None:
- File "<input>", line 1
- if widget == None:
- ^
- IndentationError: unexpected indent
- >>> self.oskin = not self.oskin
- File "<input>", line 1
- self.oskin = not self.oskin
- ^
- IndentationError: unexpected indent
- >>> else: self.oskin = widget.get_active()
- File "<input>", line 1
- else: self.oskin = widget.get_active()
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,NOWHERE,True)
- File "<input>", line 1
- self.on_goto(None,NOWHERE,True)
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_config(self,widget):
- File "<input>", line 1
- def on_config(self,widget):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Open a dialog to set all the settings of the plugin.
- File "<input>", line 1
- Open a dialog to set all the settings of the plugin.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> dialog = ConfDialog("FAnim Config",self,self.get_settings())
- File "<input>", line 1
- dialog = ConfDialog("FAnim Config",self,self.get_settings())
- ^
- IndentationError: unexpected indent
- >>> result, config = dialog.run()
- File "<input>", line 1
- result, config = dialog.run()
- ^
- IndentationError: unexpected indent
- >>>
- >>> if result == gtk.RESPONSE_APPLY:
- File "<input>", line 1
- if result == gtk.RESPONSE_APPLY:
- ^
- IndentationError: unexpected indent
- >>> self.set_settings(config)
- File "<input>", line 1
- self.set_settings(config)
- ^
- IndentationError: unexpected indent
- >>> dialog.destroy()
- File "<input>", line 1
- dialog.destroy()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_move(self,widget,direction):
- File "<input>", line 1
- def on_move(self,widget,direction):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Move the layer and the frame forward or backward.
- File "<input>", line 1
- Move the layer and the frame forward or backward.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> # calculate next position
- >>> index = 0
- File "<input>", line 1
- index = 0
- ^
- IndentationError: unexpected indent
- >>> if direction == NEXT:
- File "<input>", line 1
- if direction == NEXT:
- ^
- IndentationError: unexpected indent
- >>> index = self.active+1
- File "<input>", line 1
- index = self.active+1
- ^
- IndentationError: unexpected indent
- >>> if index == len(self.frames):
- File "<input>", line 1
- if index == len(self.frames):
- ^
- IndentationError: unexpected indent
- >>> return
- File "<input>", line 1
- return
- ^
- IndentationError: unexpected indent
- >>>
- >>> elif direction == PREV:
- File "<input>", line 1
- elif direction == PREV:
- ^
- IndentationError: unexpected indent
- >>> index = self.active-1
- File "<input>", line 1
- index = self.active-1
- ^
- IndentationError: unexpected indent
- >>> if self.active-1 < 0:
- File "<input>", line 1
- if self.active-1 < 0:
- ^
- IndentationError: unexpected indent
- >>> return
- File "<input>", line 1
- return
- ^
- IndentationError: unexpected indent
- >>> # move layer.
- >>> if direction == NEXT:
- File "<input>", line 1
- if direction == NEXT:
- ^
- IndentationError: unexpected indent
- >>> self.image.raise_layer(self.frames[self.active].layer)
- File "<input>", line 1
- self.image.raise_layer(self.frames[self.active].layer)
- ^
- IndentationError: unexpected indent
- >>> elif direction == PREV:
- File "<input>", line 1
- elif direction == PREV:
- ^
- IndentationError: unexpected indent
- >>> self.image.lower_layer(self.frames[self.active].layer)
- File "<input>", line 1
- self.image.lower_layer(self.frames[self.active].layer)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # update Timeline
- >>> self._scan_image_layers()
- File "<input>", line 1
- self._scan_image_layers()
- ^
- IndentationError: unexpected indent
- >>> self.active = index
- File "<input>", line 1
- self.active = index
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,NOWHERE)
- File "<input>", line 1
- self.on_goto(None,NOWHERE)
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_remove(self,widget):
- File "<input>", line 1
- def on_remove(self,widget):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Remove the atual selected frame, and his layer. and if the case his sublayers.
- File "<input>", line 1
- Remove the atual selected frame, and his layer. and if the case his sublayers.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> if not self.frames:
- File "<input>", line 1
- if not self.frames:
- ^
- IndentationError: unexpected indent
- >>> return
- File "<input>", line 1
- return
- ^
- IndentationError: unexpected indent
- >>>
- >>> index = 0
- File "<input>", line 1
- index = 0
- ^
- IndentationError: unexpected indent
- >>> if self.active > 0:
- File "<input>", line 1
- if self.active > 0:
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,PREV,True)
- File "<input>", line 1
- self.on_goto(None,PREV,True)
- ^
- IndentationError: unexpected indent
- >>> index = self.active + 1
- File "<input>", line 1
- index = self.active + 1
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.image.remove_layer(self.frames[index].layer)
- File "<input>", line 1
- self.image.remove_layer(self.frames[index].layer)
- ^
- IndentationError: unexpected indent
- >>> self.frame_bar.remove (self.frames[index])
- File "<input>", line 1
- self.frame_bar.remove (self.frames[index])
- ^
- IndentationError: unexpected indent
- >>> self.frames[index].destroy()
- File "<input>", line 1
- self.frames[index].destroy()
- ^
- IndentationError: unexpected indent
- >>> self.frames.remove(self.frames[index])
- File "<input>", line 1
- self.frames.remove(self.frames[index])
- ^
- IndentationError: unexpected indent
- >>>
- >>> if len(self.frames) == 0:
- File "<input>", line 1
- if len(self.frames) == 0:
- ^
- IndentationError: unexpected indent
- >>> self._toggle_enable_buttons(NO_FRAMES)
- File "<input>", line 1
- self._toggle_enable_buttons(NO_FRAMES)
- ^
- IndentationError: unexpected indent
- >>> else :
- File "<input>", line 1
- else :
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,None,True)
- File "<input>", line 1
- self.on_goto(None,None,True)
- ^
- IndentationError: unexpected indent
- >>> # check if theres layers left.
- >>> self.on_window_focus(None,None);
- File "<input>", line 1
- self.on_window_focus(None,None);
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_add(self,widget,copy=False):
- File "<input>", line 1
- def on_add(self,widget,copy=False):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Add new layer to the image and a new frame to the Timeline.
- File "<input>", line 1
- Add new layer to the image and a new frame to the Timeline.
- ^
- IndentationError: unexpected indent
- >>> if copy is true them the current layer will be copy.
- File "<input>", line 1
- if copy is true them the current layer will be copy.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> # starting gimp undo group
- >>> self.image.undo_group_start()
- File "<input>", line 1
- self.image.undo_group_start()
- ^
- IndentationError: unexpected indent
- >>>
- >>> name = "Frame " + str(len(self.frames))
- File "<input>", line 1
- name = "Frame " + str(len(self.frames))
- ^
- IndentationError: unexpected indent
- >>> # create the layer to add
- >>> l = None
- File "<input>", line 1
- l = None
- ^
- IndentationError: unexpected indent
- >>> if not copy:
- File "<input>", line 1
- if not copy:
- ^
- IndentationError: unexpected indent
- >>> l = gimp.Layer(self.image,name, self.image.width,self.image.height,RGBA_IMAGE,100,NORMAL_MODE)
- File "<input>", line 1
- l = gimp.Layer(self.image,name, self.image.width,self.image.height,RGBA_IMAGE,100,NORMAL_MODE)
- ^
- IndentationError: unexpected indent
- >>>
- >>> else: # copy current layer to add
- File "<input>", line 1
- else: # copy current layer to add
- ^
- IndentationError: unexpected indent
- >>> l = self.frames[self.active].layer.copy()
- File "<input>", line 1
- l = self.frames[self.active].layer.copy()
- ^
- IndentationError: unexpected indent
- >>> l.name = name
- File "<input>", line 1
- l.name = name
- ^
- IndentationError: unexpected indent
- >>>
- >>> # adding layer
- >>> self.image.add_layer(l,len(self.image.layers)-self.active-1)
- File "<input>", line 1
- self.image.add_layer(l,len(self.image.layers)-self.active-1)
- ^
- IndentationError: unexpected indent
- >>> if self.new_layer_type == TRANSPARENT_FILL and not copy:
- File "<input>", line 1
- if self.new_layer_type == TRANSPARENT_FILL and not copy:
- ^
- IndentationError: unexpected indent
- >>> pdb.gimp_edit_clear(l)
- File "<input>", line 1
- pdb.gimp_edit_clear(l)
- ^
- IndentationError: unexpected indent
- >>>
- >>> self._scan_image_layers()
- File "<input>", line 1
- self._scan_image_layers()
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,NEXT,True)
- File "<input>", line 1
- self.on_goto(None,NEXT,True)
- ^
- IndentationError: unexpected indent
- >>>
- >>> if len(self.frames) == 1 :
- File "<input>", line 1
- if len(self.frames) == 1 :
- ^
- IndentationError: unexpected indent
- >>> self._toggle_enable_buttons(NO_FRAMES)
- File "<input>", line 1
- self._toggle_enable_buttons(NO_FRAMES)
- ^
- IndentationError: unexpected indent
- >>>
- >>> # ending gimp undo group
- >>> self.image.undo_group_end()
- File "<input>", line 1
- self.image.undo_group_end()
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_click_goto(self,widget,event):
- File "<input>", line 1
- def on_click_goto(self,widget,event):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> handlers a click on frame widgets.
- File "<input>", line 1
- handlers a click on frame widgets.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> i = self.frames.index(widget)
- File "<input>", line 1
- i = self.frames.index(widget)
- ^
- IndentationError: unexpected indent
- >>> self.on_goto(None,POS,index=i)
- File "<input>", line 1
- self.on_goto(None,POS,index=i)
- ^
- IndentationError: unexpected indent
- >>>
- >>> def on_goto(self,widget,to,update=False,index=0):
- File "<input>", line 1
- def on_goto(self,widget,to,update=False,index=0):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> This method change the atual active frame to where the variable
- File "<input>", line 1
- This method change the atual active frame to where the variable
- ^
- IndentationError: unexpected indent
- >>> (to) indicate, the macros are (START, END, NEXT, PREV,POS,GIMP_ACTIVE)
- File "<input>", line 1
- (to) indicate, the macros are (START, END, NEXT, PREV,POS,GIMP_ACTIVE)
- ^
- IndentationError: unexpected indent
- >>> - called once per frame when is_playing is enabled.
- File "<input>", line 1
- - called once per frame when is_playing is enabled.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> self.layers_show(False)
- File "<input>", line 1
- self.layers_show(False)
- ^
- IndentationError: unexpected indent
- >>>
- >>> if update:
- File "<input>", line 1
- if update:
- ^
- IndentationError: unexpected indent
- >>> self.frames[self.active].update_layer_info()
- File "<input>", line 1
- self.frames[self.active].update_layer_info()
- ^
- IndentationError: unexpected indent
- >>>
- >>> if to == START:
- File "<input>", line 1
- if to == START:
- ^
- IndentationError: unexpected indent
- >>> self.active = 0
- File "<input>", line 1
- self.active = 0
- ^
- IndentationError: unexpected indent
- >>>
- >>> elif to == END:
- File "<input>", line 1
- elif to == END:
- ^
- IndentationError: unexpected indent
- >>> self.active = len(self.frames)-1
- File "<input>", line 1
- self.active = len(self.frames)-1
- ^
- IndentationError: unexpected indent
- >>>
- >>> elif to == NEXT:
- File "<input>", line 1
- elif to == NEXT:
- ^
- IndentationError: unexpected indent
- >>> i = self.active + 1
- File "<input>", line 1
- i = self.active + 1
- ^
- IndentationError: unexpected indent
- >>> if i > len(self.frames)-1:
- File "<input>", line 1
- if i > len(self.frames)-1:
- ^
- IndentationError: unexpected indent
- >>> i = 0
- File "<input>", line 1
- i = 0
- ^
- IndentationError: unexpected indent
- >>> self.active = i
- File "<input>", line 1
- self.active = i
- ^
- IndentationError: unexpected indent
- >>>
- >>> elif to == PREV:
- File "<input>", line 1
- elif to == PREV:
- ^
- IndentationError: unexpected indent
- >>> i = self.active - 1
- File "<input>", line 1
- i = self.active - 1
- ^
- IndentationError: unexpected indent
- >>> if i < 0:
- File "<input>", line 1
- if i < 0:
- ^
- IndentationError: unexpected indent
- >>> i= len(self.frames)-1
- File "<input>", line 1
- i= len(self.frames)-1
- ^
- IndentationError: unexpected indent
- >>> self.active = i
- File "<input>", line 1
- self.active = i
- ^
- IndentationError: unexpected indent
- >>> elif to == POS:
- File "<input>", line 1
- elif to == POS:
- ^
- IndentationError: unexpected indent
- >>> self.active = index
- File "<input>", line 1
- self.active = index
- ^
- IndentationError: unexpected indent
- >>>
- >>> elif to == GIMP_ACTIVE:
- File "<input>", line 1
- elif to == GIMP_ACTIVE:
- ^
- IndentationError: unexpected indent
- >>> if self.image.active_layer in self.image.layers:
- File "<input>", line 1
- if self.image.active_layer in self.image.layers:
- ^
- IndentationError: unexpected indent
- >>> self.active = self.image.layers.index(self.image.active_layer)
- File "<input>", line 1
- self.active = self.image.layers.index(self.image.active_layer)
- ^
- IndentationError: unexpected indent
- >>> self.active = len(self.image.layers)-1-self.active
- File "<input>", line 1
- self.active = len(self.image.layers)-1-self.active
- ^
- IndentationError: unexpected indent
- >>> else :self.active = 0
- File "<input>", line 1
- else :self.active = 0
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.layers_show(True)
- File "<input>", line 1
- self.layers_show(True)
- ^
- IndentationError: unexpected indent
- >>> self.image.active_layer = self.frames[self.active].layer
- File "<input>", line 1
- self.image.active_layer = self.frames[self.active].layer
- ^
- IndentationError: unexpected indent
- >>>
- >>> gimp.displays_flush() # update the gimp GUI
- File "<input>", line 1
- gimp.displays_flush() # update the gimp GUI
- ^
- IndentationError: unexpected indent
- >>>
- >>>
- >>> def layers_show(self,state):
- File "<input>", line 1
- def layers_show(self,state):
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> Util function to hide the old frames and show the next.
- File "<input>", line 1
- Util function to hide the old frames and show the next.
- ^
- IndentationError: unexpected indent
- >>> """
- File "<input>", line 1
- """
- ^
- IndentationError: unexpected indent
- >>> self.undo(False)
- File "<input>", line 1
- self.undo(False)
- ^
- IndentationError: unexpected indent
- >>>
- >>> opacity = 0
- File "<input>", line 1
- opacity = 0
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.frames[self.active].layer.opacity = 100.0
- File "<input>", line 1
- self.frames[self.active].layer.opacity = 100.0
- ^
- IndentationError: unexpected indent
- >>>
- >>> if not state:
- File "<input>", line 1
- if not state:
- ^
- IndentationError: unexpected indent
- >>> opacity = 100.0
- File "<input>", line 1
- opacity = 100.0
- ^
- IndentationError: unexpected indent
- >>> else :
- File "<input>", line 1
- else :
- ^
- IndentationError: unexpected indent
- >>> opacity = self.oskin_max_opacity
- File "<input>", line 1
- opacity = self.oskin_max_opacity
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.frames[self.active].layer.visible = state # show or hide the frame
- File "<input>", line 1
- self.frames[self.active].layer.visible = state # show or hide the frame
- ^
- IndentationError: unexpected indent
- >>> self.frames[self.active].highlight(state) # highlight or not the frame
- File "<input>", line 1
- self.frames[self.active].highlight(state) # highlight or not the frame
- ^
- IndentationError: unexpected indent
- >>>
- >>> is_fixed = self.frames[self.active].fixed # if actual frame is fixed
- File "<input>", line 1
- is_fixed = self.frames[self.active].fixed # if actual frame is fixed
- ^
- IndentationError: unexpected indent
- >>>
- >>> if (self.oskin and not is_fixed) and not(self.is_playing and not self.oskin_onplay):
- File "<input>", line 1
- if (self.oskin and not is_fixed) and not(self.is_playing and not self.oskin_onplay):
- ^
- IndentationError: unexpected indent
- >>> # calculating the onionskin backward and forward
- >>> for i in range(1,self.oskin_depth +1):
- File "<input>", line 1
- for i in range(1,self.oskin_depth +1):
- ^
- IndentationError: unexpected indent
- >>> # calculating opacity level
- >>> o = opacity
- File "<input>", line 1
- o = opacity
- ^
- IndentationError: unexpected indent
- >>> if i > 1 and state: o = opacity / i-1 * 2
- File "<input>", line 1
- if i > 1 and state: o = opacity / i-1 * 2
- ^
- IndentationError: unexpected indent
- >>>
- >>> pos = self.active - i
- File "<input>", line 1
- pos = self.active - i
- ^
- IndentationError: unexpected indent
- >>> if self.oskin_backward and pos >= 0:
- File "<input>", line 1
- if self.oskin_backward and pos >= 0:
- ^
- IndentationError: unexpected indent
- >>> is_fixed = self.frames[pos].fixed
- File "<input>", line 1
- is_fixed = self.frames[pos].fixed
- ^
- IndentationError: unexpected indent
- >>> if not is_fixed: # discard fixed frames
- File "<input>", line 1
- if not is_fixed: # discard fixed frames
- ^
- IndentationError: unexpected indent
- >>> # calculate onionskin depth opacity decay.
- >>> self.frames[pos].layer.visible = state
- File "<input>", line 1
- self.frames[pos].layer.visible = state
- ^
- IndentationError: unexpected indent
- >>> self.frames[pos].layer.opacity = o
- File "<input>", line 1
- self.frames[pos].layer.opacity = o
- ^
- IndentationError: unexpected indent
- >>>
- >>> pos = self.active +i
- File "<input>", line 1
- pos = self.active +i
- ^
- IndentationError: unexpected indent
- >>> if self.oskin_forward and pos <= len(self.frames)-1:
- File "<input>", line 1
- if self.oskin_forward and pos <= len(self.frames)-1:
- ^
- IndentationError: unexpected indent
- >>> is_fixed = self.frames[pos].fixed
- File "<input>", line 1
- is_fixed = self.frames[pos].fixed
- ^
- IndentationError: unexpected indent
- >>> #self.frames[self.active].layer.opacity = min(100.0, 1.5*opacity)
- >>>
- >>> if not is_fixed:# discard fixed frames
- File "<input>", line 1
- if not is_fixed:# discard fixed frames
- ^
- IndentationError: unexpected indent
- >>> # calculate onionskin depth opacity decay.
- >>> self.frames[pos].layer.visible = state
- File "<input>", line 1
- self.frames[pos].layer.visible = state
- ^
- IndentationError: unexpected indent
- >>> self.frames[pos].layer.opacity = o
- File "<input>", line 1
- self.frames[pos].layer.opacity = o
- ^
- IndentationError: unexpected indent
- >>>
- >>> if self.frames[self.active].fixed and state == False:
- File "<input>", line 1
- if self.frames[self.active].fixed and state == False:
- ^
- IndentationError: unexpected indent
- >>> self.frames[self.active].layer.visible = True
- File "<input>", line 1
- self.frames[self.active].layer.visible = True
- ^
- IndentationError: unexpected indent
- >>>
- >>> self.undo(True)
- File "<input>", line 1
- self.undo(True)
- ^
- IndentationError: unexpected indent
- >>>
- >>>
- >>> def timeline_main(image,drawable):
- ... """
- ... gimp call initial function, created the main timeline window.
- ... """
- ... global WINDOW_TITLE
- ... WINDOW_TITLE = WINDOW_TITLE % (image.name)
- ... win = Timeline(WINDOW_TITLE,image)
- ... win.start()
- ...
- >>> # register the script on GIMP
- >>> register(
- ... "fanim_timeline",
- ... DESCRIPTION,
- ... DESCRIPTION,
- ... AUTHORS[0],
- ... AUTHORS[0],
- ... YEAR,
- ... GIMP_LOCATION,
- ... "*",
- ... [],[],timeline_main)
- Traceback (most recent call last):
- File "<input>", line 1, in <module>
- NameError: name 'register' is not defined
- >>> main()
Add Comment
Please, Sign In to add comment