Post #526:
Ma
π Metadata
- Author: roaoao
- Date: 2017-02-17 02:57:07
- Type:
answer - Quality Score: 8/10
- Reply to: post_00525
- Replies (1): post_00527
π·οΈ Tags
popup-dialog custom-scripting advanced solved
βοΈ Related PME Features
- 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)