Post #3298: ![](https://blenderartists.org/user_avatar/blenderartists.org/mickhanks/48/77779

📋 Metadata

  • Author: roaoao
  • Date: 2020-05-14 14:19:18
  • Type: answer
  • Quality Score: 7/10
  • Reply to: post_03295

🏷️ Tags

custom-scripting intermediate solved

  • Custom Line Editor
  • Python Scripting
  • Boolean Property
  • Macro Editor

💬 Content

MickHanks:

Many times there are button is a boolean true/false. I don’t what to have 2 buttons, one Off and one ON. Can a button be turned into a toggle in the custom line?

It depends on buttons. In most cases it’s possible by adding Boolean Property but you need to look at button’s source code to find a way to display its ON/OFF state.

MickHanks:

Also why is the “custom ” only one line?

Blender don’t have multiline text input widget. But you can call external multiline python script:

execute_script("scripts/my_script.py")

❤️ 1 likes


🔗 View on Blender Artists