When I run this code, group property shows up. However self property doesn't show up. Maybe the property path is wrong. Can you help me please :)
import bpy
class PropertyAsGroup(bpy.types.PropertyGroup):
group_property = bpy.props.FloatVectorProperty()
# ...etc ..
class AddonPanel(bpy.types.Panel):
bl_label = "Hello World Panel"
bl_idname = "Hello"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
bl_category = 'Tools'
self_property = bpy.props.FloatVectorProperty()
def draw(self, context):
layout = self.layout
scn = context.scene
# ui
col = layout.column()
row = col.row(align=True)
row.prop(scn.my_addon, 'group_property', text='group')
row.prop(self, 'self_property', text='self')
def register():
bpy.utils.register_module(__name__)
bpy.types.Scene.my_addon = bpy.props.PointerProperty(type=PropertyAsGroup)
def unregister():
bpy.utils.unregister_module(__name__)
del bpy.types.Scene.my_addon
if __name__ == '__main__':
register()