I'm trying to make a script to change the size of the manipulator, but I get this error from console:
Traceback (most recent call last): File "/addon_widget_size.py", line 30, in draw TypeError: UILayout.prop(): error with argument 1, "data" - Function.data expected a AnyType type, not int
I have very limited skills at coding, so this error says nothing to me.
my code is:
bl_info = {
"name": "WidgetSize",
"author": "Ed-Hernandez",
"version": (1, 0),
"blender": (2, 79, 0),
"location": "View3D > properties-panel",
"description": "fast change witget size",
"warning": "",
"wiki_url": "",
"category": "3D View",
}
import bpy
class WidgetSize(bpy.types.Panel):
"""creates a panel for the addon"""
bl_label = "Widget Size"
bl_idname = "WidgetSize"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
@classmethod
def draw(self, context):
layout = self.layout
col = layout.column()
row = col.row()
row.label(text = "WitgetSize")
row = col.row()
row.prop(bpy.context.user_preferences.view.manipulator_size, toggle=True, text = "size")
def register():
bpy.utils.register_class(WidgetSize)
register()