#-- SHARED TOOLKIT CONSTANTS ----------------------------------------------------
# Shared between all of the Toolkit versions: Blender, 3ds Max

# Toolkit URLs
TOOLKIT_URL_BLENDER_DOWNLOAD = "https://create.imvu.com/articles/studio/toolkit/#blender"
TOOLKIT_URL_BLENDER_HELP = "https://create.imvu.com/articles/studio/toolkit-blender"
TOOLKIT_URL_BLENDER_MCG_INFO = "https://create.imvu.com/articles/studio/understanding-manipulated-mcg-products"
TOOLKIT_URL_3DSMAX_DOWNLOAD = "https://create.imvu.com/articles/studio/toolkit/#toolkit-3dsmax"
TOOLKIT_URL_3DSMAX_HELP = "https://create.imvu.com/articles/studio/using-imvu-studio-toolkit-for-3ds-max"

# Tool name constants
TOOLKIT_NAME = "IMVU Studio Toolkit"
TOOLNAME_ROOM = "Room Tool"
TOOLNAME_FURNITURE = "Furniture Tool"
TOOLNAME_ATTACHMENT = "Attachment Tool"
# DEV CRUFT local TOOLNAME_CLOTHING = "Clothing Tool"
TOOLNAME_AVATAR = "Avatar Tool"
TOOLNAME_HEAD = "Head Tool"
TOOLNAME_EXPORT = "Export Tool"

# Tool states
toolState_DISABLED = 0
toolState_ENABLED = 1
toolState_ACTIVE = 2

# Tool export layer (3ds max) / collection (Blender) names
EXPORT_NAME_ROOM = "ROOM_EXPORT"
EXPORT_NAME_FURNITURE = "FURNITURE_EXPORT"
EXPORT_NAME_ATTACHMENT = "ATTACHMENT_EXPORT"
EXPORT_NAME_CLOTHING = "CLOTHING_EXPORT"  # Legacy tool support
EXPORT_NAME_ANIMATION = "ANIMATION_EXPORT"  # Legacy tool support
EXPORT_NAME_AVATAR_ANIMATION = "AVATAR_ANIMATION_EXPORT" #3ds Max  # Legacy tool support
EXPORT_NAME_AVATAR = "AVATAR_EXPORT"
EXPORT_NAME_HEAD = "HEAD_EXPORT" #Blender

EXPORT_LAYER_NAMES = [
    EXPORT_NAME_ROOM,
    EXPORT_NAME_FURNITURE,
    EXPORT_NAME_ATTACHMENT,
    EXPORT_NAME_CLOTHING,
    EXPORT_NAME_ANIMATION,
    EXPORT_NAME_AVATAR_ANIMATION,
    EXPORT_NAME_AVATAR,
	EXPORT_NAME_HEAD
    ]

NODETYPE_SEAT = 0
NODETYPE_FLOOR = 1
NODETYPE_WALL = 2
NODETYPE_CEILING = 3
NODETYPE_HANDLE = 4
NODETYPE_CATCHER = 5
NODETYPE_PITCHER = 6
NODETYPE_SEETHROUGH = 7
NODETYPE_CAMERAZONE = 8

NODE_NAME_SEPARATOR = "."
LEGACY_NODE_NAME_SEPARATORS = "._"

# ROOM node names
NODE_NAME_ROOM_ROOT = "Skeleton" + NODE_NAME_SEPARATOR + "Room"
NODE_NAME_SEAT_PARENT = "AvatarNodes"
NODE_NAME_FURNITURE_PARENT = "FurnitureNodes"
NODE_NAME_FURNITURE = "Furniture"
NODE_NAME_FLOOR = "Floor"
NODE_NAME_WALL = "Wall"
NODE_NAME_CEILING = "Ceiling"
ROOM_REF_MESH_NAME = "Room_Ref"
CAMERA_NAME = "Camera" + NODE_NAME_SEPARATOR + "01" + NODE_NAME_SEPARATOR + "01"
CAMERA_TRAGET_NAME = "Camera" + NODE_NAME_SEPARATOR + "01" + NODE_NAME_SEPARATOR + "01" + NODE_NAME_SEPARATOR + "Target"
OMNI_LIGHT_NAME = "Omni01"

# FURNITURE node names
NODE_NAME_FURNITURE_ROOT_LEGACY = "Attachment" + NODE_NAME_SEPARATOR + "Root"
NODE_NAME_FURNITURE_ROOT = "Root"
NODE_NAME_FURNITURE_NODES_PARENT = "Nodes"
NODE_NAME_CAMERA_ZONE_PARENT = "CameraZones"
NODE_NAME_CAMERA_ZONE = NODE_NAME_FURNITURE + ".Camera." 

# Shared ROOM and FURNITURE node names
NODE_NAME_SEAT = "Seat"
NODE_NAME_SEAT_STANDING = "Standing"
NODE_NAME_SEAT_SITTING = "Sitting"
NODE_NAME_SEAT_IDLE = "Idle"
NODE_NAME_HANDLE = "Handle"
NODE_NAME_CATCHER = "Catcher"
NODE_NAME_PITCHER = "Pitcher"
NODE_NAME_LIGHTING = "LightingNodes"
NODE_NAME_SEETHROUGH = "SeeThrough"
FURNITURE_REF_MESH_NAME = "ScaleCube_Ref"

# ATTACHMENT node names
NODE_NAME_ATTACHMENT_ROOT = "AttachmentRoot"
#NODE_NAME_ATTACHMENT_NODE = "AttachmentNode"  # TODO: I don't think this is a requirement and it might be more convenient to have any/all assets attached to the AttachmnetRoot node

# ANIMATION values
ANIM_POSE_LENGTH = 3
ANIM_DEFUALT_LENGTH = 100

# Tooltip strings
TOOLTIP_VISUALS_SHOWNAMES_BUTTON = "Show Object Names"
TOOLTIP_VISUALS_HIDENAMES_BUTTON = "Hide Object Names"
TOOLTIP_VISUALS_FREEZEAVATARS_BUTTON = "Freeze the Male and Female avatar meshes"
TOOLTIP_VISUALS_UNFREEZEAVATARS_BUTTON = "Unfreeze the Male and Female avatar meshes"

TOOLTIP_ROOM_TOOL_CREATE_BUTTON = "Create a room based on the above dimensions"
TOOLTIP_ROOM_TOOL_ADDFURNITURE_BUTTON = "Create a furniture node based on the above selection"
TOOLTIP_ROOM_TOOL_ROOMN_BUTTON = "Duplicate a furniture node up. \nTip: Select multiple to easily make a grid"
TOOLTIP_ROOM_TOOL_ROOMW_BUTTON = "Duplicate a furniture node left. \nTip: Select multiple to easily make a grid"
TOOLTIP_ROOM_TOOL_ROOME_BUTTON = "Duplicate a furniture node right. \nTip: Select multiple to easily make a grid"
TOOLTIP_ROOM_TOOL_ROOMS_BUTTON = "Duplicate a furniture node down. \nTip: Select multiple to easily make a grid"
TOOLTIP_ROOM_TOOL_FURNDIST_BUTTON = "Offset distance when duplicating furniture nodes"
TOOLTIP_ROOM_TOOL_ADDIDLE_BUTTON = "Create an idle seat node"
TOOLTIP_ROOM_TOOL_ADDSTANDING_BUTTON = "Create a standing seat node \nSelect Catcher to create a Catcher and a Pitcher node. \nSelect Handle to create a Handle node"
TOOLTIP_ROOM_TOOL_ADDSITTING_BUTTON = "Create a sitting seat node. \nSelect Catcher to create a Catcher and a Pitcher node. \nSelect Handle to create a Handle node"
TOOLTIP_ROOM_TOOL_CUSTOMSEAT = "Name the custom seat node"
TOOLTIP_ROOM_TOOL_ADDCUSTOMSEAT_BUTTON = "Create a custom seat node based on the name above. \nSelect Catcher to create a Catcher and a Pitcher node. \nSelect Handle to create a Handle node"
TOOLTIP_ROOM_TOOL_ADDCATCHER_BUTTON = "Add a catcher and pitcher node to the selected seat"
TOOLTIP_ROOM_TOOL_ADDHANDLE_BUTTON = "Add a handle node to the selected seat"
TOOLTIP_ROOM_TOOL_REMOVECATCHER_BUTTON = "Remove catcher and pitcher nodes from the selected seat"
TOOLTIP_ROOM_TOOL_REMOVEHANDLE_BUTTON = "Remove handle node from the selected seat"
TOOLTIP_ROOM_TOOL_CREATESEETHRUNODE_BUTTON = "Create See Through Node"
TOOLTIP_ROOM_TOOL_LINKSEETHRUNODE_BUTTON = "Link To See Through Node"
TOOLTIP_ROOM_TOOL_UNLINKSEETHRUNODE_BUTTON = "Unlink From See Through Node"

TOOLTIP_FURNITURE_TOOL_CREATE_BUTTON = "Create a furniture"
TOOLTIP_FURNITURE_TOOL_ADDFURNITURE_BUTTON = TOOLTIP_ROOM_TOOL_ADDFURNITURE_BUTTON
TOOLTIP_FURNITURE_TOOL_ROOMN_BUTTON = TOOLTIP_ROOM_TOOL_ROOMN_BUTTON
TOOLTIP_FURNITURE_TOOL_ROOMW_BUTTON = TOOLTIP_ROOM_TOOL_ROOMW_BUTTON
TOOLTIP_FURNITURE_TOOL_ROOME_BUTTON = TOOLTIP_ROOM_TOOL_ROOME_BUTTON
TOOLTIP_FURNITURE_TOOL_ROOMS_BUTTON = TOOLTIP_ROOM_TOOL_ROOMS_BUTTON
TOOLTIP_FURNITURE_TOOL_FURNDIST_BUTTON = TOOLTIP_ROOM_TOOL_FURNDIST_BUTTON
TOOLTIP_FURNITURE_TOOL_ADDIDLE_BUTTON = TOOLTIP_ROOM_TOOL_ADDIDLE_BUTTON
TOOLTIP_FURNITURE_TOOL_ADDSTANDING_BUTTON = TOOLTIP_ROOM_TOOL_ADDSTANDING_BUTTON
TOOLTIP_FURNITURE_TOOL_ADDSITTING_BUTTON = TOOLTIP_ROOM_TOOL_ADDSITTING_BUTTON
TOOLTIP_FURNITURE_TOOL_CUSTOMSEAT = TOOLTIP_ROOM_TOOL_CUSTOMSEAT
TOOLTIP_FURNITURE_TOOL_ADDCUSTOMSEAT_BUTTON = TOOLTIP_ROOM_TOOL_CUSTOMSEAT
TOOLTIP_FURNITURE_TOOL_ADDCATCHER_BUTTON = TOOLTIP_ROOM_TOOL_ADDCATCHER_BUTTON
TOOLTIP_FURNITURE_TOOL_ADDHANDLE_BUTTON = TOOLTIP_ROOM_TOOL_ADDHANDLE_BUTTON
TOOLTIP_FURNITURE_TOOL_REMOVECATCHER_BUTTON = TOOLTIP_ROOM_TOOL_REMOVECATCHER_BUTTON
TOOLTIP_FURNITURE_TOOL_REMOVEHANDLE_BUTTON = TOOLTIP_ROOM_TOOL_REMOVEHANDLE_BUTTON
TOOLTIP_FURNITURE_TOOL_CREATESEETHRUNODE_BUTTON = TOOLTIP_ROOM_TOOL_CREATESEETHRUNODE_BUTTON
TOOLTIP_FURNITURE_TOOL_LINKSEETHRUNODE_BUTTON = TOOLTIP_ROOM_TOOL_LINKSEETHRUNODE_BUTTON
TOOLTIP_FURNITURE_TOOL_UNLINKSEETHRUNODE_BUTTON = TOOLTIP_ROOM_TOOL_UNLINKSEETHRUNODE_BUTTON
TOOLTIP_FURNITURE_TOOL_CREATECAMERAZONENODES_BUTTON = "Create a set of Camera Zone Nodes to set the focus of the camera when generating product images for your product in IMVU Studio.\nThe camera in Product Image Generator will attempt to keep ONLY the Camera Zone Nodes in view when you select one of the Camera Zone scenes."
TOOLTIP_FURNITURE_TOOL_CAMERAZONENODESCENTER_BUTTON = "Center the Camera Zone Nodes on whatever objects are currently selected"
TOOLTIP_FURNITURE_TOOL_ANIMNAME = "Name your furniture animation"
TOOLTIP_FURNITURE_TOOL_ANIMNAMEFROMOBJECT = "Set the name your furniture animation from the selected object. If more than one object is selected picks the first one."
TOOLTIP_FURNITURE_TOOL_SETSELECTEDFOREXPORT = "Adds the selected object(s) and their children to the furniture export layer and parents selected object(s) to the Attachment.Root node. Preserves the hierarchy of the selection."

TOOLTIP_ATTACHMENT_TOOL_CREATE_BUTTON = "Create a new Attachment product"
TOOLTIP_ATTACHMENT_TOOL_SETUPORIENTATION_CHECKBOX = "When checked the selected objects will be parented to the Attachment Root bone before the Attachment Root bone is aligned with the picked bone"
TOOLTIP_ATTACHMENT_TOOL_SETUP_BUTTON = "Aligns Attachment Root bone to the picked bone and sets up the selected object(s) for export"
TOOLTIP_ATTACHMENT_TOOL_RESET_BUTTON = "Returns attachment objects and Attachment Root to last position and rotation before setup and unparents attachment objects from the Attachment Root node"

# --CRUFT START-- Do be deprecated
TOOLTIP_CLOTHING_TOOL_CREATE_BUTTON = "Create a new Clothing product"
TOOLTIP_CLOTHING_TOOL_BIND_BUTTON = "Weight the selected object to the avatar skeleton"
TOOLTIP_CLOTHING_TOOL_PAINTWEIGHTS_BUTTON = "Adjust the bone weighting"
TOOLTIP_CLOTHING_TOOL_POSE_BUTTON = "Pose the avatar"
TOOLTIP_CLOTHING_TOOL_LIMITBONES_BUTTON = "Limit the bones"

TOOLTIP_AVATARANIM_TOOL_CREATE_BUTTON = "Create a new Avatar Animation product"
TOOLTIP_AVATARANIM_TOOL_MAKEPOSE = "On export automatically set the needed keys on frames 0, 1, and 3 for creating a static pose in IMVU Studio"
TOOLTIP_AVATARANIM_TOOL_EXPORTALLBONES = "On export key all avatar bones so that the animation replaces any idle animation with the action that is triggered. Useful for custom idles or dance actions."
TOOLTIP_AVATARANIM_TOOL_DOKEYREDUCTION = "When checked will do a key reduction pass on all avatar bones"
TOOLTIP_AVATARANIM_TOOL_KEYREDUCTIONTHRESHOLD = "The closeness that the reduced key values will match the original keys"
TOOLTIP_AVATARANIM_TOOL_KEYREDUCTIONSTEP = "The time step at which the controller will be sampled"
TOOLTIP_AVATARANIM_TOOL_ANIMNAME = "Name your avatar animation"
TOOLTIP_AVATARANIM_TOOL_USEIK = "Use FK if unchecked"
TOOLTIP_AVATARANIM_TOOL_SELECTALLRIGWIDGETS_BUTTON = "Selects all rig widgets whether hidden or not. Useful for editing keys for all widgets at once."
TOOLTIP_AVATARANIM_TOOL_DELETEAVATARKEYS_BUTTON = "Delete keys at the current time slider position for selected widgets or all widgets if none are selected"
TOOLTIP_AVATARANIM_TOOL_DELETEALLAVATARKEYS_BUTTON = "Delete all keys for selected widgets or all widgets if none are selected"
TOOLTIP_AVATARANIM_TOOL_RESETPOSE_BUTTON = "Resets the pose of the entire avatar if no bones are selected, otherwise just resets the selected bones"
# --CRUFT END-- Do be deprecated

# --NEW-- Avatar Clothing
TOOLTIP_AVATAR_TOOL_CREATE_BUTTON = "Create a new Avatar clothing or animation product"
TOOLTIP_AVATAR_TOOL_BIND_BUTTON = "Weight the selected object to the avatar skeleton"
TOOLTIP_AVATAR_TOOL_PAINTWEIGHTS_BUTTON = "Adjust the bone weighting"
TOOLTIP_AVATAR_TOOL_POSE_BUTTON = "Pose the avatar"
TOOLTIP_AVATAR_TOOL_LIMITBONES_BUTTON = "Limit the bones"

# --NEW-- Avatar Animation
TOOLTIP_AVATAR_TOOL_MAKEPOSE = "Make a single keyframe animation at frame 0 for any bones that have moved or all bones if Export All Bones is checked. For creating a quick static pose in IMVU Studio"
TOOLTIP_AVATAR_TOOL_EXPORTALLBONES = "On export key all avatar bones so that the animation replaces any idle animation with the action that is triggered. Useful for custom idles or dance actions."
TOOLTIP_AVATAR_TOOL_DOKEYREDUCTION = "When checked will do a key reduction pass on all avatar bones"
TOOLTIP_AVATAR_TOOL_KEYREDUCTIONTHRESHOLD = "The closeness that the reduced key values will match the original keys"
TOOLTIP_AVATAR_TOOL_KEYREDUCTIONSTEP = "The time step at which the controller will be sampled"
TOOLTIP_AVATAR_TOOL_ANIMNAME = "Name your avatar animation"
TOOLTIP_AVATAR_TOOL_USEIK = "Use FK if unchecked"
TOOLTIP_AVATAR_TOOL_SELECTALLRIGWIDGETS_BUTTON = "Selects all rig widgets whether hidden or not. Useful for editing keys for all widgets at once."
TOOLTIP_AVATAR_TOOL_DELETEAVATARKEYS_BUTTON = "Delete keys at the current time slider position for selected widgets or all widgets if none are selected"
TOOLTIP_AVATAR_TOOL_DELETEALLAVATARKEYS_BUTTON = "Delete all keys for selected widgets or all widgets if none are selected"
TOOLTIP_AVATAR_TOOL_RESETPOSE_BUTTON = "Resets the pose of the entire avatar if no bones are selected, otherwise just resets the selected bones"

TOOLTIP_EXPORT_TOOL_EXPORT_BUTTON = "Export your project to FBX"
TOOLTIP_EXPORT_TOOL_OPENDIR_BUTTON = "Open the export directory"
TOOLTIP_EXPORT_TOOL_HELP_BUTTON = "Visit the Help Page"
TOOLTIP_EXPORT_TOOL_VERSION_BUTTON = "This version of Studio Toolkit is up to date"
TOOLTIP_EXPORT_TOOL_VERSION_BUTTON_BETA = "This version of Studio Toolkit is in Beta"
TOOLTIP_EXPORT_TOOL_VERSION_BUTTON_UNK = "Failed to retrieve current version from server! Please check download page for current version."
TOOLTIP_EXPORT_TOOL_VERSION_BUTTON_UPDATE = "This version of Studio Toolkit is not the latest! Please check download page for current version."
