Mercurial > MadButterfly
diff pyink/domview_ui.py @ 1323:ffbbd3aa218d
Make a component from a group.
User can translate a group into a component from context menu.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 30 Jan 2011 19:15:17 +0800 |
parents | 6090be010927 |
children | 407f321f0d7c |
line wrap: on
line diff
--- a/pyink/domview_ui.py Sun Jan 23 09:24:01 2011 +0800 +++ b/pyink/domview_ui.py Sun Jan 30 19:15:17 2011 +0800 @@ -455,6 +455,16 @@ def get_current_timeline(self): return self._dom.get_current_timeline() + + ## \brief Add a new component from a group node. + # + # The group node is reparented to the group of first layer of + # specified component. + # + def add_component_from_group(self, comp_name, group): + self.add_component(comp_name) + self._dom.mv_group_to_component(group, comp_name) + pass pass @@ -757,6 +767,14 @@ self._dom.clone_group_children(src_group, dst_group) pass + ## \brief To test a graphic node. + # + # A graphic node is a SVG node that is not layer group, scene + # group, ... etc. It is only a normal node in a layer group or a + # scene group. + def is_graph_node(self, node): + return self._dom.is_graph_node(node) + ## \brief Return widget showing frames and layers. # def get_frame_ui_widget(self): @@ -906,6 +924,12 @@ pass self._fl_stack.set_layer_label(layer_idx, label) pass + + ## \brief Get layer group. + # + def get_layer_group(self, layer_idx): + layer_group = self._dom.get_layer_group(layer_idx) + return layer_group pass