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
heres my code
import bpy
class snapTryPanel(bpy.types.Panel):
bl_label = "Snap try"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
def draw(self, context):
layout = self.layout
col = layout.column()
row = col.row(align=True)
row.operator("helloOperator", text="test")
class helloOperator(bpy.types.Operator):
bl_idname = "test"
def execute(self, context):
print("test this class")
return {'FINISHED'}
def register():
bpy.utils.register_class(helloOperator)
##########################################
def register():
bpy.utils.register_class(snapTryPanel)
def unregister():
bpy.utils.unregister_class(snapTryPanel)
if __name__ == "__main__":
register()
and heres the error i keep getting
search for unknown operator ‘helloOperator’, ‘helloOperator’
uiItemFullO: ‘helloOperator’ unknown operator
/Users/snowcovered/Desktop/myprojects/3dStuff/JAM_ProprietaryLibrary/specialThangZ/tests/scripts/snapTry.blend/snap.py:15
if anyone’s curious about the bassam kurdali script, ive attached his file here
Attachments
IK_FK_Snap-03.blend (439 KB)