Post #187: fj

๐Ÿ“‹ Metadata

  • Author: roaoao
  • Date: 2016-06-02 10:43:19
  • Type: answer
  • Quality Score: 8/10
  • Reply to: post_00186

๐Ÿท๏ธ Tags

pie-menu popup-dialog hotkeys intermediate

  • Pie Menu Editor
  • Popup Dialog Editor
  • Custom tab scripting
  • Python scripting

๐Ÿ’ฌ Content

fjg3d:

I think thatโ€™s the command to change visible layers? Iโ€™m referring to the โ€˜object.move_to_layerโ€™ panel that pops up when you press โ€˜mโ€™ key (to move objects to different layers).

It should move the last selected object to the selected layer(s). If you want to move all selected objects you have to use โ€˜Mโ€™ command.

You can change visible layers with this code for popup dialogs (Custom tab):

L.prop(C.scene, "layers", "")

Or this for pie menus (Custom tab):

L.box().prop(C.scene, "layers", "")

๐Ÿ”— View on Blender Artists