i’ve been trying to breakdown and recreate that old IK FK snap script that bassam kudali made for blender 2.56 but being a total script kitty i’ve hit a stumbling block with making some simple buttons, im just trying to make a buttom that’ll print hello or something to the console
thanks, that’s one problem down. im still getting basically the same error tho, i don’t really know why but i keep getting this "search for unknown operator ‘helloOperator’, ‘helloOperator’ "
thanks a ton guys, it’s working now. its kinda useless but maybe some other script kitty might want it to learn more about making these scripts or something
i
mport bpy
class cubeButtonPanel(bpy.types.Panel):
bl_label = "adds A Cube BTN"
bl_idname = "OBJECT_PT_hello"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_context = "object"
def draw(self, context):
layout = self.layout
row = layout.row()
row.operator("myops.dothis", text = "this adds a cube")
class operation(bpy.types.Operator):
bl_idname = "myops.dothis"
bl_label = "operation"
def execute(self, context):
print("this is a statement")
bpy.ops.mesh.primitive_cube_add()
return{'FINISHED'}
def register():
bpy.utils.register_class(cubeButtonPanel)
bpy.utils.register_class(operation)
def unregister():
bpy.utils.unregister_class(cubeButtonPanel)
bpy.utils.unregister_class(operation)
if __name__ == "__main__":
register()