hello, how can i move a cube(it’s a example) with a slider(custom property[‘prop’]) without drivers.?
it’s this but in the properties panel:
import bpy
class AddGem(bpy.types.Operator):
bl_idname = “mesh.primitivegemadd”
bl_label = “AddGem”
bl_description = “Create an offset faceted gem.”
bl_options = {‘REGISTER’, ‘UNDO’}
segments = bpy.props.FloatProperty(name=“Segments”,
description=“Longitudial segmentation”,
min=0.0,
max=1.0,
default=0.8,)
def execute(self, context):
bpy.data.objects[‘Cube’].location.x = self.segments
return {‘FINISHED’}
bpy.utils.register_class(AddGem)
thank you, and sorry for my english:o