Hide Object Properties with Python I have been trying to make an Addon that uses Object Properties and have come up with the following code.

import bpy
bpy.types.Object.save_name2 = bpy.props.StringProperty(options={'HIDDEN'}, name='Save Name')

first_object = bpy.context.selected_objects[0]
first_object.save_name2 = "Bob"


I want to hide the property from Blender's ui so people can't change the values, however, the options=hidden does not seem to work.



Does anyone know how to hide the property? I have been looking around from awhile but i can't seem to find anything.
Try using a property group class where you can store all your properties.

import bpy

class MaterialSettings(bpy.types.PropertyGroup):
    my_int = bpy.props.IntProperty()
    my_float = bpy.props.FloatProperty()
    my_string = bpy.props.StringProperty()

bpy.utils.register_class(MaterialSettings)


Assigning these values to the Object like this:

bpy.types.Object.my_settings = bpy.props.PointerProperty(type=MaterialSettings)


Note:
you can choose a custom name instead of 'my_settings'

And the name after the 'type=' is the classname of your property group .

You can access these properties like this: object.my_settings.my_float = 3.0
object.my_settings.my_string = "Foo"

This way, only the propertyclass will be visible in the properties tab and is only editable via script!