# Show/Hide an Input Field based on a conditional when making an Addon

I am writing a Blender Add-on which takes properties from configuration file and generates a tree based on the customization. The Add-On allows tweaking of certain properties, most notably whether the tree is monopodial (one canopy) or sympodial (multiple canopies).

If the tree is sympodial, I want the user to be able to select how many canopies are present in the Add-On. If the tree is monopodial, I want the fields to either be hidden or greyed out/locked for editing.

I've tried something like

row = box.row()
row.prop(scn, "Tree_Form")
if (tree_form == "Sympodial")
row = box.row()
row.prop(scn, "Num_Canopies")


But I haven't had success. Admittedly, I am a complete novice to Python and Blender Add-Ons in general.

• Based on guesswork re your code snippet, you want something like if(scn.Tree_Form == "Sympodial"): Don't forget the colon after the if statement. – batFINGER Nov 2 '15 at 18:01

row = box.row()

• I myself, was stuck on .props and such. – Andrew Mast Nov 2 '15 at 20:29