Add example model: Bob

Add menu item "Open Example", open a default example model, called "bob.ds3".
Thanks to reddit user(bvanevery) for proposing this feature.
master
Jeremy Hu 2019-03-01 22:34:46 +09:30
parent e198853674
commit 8c0156bc7a
6 changed files with 210 additions and 3 deletions

View File

@ -24,3 +24,4 @@ justStand <https://github.com/justStand>
Ruben Niculcea <https://github.com/RubenSandwich> Ruben Niculcea <https://github.com/RubenSandwich>
boynet <https://dust3d.discourse.group/u/boynet> boynet <https://dust3d.discourse.group/u/boynet>
fornclake <https://www.reddit.com/user/fornclake> fornclake <https://www.reddit.com/user/fornclake>
bvanevery <https://www.reddit.com/user/bvanevery>

View File

@ -12,10 +12,10 @@ macx {
} }
isEmpty(HUMAN_VERSION) { isEmpty(HUMAN_VERSION) {
HUMAN_VERSION = "1.0.0-beta.15" HUMAN_VERSION = "1.0.0-beta.16"
} }
isEmpty(VERSION) { isEmpty(VERSION) {
VERSION = 1.0.0.15 VERSION = 1.0.0.16
} }
REPOSITORY_URL = "https://github.com/huxingyi/dust3d" REPOSITORY_URL = "https://github.com/huxingyi/dust3d"

View File

@ -7,6 +7,7 @@
<file>resources/tree-branch-open.png</file> <file>resources/tree-branch-open.png</file>
<file>resources/tree-vline.png</file> <file>resources/tree-vline.png</file>
<file>resources/material-demo-model.ds3</file> <file>resources/material-demo-model.ds3</file>
<file>resources/bob.ds3</file>
<file>shaders/default.vert</file> <file>shaders/default.vert</file>
<file>shaders/default.frag</file> <file>shaders/default.frag</file>
<file>shaders/default.core.vert</file> <file>shaders/default.core.vert</file>

140
resources/bob.ds3 Normal file
View File

@ -0,0 +1,140 @@
DUST3D 1.0 xml 0000000133
<?xml version="1.0" encoding="UTF-8"?>
<ds3>
<model name="model.xml" offset="0" size="22267"/>
</ds3>
<?xml version="1.0" encoding="UTF-8"?>
<canvas originX="0.56288" originY="0.470664" originZ="1.04831" rigType="Animal">
<nodes>
<node id="{0d0f104a-ec3d-4f44-8cfd-09eb84e3bc38}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0217391" x="0.28778" y="0.239754" z="1.03804"/>
<node id="{12b18363-3be9-4c86-ad15-5d34b817a1f9}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0573123" x="0.527668" y="0.474308" z="1.04595"/>
<node id="{15b2d58a-7a04-4205-a067-a09cf9844218}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" radius="0.0177866" x="0.458498" y="0.942688" z="1.00198"/>
<node id="{174d7472-82ca-4713-9bf3-f5e0538be1fc}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0296443" x="0.427555" y="0.240737" z="1.05912"/>
<node id="{190c9a65-cdb2-4c0f-a4bf-2bf3218110b4}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0355731" x="0.495823" y="0.599838" z="1.04002"/>
<node id="{22b42cad-c043-400b-8860-4f2c3897e47f}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" radius="0.0100287" x="0.148738" y="0.256057" z="0.971495"/>
<node id="{2473f826-dcf1-45b4-80e2-abafb621b18c}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" radius="0.0197628" x="0.458498" y="0.93083" z="1.03557"/>
<node id="{25435c34-83f2-4ba7-8a8d-d3e19ee52abb}" partId="{200b869b-0574-4f2c-a7a3-c612ef055317}" radius="0.0296443" x="0.565217" y="0.201581" z="1.03755"/>
<node boneMark="Limb" id="{2dc0ed96-f948-4e41-abd1-30b7e75cf7fd}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0316206" x="0.455273" y="0.241683" z="1.05737"/>
<node id="{2f8f9eeb-d392-47c3-a62e-e2ffb3481855}" partId="{fafff396-bd4b-44c8-b32d-d6636ae357ad}" radius="0.0501901" x="0.567201" y="0.101968" z="1.00365"/>
<node id="{35e32149-51cf-41b0-a444-ce169543d671}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0217391" x="0.373262" y="0.240443" z="1.05912"/>
<node id="{3fd64207-f3d7-45af-9dc5-e362460ed7e0}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0592885" x="0.533596" y="0.29249" z="1.04002"/>
<node id="{4364ea1f-b008-49e7-a7f6-b7ce67bc6321}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" radius="0.0237154" x="0.458498" y="0.922925" z="1.06176"/>
<node boneMark="Limb" id="{439c1277-f421-4ca2-a3a8-aa2a1a9cf8f0}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0335968" x="0.485946" y="0.243522" z="1.05649"/>
<node id="{47b6bb73-ea0d-4700-baa0-3fba91b39b55}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0177866" x="0.461219" y="0.944664" z="1.07115"/>
<node id="{4a0ba6bd-0bb5-4563-845f-3a072ef0267e}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0158103" x="0.467309" y="0.833315" z="1.07362"/>
<node id="{4b1fe12f-f759-44b2-8580-303fbfbe9a1c}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0158103" x="0.461732" y="0.886382" z="1.07164"/>
<node id="{4d340e5e-2466-4314-b93d-9e545063761d}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0632412" x="0.533596" y="0.262846" z="1.04793"/>
<node boneMark="Joint" id="{51598637-2230-4ac8-911a-3e51de201246}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0177866" x="0.347279" y="0.239223" z="1.06088"/>
<node id="{54f78cd3-ff05-4809-ab54-0ea1d6f523c1}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0533597" x="0.551383" y="0.23913" z="1.04793"/>
<node boneMark="Joint" id="{5636d128-ea40-4d18-bb9c-504cb4c1e695}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0197628" x="0.461219" y="0.910174" z="1.06769"/>
<node id="{5c097492-4a24-48a2-8d77-949ed0b1a7b5}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" radius="0.0118577" x="0.458498" y="0.944664" z="0.972332"/>
<node id="{5d56f2b9-f65b-43b1-bd16-a9bd365941f4}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0217391" x="0.329675" y="0.237564" z="1.05649"/>
<node id="{646901cf-8a45-467a-b6d9-29a37cdacabb}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" radius="0.0186246" x="0.163739" y="0.256296" z="0.973425"/>
<node id="{679eae99-fdeb-4467-888c-bc29430c3a09}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" radius="0.00859599" x="0.133447" y="0.267585" z="0.969992"/>
<node id="{68405953-3413-42d4-a2b2-fa1a40271878}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0474308" x="0.539525" y="0.430829" z="1.03014"/>
<node id="{7232cd3b-9a8d-415f-8591-dabf2373e915}" partId="{200b869b-0574-4f2c-a7a3-c612ef055317}" radius="0.027668" x="0.565217" y="0.13834" z="1.01581"/>
<node id="{72fdfeb9-cd0c-4552-82bf-e68d39aef546}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0217391" x="0.302665" y="0.238285" z="1.04419"/>
<node id="{792b114e-107f-46b6-a97d-f40b3084527b}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0375494" x="0.524374" y="0.240228" z="1.04595"/>
<node id="{7b949d31-f33a-4b0c-907e-766fb6bd23ca}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" radius="0.013834" x="0.458498" y="0.93083" z="1.07312"/>
<node boneMark="Joint" id="{7e55702a-b240-4069-a1b5-28340af57b86}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0256917" x="0.489732" y="0.676698" z="1.04595"/>
<node id="{7e841be5-0a7f-4f33-8c3b-2d298f0c658a}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" radius="0.0143266" x="0.195698" y="0.251323" z="0.988658"/>
<node id="{7e843ae5-1bb8-493f-83db-12d4a25316a2}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0395257" x="0.53162" y="0.341898" z="1.03014"/>
<node id="{7f9c842b-e473-4ea6-b907-2dc130c4266e}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" radius="0.027668" x="0.567194" y="0.142292" z="0.982213"/>
<node boneMark="Neck" id="{8d52d8a1-afa6-4ab7-bb79-80ea47947103}" partId="{200b869b-0574-4f2c-a7a3-c612ef055317}" radius="0.0256917" x="0.565217" y="0.167984" z="1.01976"/>
<node id="{8fb54aa5-dfd0-4abf-8af6-db181f39f52b}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.027668" x="0.493037" y="0.64525" z="1.04397"/>
<node id="{97e6383f-2467-40bb-a120-c6fc77ff3c2f}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.027668" x="0.400568" y="0.238786" z="1.06"/>
<node id="{9990e39d-1664-4d14-a123-00c261c5dece}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.041502" x="0.539525" y="0.385375" z="1.02421"/>
<node id="{9a72c2c9-a8d1-4046-b390-4e5f57fef378}" partId="{200b869b-0574-4f2c-a7a3-c612ef055317}" radius="0.0395257" x="0.565217" y="0.229249" z="1.04941"/>
<node id="{a1c2b443-dc36-415a-a788-cbe7e0a33eef}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" radius="0.02149" x="0.178592" y="0.249936" z="0.979333"/>
<node id="{af92e39c-f885-40a0-be7c-29ff289210a2}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0454546" x="0.503159" y="0.548942" z="1.03606"/>
<node id="{b56e1ffa-853b-45a0-b546-ba71aa2c82bd}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0237154" x="0.47991" y="0.713421" z="1.06176"/>
<node boneMark="Limb" id="{b62a224d-c60e-4876-a692-6c39bec158fe}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0533597" x="0.51581" y="0.498023" z="1.04002"/>
<node id="{bb4002e6-b3f7-4749-96c4-3527edb9c221}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0197628" x="0.565217" y="0.203557" z="1.03557"/>
<node id="{c39bc470-4676-4ed9-8f6d-0c933a6abcee}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0217391" x="0.471647" y="0.79204" z="1.06966"/>
<node id="{c8ae059f-d7b5-4cff-a6cc-e18f074c2421}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" radius="0.027668" x="0.567194" y="0.0968379" z="0.988142"/>
<node id="{cd44a093-5c13-4b74-b9b5-4afaf1b88327}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.013834" x="0.464004" y="0.864762" z="1.07164"/>
<node id="{cef3afd5-d36c-4930-94a2-93e8cf31e222}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.027668" x="0.477018" y="0.740938" z="1.06571"/>
<node boneMark="Joint" id="{d104812a-5add-4a3d-a35a-85b4def3079d}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.013834" x="0.216685" y="0.245679" z="1.00115"/>
<node id="{d8b1dbe5-46a2-40d1-94cd-fcfe3cd11af2}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" radius="0.013834" x="0.567194" y="0.175889" z="0.98666"/>
<node id="{e1d5fcad-f3c6-44d2-8adf-0e921f3dbaa2}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" radius="0.0256917" x="0.474539" y="0.764524" z="1.06966"/>
<node id="{f402fbdc-1131-4035-b297-433a27134004}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0158103" x="0.240246" y="0.242836" z="1.01433"/>
<node id="{f96e2321-bfdf-4a35-919d-f77665336689}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.0177866" x="0.264812" y="0.240724" z="1.02487"/>
<node id="{fbfe751e-e5a2-4e89-9a0c-852cfd1d5699}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" radius="0.013834" x="0.200101" y="0.251862" z="0.990613"/>
<node id="{fed432d4-4529-4bb7-b49a-fabe0e84095d}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" radius="0.0197628" x="0.567194" y="0.0790514" z="1.00198"/>
<node boneMark="Joint" id="{ff20d98f-5cda-45fd-a1be-f3f38c9be1e2}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" radius="0.0118577" x="0.21675" y="0.246293" z="1.00133"/>
<node id="{ff5071bc-b61b-4279-81a8-3924d8466b32}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" radius="0.0335968" x="0.567194" y="0.116601" z="0.98419"/>
</nodes>
<edges>
<edge from="{3fd64207-f3d7-45af-9dc5-e362460ed7e0}" id="{0002af77-8c2d-44c7-8060-cbeb94a55bf4}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{4d340e5e-2466-4314-b93d-9e545063761d}"/>
<edge from="{e1d5fcad-f3c6-44d2-8adf-0e921f3dbaa2}" id="{06f6e38e-4340-4b91-bf02-f2e57ff7b029}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{c39bc470-4676-4ed9-8f6d-0c933a6abcee}"/>
<edge from="{0d0f104a-ec3d-4f44-8cfd-09eb84e3bc38}" id="{071682bc-689f-45ff-a79f-56ab5c3e7d7c}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{f96e2321-bfdf-4a35-919d-f77665336689}"/>
<edge from="{4a0ba6bd-0bb5-4563-845f-3a072ef0267e}" id="{0f5e572d-691a-4e1c-a505-dde4738687af}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{cd44a093-5c13-4b74-b9b5-4afaf1b88327}"/>
<edge from="{22b42cad-c043-400b-8860-4f2c3897e47f}" id="{1111e86d-411d-4a46-bd9f-efa16369292b}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" to="{679eae99-fdeb-4467-888c-bc29430c3a09}"/>
<edge from="{8fb54aa5-dfd0-4abf-8af6-db181f39f52b}" id="{13690f42-faac-4a62-ac07-bbcac873e1ce}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{7e55702a-b240-4069-a1b5-28340af57b86}"/>
<edge from="{7f9c842b-e473-4ea6-b907-2dc130c4266e}" id="{16f7f730-1f2f-441f-9be9-e754590e51e0}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" to="{ff5071bc-b61b-4279-81a8-3924d8466b32}"/>
<edge from="{7e841be5-0a7f-4f33-8c3b-2d298f0c658a}" id="{17b46f35-ae6e-4008-93ae-ceac78780a81}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" to="{ff20d98f-5cda-45fd-a1be-f3f38c9be1e2}"/>
<edge from="{4364ea1f-b008-49e7-a7f6-b7ce67bc6321}" id="{1cd492f0-3f45-4b67-b1e8-d2042c76b19e}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" to="{7b949d31-f33a-4b0c-907e-766fb6bd23ca}"/>
<edge from="{d8b1dbe5-46a2-40d1-94cd-fcfe3cd11af2}" id="{1e29a19b-73bb-4f31-aeb7-345c08c9feac}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" to="{7f9c842b-e473-4ea6-b907-2dc130c4266e}"/>
<edge from="{25435c34-83f2-4ba7-8a8d-d3e19ee52abb}" id="{1eef33ef-82cc-4b5d-ac65-56ddaee55bdb}" partId="{200b869b-0574-4f2c-a7a3-c612ef055317}" to="{9a72c2c9-a8d1-4046-b390-4e5f57fef378}"/>
<edge from="{4b1fe12f-f759-44b2-8580-303fbfbe9a1c}" id="{2362772a-0088-45d3-8c7b-9f40f7bfb091}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{5636d128-ea40-4d18-bb9c-504cb4c1e695}"/>
<edge from="{cef3afd5-d36c-4930-94a2-93e8cf31e222}" id="{25bc7012-7cbc-4053-96b1-348a77c965fa}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{e1d5fcad-f3c6-44d2-8adf-0e921f3dbaa2}"/>
<edge from="{ff5071bc-b61b-4279-81a8-3924d8466b32}" id="{260d0fe7-00f6-43cd-b641-945792490d2a}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" to="{c8ae059f-d7b5-4cff-a6cc-e18f074c2421}"/>
<edge from="{b62a224d-c60e-4876-a692-6c39bec158fe}" id="{280e42fd-b3d4-4c00-940f-42a6a6467bf5}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{12b18363-3be9-4c86-ad15-5d34b817a1f9}"/>
<edge from="{72fdfeb9-cd0c-4552-82bf-e68d39aef546}" id="{2f7b8e82-8e43-4410-857e-915029b8c21b}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{0d0f104a-ec3d-4f44-8cfd-09eb84e3bc38}"/>
<edge from="{646901cf-8a45-467a-b6d9-29a37cdacabb}" id="{41f4f419-a5fe-4e33-a53a-285aefbdb4b6}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" to="{a1c2b443-dc36-415a-a788-cbe7e0a33eef}"/>
<edge from="{174d7472-82ca-4713-9bf3-f5e0538be1fc}" id="{42730ac8-b1b0-40e6-a4b0-b0620bf487d0}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{2dc0ed96-f948-4e41-abd1-30b7e75cf7fd}"/>
<edge from="{51598637-2230-4ac8-911a-3e51de201246}" id="{436677d1-e815-4279-809e-e722df5c196f}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{35e32149-51cf-41b0-a444-ce169543d671}"/>
<edge from="{9990e39d-1664-4d14-a123-00c261c5dece}" id="{438fa9ca-104b-420c-9de4-09758c2aa898}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{7e843ae5-1bb8-493f-83db-12d4a25316a2}"/>
<edge from="{2dc0ed96-f948-4e41-abd1-30b7e75cf7fd}" id="{45231903-db62-48ed-8179-e36bdbd48a8f}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{439c1277-f421-4ca2-a3a8-aa2a1a9cf8f0}"/>
<edge from="{f402fbdc-1131-4035-b297-433a27134004}" id="{46a51055-0bc3-40f7-9f6f-a77485fa5fb9}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{d104812a-5add-4a3d-a35a-85b4def3079d}"/>
<edge from="{35e32149-51cf-41b0-a444-ce169543d671}" id="{48bf63c5-785a-4ff9-8e14-75c7f9147f16}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{97e6383f-2467-40bb-a120-c6fc77ff3c2f}"/>
<edge from="{68405953-3413-42d4-a2b2-fa1a40271878}" id="{57cab489-b1e6-481b-a9e0-8020ad4f5eea}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{12b18363-3be9-4c86-ad15-5d34b817a1f9}"/>
<edge from="{97e6383f-2467-40bb-a120-c6fc77ff3c2f}" id="{58ce2958-f111-4f25-9097-95edf1013bc9}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{174d7472-82ca-4713-9bf3-f5e0538be1fc}"/>
<edge from="{af92e39c-f885-40a0-be7c-29ff289210a2}" id="{61d169a1-e3c1-4a6a-93fb-ca8947a01e00}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{b62a224d-c60e-4876-a692-6c39bec158fe}"/>
<edge from="{5d56f2b9-f65b-43b1-bd16-a9bd365941f4}" id="{64679de7-eede-46ff-8de4-a95143e36d68}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{51598637-2230-4ac8-911a-3e51de201246}"/>
<edge from="{190c9a65-cdb2-4c0f-a4bf-2bf3218110b4}" id="{66a0dc2f-f57b-4f71-9b71-08afff95cd10}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{8fb54aa5-dfd0-4abf-8af6-db181f39f52b}"/>
<edge from="{c39bc470-4676-4ed9-8f6d-0c933a6abcee}" id="{69d55ea4-48a5-4a76-9e1b-bf65c1d0d2a1}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{4a0ba6bd-0bb5-4563-845f-3a072ef0267e}"/>
<edge from="{5636d128-ea40-4d18-bb9c-504cb4c1e695}" id="{73c98cc9-d511-42ab-82ac-9c11e41cd496}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{47b6bb73-ea0d-4700-baa0-3fba91b39b55}"/>
<edge from="{7e843ae5-1bb8-493f-83db-12d4a25316a2}" id="{7f89cf18-e757-448d-ac58-6ee4a33f473e}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{3fd64207-f3d7-45af-9dc5-e362460ed7e0}"/>
<edge from="{f96e2321-bfdf-4a35-919d-f77665336689}" id="{85b9fb49-48a3-48b8-b088-461709b09ded}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{f402fbdc-1131-4035-b297-433a27134004}"/>
<edge from="{8d52d8a1-afa6-4ab7-bb79-80ea47947103}" id="{89d29dc9-388f-4acf-b899-c18162013df7}" partId="{200b869b-0574-4f2c-a7a3-c612ef055317}" to="{25435c34-83f2-4ba7-8a8d-d3e19ee52abb}"/>
<edge from="{4d340e5e-2466-4314-b93d-9e545063761d}" id="{95c603d1-9af0-4cac-9a67-aeb77752e345}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{54f78cd3-ff05-4809-ab54-0ea1d6f523c1}"/>
<edge from="{68405953-3413-42d4-a2b2-fa1a40271878}" id="{998bc936-915c-4d2f-a297-91d88df2897d}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{9990e39d-1664-4d14-a123-00c261c5dece}"/>
<edge from="{2473f826-dcf1-45b4-80e2-abafb621b18c}" id="{b0a620ec-0e0f-4649-bc7b-426f3cbe081b}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" to="{15b2d58a-7a04-4205-a067-a09cf9844218}"/>
<edge from="{a1c2b443-dc36-415a-a788-cbe7e0a33eef}" id="{b10ff369-13ca-4c63-9093-813d89e0040d}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" to="{7e841be5-0a7f-4f33-8c3b-2d298f0c658a}"/>
<edge from="{cd44a093-5c13-4b74-b9b5-4afaf1b88327}" id="{b284c30f-5136-41ad-9c17-9627f602efa5}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{4b1fe12f-f759-44b2-8580-303fbfbe9a1c}"/>
<edge from="{7232cd3b-9a8d-415f-8591-dabf2373e915}" id="{b9537ea5-d11c-4071-a8ac-f913de3d1244}" partId="{200b869b-0574-4f2c-a7a3-c612ef055317}" to="{8d52d8a1-afa6-4ab7-bb79-80ea47947103}"/>
<edge from="{15b2d58a-7a04-4205-a067-a09cf9844218}" id="{c05631fa-0640-408e-b10d-7a31199cd33d}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" to="{5c097492-4a24-48a2-8d77-949ed0b1a7b5}"/>
<edge from="{4364ea1f-b008-49e7-a7f6-b7ce67bc6321}" id="{c7e711f4-94bb-4325-ac4b-2f631936ffe4}" partId="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" to="{2473f826-dcf1-45b4-80e2-abafb621b18c}"/>
<edge from="{c8ae059f-d7b5-4cff-a6cc-e18f074c2421}" id="{d201bcb0-846a-4e9a-a13f-5d747f7384ed}" partId="{aa532c21-08ca-4b48-896a-13252898d5b2}" to="{fed432d4-4529-4bb7-b49a-fabe0e84095d}"/>
<edge from="{54f78cd3-ff05-4809-ab54-0ea1d6f523c1}" id="{e5153aac-e8e7-4745-b4a4-a4b65dc6e773}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{bb4002e6-b3f7-4749-96c4-3527edb9c221}"/>
<edge from="{5d56f2b9-f65b-43b1-bd16-a9bd365941f4}" id="{eda90128-1ea2-4e7f-a697-eb7495bf07db}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{72fdfeb9-cd0c-4552-82bf-e68d39aef546}"/>
<edge from="{646901cf-8a45-467a-b6d9-29a37cdacabb}" id="{f27345dc-6f37-4da7-9253-eed377efdae0}" partId="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" to="{22b42cad-c043-400b-8860-4f2c3897e47f}"/>
<edge from="{d104812a-5add-4a3d-a35a-85b4def3079d}" id="{f7e61543-065c-42c8-8efe-7422a660412e}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{fbfe751e-e5a2-4e89-9a0c-852cfd1d5699}"/>
<edge from="{7e55702a-b240-4069-a1b5-28340af57b86}" id="{fc944eb7-61af-4d5f-bbe8-d2c30e045a8d}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{b56e1ffa-853b-45a0-b546-ba71aa2c82bd}"/>
<edge from="{439c1277-f421-4ca2-a3a8-aa2a1a9cf8f0}" id="{fca49b22-43f6-4bd1-8262-52dfb67d03ee}" partId="{4e48defc-9a67-432d-9cb6-4333973194ce}" to="{792b114e-107f-46b6-a97d-f40b3084527b}"/>
<edge from="{af92e39c-f885-40a0-be7c-29ff289210a2}" id="{fe433b76-0a2c-4cdf-bfc7-4cc458357f62}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{190c9a65-cdb2-4c0f-a4bf-2bf3218110b4}"/>
<edge from="{b56e1ffa-853b-45a0-b546-ba71aa2c82bd}" id="{feb4b5f7-db8a-46e9-a5f5-c55af83d3139}" partId="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" to="{cef3afd5-d36c-4930-94a2-93e8cf31e222}"/>
</edges>
<parts>
<part disabled="false" id="{200b869b-0574-4f2c-a7a3-c612ef055317}" locked="false" rounded="false" subdived="true" visible="true" xMirrored="false" zMirrored="false"/>
<part deformWidth="0.69" disabled="false" id="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" locked="false" rounded="true" subdived="true" visible="true" xMirrored="true" zMirrored="false"/>
<part deformThickness="0.93" disabled="false" id="{4e48defc-9a67-432d-9cb6-4333973194ce}" locked="false" rounded="false" subdived="true" visible="true" xMirrored="true" zMirrored="false"/>
<part disabled="false" id="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" locked="false" rounded="false" subdived="true" visible="true" xMirrored="true" zMirrored="false"/>
<part disabled="false" id="{aa532c21-08ca-4b48-896a-13252898d5b2}" locked="false" rounded="false" subdived="true" visible="true" xMirrored="false" zMirrored="false"/>
<part deformWidth="0.61" disabled="false" id="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" locked="false" rounded="false" subdived="true" visible="true" xMirrored="true" zMirrored="false"/>
<part color="#c0c0c0" deformThickness="1.16" disabled="false" id="{fafff396-bd4b-44c8-b32d-d6636ae357ad}" locked="false" rounded="false" subdived="true" visible="true" xMirrored="false" zMirrored="false"/>
</parts>
<components>
<component combineMode="Normal" expanded="false" id="{9e2f0b46-832b-47c5-91ac-1f6df8e135d0}" linkData="{fafff396-bd4b-44c8-b32d-d6636ae357ad}" linkDataType="partId"/>
<component combineMode="Normal" expanded="false" id="{17669df3-6da1-4da7-a984-1bb22bf4f49b}" linkData="{200b869b-0574-4f2c-a7a3-c612ef055317}" linkDataType="partId"/>
<component combineMode="Normal" expanded="false" id="{dcc0afd8-9d25-4eb9-a0a4-ea98a8fb9c96}" linkData="{aa532c21-08ca-4b48-896a-13252898d5b2}" linkDataType="partId"/>
<component combineMode="Normal" expanded="false" id="{1aa823f6-4950-4024-8a47-d4aa7bbb2635}" linkData="{c1cbd08b-66f9-427d-a907-c79aab344eb4}" linkDataType="partId"/>
<component combineMode="Normal" expanded="false" id="{ff02fc08-d6fe-4a2c-a66d-a1404b7b400e}" linkData="{4e48defc-9a67-432d-9cb6-4333973194ce}" linkDataType="partId"/>
<component combineMode="Normal" expanded="false" id="{f4b89f9e-540d-4c08-b569-fd6f79e21b1d}" linkData="{790024c6-582c-4d7e-907b-2cfb570fc3e1}" linkDataType="partId"/>
<component combineMode="Normal" expanded="false" id="{4f71ea32-b31b-43ab-84a9-2d8f4b0459ca}" linkData="{4cdedbbf-8900-443e-9b85-7baf6a5c76fa}" linkDataType="partId"/>
</components>
<materials/>
<poses/>
<motions/>
</canvas>

View File

@ -345,6 +345,10 @@ DocumentWindow::DocumentWindow() :
connect(m_openAction, &QAction::triggered, this, &DocumentWindow::open, Qt::QueuedConnection); connect(m_openAction, &QAction::triggered, this, &DocumentWindow::open, Qt::QueuedConnection);
m_fileMenu->addAction(m_openAction); m_fileMenu->addAction(m_openAction);
m_openExampleAction = new QAction(tr("Open Example"), this);
connect(m_openExampleAction, &QAction::triggered, this, &DocumentWindow::openExample, Qt::QueuedConnection);
m_fileMenu->addAction(m_openExampleAction);
m_saveAction = new QAction(tr("Save"), this); m_saveAction = new QAction(tr("Save"), this);
connect(m_saveAction, &QAction::triggered, this, &DocumentWindow::save, Qt::QueuedConnection); connect(m_saveAction, &QAction::triggered, this, &DocumentWindow::save, Qt::QueuedConnection);
m_fileMenu->addAction(m_saveAction); m_fileMenu->addAction(m_saveAction);
@ -1173,6 +1177,65 @@ void DocumentWindow::saveTo(const QString &saveAsFilename)
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();
} }
void DocumentWindow::openExample()
{
if (!m_documentSaved) {
QMessageBox::StandardButton answer = QMessageBox::question(this,
APP_NAME,
tr("Do you really want to open example and lose the unsaved changes?"),
QMessageBox::Yes | QMessageBox::No);
if (answer != QMessageBox::Yes)
return;
}
QApplication::setOverrideCursor(Qt::WaitCursor);
Ds3FileReader ds3Reader(":/resources/bob.ds3");
m_document->clearHistories();
m_document->reset();
m_document->saveSnapshot();
for (int i = 0; i < ds3Reader.items().size(); ++i) {
Ds3ReaderItem item = ds3Reader.items().at(i);
if (item.type == "asset") {
if (item.name.startsWith("images/")) {
QString filename = item.name.split("/")[1];
QString imageIdString = filename.split(".")[0];
QUuid imageId = QUuid(imageIdString);
if (!imageId.isNull()) {
QByteArray data;
ds3Reader.loadItem(item.name, &data);
QImage image = QImage::fromData(data, "PNG");
(void)ImageForever::add(&image, imageId);
}
}
}
}
for (int i = 0; i < ds3Reader.items().size(); ++i) {
Ds3ReaderItem item = ds3Reader.items().at(i);
if (item.type == "model") {
QByteArray data;
ds3Reader.loadItem(item.name, &data);
QXmlStreamReader stream(data);
Snapshot snapshot;
loadSkeletonFromXmlStream(&snapshot, stream);
m_document->fromSnapshot(snapshot);
m_document->saveSnapshot();
} else if (item.type == "asset") {
if (item.name == "canvas.png") {
QByteArray data;
ds3Reader.loadItem(item.name, &data);
QImage image = QImage::fromData(data, "PNG");
m_document->updateTurnaround(image);
}
}
}
QApplication::restoreOverrideCursor();
setCurrentFilename("");
}
void DocumentWindow::open() void DocumentWindow::open()
{ {
if (!m_documentSaved) { if (!m_documentSaved) {

View File

@ -38,6 +38,7 @@ public slots:
void save(); void save();
void saveTo(const QString &saveAsFilename); void saveTo(const QString &saveAsFilename);
void open(); void open();
void openExample();
void exportObjResult(); void exportObjResult();
void exportGlbResult(); void exportGlbResult();
void exportFbxResult(); void exportFbxResult();
@ -84,6 +85,7 @@ private:
QAction *m_newWindowAction; QAction *m_newWindowAction;
QAction *m_newDocumentAction; QAction *m_newDocumentAction;
QAction *m_openAction; QAction *m_openAction;
QAction *m_openExampleAction;
QAction *m_saveAction; QAction *m_saveAction;
QAction *m_saveAsAction; QAction *m_saveAsAction;
QAction *m_saveAllAction; QAction *m_saveAllAction;