Trying to add a PointerProperty for a PropertyGroup, I didn’t include specific from imports and was getting an error trying to use a naked PointerProperty. So I prefixed it with “bpy.types.” After spending an embarrassing amount of time trying to figure out why I was getting the following:
TypeError: bpy_struct.__new__(type): expected a single argument
I tried adding a specific import for the class. Suddenly the error was gone and my thing worked (after working through later errors)!
But why couldn’t I address the class directly? Ha ha. Turns out there there is a class in one module and a function in another. Guess which one I used. 🙃
bpy.props.PointerProperty is the function I should have been using all along.
#Blender3D #PythonScripting #ApplicationProgrammingInterface