📋 Metadata

💬 Content

draguu:

here is a json link
https://drive.google.com/file/d/0B5_6TmbNuys1cjVQQVkwYTNURE0/view?usp=sharing

You can split that panel into 2 panels (main and sub-panel). And draw sub-panel in the main panel only when the object has materials (Custom tab):

your_condition_here and draw_menu("sub-panel")

for example "object has materials" condition:
ao = C.active_object; ao and len(ao.material_slots) and ao.material_slots[ao.active_material_index].material and draw_menu("sub-panel")

Here is a json: mat2.zip (929 Bytes)


🔗 View on Blender Artists