
I'm working on an extension which needs to be able to group certain open models like the model panel does. Is there a way to utilize the group function in the model panel from an extension in python? Thank you, Taylor

Hi Taylor, Yes, there is a way to programmatically group things in the model panel. It’s ModelPanel.groupCmd(items, name=None). The items can be models and/or groups. It returns the new group formed. You should probably provide the ‘name’ argument, since otherwise it’s possible the user would be prompted for the name. If there’s no particularly obvious name for you to use, you can use ModelPanel.defaultGroupName(items) to generate one. —Eric Eric Pettersen UCSF Computer Graphics Lab
On May 19, 2016, at 5:51 PM, Taylor Gerpheide <tgerp001@odu.edu> wrote:
I'm working on an extension which needs to be able to group certain open models like the model panel does. Is there a way to utilize the group function in the model panel from an extension in python?
Thank you, Taylor _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Thank you! That worked perfectly. On Fri, May 20, 2016 at 1:40 PM, Eric Pettersen <pett@cgl.ucsf.edu> wrote:
Hi Taylor, Yes, there is a way to programmatically group things in the model panel. It’s ModelPanel.groupCmd(items, name=None). The items can be models and/or groups. It returns the new group formed. You should probably provide the ‘name’ argument, since otherwise it’s possible the user would be prompted for the name. If there’s no particularly obvious name for you to use, you can use ModelPanel.defaultGroupName(items) to generate one.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On May 19, 2016, at 5:51 PM, Taylor Gerpheide <tgerp001@odu.edu> wrote:
I'm working on an extension which needs to be able to group certain open models like the model panel does. Is there a way to utilize the group function in the model panel from an extension in python?
Thank you, Taylor _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev

Great! You’re welcome. —Eric
On May 20, 2016, at 11:34 AM, Taylor Gerpheide <tgerp001@odu.edu> wrote:
Thank you! That worked perfectly.
On Fri, May 20, 2016 at 1:40 PM, Eric Pettersen <pett@cgl.ucsf.edu <mailto:pett@cgl.ucsf.edu>> wrote: Hi Taylor, Yes, there is a way to programmatically group things in the model panel. It’s ModelPanel.groupCmd(items, name=None). The items can be models and/or groups. It returns the new group formed. You should probably provide the ‘name’ argument, since otherwise it’s possible the user would be prompted for the name. If there’s no particularly obvious name for you to use, you can use ModelPanel.defaultGroupName(items) to generate one.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
On May 19, 2016, at 5:51 PM, Taylor Gerpheide <tgerp001@odu.edu <mailto:tgerp001@odu.edu>> wrote:
I'm working on an extension which needs to be able to group certain open models like the model panel does. Is there a way to utilize the group function in the model panel from an extension in python?
Thank you, Taylor _______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu <mailto:Chimera-dev@cgl.ucsf.edu> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
_______________________________________________ Chimera-dev mailing list Chimera-dev@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev
participants (2)
-
Eric Pettersen
-
Taylor Gerpheide