diff --git a/__init__.py b/__init__.py index b92efef..debc775 100644 --- a/__init__.py +++ b/__init__.py @@ -410,69 +410,69 @@ def register(): for cls in classes: bpy.utils.register_class(cls) - bpy.types.Scene.subrect_atlas = bpy.props.PointerProperty (name="atlas",type=bpy.types.Object,description="atlas object") - bpy.types.Scene.uv_box = bpy.props.PointerProperty (name="uvbox",type=bpy.types.Object,description="uv box") - bpy.types.Scene.trim_atlas = bpy.props.PointerProperty (name="trim_atlas",type=bpy.types.Object,description="trim atlas") - bpy.types.Scene.trim_index = bpy.props.IntProperty (name = "trim_index",default = 0,description = "trim index") - bpy.types.Scene.cap_index = bpy.props.IntProperty (name = "cap_index",default = 0,description = "cap index") - bpy.types.Scene.duv_trimuseinset = bpy.props.BoolProperty (name = "duv_trimuseinset",default = False,description = "Use inset when trimming") - bpy.types.Scene.uvinsetpixels = bpy.props.FloatProperty (name = "uv inset pixel amount",default = 1.0,description = "") - bpy.types.Scene.uvinsettexsize = bpy.props.FloatProperty (name = "uv inset texture size",default = 1024.0,description = "") - bpy.types.Scene.uvtransferxmin = bpy.props.FloatProperty (name = "uvtransferxmin",default = 0.0,description = "uv left bottom corner X") - bpy.types.Scene.uvtransferymin = bpy.props.FloatProperty (name = "uvtransferymin",default = 0.0,description = "uv left bottom corner Y") - bpy.types.Scene.uvtransferxmax = bpy.props.FloatProperty (name = "uvtransferxmax",default = 1.0,description = "uv right top corner X") - bpy.types.Scene.uvtransferymax = bpy.props.FloatProperty (name = "uvtransferymax",default = 1.0,description = "uv right top corner Y") - bpy.types.Scene.duv_useorientation = bpy.props.BoolProperty (name = "duv_useorientation",default = False,description = "Align UVs with world orientation") - bpy.types.Scene.duv_usemirrorx = bpy.props.BoolProperty (name = "duv_usemirrorx",default = True,description = "Randomly mirror faces on the x-axis") - bpy.types.Scene.duv_usemirrory = bpy.props.BoolProperty (name = "duv_usemirrory",default = True,description = "Randomly mirror faces on the y-axis") - bpy.types.Scene.duvhotspotscale = bpy.props.FloatProperty (name = "duvhotspotscale",default = 1.0,description = "Hotspotting scale multiplier") - bpy.types.Scene.duv_hotspotmaterial = bpy.props.PointerProperty (name="duv_hotspotmaterial",type=bpy.types.Material,poll=poll_material,description="Hotspot material") - bpy.types.Scene.duv_hotspotuseinset = bpy.props.BoolProperty (name = "duv_hotspotuseinset",default = False,description = "Use inset when hotspotting") - bpy.types.Scene.hotspotinsetpixels = bpy.props.FloatProperty (name = "hotspot inset pixel amount",default = 1.0,description = "") - bpy.types.Scene.hotspotinsettexsize = bpy.props.FloatProperty (name = "hotspot texture size",default = 1024.0,description = "") - bpy.types.Scene.duv_experimentaltools = bpy.props.BoolProperty (name = "duv_experimentaltools",default = False,description = "Show experimental tools") - bpy.types.Scene.duv_uv2copy = bpy.props.BoolProperty (name = "duv_uv2copy",default = False,description = "Copy uv2") - bpy.types.Scene.duv_hotspot_uv1 = bpy.props.BoolProperty (name = "duv_hotspot_uv1",default = False,description = "Always hotspot UV 1") - bpy.types.Scene.duv_hotspot_uv2 = bpy.props.BoolProperty (name = "duv_hotspot_uv2",default = False,description = "Always hotspot UV 2") - bpy.types.Scene.duv_boxmap_uv1 = bpy.props.BoolProperty (name = "duv_boxmap_uv1",default = False,description = "Always box map UV 1") - bpy.types.Scene.duv_boxmap_uv2 = bpy.props.BoolProperty (name = "duv_boxmap_uv2",default = False,description = "Always box map UV 2") - bpy.types.Scene.duv_autoboxmap = bpy.props.BoolProperty (name = "duv_autoboxmap",default = False,description = "Auto apply boxmap after hotspot operation") - bpy.types.Scene.duv_trimcap_uv1 = bpy.props.BoolProperty (name = "duv_trimcap_uv1",default = False,description = "Always apply trim/cap to UV 1") - bpy.types.Scene.duv_trimcap_uv2 = bpy.props.BoolProperty (name = "duv_trimcap_uv2",default = False,description = "Always apply trim/cap to UV 2") - bpy.types.Scene.duv_autoboxmaptrim = bpy.props.BoolProperty (name = "duv_autoboxmaptrim",default = False,description = "Auto apply boxmap after trim/cap operation") - bpy.types.Scene.duv_uvtrim_randomshift = bpy.props.BoolProperty (name = "duv_uvtrim_randomshift",default = False,description = "Randomize trim position along tiling axis") - bpy.types.Scene.duv_uvtrim_bounds = bpy.props.BoolProperty (name = "duv_uvtrim_bounds",default = False,description = "Scale trim to boundary region") - bpy.types.Scene.duv_uvtrim_min = bpy.props.FloatProperty (name = "duv_uvtrim_min",default = 0.0,description = "Boundary start") - bpy.types.Scene.duv_uvtrim_max = bpy.props.FloatProperty (name = "duv_uvtrim_max",default = 1.0,description = "Boundary end") + bpy.types.WindowManager.subrect_atlas = bpy.props.PointerProperty (name="atlas",type=bpy.types.Object,description="atlas object") + bpy.types.WindowManager.uv_box = bpy.props.PointerProperty (name="uvbox",type=bpy.types.Object,description="uv box") + bpy.types.WindowManager.trim_atlas = bpy.props.PointerProperty (name="trim_atlas",type=bpy.types.Object,description="trim atlas") + bpy.types.WindowManager.trim_index = bpy.props.IntProperty (name = "trim_index",default = 0,description = "trim index") + bpy.types.WindowManager.cap_index = bpy.props.IntProperty (name = "cap_index",default = 0,description = "cap index") + bpy.types.WindowManager.duv_trimuseinset = bpy.props.BoolProperty (name = "duv_trimuseinset",default = False,description = "Use inset when trimming") + bpy.types.WindowManager.uvinsetpixels = bpy.props.FloatProperty (name = "uv inset pixel amount",default = 1.0,description = "") + bpy.types.WindowManager.uvinsettexsize = bpy.props.FloatProperty (name = "uv inset texture size",default = 1024.0,description = "") + bpy.types.WindowManager.uvtransferxmin = bpy.props.FloatProperty (name = "uvtransferxmin",default = 0.0,description = "uv left bottom corner X") + bpy.types.WindowManager.uvtransferymin = bpy.props.FloatProperty (name = "uvtransferymin",default = 0.0,description = "uv left bottom corner Y") + bpy.types.WindowManager.uvtransferxmax = bpy.props.FloatProperty (name = "uvtransferxmax",default = 1.0,description = "uv right top corner X") + bpy.types.WindowManager.uvtransferymax = bpy.props.FloatProperty (name = "uvtransferymax",default = 1.0,description = "uv right top corner Y") + bpy.types.WindowManager.duv_useorientation = bpy.props.BoolProperty (name = "duv_useorientation",default = False,description = "Align UVs with world orientation") + bpy.types.WindowManager.duv_usemirrorx = bpy.props.BoolProperty (name = "duv_usemirrorx",default = True,description = "Randomly mirror faces on the x-axis") + bpy.types.WindowManager.duv_usemirrory = bpy.props.BoolProperty (name = "duv_usemirrory",default = True,description = "Randomly mirror faces on the y-axis") + bpy.types.WindowManager.duvhotspotscale = bpy.props.FloatProperty (name = "duvhotspotscale",default = 1.0,description = "Hotspotting scale multiplier") + bpy.types.WindowManager.duv_hotspotmaterial = bpy.props.PointerProperty (name="duv_hotspotmaterial",type=bpy.types.Material,poll=poll_material,description="Hotspot material") + bpy.types.WindowManager.duv_hotspotuseinset = bpy.props.BoolProperty (name = "duv_hotspotuseinset",default = False,description = "Use inset when hotspotting") + bpy.types.WindowManager.hotspotinsetpixels = bpy.props.FloatProperty (name = "hotspot inset pixel amount",default = 1.0,description = "") + bpy.types.WindowManager.hotspotinsettexsize = bpy.props.FloatProperty (name = "hotspot texture size",default = 1024.0,description = "") + bpy.types.WindowManager.duv_experimentaltools = bpy.props.BoolProperty (name = "duv_experimentaltools",default = False,description = "Show experimental tools") + bpy.types.WindowManager.duv_uv2copy = bpy.props.BoolProperty (name = "duv_uv2copy",default = False,description = "Copy uv2") + bpy.types.WindowManager.duv_hotspot_uv1 = bpy.props.BoolProperty (name = "duv_hotspot_uv1",default = False,description = "Always hotspot UV 1") + bpy.types.WindowManager.duv_hotspot_uv2 = bpy.props.BoolProperty (name = "duv_hotspot_uv2",default = False,description = "Always hotspot UV 2") + bpy.types.WindowManager.duv_boxmap_uv1 = bpy.props.BoolProperty (name = "duv_boxmap_uv1",default = False,description = "Always box map UV 1") + bpy.types.WindowManager.duv_boxmap_uv2 = bpy.props.BoolProperty (name = "duv_boxmap_uv2",default = False,description = "Always box map UV 2") + bpy.types.WindowManager.duv_autoboxmap = bpy.props.BoolProperty (name = "duv_autoboxmap",default = False,description = "Auto apply boxmap after hotspot operation") + bpy.types.WindowManager.duv_trimcap_uv1 = bpy.props.BoolProperty (name = "duv_trimcap_uv1",default = False,description = "Always apply trim/cap to UV 1") + bpy.types.WindowManager.duv_trimcap_uv2 = bpy.props.BoolProperty (name = "duv_trimcap_uv2",default = False,description = "Always apply trim/cap to UV 2") + bpy.types.WindowManager.duv_autoboxmaptrim = bpy.props.BoolProperty (name = "duv_autoboxmaptrim",default = False,description = "Auto apply boxmap after trim/cap operation") + bpy.types.WindowManager.duv_uvtrim_randomshift = bpy.props.BoolProperty (name = "duv_uvtrim_randomshift",default = False,description = "Randomize trim position along tiling axis") + bpy.types.WindowManager.duv_uvtrim_bounds = bpy.props.BoolProperty (name = "duv_uvtrim_bounds",default = False,description = "Scale trim to boundary region") + bpy.types.WindowManager.duv_uvtrim_min = bpy.props.FloatProperty (name = "duv_uvtrim_min",default = 0.0,description = "Boundary start") + bpy.types.WindowManager.duv_uvtrim_max = bpy.props.FloatProperty (name = "duv_uvtrim_max",default = 1.0,description = "Boundary end") - bpy.types.Scene.subrect_atlas1 = bpy.props.PointerProperty (name="atlas1",type=bpy.types.Object,description="atlas1") - bpy.types.Scene.subrect_atlas2 = bpy.props.PointerProperty (name="atlas2",type=bpy.types.Object,description="atlas2") - bpy.types.Scene.subrect_atlas3 = bpy.props.PointerProperty (name="atlas3",type=bpy.types.Object,description="atlas3") - bpy.types.Scene.subrect_atlas4 = bpy.props.PointerProperty (name="atlas4",type=bpy.types.Object,description="atlas4") - bpy.types.Scene.subrect_atlas5 = bpy.props.PointerProperty (name="atlas5",type=bpy.types.Object,description="atlas5") - bpy.types.Scene.subrect_atlas6 = bpy.props.PointerProperty (name="atlas6",type=bpy.types.Object,description="atlas6") - bpy.types.Scene.subrect_atlas7 = bpy.props.PointerProperty (name="atlas7",type=bpy.types.Object,description="atlas7") - bpy.types.Scene.subrect_atlas8 = bpy.props.PointerProperty (name="atlas8",type=bpy.types.Object,description="atlas8") - - bpy.types.Scene.duv_hotspotmaterial1 = bpy.props.PointerProperty (name="duv_hotspotmaterial1",type=bpy.types.Material,poll=poll_material,description="Hotspot material 1") - bpy.types.Scene.duv_hotspotmaterial2 = bpy.props.PointerProperty (name="duv_hotspotmaterial2",type=bpy.types.Material,poll=poll_material,description="Hotspot material 2") - bpy.types.Scene.duv_hotspotmaterial3 = bpy.props.PointerProperty (name="duv_hotspotmaterial3",type=bpy.types.Material,poll=poll_material,description="Hotspot material 3") - bpy.types.Scene.duv_hotspotmaterial4 = bpy.props.PointerProperty (name="duv_hotspotmaterial4",type=bpy.types.Material,poll=poll_material,description="Hotspot material 4") - bpy.types.Scene.duv_hotspotmaterial5 = bpy.props.PointerProperty (name="duv_hotspotmaterial5",type=bpy.types.Material,poll=poll_material,description="Hotspot material 5") - bpy.types.Scene.duv_hotspotmaterial6 = bpy.props.PointerProperty (name="duv_hotspotmaterial6",type=bpy.types.Material,poll=poll_material,description="Hotspot material 6") - bpy.types.Scene.duv_hotspotmaterial7 = bpy.props.PointerProperty (name="duv_hotspotmaterial7",type=bpy.types.Material,poll=poll_material,description="Hotspot material 7") - bpy.types.Scene.duv_hotspotmaterial8 = bpy.props.PointerProperty (name="duv_hotspotmaterial8",type=bpy.types.Material,poll=poll_material,description="Hotspot material 8") + bpy.types.WindowManager.subrect_atlas1 = bpy.props.PointerProperty (name="atlas1",type=bpy.types.Object,description="atlas1") + bpy.types.WindowManager.subrect_atlas2 = bpy.props.PointerProperty (name="atlas2",type=bpy.types.Object,description="atlas2") + bpy.types.WindowManager.subrect_atlas3 = bpy.props.PointerProperty (name="atlas3",type=bpy.types.Object,description="atlas3") + bpy.types.WindowManager.subrect_atlas4 = bpy.props.PointerProperty (name="atlas4",type=bpy.types.Object,description="atlas4") + bpy.types.WindowManager.subrect_atlas5 = bpy.props.PointerProperty (name="atlas5",type=bpy.types.Object,description="atlas5") + bpy.types.WindowManager.subrect_atlas6 = bpy.props.PointerProperty (name="atlas6",type=bpy.types.Object,description="atlas6") + bpy.types.WindowManager.subrect_atlas7 = bpy.props.PointerProperty (name="atlas7",type=bpy.types.Object,description="atlas7") + bpy.types.WindowManager.subrect_atlas8 = bpy.props.PointerProperty (name="atlas8",type=bpy.types.Object,description="atlas8") + + bpy.types.WindowManager.duv_hotspotmaterial1 = bpy.props.PointerProperty (name="duv_hotspotmaterial1",type=bpy.types.Material,poll=poll_material,description="Hotspot material 1") + bpy.types.WindowManager.duv_hotspotmaterial2 = bpy.props.PointerProperty (name="duv_hotspotmaterial2",type=bpy.types.Material,poll=poll_material,description="Hotspot material 2") + bpy.types.WindowManager.duv_hotspotmaterial3 = bpy.props.PointerProperty (name="duv_hotspotmaterial3",type=bpy.types.Material,poll=poll_material,description="Hotspot material 3") + bpy.types.WindowManager.duv_hotspotmaterial4 = bpy.props.PointerProperty (name="duv_hotspotmaterial4",type=bpy.types.Material,poll=poll_material,description="Hotspot material 4") + bpy.types.WindowManager.duv_hotspotmaterial5 = bpy.props.PointerProperty (name="duv_hotspotmaterial5",type=bpy.types.Material,poll=poll_material,description="Hotspot material 5") + bpy.types.WindowManager.duv_hotspotmaterial6 = bpy.props.PointerProperty (name="duv_hotspotmaterial6",type=bpy.types.Material,poll=poll_material,description="Hotspot material 6") + bpy.types.WindowManager.duv_hotspotmaterial7 = bpy.props.PointerProperty (name="duv_hotspotmaterial7",type=bpy.types.Material,poll=poll_material,description="Hotspot material 7") + bpy.types.WindowManager.duv_hotspotmaterial8 = bpy.props.PointerProperty (name="duv_hotspotmaterial8",type=bpy.types.Material,poll=poll_material,description="Hotspot material 8") - bpy.types.Scene.duv_hotspot_atlas1 = bpy.props.BoolProperty (name = "duv_hotspot_atlas1",default = True,description = "duv_hotspot_atlas1") - bpy.types.Scene.duv_hotspot_atlas2 = bpy.props.BoolProperty (name = "duv_hotspot_atlas2",default = False,description = "duv_hotspot_atlas2") - bpy.types.Scene.duv_hotspot_atlas3 = bpy.props.BoolProperty (name = "duv_hotspot_atlas3",default = False,description = "duv_hotspot_atlas3") - bpy.types.Scene.duv_hotspot_atlas4 = bpy.props.BoolProperty (name = "duv_hotspot_atlas4",default = False,description = "duv_hotspot_atlas4") - bpy.types.Scene.duv_hotspot_atlas5 = bpy.props.BoolProperty (name = "duv_hotspot_atlas5",default = False,description = "duv_hotspot_atlas5") - bpy.types.Scene.duv_hotspot_atlas6 = bpy.props.BoolProperty (name = "duv_hotspot_atlas6",default = False,description = "duv_hotspot_atlas6") - bpy.types.Scene.duv_hotspot_atlas7 = bpy.props.BoolProperty (name = "duv_hotspot_atlas7",default = False,description = "duv_hotspot_atlas7") - bpy.types.Scene.duv_hotspot_atlas8 = bpy.props.BoolProperty (name = "duv_hotspot_atlas8",default = False,description = "duv_hotspot_atlas8") + bpy.types.WindowManager.duv_hotspot_atlas1 = bpy.props.BoolProperty (name = "duv_hotspot_atlas1",default = True,description = "duv_hotspot_atlas1") + bpy.types.WindowManager.duv_hotspot_atlas2 = bpy.props.BoolProperty (name = "duv_hotspot_atlas2",default = False,description = "duv_hotspot_atlas2") + bpy.types.WindowManager.duv_hotspot_atlas3 = bpy.props.BoolProperty (name = "duv_hotspot_atlas3",default = False,description = "duv_hotspot_atlas3") + bpy.types.WindowManager.duv_hotspot_atlas4 = bpy.props.BoolProperty (name = "duv_hotspot_atlas4",default = False,description = "duv_hotspot_atlas4") + bpy.types.WindowManager.duv_hotspot_atlas5 = bpy.props.BoolProperty (name = "duv_hotspot_atlas5",default = False,description = "duv_hotspot_atlas5") + bpy.types.WindowManager.duv_hotspot_atlas6 = bpy.props.BoolProperty (name = "duv_hotspot_atlas6",default = False,description = "duv_hotspot_atlas6") + bpy.types.WindowManager.duv_hotspot_atlas7 = bpy.props.BoolProperty (name = "duv_hotspot_atlas7",default = False,description = "duv_hotspot_atlas7") + bpy.types.WindowManager.duv_hotspot_atlas8 = bpy.props.BoolProperty (name = "duv_hotspot_atlas8",default = False,description = "duv_hotspot_atlas8") - bpy.types.Scene.atlas_list_size = bpy.props.IntProperty ( + bpy.types.WindowManager.atlas_list_size = bpy.props.IntProperty ( name = "atlas_list_size", default = 1, min = 1,