import bpy class MySettings(bpy.types.PropertyGroup): my_vector: bpy.props.FloatVectorProperty( name="My Vector", size=3, default=(0.0, 0.0, 0.0) )
import bpy class MyProperties(bpy.types.PropertyGroup): object_location: bpy.props.FloatVectorProperty( name="Location", size=3, subtype="TRANSLATION", default=(0.0, 0.0, 0.0), unit="LENGTH" ) class MyOperator(bpy.types.Operator): bl_idname = "object.move" bl_label = "Move Object" def execute(self, context): obj = context.active_object obj.location = context.scene.my_properties.object_location return {'FINISHED'}In this example, the "subtype" parameter is set to "TRANSLATION" to allow the vector values to be modified by moving the object in the 3D viewport. The "unit" parameter is set to "LENGTH" to indicate that the values represent distances. The bpy.props module is part of the Blender Python API.