Post #526: Ma

πŸ“‹ Metadata

🏷️ Tags

popup-dialog custom-scripting advanced solved

  • Regular Menu
  • Custom tab
  • Python Scripting

πŸ’¬ Content

MatsuikoHiroka:

Hi Roaoao
is it possible create a drop down list box of render slot for regular menu

Hi, MatsuikoHiroka.
It’s not easy but possible. Note that render slots are not available by default. You need to render an image or open render result window.
Use this code in Custom tab (Regular Menu):

imgs = [img for img in D.images if img.type == 'RENDER_RESULT']; img = imgs and imgs[0]; img and L.context_pointer_set("img", img); img and (lambda img, L: [operator(L, "wm.context_set_int","Slot %d" % (i + 1), 'CHECKBOX_HLT' if img.render_slots.active_index == i else 'CHECKBOX_DEHLT', data_path="img.render_slots.active_index", value=i) for i in range(0, 8)])(img, L)

πŸ”— View on Blender Artists