import bpy scene_props = {} collection_props = {} scene_props["mv_name"] = bpy.props.StringProperty( name = "Name", description = "The name of the thing", default = "" ) scene_props["mv_kind"] = bpy.props.StringProperty( name = "Kind", description = "What category the entity belongs to", default = "objects" ) scene_props["mv_trace_mode"] = bpy.props.FloatProperty( name = "Trace Alpha", description = "0 for polygonal; 1 for normal", min = 0, max = 2, soft_min = 0, soft_max = 1, default = 1 ) class MVView(bpy.types.PropertyGroup): view: bpy.props.EnumProperty( name = "View", description = "The angle to view from", items = ( ("FRONT", "Front", ""), ("ANGLED", "Angled", ""), ("CORNER", "Corner", ""), ("SIDE", "Side", ""), ("BACK_CORNER", "Back Corner", ""), ("BACK", "Back", ""), ("TOP", "Top", ""), ("BOTTOM", "Bottom", "") ) ) name: bpy.props.StringProperty(name = "Name", description="What to call this view") class MVScientificNumber(bpy.types.PropertyGroup): base: bpy.props.FloatProperty( name = "Base", description = "The base of the number", default = 0, precision = 7 ) power: bpy.props.IntProperty( name = "Power", description = "The power of ten to multiply the base by", default = 0 ) scene_props["mv_views"] = bpy.props.CollectionProperty( name = "Views", description = "The views to view the object from", type = MVView ) scene_props["mv_views_index"] = bpy.props.IntProperty( name = "Views index", description = "View list index" ) scene_props["mv_scale_factor"] = bpy.props.IntProperty( name = "Scale Factor", description = "Scale lengths by 10^x", min = -20, max = 20, soft_min = -20, soft_max = 20, default = 0 ) scene_props["mv_material_mode"] = bpy.props.EnumProperty( name = "Material Mode", description = "How to decide what to replace each material with", items = ( ('RANDOM', "Random", 'Randomly assign materials'), ('NAMES', "Names", 'Turn the specified names medium or light; the rest become dark'), ('FACE_MAPS', "Face Maps", "Assign a material for each face map") ), ) scene_props["mv_material_names_light"] = bpy.props.StringProperty( name = "Light Colors", description = "Materials containing these words will become light", default = "" ) scene_props["mv_material_names_medium"] = bpy.props.StringProperty( name = "Medium Colors", description = "Materials containing these words will become medium", default = "" ) scene_props["mv_entity_mass_mode"] = bpy.props.EnumProperty( name = "Mass", description = "How to compute the mass of entities", items = ( ("OFF", "Off", "Do not include mass",), ("MANUAL", "Manual", "Use manually-specified mass",), ("DENSITY", "Density", "Use volume and manually-specified density") ), default = "OFF" ) scene_props["mv_entity_volume_mode"] = bpy.props.EnumProperty( name = "Volume", description = "How to compute the volume of entities", items = ( ("OFF", "Off", "Do not include volume",), ("MANUAL", "Manual", "Use manually-specified volume",), ("AUTO", "Auto", "Use auto-computed volume") ), default = "OFF" ) collection_props["mv_entity_volume"] = bpy.props.PointerProperty( type = MVScientificNumber, ) collection_props["mv_entity_mass"] = bpy.props.PointerProperty( type = MVScientificNumber, ) collection_props["mv_entity_density"] = bpy.props.PointerProperty( type = MVScientificNumber, ) clses = [ MVView, MVScientificNumber ]