2025-07-01
This commit is contained in:
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
{one line to give the program's name and a brief idea of what it does.}
|
||||
Copyright (C) {year} {name of author}
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
{project} Copyright (C) {year} {fullname}
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1,21 @@
|
||||
# Rigacar
|
||||
|
||||
## Fork
|
||||
|
||||
_This fork supports **Blender 4.0+** and consolidates fixes from the community while the maintainer is absent._
|
||||
|
||||
Upstream readme description below.
|
||||
|
||||
## Upstream
|
||||
|
||||
Rigacar is a free addon for Blender. It is designed to fulfill the following goals:
|
||||
|
||||
* generate a complete rig as quickly as possible (actually few seconds) for standard car models
|
||||
* provide tools to automate wheels animation
|
||||
* allow efficient animation baking to be able to export animated models into real time renderers
|
||||
|
||||
Please read [full documentation](http://digicreatures.net/articles/rigacar.html) on my website.
|
||||
|
||||
You can also watch the series of video tutorials:
|
||||
|
||||
[](https://www.youtube.com/watch?v=D3XQxA_-TzY&list=PLH_mmrv8SfPFiEj93RJt3sBvHCnipI9qK "Rigacar video tutorials")
|
||||
@@ -0,0 +1,222 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
bl_info = {
|
||||
"name": "Rigacar (Generates Car Rig)",
|
||||
"author": "David Gayerie",
|
||||
"version": (8, 0),
|
||||
"blender": (4, 0, 0),
|
||||
"location": "View3D > Add > Armature",
|
||||
"description": "Adds a deformation rig for vehicules, generates animation rig and bake wheels animation.",
|
||||
"wiki_url": "http://digicreatures.net/articles/rigacar.html",
|
||||
"tracker_url": "https://github.com/digicreatures/rigacar/issues",
|
||||
"category": "Rigging"
|
||||
}
|
||||
|
||||
if "bpy" in locals():
|
||||
import importlib
|
||||
|
||||
if "bake_operators" in locals():
|
||||
importlib.reload(bake_operators)
|
||||
if "car_rig" in locals():
|
||||
importlib.reload(car_rig)
|
||||
if "widgets" in locals():
|
||||
importlib.reload(widgets)
|
||||
else:
|
||||
import bpy
|
||||
from . import bake_operators
|
||||
from . import car_rig
|
||||
|
||||
|
||||
def enumerate_ground_sensors(bones):
|
||||
bone = bones.get('GroundSensor.Axle.Ft')
|
||||
if bone is not None:
|
||||
yield bone
|
||||
for bone in bones:
|
||||
if bone.name.startswith('GroundSensor.Ft'):
|
||||
yield bone
|
||||
bone = bones.get('GroundSensor.Axle.Bk')
|
||||
if bone is not None:
|
||||
yield bone
|
||||
for bone in bones:
|
||||
if bone.name.startswith('GroundSensor.Bk'):
|
||||
yield bone
|
||||
|
||||
|
||||
class RIGACAR_PT_mixin:
|
||||
|
||||
def __init__(self):
|
||||
self.layout.use_property_split = True
|
||||
self.layout.use_property_decorate = False
|
||||
|
||||
@classmethod
|
||||
def is_car_rig(cls, context):
|
||||
return context.object is not None and context.object.data is not None and 'Car Rig' in context.object.data
|
||||
|
||||
@classmethod
|
||||
def is_car_rig_generated(cls, context):
|
||||
return cls.is_car_rig(context) and context.object.data['Car Rig']
|
||||
|
||||
def display_generate_section(self, context):
|
||||
self.layout.operator(car_rig.POSE_OT_carAnimationRigGenerate.bl_idname, text='Generate')
|
||||
|
||||
def display_bake_section(self, context):
|
||||
self.layout.operator(bake_operators.ANIM_OT_carSteeringBake.bl_idname)
|
||||
self.layout.operator(bake_operators.ANIM_OT_carWheelsRotationBake.bl_idname)
|
||||
self.layout.operator(bake_operators.ANIM_OT_carClearSteeringWheelsRotation.bl_idname)
|
||||
|
||||
def display_rig_props_section(self, context):
|
||||
layout = self.layout.column()
|
||||
layout.prop(context.object, '["wheels_on_y_axis"]', text="Wheels on Y axis")
|
||||
layout.prop(context.object, '["suspension_factor"]', text="Pitch factor")
|
||||
layout.prop(context.object, '["suspension_rolling_factor"]', text="Roll factor")
|
||||
|
||||
def display_ground_sensors_section(self, context):
|
||||
for ground_sensor in enumerate_ground_sensors(context.object.pose.bones):
|
||||
ground_projection_constraint = ground_sensor.constraints.get('Ground projection')
|
||||
self.layout.label(text=ground_sensor.name, icon='BONE_DATA')
|
||||
if ground_projection_constraint is not None:
|
||||
self.layout.prop(ground_projection_constraint, 'target', text='Ground')
|
||||
if ground_projection_constraint.target is not None:
|
||||
self.layout.prop(ground_projection_constraint, 'shrinkwrap_type')
|
||||
if ground_projection_constraint.shrinkwrap_type == 'PROJECT':
|
||||
self.layout.prop(ground_projection_constraint, 'project_limit')
|
||||
self.layout.prop(ground_projection_constraint, 'influence')
|
||||
ground_projection_limit_constraint = ground_sensor.constraints.get('Ground projection limitation')
|
||||
if ground_projection_limit_constraint is not None:
|
||||
self.layout.prop(ground_projection_limit_constraint, 'min_z', text='Min local Z')
|
||||
self.layout.prop(ground_projection_limit_constraint, 'max_z', text='Max local Z')
|
||||
self.layout.separator()
|
||||
|
||||
|
||||
class RIGACAR_PT_rigProperties(bpy.types.Panel, RIGACAR_PT_mixin):
|
||||
bl_label = "Rigacar"
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "data"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return RIGACAR_PT_mixin.is_car_rig(context)
|
||||
|
||||
def draw(self, context):
|
||||
if RIGACAR_PT_mixin.is_car_rig_generated(context):
|
||||
self.display_rig_props_section(context)
|
||||
self.layout.separator()
|
||||
self.display_bake_section(context)
|
||||
else:
|
||||
self.display_generate_section(context)
|
||||
|
||||
|
||||
class RIGACAR_PT_groundSensorsProperties(bpy.types.Panel, RIGACAR_PT_mixin):
|
||||
bl_label = "Ground Sensors"
|
||||
bl_parent_id = "RIGACAR_PT_rigProperties"
|
||||
bl_space_type = "PROPERTIES"
|
||||
bl_region_type = "WINDOW"
|
||||
bl_context = "data"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return RIGACAR_PT_mixin.is_car_rig_generated(context)
|
||||
|
||||
def draw(self, context):
|
||||
self.display_ground_sensors_section(context)
|
||||
|
||||
|
||||
class RIGACAR_PT_animationRigView(bpy.types.Panel, RIGACAR_PT_mixin):
|
||||
bl_category = "Rigacar"
|
||||
bl_label = "Animation Rig"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "UI"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return RIGACAR_PT_mixin.is_car_rig(context)
|
||||
|
||||
def draw(self, context):
|
||||
if RIGACAR_PT_mixin.is_car_rig_generated(context):
|
||||
self.display_rig_props_section(context)
|
||||
else:
|
||||
self.display_generate_section(context)
|
||||
|
||||
|
||||
class RIGACAR_PT_wheelsAnimationView(bpy.types.Panel, RIGACAR_PT_mixin):
|
||||
bl_category = "Rigacar"
|
||||
bl_label = "Wheels animation"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "UI"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return RIGACAR_PT_mixin.is_car_rig_generated(context)
|
||||
|
||||
def draw(self, context):
|
||||
self.display_bake_section(context)
|
||||
|
||||
|
||||
class RIGACAR_PT_groundSensorsView(bpy.types.Panel, RIGACAR_PT_mixin):
|
||||
bl_category = "Rigacar"
|
||||
bl_label = "Ground Sensors"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "UI"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return RIGACAR_PT_mixin.is_car_rig_generated(context)
|
||||
|
||||
def draw(self, context):
|
||||
self.display_ground_sensors_section(context)
|
||||
|
||||
|
||||
def menu_entries(menu, context):
|
||||
menu.layout.operator(car_rig.OBJECT_OT_armatureCarDeformationRig.bl_idname, text="Car (deformation rig)",
|
||||
icon='AUTO')
|
||||
|
||||
|
||||
classes = (
|
||||
RIGACAR_PT_rigProperties,
|
||||
RIGACAR_PT_groundSensorsProperties,
|
||||
RIGACAR_PT_animationRigView,
|
||||
RIGACAR_PT_wheelsAnimationView,
|
||||
RIGACAR_PT_groundSensorsView,
|
||||
)
|
||||
|
||||
|
||||
def register():
|
||||
bpy.types.VIEW3D_MT_armature_add.append(menu_entries)
|
||||
for c in classes:
|
||||
bpy.utils.register_class(c)
|
||||
car_rig.register()
|
||||
bake_operators.register()
|
||||
|
||||
|
||||
def unregister():
|
||||
bake_operators.unregister()
|
||||
car_rig.unregister()
|
||||
for c in classes:
|
||||
bpy.utils.unregister_class(c)
|
||||
bpy.types.VIEW3D_MT_armature_add.remove(menu_entries)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
@@ -0,0 +1,490 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import bpy
|
||||
import bpy_extras.anim_utils
|
||||
import mathutils
|
||||
import math
|
||||
import itertools
|
||||
import re
|
||||
|
||||
|
||||
def cursor(cursor_mode):
|
||||
def cursor_decorator(func):
|
||||
def wrapper(self, context, *args, **kwargs):
|
||||
context.window.cursor_modal_set(cursor_mode)
|
||||
try:
|
||||
return func(self, context, *args, **kwargs)
|
||||
finally:
|
||||
context.window.cursor_modal_restore()
|
||||
|
||||
return wrapper
|
||||
|
||||
return cursor_decorator
|
||||
|
||||
|
||||
def bone_name(prefix, position, side, index=0):
|
||||
if index == 0:
|
||||
return '%s.%s.%s' % (prefix, position, side)
|
||||
else:
|
||||
return '%s.%s.%s.%03d' % (prefix, position, side, index)
|
||||
|
||||
|
||||
def bone_range(bones, name_prefix, position, side):
|
||||
for index in itertools.count():
|
||||
name = bone_name(name_prefix, position, side, index)
|
||||
if name in bones:
|
||||
yield bones[name]
|
||||
else:
|
||||
break
|
||||
|
||||
|
||||
def find_wheelbrake_bone(bones, position, side, index):
|
||||
other_side = 'R' if side == 'L' else 'L'
|
||||
name_prefix = 'WheelBrake'
|
||||
bone = bones.get(bone_name(name_prefix, position, side, index))
|
||||
if bone:
|
||||
return bone
|
||||
bone = bones.get(bone_name(name_prefix, position, other_side, index))
|
||||
if bone:
|
||||
return bone
|
||||
if index > 0:
|
||||
bone = bones.get(bone_name(name_prefix, position, side))
|
||||
if bone:
|
||||
return bone
|
||||
bone = bones.get(bone_name(name_prefix, position, other_side))
|
||||
if bone:
|
||||
return bone
|
||||
backward_compatible_bone_name = '%s Wheels' % ('Front' if position == 'Ft' else 'Back')
|
||||
return bones.get(backward_compatible_bone_name)
|
||||
|
||||
|
||||
def clear_property_animation(context, property_name, remove_keyframes=True):
|
||||
if remove_keyframes and context.object.animation_data and context.object.animation_data.action:
|
||||
fcurve_datapath = '["%s"]' % property_name
|
||||
action = context.object.animation_data.action
|
||||
fcurve = action.fcurves.find(fcurve_datapath)
|
||||
if fcurve is not None:
|
||||
action.fcurves.remove(fcurve)
|
||||
context.object[property_name] = .0
|
||||
|
||||
|
||||
def create_property_animation(context, property_name):
|
||||
action = context.object.animation_data.action
|
||||
fcurve_datapath = '["%s"]' % property_name
|
||||
return action.fcurves.new(fcurve_datapath, index=0, action_group='Wheels rotation')
|
||||
|
||||
|
||||
class FCurvesEvaluator(object):
|
||||
"""Encapsulates a bunch of FCurves for vector animations."""
|
||||
|
||||
def __init__(self, fcurves, default_value):
|
||||
self.default_value = default_value
|
||||
self.fcurves = fcurves
|
||||
|
||||
def evaluate(self, f):
|
||||
result = []
|
||||
for fcurve, value in zip(self.fcurves, self.default_value):
|
||||
if fcurve is not None:
|
||||
result.append(fcurve.evaluate(f))
|
||||
else:
|
||||
result.append(value)
|
||||
return result
|
||||
|
||||
|
||||
class VectorFCurvesEvaluator(object):
|
||||
|
||||
def __init__(self, fcurves_evaluator):
|
||||
self.fcurves_evaluator = fcurves_evaluator
|
||||
|
||||
def evaluate(self, f):
|
||||
return mathutils.Vector(self.fcurves_evaluator.evaluate(f))
|
||||
|
||||
|
||||
class EulerToQuaternionFCurvesEvaluator(object):
|
||||
|
||||
def __init__(self, fcurves_evaluator):
|
||||
self.fcurves_evaluator = fcurves_evaluator
|
||||
|
||||
def evaluate(self, f):
|
||||
return mathutils.Euler(self.fcurves_evaluator.evaluate(f)).to_quaternion()
|
||||
|
||||
|
||||
class QuaternionFCurvesEvaluator(object):
|
||||
|
||||
def __init__(self, fcurves_evaluator):
|
||||
self.fcurves_evaluator = fcurves_evaluator
|
||||
|
||||
def evaluate(self, f):
|
||||
return mathutils.Quaternion(self.fcurves_evaluator.evaluate(f))
|
||||
|
||||
|
||||
def fix_old_steering_rotation(rig_object):
|
||||
"""
|
||||
Fix armature generated with Rigacar version < 6.0
|
||||
"""
|
||||
if rig_object.pose and rig_object.pose.bones:
|
||||
if 'MCH-Steering.rotation' in rig_object.pose.bones:
|
||||
rig_object.pose.bones['MCH-Steering.rotation'].rotation_mode = 'QUATERNION'
|
||||
|
||||
|
||||
def serialize_bake_options():
|
||||
# For older versions than 4.1
|
||||
if bpy.app.version < (4, 1, 0):
|
||||
return dict(
|
||||
only_selected=True,
|
||||
do_pose=True,
|
||||
do_object=False,
|
||||
do_visual_keying=True
|
||||
)
|
||||
# For latest versions
|
||||
return dict(bake_options=bpy_extras.anim_utils.BakeOptions(
|
||||
only_selected=True,
|
||||
do_pose=True,
|
||||
do_object=False,
|
||||
do_visual_keying=True,
|
||||
do_constraint_clear=False,
|
||||
do_parents_clear=False,
|
||||
do_clean=False,
|
||||
do_location=True,
|
||||
do_scale=True,
|
||||
do_rotation=True,
|
||||
do_bbone=True,
|
||||
do_custom_props=True
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
class BakingOperator(object):
|
||||
frame_start: bpy.props.IntProperty(name='Start Frame', min=1)
|
||||
frame_end: bpy.props.IntProperty(name='End Frame', min=1)
|
||||
keyframe_tolerance: bpy.props.FloatProperty(name='Keyframe tolerance', min=0, default=.01)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return ('Car Rig' in context.object.data and
|
||||
context.object.data['Car Rig'] and
|
||||
context.object.mode in ('POSE', 'OBJECT'))
|
||||
|
||||
def invoke(self, context, event):
|
||||
if context.object.animation_data is None:
|
||||
context.object.animation_data_create()
|
||||
if context.object.animation_data.action is None:
|
||||
context.object.animation_data.action = bpy.data.actions.new("%sAction" % context.object.name)
|
||||
|
||||
action = context.object.animation_data.action
|
||||
self.frame_start = int(action.frame_range[0])
|
||||
self.frame_end = int(action.frame_range[1])
|
||||
|
||||
return context.window_manager.invoke_props_dialog(self)
|
||||
|
||||
def draw(self, context):
|
||||
self.layout.use_property_split = True
|
||||
self.layout.use_property_decorate = False
|
||||
self.layout.prop(self, 'frame_start')
|
||||
self.layout.prop(self, 'frame_end')
|
||||
self.layout.prop(self, 'keyframe_tolerance')
|
||||
|
||||
def _create_euler_evaluator(self, action, source_bone):
|
||||
fcurve_name = 'pose.bones["%s"].rotation_euler' % source_bone.name
|
||||
fc_root_rot = [action.fcurves.find(fcurve_name, index=i) for i in range(3)]
|
||||
return EulerToQuaternionFCurvesEvaluator(FCurvesEvaluator(fc_root_rot, default_value=(.0, .0, .0)))
|
||||
|
||||
def _create_quaternion_evaluator(self, action, source_bone):
|
||||
fcurve_name = 'pose.bones["%s"].rotation_quaternion' % source_bone.name
|
||||
fc_root_rot = [action.fcurves.find(fcurve_name, index=i) for i in range(4)]
|
||||
return QuaternionFCurvesEvaluator(FCurvesEvaluator(fc_root_rot, default_value=(1.0, .0, .0, .0)))
|
||||
|
||||
def _create_location_evaluator(self, action, source_bone):
|
||||
fcurve_name = 'pose.bones["%s"].location' % source_bone.name
|
||||
fc_root_loc = [action.fcurves.find(fcurve_name, index=i) for i in range(3)]
|
||||
return VectorFCurvesEvaluator(FCurvesEvaluator(fc_root_loc, default_value=(.0, .0, .0)))
|
||||
|
||||
def _create_scale_evaluator(self, action, source_bone):
|
||||
fcurve_name = 'pose.bones["%s"].scale' % source_bone.name
|
||||
fc_root_loc = [action.fcurves.find(fcurve_name, index=i) for i in range(3)]
|
||||
return VectorFCurvesEvaluator(FCurvesEvaluator(fc_root_loc, default_value=(1.0, 1.0, 1.0)))
|
||||
|
||||
def _bake_action(self, context, *source_bones):
|
||||
action = context.object.animation_data.action
|
||||
nla_tweak_mode = context.object.animation_data.use_tweak_mode if hasattr(context.object.animation_data,
|
||||
'use_tweak_mode') else False
|
||||
|
||||
# saving context
|
||||
selected_bones = [b for b in context.object.data.bones if b.select]
|
||||
mode = context.object.mode
|
||||
for b in selected_bones:
|
||||
b.select = False
|
||||
|
||||
bpy.ops.object.mode_set(mode='OBJECT')
|
||||
source_bones_matrix_basis = []
|
||||
for source_bone in source_bones:
|
||||
source_bones_matrix_basis.append(context.object.pose.bones[source_bone.name].matrix_basis.copy())
|
||||
source_bone.select = True
|
||||
|
||||
bake_options = serialize_bake_options()
|
||||
baked_action = bpy_extras.anim_utils.bake_action(
|
||||
context.object,
|
||||
action=None,
|
||||
frames=range(self.frame_start, self.frame_end + 1),
|
||||
**bake_options
|
||||
)
|
||||
|
||||
# restoring context
|
||||
for source_bone, matrix_basis in zip(source_bones, source_bones_matrix_basis):
|
||||
context.object.pose.bones[source_bone.name].matrix_basis = matrix_basis
|
||||
source_bone.select = False
|
||||
for b in selected_bones:
|
||||
b.select = True
|
||||
|
||||
bpy.ops.object.mode_set(mode=mode)
|
||||
|
||||
if nla_tweak_mode:
|
||||
context.object.animation_data.use_tweak_mode = nla_tweak_mode
|
||||
else:
|
||||
context.object.animation_data.action = action
|
||||
|
||||
return baked_action
|
||||
|
||||
|
||||
class ANIM_OT_carWheelsRotationBake(bpy.types.Operator, BakingOperator):
|
||||
bl_idname = 'anim.car_wheels_rotation_bake'
|
||||
bl_label = 'Bake wheels rotation'
|
||||
bl_description = 'Automatically generates wheels animation based on Root bone animation.'
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
def execute(self, context):
|
||||
context.object['wheels_on_y_axis'] = False
|
||||
self._bake_wheels_rotation(context)
|
||||
return {'FINISHED'}
|
||||
|
||||
@cursor('WAIT')
|
||||
def _bake_wheels_rotation(self, context):
|
||||
bones = context.object.data.bones
|
||||
|
||||
wheel_bones = []
|
||||
brake_bones = []
|
||||
for position, side in itertools.product(('Ft', 'Bk'), ('L', 'R')):
|
||||
for index, wheel_bone in enumerate(bone_range(bones, 'MCH-Wheel.rotation', position, side)):
|
||||
wheel_bones.append(wheel_bone)
|
||||
brake_bones.append(find_wheelbrake_bone(bones, position, side, index) or wheel_bone)
|
||||
|
||||
for property_name in map(lambda wheel_bone: wheel_bone.name.replace('MCH-', ''), wheel_bones):
|
||||
clear_property_animation(context, property_name)
|
||||
|
||||
bones = set(wheel_bones + brake_bones)
|
||||
baked_action = self._bake_action(context, *bones)
|
||||
|
||||
if baked_action is None:
|
||||
self.report({'WARNING'}, "Existing action failed to bake. Won't bake wheel rotation")
|
||||
return
|
||||
|
||||
try:
|
||||
for wheel_bone, brake_bone in zip(wheel_bones, brake_bones):
|
||||
self._bake_wheel_rotation(context, baked_action, wheel_bone, brake_bone)
|
||||
finally:
|
||||
bpy.data.actions.remove(baked_action)
|
||||
|
||||
def _evaluate_distance_per_frame(self, action, bone, brake_bone):
|
||||
loc_evaluator = self._create_location_evaluator(action, bone)
|
||||
rot_evaluator = self._create_euler_evaluator(action, bone)
|
||||
brake_evaluator = self._create_scale_evaluator(action, brake_bone)
|
||||
|
||||
radius = bone.length if bone.length > .0 else 1.0
|
||||
bone_init_vector = (bone.head_local - bone.tail_local).normalized()
|
||||
prev_pos = loc_evaluator.evaluate(self.frame_start)
|
||||
prev_speed = 0
|
||||
distance = 0
|
||||
yield self.frame_start, distance
|
||||
for f in range(self.frame_start + 1, self.frame_end):
|
||||
pos = loc_evaluator.evaluate(f)
|
||||
speed_vector = pos - prev_pos
|
||||
speed_vector *= 2 * brake_evaluator.evaluate(f).y - 1
|
||||
rotation_quaternion = rot_evaluator.evaluate(f)
|
||||
bone_orientation = rotation_quaternion @ bone_init_vector
|
||||
speed = math.copysign(speed_vector.magnitude, bone_orientation.dot(speed_vector))
|
||||
speed /= radius
|
||||
drop_keyframe = False
|
||||
if speed == .0:
|
||||
drop_keyframe = prev_speed == speed
|
||||
elif prev_speed != .0:
|
||||
drop_keyframe = abs(1 - prev_speed / speed) < self.keyframe_tolerance / 10
|
||||
if not drop_keyframe:
|
||||
prev_speed = speed
|
||||
yield f - 1, distance
|
||||
distance += speed
|
||||
prev_pos = pos
|
||||
yield self.frame_end, distance
|
||||
|
||||
def _bake_wheel_rotation(self, context, baked_action, bone, brake_bone):
|
||||
fc_rot = create_property_animation(context, bone.name.replace('MCH-', ''))
|
||||
|
||||
# Reset the transform of the wheel bone, otherwise baking yields wrong results
|
||||
pb: bpy.types.PoseBone = context.object.pose.bones[bone.name]
|
||||
pb.matrix_basis.identity()
|
||||
|
||||
for f, distance in self._evaluate_distance_per_frame(baked_action, bone, brake_bone):
|
||||
kf = fc_rot.keyframe_points.insert(f, distance)
|
||||
kf.interpolation = 'LINEAR'
|
||||
kf.type = 'JITTER'
|
||||
|
||||
|
||||
class ANIM_OT_carSteeringBake(bpy.types.Operator, BakingOperator):
|
||||
bl_idname = 'anim.car_steering_bake'
|
||||
bl_label = 'Bake car steering'
|
||||
bl_description = 'Automatically generates steering animation based on Root bone animation.'
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
rotation_factor: bpy.props.FloatProperty(name='Rotation factor', min=.1, default=1)
|
||||
|
||||
def draw(self, context):
|
||||
self.layout.use_property_split = True
|
||||
self.layout.use_property_decorate = False
|
||||
self.layout.prop(self, 'frame_start')
|
||||
self.layout.prop(self, 'frame_end')
|
||||
self.layout.prop(self, 'rotation_factor')
|
||||
self.layout.prop(self, 'keyframe_tolerance')
|
||||
|
||||
def execute(self, context):
|
||||
if self.frame_end > self.frame_start:
|
||||
if 'Steering' in context.object.data.bones and 'MCH-Steering.rotation' in context.object.data.bones:
|
||||
steering = context.object.data.bones['Steering']
|
||||
mch_steering_rotation = context.object.data.bones['MCH-Steering.rotation']
|
||||
bone_offset = abs(steering.head_local.y - mch_steering_rotation.head_local.y)
|
||||
self._bake_steering_rotation(context, bone_offset, mch_steering_rotation)
|
||||
return {'FINISHED'}
|
||||
|
||||
def _evaluate_rotation_per_frame(self, action, bone_offset, bone):
|
||||
loc_evaluator = self._create_location_evaluator(action, bone)
|
||||
rot_evaluator = self._create_quaternion_evaluator(action, bone)
|
||||
|
||||
distance_threshold = pow(bone_offset * max(self.keyframe_tolerance, .001), 2)
|
||||
steering_threshold = bone_offset * self.keyframe_tolerance * .1
|
||||
bone_direction_vector = (bone.head_local - bone.tail_local).normalized()
|
||||
bone_normal_vector = mathutils.Vector((1, 0, 0))
|
||||
|
||||
current_pos = loc_evaluator.evaluate(self.frame_start)
|
||||
previous_steering_position = None
|
||||
for f in range(self.frame_start, self.frame_end - 1):
|
||||
next_pos = loc_evaluator.evaluate(f + 1)
|
||||
steering_direction_vector = next_pos - current_pos
|
||||
|
||||
if steering_direction_vector.length_squared < distance_threshold:
|
||||
continue
|
||||
|
||||
rotation_quaternion = rot_evaluator.evaluate(f)
|
||||
world_space_bone_direction_vector = rotation_quaternion @ bone_direction_vector
|
||||
world_space_bone_normal_vector = rotation_quaternion @ bone_normal_vector
|
||||
|
||||
projected_steering_direction = steering_direction_vector.dot(world_space_bone_direction_vector)
|
||||
if projected_steering_direction == 0:
|
||||
continue
|
||||
|
||||
length_ratio = bone_offset * self.rotation_factor / projected_steering_direction
|
||||
steering_direction_vector *= length_ratio
|
||||
|
||||
steering_position = mathutils.geometry.distance_point_to_plane(steering_direction_vector,
|
||||
world_space_bone_direction_vector,
|
||||
world_space_bone_normal_vector)
|
||||
|
||||
if previous_steering_position is not None \
|
||||
and abs(steering_position - previous_steering_position) < steering_threshold:
|
||||
continue
|
||||
|
||||
yield f, steering_position
|
||||
current_pos = next_pos
|
||||
previous_steering_position = steering_position
|
||||
|
||||
@cursor('WAIT')
|
||||
def _bake_steering_rotation(self, context, bone_offset, bone):
|
||||
clear_property_animation(context, 'Steering.rotation')
|
||||
fix_old_steering_rotation(context.object)
|
||||
fc_rot = create_property_animation(context, 'Steering.rotation')
|
||||
|
||||
baked_action = self._bake_action(context, bone)
|
||||
if baked_action is None:
|
||||
self.report({'WARNING'}, "Existing action failed to bake. Won't bake steering rotation")
|
||||
return
|
||||
|
||||
try:
|
||||
# Reset the transform of the steering bone, because baking action manipulates the transform
|
||||
# and evaluate_rotation_frame expects it at it's default position
|
||||
pb: bpy.types.PoseBone = context.object.pose.bones[bone.name]
|
||||
pb.matrix_basis.identity()
|
||||
|
||||
for f, steering_pos in self._evaluate_rotation_per_frame(baked_action, bone_offset, bone):
|
||||
kf = fc_rot.keyframe_points.insert(f, steering_pos)
|
||||
kf.type = 'JITTER'
|
||||
kf.interpolation = 'LINEAR'
|
||||
finally:
|
||||
bpy.data.actions.remove(baked_action)
|
||||
|
||||
|
||||
class ANIM_OT_carClearSteeringWheelsRotation(bpy.types.Operator):
|
||||
bl_idname = "anim.car_clear_steering_wheels_rotation"
|
||||
bl_label = "Clear baked animation"
|
||||
bl_description = "Clear generated rotation for steering and wheels"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
clear_steering: bpy.props.BoolProperty(name="Steering", description="Clear generated animation for steering",
|
||||
default=True)
|
||||
clear_wheels: bpy.props.BoolProperty(name="Wheels", description="Clear generated animation for wheels",
|
||||
default=True)
|
||||
|
||||
def draw(self, context):
|
||||
self.layout.use_property_decorate = False
|
||||
self.layout.label(text='Clear generated keyframes for')
|
||||
self.layout.prop(self, property='clear_steering')
|
||||
self.layout.prop(self, property='clear_wheels')
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.object is not None and context.object.data is not None and context.object.data.get('Car Rig')
|
||||
|
||||
def execute(self, context):
|
||||
re_wheel_propname = re.compile(r'^Wheel\.rotation\.(Ft|Bk)\.[LR](\.\d+)?$')
|
||||
for prop in context.object.keys():
|
||||
if prop == 'Steering.rotation':
|
||||
clear_property_animation(context, prop, remove_keyframes=self.clear_steering)
|
||||
elif re_wheel_propname.match(prop):
|
||||
clear_property_animation(context, prop, remove_keyframes=self.clear_wheels)
|
||||
# this is a hack to force Blender to take into account the modification
|
||||
# of the properties by changing the object mode.
|
||||
# Don't know yet if it is specific to blender 2.80
|
||||
mode = context.object.mode
|
||||
bpy.ops.object.mode_set(mode='OBJECT' if mode == 'POSE' else 'POSE')
|
||||
bpy.ops.object.mode_set(mode=mode)
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
bpy.utils.register_class(ANIM_OT_carWheelsRotationBake)
|
||||
bpy.utils.register_class(ANIM_OT_carSteeringBake)
|
||||
bpy.utils.register_class(ANIM_OT_carClearSteeringWheelsRotation)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.utils.unregister_class(ANIM_OT_carClearSteeringWheelsRotation)
|
||||
bpy.utils.unregister_class(ANIM_OT_carSteeringBake)
|
||||
bpy.utils.unregister_class(ANIM_OT_carWheelsRotationBake)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,475 @@
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 3
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import bpy
|
||||
|
||||
COLLECTION_NAME = 'Rigacar widgets'
|
||||
|
||||
|
||||
def create():
|
||||
if COLLECTION_NAME not in bpy.data.collections:
|
||||
c = bpy.data.collections.new(COLLECTION_NAME)
|
||||
c.hide_viewport = True
|
||||
c.hide_render = True
|
||||
c.hide_select = True
|
||||
|
||||
widgets_collection = bpy.data.collections[COLLECTION_NAME]
|
||||
|
||||
if COLLECTION_NAME not in bpy.context.scene.collection.children:
|
||||
bpy.context.scene.collection.children.link(widgets_collection)
|
||||
|
||||
for name, widget in get_widgets().items():
|
||||
object_name = 'WGT-CarRig.%s' % name
|
||||
if object_name not in bpy.data.objects:
|
||||
m = bpy.data.meshes.new(object_name)
|
||||
m.from_pydata(widget['vertices'], widget['edges'], [])
|
||||
o = bpy.data.objects.new(object_name, m)
|
||||
else:
|
||||
o = bpy.data.objects[object_name]
|
||||
|
||||
if object_name not in widgets_collection.objects:
|
||||
widgets_collection.objects.link(o)
|
||||
|
||||
|
||||
def get_widgets():
|
||||
"""
|
||||
Return array of data compatible with method Mesh.from_pydata.
|
||||
To get data in Blender from the selected object, use:
|
||||
{'vertices': [v.co[:] for v in bpy.context.object.data.vertices], 'edges': [e.vertices[:] for e in bpy.context.object.data.edges]}
|
||||
"""
|
||||
widgets = {}
|
||||
widgets['DriftHandle'] = {
|
||||
'vertices': [(0.560016930103302, 3.5614462490229926e-07, 0.0), (0.5472726821899414, 0.051212746649980545, 0.0),
|
||||
(0.5173879265785217, 0.09973714500665665, 0.0), (0.4643173813819885, 0.14344893395900726, 0.0),
|
||||
(0.3959912657737732, 0.1842898577451706, 0.0), (0.3111281096935272, 0.21670186519622803, 0.0),
|
||||
(0.21430844068527222, 0.2407861351966858, 0.0), (0.10925304144620895, 0.2556171119213104, 0.0),
|
||||
(0.5551204085350037, 0.025475479662418365, 0.0), (0.5348702073097229, 0.07644488662481308, 0.0),
|
||||
(0.4915122985839844, 0.12226644158363342, 0.0), (0.4308139681816101, 0.1645427942276001, 0.0),
|
||||
(0.3535597026348114, 0.2004958689212799, 0.0), (0.2627182900905609, 0.22874398529529572, 0.0),
|
||||
(0.16178074479103088, 0.2482016384601593, 0.0), (0.05462652072310448, 0.2581210136413574, 0.0),
|
||||
(0.4683051109313965, 2.978201791847823e-07, 0.0), (0.46016228199005127, 0.03240064159035683, 0.0),
|
||||
(0.43346360325813293, 0.06059274449944496, 0.0), (0.38938117027282715, 0.08542850613594055, 0.0),
|
||||
(0.33114129304885864, 0.110313281416893, 0.0), (0.2601758539676666, 0.13103415071964264, 0.0),
|
||||
(0.17921197414398193, 0.1465274840593338, 0.0), (0.09136109799146652, 0.15609556436538696, 0.0),
|
||||
(0.4649912118911743, 0.015658844262361526, 0.0), (0.450432151556015, 0.04798557236790657, 0.0),
|
||||
(0.41178521513938904, 0.07347165793180466, 0.0), (0.3602612316608429, 0.09748400002717972, 0.0),
|
||||
(0.29565858840942383, 0.12036669254302979, 0.0), (0.21969391405582428, 0.13851231336593628, 0.0),
|
||||
(0.13528653979301453, 0.15106302499771118, 0.0), (0.04568054899573326, 0.15747304260730743, 0.0),
|
||||
(-0.560016930103302, 3.5614462490229926e-07, 0.0),
|
||||
(-0.5472726821899414, 0.051212746649980545, 0.0),
|
||||
(-0.5173879265785217, 0.09973714500665665, 0.0), (-0.46497008204460144, 0.14364132285118103, 0.0),
|
||||
(-0.3959912657737732, 0.1842898577451706, 0.0), (-0.3111281096935272, 0.21670186519622803, 0.0),
|
||||
(-0.21430844068527222, 0.2407861351966858, 0.0), (-0.10925304144620895, 0.2556171119213104, 0.0),
|
||||
(-0.5551204085350037, 0.025475479662418365, 0.0), (-0.5348702073097229, 0.07644488662481308, 0.0),
|
||||
(-0.4915122985839844, 0.12226644158363342, 0.0), (-0.4308139681816101, 0.1645427942276001, 0.0),
|
||||
(-0.3535597026348114, 0.2004958689212799, 0.0), (-0.2627182900905609, 0.22874398529529572, 0.0),
|
||||
(-0.16178074479103088, 0.2482016384601593, 0.0), (-0.05462652072310448, 0.2581210136413574, 0.0),
|
||||
(-0.4683051109313965, 2.978201791847823e-07, 0.0),
|
||||
(-0.46016228199005127, 0.03240064159035683, 0.0),
|
||||
(-0.43346360325813293, 0.06059274449944496, 0.0), (-0.38938117027282715, 0.08542850613594055, 0.0),
|
||||
(-0.33114129304885864, 0.110313281416893, 0.0), (-0.2601758539676666, 0.13103415071964264, 0.0),
|
||||
(-0.17921197414398193, 0.1465274840593338, 0.0), (-0.09136109799146652, 0.15609556436538696, 0.0),
|
||||
(-0.4649912118911743, 0.015658844262361526, 0.0), (-0.450432151556015, 0.04798557236790657, 0.0),
|
||||
(-0.41178521513938904, 0.07347165793180466, 0.0), (-0.3602612316608429, 0.09748400002717972, 0.0),
|
||||
(-0.29565858840942383, 0.12036669254302979, 0.0), (-0.21969391405582428, 0.13851231336593628, 0.0),
|
||||
(-0.13528653979301453, 0.15106302499771118, 0.0), (-0.04568054899573326, 0.15747304260730743, 0.0),
|
||||
(0.0, 0.26062488555908203, 0.0), (0.0, 0.15932999551296234, 0.0)],
|
||||
'edges': [(8, 0), (9, 1), (10, 2), (11, 3), (12, 4), (13, 5), (14, 6), (15, 7), (1, 8), (2, 9), (3, 10),
|
||||
(4, 11), (5, 12), (6, 13), (7, 14), (64, 15), (24, 16), (25, 17), (26, 18), (27, 19), (28, 20),
|
||||
(29, 21), (30, 22), (31, 23), (17, 24), (18, 25), (19, 26), (20, 27), (21, 28), (22, 29), (23, 30),
|
||||
(65, 31), (0, 16), (24, 8), (1, 17), (25, 9), (40, 32), (41, 33), (42, 34), (43, 35), (44, 36),
|
||||
(45, 37), (46, 38), (47, 39), (33, 40), (34, 41), (35, 42), (36, 43), (37, 44), (38, 45), (39, 46),
|
||||
(64, 47), (56, 48), (57, 49), (58, 50), (59, 51), (60, 52), (61, 53), (62, 54), (63, 55), (49, 56),
|
||||
(50, 57), (51, 58), (52, 59), (53, 60), (54, 61), (55, 62), (65, 63), (32, 48), (56, 40), (33, 49),
|
||||
(57, 41)]
|
||||
}
|
||||
|
||||
widgets['Root'] = {
|
||||
'vertices': [(-0.5, -0.8844379782676697, 0.0), (-0.3844379782676697, -1.0, 0.0),
|
||||
(-0.4912033677101135, -0.9286617040634155, 0.0), (-0.4661526679992676, -0.9661527276039124, 0.0),
|
||||
(-0.42866164445877075, -0.9912034273147583, 0.0), (0.3844379782676697, -1.0, 0.0),
|
||||
(0.5, -0.8844379782676697, 0.0), (0.42866164445877075, -0.9912034273147583, 0.0),
|
||||
(0.4661526679992676, -0.9661527276039124, 0.0), (0.4912033677101135, -0.9286617040634155, 0.0),
|
||||
(-0.5, 0.8844379782676697, 0.0), (-0.3844379782676697, 1.0, 0.0),
|
||||
(-0.4912033677101135, 0.9286617040634155, 0.0), (-0.4661526679992676, 0.9661527276039124, 0.0),
|
||||
(-0.42866164445877075, 0.9912034273147583, 0.0), (0.5, 0.8844379782676697, 0.0),
|
||||
(0.3844379782676697, 1.0, 0.0), (0.4912033677101135, 0.9286617040634155, 0.0),
|
||||
(0.4661526679992676, 0.9661527276039124, 0.0), (0.42866164445877075, 0.9912034273147583, 0.0),
|
||||
(0.1234154999256134, -1.0, 0.0), (-0.1234154999256134, -1.0, 0.0),
|
||||
(0.1234154999256134, -1.0971899032592773, 0.0), (-0.1234154999256134, -1.0971899032592773, 0.0),
|
||||
(0.3031257688999176, -1.0971899032592773, 0.0), (-0.3031257688999176, -1.0971899032592773, 0.0),
|
||||
(0.0, -1.25, 0.0)],
|
||||
'edges': [(0, 2), (2, 3), (3, 4), (4, 1), (5, 7), (7, 8), (8, 9), (9, 6), (10, 12), (12, 13), (13, 14),
|
||||
(14, 11), (15, 17), (17, 18), (18, 19), (19, 16), (0, 10), (6, 15), (11, 16), (20, 5), (21, 1),
|
||||
(22, 20), (23, 21), (24, 22), (25, 23), (26, 24), (26, 25)]
|
||||
}
|
||||
|
||||
widgets['GroundSensor'] = {
|
||||
'vertices': [(-0.5, -0.822191596031189, 0.0), (-0.32219159603118896, -1.0, 0.0),
|
||||
(-0.4761781692504883, -0.9110957980155945, 0.0), (-0.4110957980155945, -0.9761781692504883, 0.0),
|
||||
(0.32219159603118896, -1.0, 0.0), (0.5, -0.822191596031189, 0.0),
|
||||
(0.4110957980155945, -0.9761781692504883, 0.0), (0.47617819905281067, -0.9110957980155945, 0.0),
|
||||
(-0.5, 0.822191596031189, 0.0), (-0.32219159603118896, 1.0, 0.0),
|
||||
(-0.4761781692504883, 0.9110957980155945, 0.0), (-0.4110957980155945, 0.9761781692504883, 0.0),
|
||||
(0.5, 0.822191596031189, 0.0), (0.32219159603118896, 1.0, 0.0),
|
||||
(0.4761781692504883, 0.9110957980155945, 0.0), (0.4110957980155945, 0.9761781692504883, 0.0)],
|
||||
'edges': [(0, 2), (2, 3), (3, 1), (4, 6), (6, 7), (7, 5), (8, 10), (10, 11), (11, 9), (12, 14), (14, 15),
|
||||
(15, 13), (0, 8), (1, 4), (5, 12), (9, 13)]
|
||||
}
|
||||
|
||||
widgets['GroundSensor.Axle'] = {
|
||||
'vertices': [(0.0, 0.5, 0.0), (-0.19134172797203064, 0.4619397521018982, 0.0),
|
||||
(-0.3535533845424652, 0.3535533845424652, 0.0), (-0.4619397521018982, 0.19134171307086945, 0.0),
|
||||
(-0.5, -2.1855694143368964e-08, 0.0), (-0.4619397521018982, -0.19134175777435303, 0.0),
|
||||
(-0.3535533845424652, -0.3535533845424652, 0.0), (-0.19134174287319183, -0.4619397521018982, 0.0),
|
||||
(-7.549790126404332e-08, -0.5, 0.0), (0.1913416087627411, -0.46193981170654297, 0.0),
|
||||
(0.35355329513549805, -0.35355350375175476, 0.0), (0.4619397521018982, -0.19134178757667542, 0.0),
|
||||
(0.5, 5.962440319251527e-09, 0.0), (0.4619397222995758, 0.1913418024778366, 0.0),
|
||||
(0.35355326533317566, 0.35355350375175476, 0.0), (0.19134148955345154, 0.46193987131118774, 0.0),
|
||||
(0.0, 0.2866188585758209, 0.0), (-0.1096842959523201, 0.2648012936115265, 0.0),
|
||||
(-0.2026701420545578, 0.2026701420545578, 0.0), (-0.2648012936115265, 0.1096842885017395, 0.0),
|
||||
(-0.2866188585758209, -1.2528508008813333e-08, 0.0),
|
||||
(-0.2648012936115265, -0.10968431085348129, 0.0), (-0.2026701420545578, -0.2026701420545578, 0.0),
|
||||
(-0.1096843034029007, -0.2648012936115265, 0.0),
|
||||
(-4.327824498773225e-08, -0.2866188585758209, 0.0),
|
||||
(0.10968422889709473, -0.2648013234138489, 0.0), (0.20267008244991302, -0.20267020165920258, 0.0),
|
||||
(0.2648012936115265, -0.10968433320522308, 0.0), (0.2866188585758209, 3.4178957442065894e-09, 0.0),
|
||||
(0.2648012638092041, 0.10968434065580368, 0.0), (0.20267006754875183, 0.20267020165920258, 0.0),
|
||||
(0.10968416184186935, 0.26480135321617126, 0.0), (-2.1639122493866125e-08, 0.0, 0.0)],
|
||||
'edges': [(1, 0), (2, 1), (3, 2), (4, 3), (5, 4), (6, 5), (7, 6), (8, 7), (9, 8), (10, 9), (11, 10), (12, 11),
|
||||
(13, 12), (14, 13), (15, 14), (0, 15), (17, 16), (18, 17), (19, 18), (20, 19), (21, 20), (22, 21),
|
||||
(23, 22), (24, 23), (25, 24), (26, 25), (27, 26), (28, 27), (29, 28), (30, 29), (31, 30), (16, 31),
|
||||
(32, 24), (16, 32), (20, 32), (28, 32)]}
|
||||
widgets['Wheel'] = {
|
||||
'vertices': [(0, 0.9999999403953552, -1.1874362826347351e-07), (0, 0.9807851910591125, 0.19509020447731018),
|
||||
(0, 0.9238794445991516, 0.38268333673477173), (0, 0.8314695358276367, 0.555570125579834),
|
||||
(0, 0.7071067094802856, 0.7071066498756409), (0, 0.555570125579834, 0.8314695358276367),
|
||||
(0, 0.3826833963394165, 0.9238793849945068), (0, 0.19509033858776093, 0.9807851314544678),
|
||||
(0, 7.549790836947068e-08, 0.9999998807907104), (0, -0.195090189576149, 0.9807851910591125),
|
||||
(0, -0.38268324732780457, 0.9238794445991516), (0, -0.555570125579834, 0.8314695358276367),
|
||||
(0, -0.7071067094802856, 0.7071066498756409), (0, -0.8314695954322815, 0.5555700659751892),
|
||||
(0, -0.9238795638084412, 0.3826831579208374), (0, -0.9807852506637573, 0.19508996605873108),
|
||||
(0, -0.9999998211860657, -4.445849981493666e-07), (0, -0.9807851314544678, -0.19509084522724152),
|
||||
(0, -0.9238792657852173, -0.38268399238586426), (0, -0.8314692378044128, -0.5555708408355713),
|
||||
(0, -0.7071062922477722, -0.7071073651313782), (0, -0.555569589138031, -0.8314701318740845),
|
||||
(0, -0.3826826512813568, -0.9238799810409546), (0, -0.1950894445180893, -0.9807855486869812),
|
||||
(0, 9.655991561885457e-07, -1.0000001192092896), (0, 0.1950913369655609, -0.9807851910591125),
|
||||
(0, 0.3826844394207001, -0.9238792061805725), (0, 0.5555711984634399, -0.8314690589904785),
|
||||
(0, 0.7071076035499573, -0.7071059942245483), (0, 0.8314703106880188, -0.5555692315101624),
|
||||
(0, 0.9238800406455994, -0.382682204246521), (0, 0.9807854890823364, -0.1950889378786087),
|
||||
(0, 0.9439931511878967, -1.099180622077256e-07), (0, 0.9258545637130737, 0.18416382372379303),
|
||||
(0, 0.8721359372138977, 0.36125046014785767), (0, 0.7849016189575195, 0.5244544148445129),
|
||||
(0, 0.6675039529800415, 0.667503833770752), (0, 0.5244544148445129, 0.7849015593528748),
|
||||
(0, 0.36125051975250244, 0.8721358180046082), (0, 0.18416395783424377, 0.9258544445037842),
|
||||
(0, 8.652769167838414e-08, 0.9439930319786072), (0, -0.18416379392147064, 0.925854504108429),
|
||||
(0, -0.3612503409385681, 0.8721358776092529), (0, -0.5244543552398682, 0.7849015593528748),
|
||||
(0, -0.6675038933753967, 0.667503833770752), (0, -0.7849015593528748, 0.5244543552398682),
|
||||
(0, -0.8721359372138977, 0.36125028133392334), (0, -0.9258545637130737, 0.18416360020637512),
|
||||
(0, -0.9439929723739624, -4.1751010826374113e-07), (0, -0.9258544445037842, -0.18416441977024078),
|
||||
(0, -0.8721356987953186, -0.3612510859966278), (0, -0.7849012613296509, -0.5244550704956055),
|
||||
(0, -0.6675034761428833, -0.6675045490264893), (0, -0.52445387840271, -0.7849021553993225),
|
||||
(0, -0.36124980449676514, -0.8721364140510559), (0, -0.18416307866573334, -0.9258548617362976),
|
||||
(0, 9.267772043131117e-07, -0.9439932703971863), (0, 0.18416491150856018, -0.925854504108429),
|
||||
(0, 0.36125150322914124, -0.8721356987953186), (0, 0.5244554281234741, -0.7849010825157166),
|
||||
(0, 0.6675047874450684, -0.6675032377243042), (0, 0.7849022746086121, -0.5244535803794861),
|
||||
(0, 0.8721364140510559, -0.3612493872642517), (0, 0.9258548021316528, -0.18416263163089752)],
|
||||
'edges': [(1, 0), (2, 1), (3, 2), (4, 3), (5, 4), (6, 5), (7, 6), (8, 7), (9, 8), (10, 9), (11, 10), (12, 11),
|
||||
(13, 12), (14, 13), (15, 14), (16, 15), (17, 16), (18, 17), (19, 18), (20, 19), (21, 20), (22, 21),
|
||||
(23, 22), (24, 23), (25, 24), (26, 25), (27, 26), (28, 27), (29, 28), (30, 29), (31, 30), (0, 31),
|
||||
(33, 32), (34, 33), (35, 34), (36, 35), (37, 36), (38, 37), (39, 38), (40, 39), (41, 40), (42, 41),
|
||||
(43, 42), (44, 43), (45, 44), (46, 45), (47, 46), (48, 47), (49, 48), (50, 49), (51, 50), (52, 51),
|
||||
(53, 52), (54, 53), (55, 54), (56, 55), (57, 56), (58, 57), (59, 58), (60, 59), (61, 60), (62, 61),
|
||||
(63, 62), (32, 63)]
|
||||
}
|
||||
|
||||
widgets['WheelBrake'] = {
|
||||
'vertices': [(0, 0.8759009838104248, -1.0943974615429397e-07), (0, 0.8590707778930664, 0.17087969183921814),
|
||||
(0, 0.728285014629364, 0.48662444949150085), (0, 0.6193554997444153, 0.6193553805351257),
|
||||
(0, 0.48662441968917847, 0.7282849550247192), (0, 0.17087985575199127, 0.8590706586837769),
|
||||
(0, 1.0010809603500093e-07, 0.8759008646011353), (0, -0.17087966203689575, 0.8590707182884216),
|
||||
(0, -0.48662441968917847, 0.7282849550247192), (0, -0.6193554401397705, 0.6193553805351257),
|
||||
(0, -0.728285014629364, 0.4866243898868561), (0, -0.8590707182884216, 0.17087948322296143),
|
||||
(0, -0.8759008049964905, -3.948445055357297e-07), (0, -0.8590705990791321, -0.1708802729845047),
|
||||
(0, -0.7282846570014954, -0.4866250157356262), (0, -0.6193550825119019, -0.6193560361862183),
|
||||
(0, -0.48662394285202026, -0.7282854914665222), (0, -0.17087900638580322, -0.8590710163116455),
|
||||
(0, 8.797486543699051e-07, -0.8759011626243591), (0, 0.17088072001934052, -0.8590707182884216),
|
||||
(0, 0.4866253733634949, -0.7282845973968506), (0, 0.6193562746047974, -0.6193548440933228),
|
||||
(0, 0.7282857298851013, -0.486623615026474), (0, 0.8590710163116455, -0.170878604054451),
|
||||
(0, 0.7276514172554016, -1.0585000609353301e-07), (0, 0.7136697769165039, 0.14195764064788818),
|
||||
(0, 0.6050200462341309, 0.40426141023635864), (0, 0.5145272016525269, 0.5145270824432373),
|
||||
(0, 0.40426141023635864, 0.6050199270248413), (0, 0.14195780456066132, 0.7136696577072144),
|
||||
(0, 9.063110439910815e-08, 0.7276512980461121), (0, -0.141957625746727, 0.7136697173118591),
|
||||
(0, -0.40426141023635864, 0.6050199270248413), (0, -0.5145271420478821, 0.5145270824432373),
|
||||
(0, -0.6050199866294861, 0.40426138043403625), (0, -0.7136697173118591, 0.14195746183395386),
|
||||
(0, -0.7276512384414673, -3.429489368045324e-07), (0, -0.7136696577072144, -0.14195814728736877),
|
||||
(0, -0.6050196886062622, -0.40426191687583923), (0, -0.514526903629303, -0.5145276784896851),
|
||||
(0, -0.4042609930038452, -0.6050204634666443), (0, -0.141957089304924, -0.713670015335083),
|
||||
(0, 7.383145543826686e-07, -0.7276515960693359), (0, 0.14195851981639862, -0.7136697769165039),
|
||||
(0, 0.4042621850967407, -0.6050196886062622), (0, 0.5145279169082642, -0.5145267248153687),
|
||||
(0, 0.6050206422805786, -0.4042607545852661), (0, 0.713670015335083, -0.14195676147937775),
|
||||
(0, 0.695227324962616, -1.0113333814842917e-07), (0, 0.6818687319755554, 0.13563202321529388),
|
||||
(0, 0.5780603885650635, 0.38624757528305054), (0, 0.4915999174118042, 0.49159979820251465),
|
||||
(0, 0.38624757528305054, 0.5780603289604187), (0, 0.13563217222690582, 0.6818686127662659),
|
||||
(0, 8.659259265186847e-08, 0.6952272057533264), (0, -0.1356320083141327, 0.6818686723709106),
|
||||
(0, -0.38624757528305054, 0.5780603289604187), (0, -0.4915998578071594, 0.49159979820251465),
|
||||
(0, -0.5780603885650635, 0.38624754548072815), (0, -0.6818686723709106, 0.13563185930252075),
|
||||
(0, -0.6952271461486816, -3.276671804997022e-07), (0, -0.6818686127662659, -0.1356325000524521),
|
||||
(0, -0.5780600905418396, -0.38624805212020874), (0, -0.4915996491909027, -0.49160036444664),
|
||||
(0, -0.3862471580505371, -0.5780608057975769), (0, -0.1356315016746521, -0.6818689703941345),
|
||||
(0, 7.054153456920176e-07, -0.6952275037765503), (0, 0.13563285768032074, -0.6818687319755554),
|
||||
(0, 0.38624829053878784, -0.5780600905418396), (0, 0.4916006028652191, -0.4915994703769684),
|
||||
(0, 0.5780609846115112, -0.3862469494342804), (0, 0.6818689703941345, -0.13563118875026703),
|
||||
(0, 0.670251727104187, -9.750018392651327e-08), (0, 0.6573730111122131, 0.13075952231884003),
|
||||
(0, 0.5572939515113831, 0.3723718822002411), (0, 0.4739395081996918, 0.4739393889904022),
|
||||
(0, 0.3723718822002411, 0.5572938919067383), (0, 0.13075967133045197, 0.6573728919029236),
|
||||
(0, 8.348180813300132e-08, 0.6702516078948975), (0, -0.13075950741767883, 0.6573729515075684),
|
||||
(0, -0.3723718822002411, 0.5572938919067383), (0, -0.473939448595047, 0.4739393889904022),
|
||||
(0, -0.5572939515113831, 0.3723718523979187), (0, -0.6573729515075684, 0.1307593733072281),
|
||||
(0, -0.6702515482902527, -3.158959316351684e-07), (0, -0.6573728919029236, -0.13075998425483704),
|
||||
(0, -0.5572936534881592, -0.3723723292350769), (0, -0.4739392399787903, -0.4739399254322052),
|
||||
(0, -0.37237146496772766, -0.5572943091392517), (0, -0.13075903058052063, -0.6573732495307922),
|
||||
(0, 6.800737537560053e-07, -0.6702519059181213), (0, 0.1307603269815445, -0.6573730111122131),
|
||||
(0, 0.372372567653656, -0.5572936534881592), (0, 0.4739401638507843, -0.47393906116485596),
|
||||
(0, 0.557294487953186, -0.37237125635147095), (0, 0.6573732495307922, -0.13075871765613556)],
|
||||
'edges': [(1, 0), (3, 2), (4, 3), (6, 5), (7, 6), (9, 8), (10, 9), (12, 11), (13, 12), (15, 14), (16, 15),
|
||||
(18, 17), (19, 18), (21, 20), (22, 21), (0, 23), (25, 24), (27, 26), (28, 27), (30, 29), (31, 30),
|
||||
(33, 32), (34, 33), (36, 35), (37, 36), (39, 38), (40, 39), (42, 41), (43, 42), (45, 44), (46, 45),
|
||||
(24, 47), (34, 10), (46, 22), (11, 35), (25, 1), (23, 47), (37, 13), (2, 26), (14, 38), (28, 4),
|
||||
(40, 16), (5, 29), (17, 41), (31, 7), (43, 19), (8, 32), (20, 44), (49, 48), (51, 50), (52, 51),
|
||||
(54, 53), (55, 54), (57, 56), (58, 57), (60, 59), (61, 60), (63, 62), (64, 63), (66, 65), (67, 66),
|
||||
(69, 68), (70, 69), (48, 71), (73, 72), (75, 74), (76, 75), (78, 77), (79, 78), (81, 80), (82, 81),
|
||||
(84, 83), (85, 84), (87, 86), (88, 87), (90, 89), (91, 90), (93, 92), (94, 93), (72, 95)]
|
||||
}
|
||||
|
||||
widgets['Steering'] = {
|
||||
'vertices': [(0.7296777367591858, 0.07034172862768173, 0.0), (0.057004380971193314, -0.07034172862768173, 0.0),
|
||||
(0.7296777367591858, -0.07034172862768173, 0.0),
|
||||
(0.057004380971193314, 0.07034172862768173, 0.0), (0.7296777367591858, 0.16664999723434448, 0.0),
|
||||
(0.7296777367591858, -0.16664999723434448, 0.0),
|
||||
(0.9998999834060669, 0.0, 0.0), (-0.7296777367591858, 0.07034172862768173, 0.0),
|
||||
(-0.057004380971193314, -0.07034172862768173, 0.0),
|
||||
(-0.7296777367591858, -0.07034172862768173, 0.0),
|
||||
(-0.057004380971193314, 0.07034172862768173, 0.0), (-0.7296777367591858, 0.16664999723434448, 0.0),
|
||||
(-0.7296777367591858, -0.16664999723434448, 0.0), (-0.9998999834060669, 0.0, 0.0)],
|
||||
'edges': [(2, 1), (3, 0), (1, 3), (0, 4), (5, 2), (4, 6), (6, 5), (9, 8), (10, 7), (8, 10), (7, 11), (12, 9),
|
||||
(11, 13), (13, 12)]
|
||||
}
|
||||
|
||||
widgets['Suspension'] = {
|
||||
'vertices': [(-0.42728525400161743, -0.12928833067417145, -0.04404989629983902),
|
||||
(-0.06909304857254028, 0.2578587830066681, 0.0),
|
||||
(-0.13347753882408142, 0.23118986189365387, 0.0), (-0.1887657195329666, 0.1887657195329666, 0.0),
|
||||
(-0.23118992149829865, 0.13347753882408142, 0.0), (-0.2578587830066681, 0.06909307092428207, 0.0),
|
||||
(-0.42728525400161743, -0.06909316033124924, -0.025838270783424377),
|
||||
(-0.2578587830066681, -0.06909302622079849, 0.0),
|
||||
(-0.23118986189365387, -0.13347747921943665, 0.0),
|
||||
(-0.18876579403877258, -0.18876568973064423, 0.0),
|
||||
(-0.1334775984287262, -0.23118983209133148, 0.0), (-0.06909313797950745, -0.2578587532043457, 0.0),
|
||||
(-0.42728525400161743, 0.06909292191267014, -0.025838270783424377),
|
||||
(0.06909293681383133, -0.2578587830066681, 0.0),
|
||||
(0.13347743451595306, -0.23118995130062103, 0.0), (0.18876565992832184, -0.18876583874225616, 0.0),
|
||||
(0.23118983209133148, -0.1334775984287262, 0.0), (0.2578587532043457, -0.06909316033124924, 0.0),
|
||||
(0.42728525400161743, -0.06909316033124924, -0.025838270783424377),
|
||||
(0.2578587830066681, 0.06909292191267014, 0.0),
|
||||
(0.23118992149829865, 0.13347740471363068, 0.0), (0.18876585364341736, 0.18876561522483826, 0.0),
|
||||
(0.13347768783569336, 0.2311897873878479, 0.0), (0.0690932497382164, 0.2578587532043457, 0.0),
|
||||
(0.42728525400161743, 0.06909292191267014, -0.025838270783424377),
|
||||
(0.42728525400161743, -0.12928833067417145, -0.04404989629983902),
|
||||
(0.42728525400161743, 0.12928791344165802, -0.04404982924461365),
|
||||
(0.6011841893196106, -2.227646831443053e-07, -0.12004293501377106),
|
||||
(-0.42728525400161743, 0.12928791344165802, -0.04404982924461365),
|
||||
(-0.6011841893196106, -2.227646831443053e-07, -0.12004293501377106),
|
||||
(-0.06909316033124924, -0.42728525400161743, -0.025838270783424377),
|
||||
(0.06909292191267014, -0.42728525400161743, -0.025838270783424377),
|
||||
(-0.12928833067417145, -0.42728525400161743, -0.04404989629983902),
|
||||
(0.12928785383701324, -0.42728525400161743, -0.04404980689287186),
|
||||
(-2.545882011872891e-07, -0.6011841893196106, -0.12004290521144867),
|
||||
(-0.06909316033124924, 0.42728525400161743, -0.025838270783424377),
|
||||
(0.06909292191267014, 0.42728525400161743, -0.025838270783424377),
|
||||
(-0.12928833067417145, 0.42728525400161743, -0.04404989629983902),
|
||||
(0.12928785383701324, 0.42728525400161743, -0.04404982924461365),
|
||||
(-2.545882011872891e-07, 0.6011841893196106, -0.12004293501377106),
|
||||
(0.0, 0.1595769226551056, 0.0), (-0.0797884613275528, 0.13819767534732819, 0.0),
|
||||
(-0.13819767534732819, 0.079788438975811, 0.0),
|
||||
(-0.1595769226551056, -6.975329203129377e-09, 0.0),
|
||||
(-0.13819767534732819, -0.0797884613275528, 0.0),
|
||||
(-0.0797884613275528, -0.13819767534732819, 0.0),
|
||||
(-2.409544741510672e-08, -0.1595769226551056, 0.0),
|
||||
(0.07978841662406921, -0.13819767534732819, 0.0), (0.1381976306438446, -0.07978851348161697, 0.0),
|
||||
(0.1595769226551056, -7.418926628588451e-08, 0.0), (0.13819773495197296, 0.07978837937116623, 0.0),
|
||||
(0.07978855073451996, 0.1381976157426834, 0.0),
|
||||
(0.3002154231071472, 0.06909292191267014, -0.0018598437309265137),
|
||||
(0.34257203340530396, 0.06909292191267014, -0.007112756371498108),
|
||||
(0.3849286139011383, 0.06909292191267014, -0.015268802642822266),
|
||||
(0.3849286139011383, -0.06909316033124924, -0.015268847346305847),
|
||||
(0.34257200360298157, -0.06909316033124924, -0.00711272656917572),
|
||||
(0.30021539330482483, -0.06909316033124924, -0.0018598437309265137),
|
||||
(-0.3002154231071472, 0.06909303367137909, -0.0018598437309265137),
|
||||
(-0.34257203340530396, 0.0690929964184761, -0.007112756371498108),
|
||||
(-0.3849286139011383, 0.06909295171499252, -0.015268802642822266),
|
||||
(-0.3849286139011383, -0.06909313052892685, -0.015268802642822266),
|
||||
(-0.34257200360298157, -0.06909309327602386, -0.007112711668014526),
|
||||
(-0.30021539330482483, -0.06909305602312088, -0.0018598586320877075),
|
||||
(-0.06909314543008804, -0.30021539330482483, -0.0018598437309265137),
|
||||
(-0.06909314543008804, -0.34257200360298157, -0.00711272656917572),
|
||||
(-0.06909315288066864, -0.3849286139011383, -0.015268847346305847),
|
||||
(0.06909293681383133, -0.3002154231071472, -0.0018598437309265137),
|
||||
(0.06909292936325073, -0.34257203340530396, -0.007112756371498108),
|
||||
(0.06909292191267014, -0.3849286139011383, -0.015268802642822266),
|
||||
(-0.06909307837486267, 0.3002154231071472, -0.0018598437309265137),
|
||||
(-0.06909310817718506, 0.34257203340530396, -0.007112756371498108),
|
||||
(-0.06909313052892685, 0.3849286139011383, -0.015268802642822266),
|
||||
(0.06909316033124924, 0.30021539330482483, -0.0018598437309265137),
|
||||
(0.06909307837486267, 0.34257200360298157, -0.00711272656917572),
|
||||
(0.0690930038690567, 0.3849286139011383, -0.015268847346305847)],
|
||||
'edges': [(2, 1), (3, 2), (4, 3), (5, 4), (12, 28), (0, 6), (8, 7), (9, 8), (10, 9), (11, 10), (28, 29),
|
||||
(29, 0), (14, 13), (15, 14), (16, 15), (17, 16), (54, 24), (57, 17), (20, 19), (21, 20), (22, 21),
|
||||
(23, 22), (60, 12), (25, 18), (24, 26), (27, 25), (26, 27), (63, 7), (32, 30), (31, 33), (34, 32),
|
||||
(33, 34), (66, 30), (69, 31), (37, 35), (36, 38), (39, 37), (38, 39), (72, 35), (75, 36), (41, 40),
|
||||
(42, 41), (43, 42), (44, 43), (45, 44), (46, 45), (47, 46), (48, 47), (49, 48), (50, 49), (51, 50),
|
||||
(40, 51), (19, 52), (52, 53), (53, 54), (18, 55), (55, 56), (56, 57), (5, 58), (58, 59), (59, 60),
|
||||
(6, 61), (61, 62), (62, 63), (11, 64), (64, 65), (65, 66), (13, 67), (67, 68), (68, 69), (1, 70),
|
||||
(70, 71), (71, 72), (23, 73), (73, 74), (74, 75)]}
|
||||
|
||||
widgets['WheelDamper'] = {
|
||||
'vertices': [(-0.17770397663116455, -0.09192684292793274, 0.14030149579048157),
|
||||
(-0.17770397663116455, -0.09192684292793274, 0.23383590579032898),
|
||||
(-0.10793274641036987, -0.16846297681331635, 0.13250692188739777),
|
||||
(-0.10793278366327286, -0.16846297681331635, 0.22604137659072876),
|
||||
(-0.009241040796041489, -0.1998595893383026, 0.12471239268779755),
|
||||
(-0.009241056628525257, -0.19985966384410858, 0.21824686229228973),
|
||||
(0.09192679077386856, -0.17770402133464813, 0.11691785603761673),
|
||||
(0.09192682057619095, -0.17770402133464813, 0.21045231819152832),
|
||||
(0.16846293210983276, -0.10793281346559525, 0.1091233491897583),
|
||||
(0.16846293210983276, -0.10793281346559525, 0.2026577889919281),
|
||||
(0.1998595893383026, -0.009241072461009026, 0.10132881999015808),
|
||||
(0.1998595893383026, -0.009241089224815369, 0.19486328959465027),
|
||||
(0.17770397663116455, 0.09192679077386856, 0.09353431314229965),
|
||||
(0.1777040809392929, 0.09192677587270737, 0.18706879019737244),
|
||||
(0.10793274641036987, 0.16846294701099396, 0.08573977649211884),
|
||||
(0.10793281346559525, 0.16846294701099396, 0.17927424609661102),
|
||||
(0.009240993298590183, 0.19985954463481903, 0.0779452696442604),
|
||||
(0.009241056628525257, 0.1998595893383026, 0.1714797168970108),
|
||||
(-0.09192684292793274, 0.17770391702651978, 0.07015073299407959),
|
||||
(-0.09192682057619095, 0.17770402133464813, 0.16368518769741058),
|
||||
(-0.16846294701099396, 0.10793264955282211, 0.06235618144273758),
|
||||
(-0.16846297681331635, 0.10793274641036987, 0.15589064359664917),
|
||||
(-0.19985954463481903, 0.009240960702300072, 0.05456162989139557),
|
||||
(-0.1998595893383026, 0.00924102496355772, 0.14809606969356537),
|
||||
(-0.17770391702651978, -0.09192687273025513, 0.04676707834005356),
|
||||
(-0.17770402133464813, -0.09192684292793274, 0.14030154049396515),
|
||||
(-0.1079326793551445, -0.16846294701099396, 0.03897252678871155),
|
||||
(-0.10793278366327286, -0.16846302151679993, 0.13250696659088135),
|
||||
(-0.00924097653478384, -0.19985954463481903, 0.03117799013853073),
|
||||
(-0.009241056628525257, -0.19985966384410858, 0.12471242249011993),
|
||||
(0.09192684292793274, -0.17770391702651978, 0.02338346280157566),
|
||||
(0.09192682057619095, -0.1777040809392929, 0.11691789329051971),
|
||||
(0.16846293210983276, -0.1079326942563057, 0.015588936395943165),
|
||||
(0.16846293210983276, -0.10793283581733704, 0.10912337899208069),
|
||||
(0.19985954463481903, -0.009240993298590183, 0.0077944230288267136),
|
||||
(0.1998595893383026, -0.009241105057299137, 0.10132886469364166),
|
||||
(0.17770391702651978, 0.09192683547735214, -9.42906623890849e-08),
|
||||
(0.1777040809392929, 0.09192677587270737, 0.09353433549404144),
|
||||
(0.1079326793551445, 0.16846290230751038, -0.007794610224664211),
|
||||
(0.10793281346559525, 0.16846294701099396, 0.08573982864618301),
|
||||
(0.00924097653478384, 0.19985945522785187, -0.015589137561619282),
|
||||
(0.009241056628525257, 0.1998595893383026, 0.0779452919960022),
|
||||
(-0.09192682057619095, 0.177703857421875, -0.023383673280477524),
|
||||
(-0.09192682057619095, 0.17770402133464813, 0.07015074789524078),
|
||||
(-0.16846290230751038, 0.10793262720108032, -0.031178224831819534),
|
||||
(-0.16846294701099396, 0.10793274641036987, 0.06235621124505997),
|
||||
(-0.19985945522785187, 0.009240944869816303, -0.03897276148200035),
|
||||
(-0.1998595893383026, 0.00924102496355772, 0.05456166714429855),
|
||||
(-0.177703857421875, -0.09192684292793274, -0.046767283231019974),
|
||||
(-0.17770402133464813, -0.09192684292793274, 0.04676711559295654),
|
||||
(-0.10793262720108032, -0.16846290230751038, -0.054561812430620193),
|
||||
(-0.10793278366327286, -0.16846302151679993, 0.038972560316324234),
|
||||
(-0.009240960702300072, -0.19985948503017426, -0.062356337904930115),
|
||||
(-0.00924102496355772, -0.19985966384410858, 0.031178021803498268),
|
||||
(0.09192684292793274, -0.177703857421875, -0.07015086710453033),
|
||||
(0.09192683547735214, -0.17770402133464813, 0.023383498191833496),
|
||||
(0.16846293210983276, -0.10793262720108032, -0.07794538885354996),
|
||||
(0.16846302151679993, -0.10793278366327286, 0.015588970854878426),
|
||||
(0.19985945522785187, -0.009240944869816303, -0.08573991060256958),
|
||||
(0.19985966384410858, -0.009241040796041489, 0.007794454228132963),
|
||||
(0.1777038276195526, 0.09192683547735214, -0.09353446215391159),
|
||||
(0.1777040809392929, 0.09192684292793274, -6.286042264491698e-08),
|
||||
(0.10793259739875793, 0.1684628427028656, -0.10132896900177002),
|
||||
(0.10793281346559525, 0.16846302151679993, -0.007794579025357962),
|
||||
(0.00924092996865511, 0.1998593956232071, -0.10912348330020905),
|
||||
(0.009241040796041489, 0.19985966384410858, -0.015589105896651745),
|
||||
(-0.09192682057619095, 0.17770376801490784, -0.11691801995038986),
|
||||
(-0.09192684292793274, 0.17770405113697052, -0.023383641615509987),
|
||||
(-0.1684628427028656, 0.10793255269527435, -0.12471257150173187),
|
||||
(-0.16846302151679993, 0.10793274641036987, -0.031178191304206848),
|
||||
(-0.1998593509197235, 0.009240913204848766, -0.1325071007013321),
|
||||
(-0.19985966384410858, 0.009240993298590183, -0.03897274285554886),
|
||||
(-0.17770376801490784, -0.09192683547735214, -0.1403016299009323),
|
||||
(-0.17770402133464813, -0.09192688763141632, -0.046767283231019974),
|
||||
(-0.10793255269527435, -0.1684628427028656, -0.14809612929821014),
|
||||
(-0.10793274641036987, -0.16846303641796112, -0.054561812430620193),
|
||||
(-0.009240896441042423, -0.1998593509197235, -0.15589067339897156),
|
||||
(-0.009240993298590183, -0.19985966384410858, -0.062356337904930115),
|
||||
(0.09192683547735214, -0.17770375311374664, -0.16368518769741058),
|
||||
(0.09192688763141632, -0.17770402133464813, -0.07015086710453033),
|
||||
(0.1684628129005432, -0.10793253034353256, -0.1714797168970108),
|
||||
(0.16846302151679993, -0.10793274641036987, -0.07794538885354996),
|
||||
(0.1998593509197235, -0.009240913204848766, -0.17927424609661102),
|
||||
(0.1998595893383026, -0.009241009131073952, -0.08573991060256958),
|
||||
(0.17770375311374664, 0.09192679077386856, -0.18706879019737244),
|
||||
(0.17770397663116455, 0.09192684292793274, -0.09353446215391159),
|
||||
(0.10793255269527435, 0.1684628278017044, -0.19486330449581146),
|
||||
(0.10793274641036987, 0.16846294701099396, -0.10132896900177002),
|
||||
(0.00924092996865511, 0.1998593509197235, -0.20265783369541168),
|
||||
(0.00924102496355772, 0.19985954463481903, -0.10912348330020905),
|
||||
(-0.09192678332328796, 0.17770370841026306, -0.2104523628950119),
|
||||
(-0.09192679077386856, 0.17770394682884216, -0.11691801995038986),
|
||||
(-0.1684628129005432, 0.10793255269527435, -0.21824689209461212),
|
||||
(-0.16846290230751038, 0.10793272405862808, -0.12471257150173187),
|
||||
(-0.19985929131507874, 0.00924092996865511, -0.22604137659072876),
|
||||
(-0.19985954463481903, 0.00924102496355772, -0.1325071007013321),
|
||||
(-0.17770370841026306, -0.09192678332328796, -0.23383590579032898),
|
||||
(-0.17770391702651978, -0.09192680567502975, -0.1403016299009323),
|
||||
(-0.21371114253997803, -0.21371114253997803, 0.24772925674915314),
|
||||
(0.21371114253997803, -0.21371114253997803, 0.24772925674915314),
|
||||
(-0.21371114253997803, 0.21371114253997803, 0.24772925674915314),
|
||||
(0.21371114253997803, 0.21371114253997803, 0.24772925674915314),
|
||||
(-0.21371114253997803, -0.21371114253997803, -0.24772925674915314),
|
||||
(0.21371114253997803, -0.21371114253997803, -0.24772925674915314),
|
||||
(-0.21371114253997803, 0.21371114253997803, -0.24772925674915314),
|
||||
(0.21371114253997803, 0.21371114253997803, -0.24772925674915314)],
|
||||
'edges': [(1, 3), (2, 0), (3, 5), (4, 2), (5, 7), (6, 4), (7, 9), (8, 6), (9, 11), (10, 8), (11, 13), (12, 10),
|
||||
(13, 15), (14, 12), (15, 17), (16, 14), (17, 19), (18, 16), (19, 21), (20, 18), (21, 23), (22, 20),
|
||||
(23, 25), (24, 22), (25, 27), (26, 24), (27, 29), (28, 26), (29, 31), (30, 28), (31, 33), (32, 30),
|
||||
(33, 35), (34, 32), (35, 37), (36, 34), (37, 39), (38, 36), (39, 41), (40, 38), (41, 43), (42, 40),
|
||||
(43, 45), (44, 42), (45, 47), (46, 44), (47, 49), (48, 46), (49, 51), (50, 48), (51, 53), (52, 50),
|
||||
(53, 55), (54, 52), (55, 57), (56, 54), (57, 59), (58, 56), (59, 61), (60, 58), (61, 63), (62, 60),
|
||||
(63, 65), (64, 62), (65, 67), (66, 64), (67, 69), (68, 66), (69, 71), (70, 68), (71, 73), (72, 70),
|
||||
(73, 75), (74, 72), (75, 77), (76, 74), (77, 79), (78, 76), (79, 81), (80, 78), (81, 83), (82, 80),
|
||||
(83, 85), (84, 82), (85, 87), (86, 84), (87, 89), (88, 86), (89, 91), (90, 88), (91, 93), (92, 90),
|
||||
(93, 95), (94, 92), (95, 97), (96, 94), (100, 98), (98, 99), (99, 101), (101, 100), (104, 102),
|
||||
(102, 103), (103, 105), (105, 104)]
|
||||
}
|
||||
|
||||
return widgets
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
create()
|
||||
Reference in New Issue
Block a user