Antonioya
(Antonioya)
1
Hi,
I want add the option to enable or disable the gradient in 3dView to a panel to avoid open User preferences each time.
I have seen that the property is: ThemeGradientColors.show_grad=True/False
I have tried in the following context, but I cannot get this property.
bpy.context.user_preferences.themes[0].view_3d.???
Any idea
CoDEmanX
(CoDEmanX)
2
bpy.context.user_preferences.themes[0].view_3d.space.gradients.show_grad
Antonioya
(Antonioya)
3
From python console works, but I have one question more…How can I add this checkbox to a panel?
…something like this:
def draw(self, context):
layout = self.layout
row = layout.row()
row.prop(context.space_data, "show_only_render", text="Hide controllers")
row.prop(context.user_preferences.themes[0].view_3d.space,"gradients.show_grad", text="Gradient") ?????
batFINGER
(batFINGER)
4
Dang close
row.prop(context.user_preferences.themes[0].view_3d.space.gradients, "show_grad", text="Gradient")