{"action":"created","comment":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/41430320","id":41430320,"diff_hunk":"@@ -100,39 +94,40 @@ int ModelEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data,\n     READ_ENTITY_PROPERTY(PROP_MODEL_URL, QString, setModelURL);\n     if (args.bitstreamVersion < VERSION_ENTITIES_HAS_COLLISION_MODEL) {\n         setCompoundShapeURL(\"\");\n-    } else if (args.bitstreamVersion == VERSION_ENTITIES_HAS_COLLISION_MODEL) {\n-        READ_ENTITY_PROPERTY(PROP_COMPOUND_SHAPE_URL, QString, setCompoundShapeURL);\n     } else {\n         READ_ENTITY_PROPERTY(PROP_COMPOUND_SHAPE_URL, QString, setCompoundShapeURL);\n     }\n-    READ_ENTITY_PROPERTY(PROP_ANIMATION_URL, QString, setAnimationURL);\n \n     // Because we're using AnimationLoop which will reset the frame index if you change it's running state\n     // we want to read these values in the order they appear in the buffer, but call our setters in an\n     // order that allows AnimationLoop to preserve the correct frame rate.\n-    float animationFPS = getAnimationFPS();\n-    float animationFrameIndex = getAnimationFrameIndex();\n-    bool animationIsPlaying = getAnimationIsPlaying();\n-    READ_ENTITY_PROPERTY(PROP_ANIMATION_FPS, float, setAnimationFPS);\n-    READ_ENTITY_PROPERTY(PROP_ANIMATION_FRAME_INDEX, float, setAnimationFrameIndex);\n-    READ_ENTITY_PROPERTY(PROP_ANIMATION_PLAYING, bool, setAnimationIsPlaying);\n-\n-    if (propertyFlags.getHasProperty(PROP_ANIMATION_PLAYING)) {\n-        if (animationIsPlaying != getAnimationIsPlaying()) {\n-            setAnimationIsPlaying(animationIsPlaying);\n-        }\n-    }\n-    if (propertyFlags.getHasProperty(PROP_ANIMATION_FPS)) {\n-        setAnimationFPS(animationFPS);\n-    }\n-    if (propertyFlags.getHasProperty(PROP_ANIMATION_FRAME_INDEX)) {\n-        setAnimationFrameIndex(animationFrameIndex);\n+    if (args.bitstreamVersion < VERSION_ENTITIES_ANIMATION_PROPERTIES_GROUP) {\n+        READ_ENTITY_PROPERTY(PROP_ANIMATION_URL, QString, setAnimationURL);\n+        READ_ENTITY_PROPERTY(PROP_ANIMATION_FPS, float, setAnimationFPS);\n+        READ_ENTITY_PROPERTY(PROP_ANIMATION_FRAME_INDEX, float, setAnimationFrameIndex);\n+        READ_ENTITY_PROPERTY(PROP_ANIMATION_PLAYING, bool, setAnimationIsPlaying);\n     }\n \n     READ_ENTITY_PROPERTY(PROP_TEXTURES, QString, setTextures);\n-    READ_ENTITY_PROPERTY(PROP_ANIMATION_SETTINGS, QString, setAnimationSettings);\n+\n+    if (args.bitstreamVersion < VERSION_ENTITIES_ANIMATION_PROPERTIES_GROUP) {\n+        READ_ENTITY_PROPERTY(PROP_ANIMATION_SETTINGS, QString, setAnimationSettings);\n+    } else {\n+        // Note: since we've associated our _animationProperties with our _animationLoop, the readEntitySubclassDataFromBuffer()\n+        // will automatically read into the animation loop\n+        int bytesFromAnimation = _animationProperties.readEntitySubclassDataFromBuffer(dataAt, (bytesLeftToRead - bytesRead), args,\n+                                                                        propertyFlags, overwriteLocalData);\n+\n+        bytesRead += bytesFromAnimation;\n+        dataAt += bytesFromAnimation;\n+    }\n+\n     READ_ENTITY_PROPERTY(PROP_SHAPE_TYPE, ShapeType, updateShapeType);\n \n+    if (_animationProperties.somethingChanged()) {\n+        _dirtyFlags |= EntityItem::DIRTY_UPDATEABLE;\n+    }","path":"libraries/entities/src/ModelEntityItem.cpp","position":124,"original_position":124,"commit_id":"ef054ffc6d456575a6aa0556f780d0a05be4ebb1","original_commit_id":"016bf4011d4a7e6d1600c7ffa72a973f8afc0ed0","user":{"login":"ZappoMan","id":2093195,"avatar_url":"https://avatars.githubusercontent.com/u/2093195?v=3","gravatar_id":"","url":"https://api.github.com/users/ZappoMan","html_url":"https://github.com/ZappoMan","followers_url":"https://api.github.com/users/ZappoMan/followers","following_url":"https://api.github.com/users/ZappoMan/following{/other_user}","gists_url":"https://api.github.com/users/ZappoMan/gists{/gist_id}","starred_url":"https://api.github.com/users/ZappoMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZappoMan/subscriptions","organizations_url":"https://api.github.com/users/ZappoMan/orgs","repos_url":"https://api.github.com/users/ZappoMan/repos","events_url":"https://api.github.com/users/ZappoMan/events{/privacy}","received_events_url":"https://api.github.com/users/ZappoMan/received_events","type":"User","site_admin":false},"body":"Actually, I will change it to do that... and remove this concept...","created_at":"2015-10-07T18:52:39Z","updated_at":"2015-10-07T18:52:39Z","html_url":"https://github.com/highfidelity/hifi/pull/6006#discussion_r41430320","pull_request_url":"https://api.github.com/repos/highfidelity/hifi/pulls/6006","_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/41430320"},"html":{"href":"https://github.com/highfidelity/hifi/pull/6006#discussion_r41430320"},"pull_request":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/6006"}}},"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/6006","id":46969837,"html_url":"https://github.com/highfidelity/hifi/pull/6006","diff_url":"https://github.com/highfidelity/hifi/pull/6006.diff","patch_url":"https://github.com/highfidelity/hifi/pull/6006.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/6006","number":6006,"state":"open","locked":false,"title":"Animation group settings","user":{"login":"ZappoMan","id":2093195,"avatar_url":"https://avatars.githubusercontent.com/u/2093195?v=3","gravatar_id":"","url":"https://api.github.com/users/ZappoMan","html_url":"https://github.com/ZappoMan","followers_url":"https://api.github.com/users/ZappoMan/followers","following_url":"https://api.github.com/users/ZappoMan/following{/other_user}","gists_url":"https://api.github.com/users/ZappoMan/gists{/gist_id}","starred_url":"https://api.github.com/users/ZappoMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZappoMan/subscriptions","organizations_url":"https://api.github.com/users/ZappoMan/orgs","repos_url":"https://api.github.com/users/ZappoMan/repos","events_url":"https://api.github.com/users/ZappoMan/events{/privacy}","received_events_url":"https://api.github.com/users/ZappoMan/received_events","type":"User","site_admin":false},"body":"* fixes bugs in animations skipping when you start/stop or change propeties\r\n* gets rid of the animationSettings as a JSON string, and makes it a true property group like stage, zone, or atmosphere settings\r\n* removes \"animation\" settings from particle effects and makes a simplified \"isEmitting\" property instead since the particle effect wasn't actually using any of the other animation properties\r\n* makes the individual animation properties editable in the Entity Properties UI instead of having to know how to properly format the animationSettings string.","created_at":"2015-10-06T23:09:13Z","updated_at":"2015-10-07T18:52:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4106d5b25394fcd4e458af12f37a3ea818d10f24","assignee":{"login":"AndrewMeadows","id":2186405,"avatar_url":"https://avatars.githubusercontent.com/u/2186405?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewMeadows","html_url":"https://github.com/AndrewMeadows","followers_url":"https://api.github.com/users/AndrewMeadows/followers","following_url":"https://api.github.com/users/AndrewMeadows/following{/other_user}","gists_url":"https://api.github.com/users/AndrewMeadows/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewMeadows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewMeadows/subscriptions","organizations_url":"https://api.github.com/users/AndrewMeadows/orgs","repos_url":"https://api.github.com/users/AndrewMeadows/repos","events_url":"https://api.github.com/users/AndrewMeadows/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewMeadows/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/6006/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/6006/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/6006/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/ef054ffc6d456575a6aa0556f780d0a05be4ebb1","head":{"label":"ZappoMan:animationGroupSettings","ref":"animationGroupSettings","sha":"ef054ffc6d456575a6aa0556f780d0a05be4ebb1","user":{"login":"ZappoMan","id":2093195,"avatar_url":"https://avatars.githubusercontent.com/u/2093195?v=3","gravatar_id":"","url":"https://api.github.com/users/ZappoMan","html_url":"https://github.com/ZappoMan","followers_url":"https://api.github.com/users/ZappoMan/followers","following_url":"https://api.github.com/users/ZappoMan/following{/other_user}","gists_url":"https://api.github.com/users/ZappoMan/gists{/gist_id}","starred_url":"https://api.github.com/users/ZappoMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZappoMan/subscriptions","organizations_url":"https://api.github.com/users/ZappoMan/orgs","repos_url":"https://api.github.com/users/ZappoMan/repos","events_url":"https://api.github.com/users/ZappoMan/events{/privacy}","received_events_url":"https://api.github.com/users/ZappoMan/received_events","type":"User","site_admin":false},"repo":{"id":9376434,"name":"hifi","full_name":"ZappoMan/hifi","owner":{"login":"ZappoMan","id":2093195,"avatar_url":"https://avatars.githubusercontent.com/u/2093195?v=3","gravatar_id":"","url":"https://api.github.com/users/ZappoMan","html_url":"https://github.com/ZappoMan","followers_url":"https://api.github.com/users/ZappoMan/followers","following_url":"https://api.github.com/users/ZappoMan/following{/other_user}","gists_url":"https://api.github.com/users/ZappoMan/gists{/gist_id}","starred_url":"https://api.github.com/users/ZappoMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZappoMan/subscriptions","organizations_url":"https://api.github.com/users/ZappoMan/orgs","repos_url":"https://api.github.com/users/ZappoMan/repos","events_url":"https://api.github.com/users/ZappoMan/events{/privacy}","received_events_url":"https://api.github.com/users/ZappoMan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ZappoMan/hifi","description":"Test platform for various render and interface tests for next-gen VR system","fork":true,"url":"https://api.github.com/repos/ZappoMan/hifi","forks_url":"https://api.github.com/repos/ZappoMan/hifi/forks","keys_url":"https://api.github.com/repos/ZappoMan/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ZappoMan/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ZappoMan/hifi/teams","hooks_url":"https://api.github.com/repos/ZappoMan/hifi/hooks","issue_events_url":"https://api.github.com/repos/ZappoMan/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/ZappoMan/hifi/events","assignees_url":"https://api.github.com/repos/ZappoMan/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/ZappoMan/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/ZappoMan/hifi/tags","blobs_url":"https://api.github.com/repos/ZappoMan/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ZappoMan/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ZappoMan/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ZappoMan/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ZappoMan/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/ZappoMan/hifi/languages","stargazers_url":"https://api.github.com/repos/ZappoMan/hifi/stargazers","contributors_url":"https://api.github.com/repos/ZappoMan/hifi/contributors","subscribers_url":"https://api.github.com/repos/ZappoMan/hifi/subscribers","subscription_url":"https://api.github.com/repos/ZappoMan/hifi/subscription","commits_url":"https://api.github.com/repos/ZappoMan/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ZappoMan/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ZappoMan/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ZappoMan/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ZappoMan/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/ZappoMan/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ZappoMan/hifi/merges","archive_url":"https://api.github.com/repos/ZappoMan/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ZappoMan/hifi/downloads","issues_url":"https://api.github.com/repos/ZappoMan/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/ZappoMan/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/ZappoMan/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/ZappoMan/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ZappoMan/hifi/labels{/name}","releases_url":"https://api.github.com/repos/ZappoMan/hifi/releases{/id}","created_at":"2013-04-11T17:41:25Z","updated_at":"2015-05-08T15:39:03Z","pushed_at":"2015-10-07T18:31:36Z","git_url":"git://github.com/ZappoMan/hifi.git","ssh_url":"git@github.com:ZappoMan/hifi.git","clone_url":"https://github.com/ZappoMan/hifi.git","svn_url":"https://github.com/ZappoMan/hifi","homepage":null,"size":186195,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"highfidelity:master","ref":"master","sha":"022c4276b94adc8bdd71e0ba4cffac26a809e857","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","created_at":"2012-08-10T18:26:22Z","updated_at":"2015-10-07T02:45:17Z","pushed_at":"2015-10-07T18:43:27Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"","size":241092,"stargazers_count":312,"watchers_count":312,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":178,"mirror_url":null,"open_issues_count":57,"forks":178,"open_issues":57,"watchers":312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/6006"},"html":{"href":"https://github.com/highfidelity/hifi/pull/6006"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/6006"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/6006/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/6006/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/6006/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/ef054ffc6d456575a6aa0556f780d0a05be4ebb1"}}}}