diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-25 13:54:52 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-25 13:54:52 +0300 |
commit | e204f67cf0f570a69e46cf3eb731f2705c21ee46 (patch) | |
tree | 3654047606860eba066d94406a31fde615692df3 | |
parent | d8d1344d96801fa4ee6885567709d7d976f9a747 (diff) | |
parent | d5870270151920a04cd69bbe4a78f118be09baef (diff) |
Merge branch 'master' into mesh-to-volume-modifier
118 files changed, 1180 insertions, 670 deletions
diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake index de27d31323d..4a0a4f2493d 100644 --- a/build_files/cmake/packaging.cmake +++ b/build_files/cmake/packaging.cmake @@ -86,7 +86,7 @@ if(WIN32) set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico) set(CPACK_NSIS_COMPRESSOR "/SOLID lzma") - set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt) + set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/license/GPL-3.0.txt) set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/release/windows/icons/winblender.ico) set(BLENDER_NAMESPACE_GUID "507F933F-5898-404A-9A05-18282FD491A6") diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 2c9445dce97..db5c161865f 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1312,7 +1312,7 @@ def pyrna2sphinx(basepath): fw(title_string(title, "=")) - fw(".. module:: %s.%s\n\n" % (struct_module_name, struct_id)) + fw(".. module:: %s\n\n" % struct_module_name) # docs first?, ok write_example_ref("", fw, "%s.%s" % (struct_module_name, struct_id)) @@ -1543,7 +1543,7 @@ def pyrna2sphinx(basepath): fw(title_string(class_name, "=")) - fw(".. module:: %s.%s\n" % (class_module_name, class_name)) + fw(".. module:: %s\n" % class_module_name) fw("\n") if use_subclasses: diff --git a/release/license/Apache-2.0.txt b/release/license/Apache-2.0.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/release/license/Apache-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/release/license/BSD-3-Clause.txt b/release/license/BSD-3-Clause.txt new file mode 100644 index 00000000000..645c9596468 --- /dev/null +++ b/release/license/BSD-3-Clause.txt @@ -0,0 +1,26 @@ +The 3-Clause BSD License +------------------------ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of Google Inc. nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/release/license/BSL-1.0.txt b/release/license/BSL-1.0.txt new file mode 100644 index 00000000000..36b7cd93cdf --- /dev/null +++ b/release/license/BSL-1.0.txt @@ -0,0 +1,23 @@ +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/release/license/FTL.txt b/release/license/FTL.txt new file mode 100644 index 00000000000..ec866ebb4c8 --- /dev/null +++ b/release/license/FTL.txt @@ -0,0 +1,166 @@ +The FreeType Project LICENSE +---------------------------- + + 2006-Jan-27 + + Copyright 1996-2002, 2006 by + David Turner, Robert Wilhelm, and Werner Lemberg + + + +Introduction +============ + + The FreeType Project is distributed in several archive packages; + some of them may contain, in addition to the FreeType font engine, + various tools and contributions which rely on, or relate to, the + FreeType Project. + + This license applies to all files found in such packages, and + which do not fall under their own explicit license. The license + affects thus the FreeType font engine, the test programs, + documentation and makefiles, at the very least. + + This license was inspired by the BSD, Artistic, and IJG + (Independent JPEG Group) licenses, which all encourage inclusion + and use of free software in commercial and freeware products + alike. As a consequence, its main points are that: + + o We don't promise that this software works. However, we will be + interested in any kind of bug reports. (`as is' distribution) + + o You can use this software for whatever you want, in parts or + full form, without having to pay us. (`royalty-free' usage) + + o You may not pretend that you wrote this software. If you use + it, or only parts of it, in a program, you must acknowledge + somewhere in your documentation that you have used the + FreeType code. (`credits') + + We specifically permit and encourage the inclusion of this + software, with or without modifications, in commercial products. + We disclaim all warranties covering The FreeType Project and + assume no liability related to The FreeType Project. + + + Finally, many people asked us for a preferred form for a + credit/disclaimer to use in compliance with this license. We thus + encourage you to use the following text: + + """ + Portions of this software are copyright © <year> The FreeType + Project (www.freetype.org). All rights reserved. + """ + + Please replace <year> with the value from the FreeType version you + actually use. + + +Legal Terms +=========== + +0. Definitions +-------------- + + Throughout this license, the terms `package', `FreeType Project', + and `FreeType archive' refer to the set of files originally + distributed by the authors (David Turner, Robert Wilhelm, and + Werner Lemberg) as the `FreeType Project', be they named as alpha, + beta or final release. + + `You' refers to the licensee, or person using the project, where + `using' is a generic term including compiling the project's source + code as well as linking it to form a `program' or `executable'. + This program is referred to as `a program using the FreeType + engine'. + + This license applies to all files distributed in the original + FreeType Project, including all source code, binaries and + documentation, unless otherwise stated in the file in its + original, unmodified form as distributed in the original archive. + If you are unsure whether or not a particular file is covered by + this license, you must contact us to verify this. + + The FreeType Project is copyright (C) 1996-2000 by David Turner, + Robert Wilhelm, and Werner Lemberg. All rights reserved except as + specified below. + +1. No Warranty +-------------- + + THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY + KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO + USE, OF THE FREETYPE PROJECT. + +2. Redistribution +----------------- + + This license grants a worldwide, royalty-free, perpetual and + irrevocable right and license to use, execute, perform, compile, + display, copy, create derivative works of, distribute and + sublicense the FreeType Project (in both source and object code + forms) and derivative works thereof for any purpose; and to + authorize others to exercise some or all of the rights granted + herein, subject to the following conditions: + + o Redistribution of source code must retain this license file + (`FTL.TXT') unaltered; any additions, deletions or changes to + the original files must be clearly indicated in accompanying + documentation. The copyright notices of the unaltered, + original files must be preserved in all copies of source + files. + + o Redistribution in binary form must provide a disclaimer that + states that the software is based in part of the work of the + FreeType Team, in the distribution documentation. We also + encourage you to put an URL to the FreeType web page in your + documentation, though this isn't mandatory. + + These conditions apply to any software derived from or based on + the FreeType Project, not just the unmodified files. If you use + our work, you must acknowledge us. However, no fee need be paid + to us. + +3. Advertising +-------------- + + Neither the FreeType authors and contributors nor you shall use + the name of the other for commercial, advertising, or promotional + purposes without specific prior written permission. + + We suggest, but do not require, that you use one or more of the + following phrases to refer to this software in your documentation + or advertising materials: `FreeType Project', `FreeType Engine', + `FreeType library', or `FreeType Distribution'. + + As you have not signed this license, you are not required to + accept it. However, as the FreeType Project is copyrighted + material, only this license, or another one contracted with the + authors, grants you the right to use, distribute, and modify it. + Therefore, by using, distributing, or modifying the FreeType + Project, you indicate that you understand and accept all the terms + of this license. + +4. Contacts +----------- + + There are two mailing lists related to FreeType: + + o freetype@nongnu.org + + Discusses general use and applications of FreeType, as well as + future and wanted additions to the library and distribution. + If you are looking for support, start in this list if you + haven't found anything to help you in the documentation. + + o freetype-devel@nongnu.org + + Discusses bugs, as well as engine internals, design issues, + specific licenses, porting, etc. + + Our home page can be found at + + https://www.freetype.org diff --git a/release/text/GPL-license.txt b/release/license/GPL-2.0.txt index e8c0353e734..e8c0353e734 100644 --- a/release/text/GPL-license.txt +++ b/release/license/GPL-2.0.txt diff --git a/release/text/GPL3-license.txt b/release/license/GPL-3.0.txt index 94a9ed024d3..94a9ed024d3 100644 --- a/release/text/GPL3-license.txt +++ b/release/license/GPL-3.0.txt diff --git a/release/license/ISC.txt b/release/license/ISC.txt new file mode 100644 index 00000000000..5923726e458 --- /dev/null +++ b/release/license/ISC.txt @@ -0,0 +1,14 @@ +ISC License (ISC) +----------------- + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/release/license/MIT.txt b/release/license/MIT.txt new file mode 100644 index 00000000000..328dae3f9ab --- /dev/null +++ b/release/license/MIT.txt @@ -0,0 +1,20 @@ +The MIT License +--------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. diff --git a/release/text/ocio-license.txt b/release/license/OpenColorIO.txt index 3dfcc78df9e..3dfcc78df9e 100644 --- a/release/text/ocio-license.txt +++ b/release/license/OpenColorIO.txt diff --git a/release/license/OpenSSL.txt b/release/license/OpenSSL.txt new file mode 100644 index 00000000000..9601ab43575 --- /dev/null +++ b/release/license/OpenSSL.txt @@ -0,0 +1,125 @@ + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a double license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2019 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + diff --git a/release/text/Python-license.txt b/release/license/Python.txt index b3e8fb53db0..b3e8fb53db0 100644 --- a/release/text/Python-license.txt +++ b/release/license/Python.txt diff --git a/release/datafiles/LICENSE-bfont.ttf.txt b/release/license/bfont.ttf.txt index 4aa22365c83..4aa22365c83 100644 --- a/release/datafiles/LICENSE-bfont.ttf.txt +++ b/release/license/bfont.ttf.txt diff --git a/release/datafiles/LICENSE-bmonofont-i18n.ttf.txt b/release/license/bmonofont-i18n.ttf.txt index 20ed51c8252..20ed51c8252 100644 --- a/release/datafiles/LICENSE-bmonofont-i18n.ttf.txt +++ b/release/license/bmonofont-i18n.ttf.txt diff --git a/release/datafiles/LICENSE-droidsans.ttf.txt b/release/license/droidsans.ttf.txt index 66eca9ca715..66eca9ca715 100644 --- a/release/datafiles/LICENSE-droidsans.ttf.txt +++ b/release/license/droidsans.ttf.txt diff --git a/release/text/jemalloc-license.txt b/release/license/jemalloc.txt index cc6be939a6e..cc6be939a6e 100644 --- a/release/text/jemalloc-license.txt +++ b/release/license/jemalloc.txt diff --git a/release/scripts/presets/keyconfig/blender.py b/release/scripts/presets/keyconfig/blender.py index cbdd01b3cbe..d24735ba8b7 100644 --- a/release/scripts/presets/keyconfig/blender.py +++ b/release/scripts/presets/keyconfig/blender.py @@ -121,14 +121,16 @@ class Prefs(bpy.types.KeyConfigPreferences): name="MMB Action", items=( ('ORBIT', "Orbit", - "Orbit", + "", 0), ('PAN', "Pan", - "Set the view axis where each mouse direction always maps to the same axis", + "", 1), ), description=( - "The action when Middle-Mouse dragging in the viewport. Shift-Middle-Mouse is used for the other action" + "The action when Middle-Mouse dragging in the viewport. " + "Shift-Middle-Mouse is used for the other action. " + "This applies to Track-Pad as well" ), update=update_fn, ) diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py index c68cc016fc5..fdd654009a7 100644 --- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py +++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py @@ -1008,12 +1008,17 @@ def km_view3d(params): ("view3d.localview", {"type": 'MOUSESMARTZOOM', "value": 'ANY'}, None), ("view3d.localview_remove_from", {"type": 'M', "value": 'PRESS'}, None), # Navigation. + ("view3d.rotate", {"type": 'MOUSEROTATE', "value": 'ANY'}, None), *(( ("view3d.rotate", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "shift": True}, None), ("view3d.move", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None), + ("view3d.rotate", {"type": 'TRACKPADPAN', "value": 'ANY', "shift": True}, None), + ("view3d.move", {"type": 'TRACKPADPAN', "value": 'ANY'}, None), ) if params.use_v3d_mmb_pan else ( ("view3d.rotate", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None), ("view3d.move", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "shift": True}, None), + ("view3d.rotate", {"type": 'TRACKPADPAN', "value": 'ANY'}, None), + ("view3d.move", {"type": 'TRACKPADPAN', "value": 'ANY', "shift": True}, None), )), ("view3d.zoom", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "ctrl": True}, None), ("view3d.dolly", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "shift": True, "ctrl": True}, None), @@ -1022,9 +1027,6 @@ def km_view3d(params): ("view3d.view_selected", {"type": 'NUMPAD_PERIOD', "value": 'PRESS'}, {"properties": [("use_all_regions", False)]}), ("view3d.smoothview", {"type": 'TIMER1', "value": 'ANY', "any": True}, None), - ("view3d.rotate", {"type": 'TRACKPADPAN', "value": 'ANY'}, None), - ("view3d.rotate", {"type": 'MOUSEROTATE', "value": 'ANY'}, None), - ("view3d.move", {"type": 'TRACKPADPAN', "value": 'ANY', "shift": True}, None), ("view3d.zoom", {"type": 'TRACKPADZOOM', "value": 'ANY'}, None), ("view3d.zoom", {"type": 'TRACKPADPAN', "value": 'ANY', "ctrl": True}, None), ("view3d.zoom", {"type": 'NUMPAD_PLUS', "value": 'PRESS'}, diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py index 50316f50474..748b5733433 100644 --- a/release/scripts/startup/bl_ui/space_toolsystem_common.py +++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py @@ -288,7 +288,6 @@ class ToolSelectPanelHelper: else: yield item - @classmethod def _tool_get_active(cls, context, space_type, mode, with_icon=False): """ @@ -326,7 +325,7 @@ class ToolSelectPanelHelper: if item is not None: if type(item) is tuple: if item[0].idname == idname: - index = cls._tool_group_active.get(item[0].idname, 0) + index = cls._tool_group_active_get_from_item(item) return (item[index], index) else: if item.idname == idname: @@ -342,7 +341,7 @@ class ToolSelectPanelHelper: if item is not None: if type(item) is tuple: if item[0].idname == idname: - index = cls._tool_group_active.get(item[0].idname, 0) + index = cls._tool_group_active_get_from_item(item) return (item[index], index, item) else: if item.idname == idname: @@ -395,7 +394,7 @@ class ToolSelectPanelHelper: if item is not None: if i == tool_index: if type(item) is tuple: - index = cls._tool_group_active.get(item[0].idname, 0) + index = cls._tool_group_active_get_from_item(item) item = item[index] else: index = -1 @@ -404,6 +403,19 @@ class ToolSelectPanelHelper: return None, -1 @classmethod + def _tool_group_active_get_from_item(cls, item): + index = cls._tool_group_active.get(item[0].idname, 0) + # Can happen in the case a group is dynamic. + # + # NOTE(Campbell): that in this case it's possible the order could change too, + # So if we want to support this properly we will need to switch away from using + # an index and instead use an ID. + # Currently this is such a rare case occurrence that a range check is OK for now. + if index >= len(item): + index = 0 + return index + + @classmethod def _tool_group_active_set_by_id(cls, context, idname_group, idname): item_group = cls._tool_get_group_by_id(context, idname_group, coerce=True) if item_group: @@ -664,7 +676,7 @@ class ToolSelectPanelHelper: # not ideal, write this every time :S cls._tool_group_active[item[0].idname] = index else: - index = cls._tool_group_active.get(item[0].idname, 0) + index = cls._tool_group_active_get_from_item(item) item = item[index] use_menu = True @@ -821,7 +833,8 @@ class ToolSelectPanelHelper: if is_active_tool: index_current = -1 else: - index_current = cls._tool_group_active.get(item_group[0].idname, 0) + index_current = cls._tool_group_active_get_from_item(item_group) + for i, sub_item in enumerate(item_group): is_active = (i == index_current) @@ -871,7 +884,7 @@ class ToolSelectPanelHelper: if is_active_tool: index_current = -1 else: - index_current = cls._tool_group_active.get(item_group[0].idname, 0) + index_current = cls._tool_group_active_get_from_item(item_group) for i, sub_item in enumerate(item_group): is_active = (i == index_current) props = pie.operator( @@ -1023,7 +1036,7 @@ def activate_by_id_or_cycle(context, space_type, idname, *, offset=1, as_fallbac id_current = "" for item_group in cls.tools_from_context(context): if type(item_group) is tuple: - index_current = cls._tool_group_active.get(item_group[0].idname, 0) + index_current = cls._tool_group_active_get_from_item(item_group) for sub_item in item_group: if sub_item.idname == idname: id_current = item_group[index_current].idname diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 40cb03acdfc..9a8934b8e50 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -2183,6 +2183,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel): ({"property": "use_new_particle_system"}, "T73324"), ({"property": "use_sculpt_vertex_colors"}, "T71947"), ({"property": "use_tools_missing_icons"}, "T80331"), + ({"property": "use_switch_object_operator"}, "T80402"), ), ) diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 02b9b547314..6267642c577 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -170,9 +170,15 @@ typedef struct ModifierTypeInfo { /* The size of the modifier data type, used by allocation. */ int structSize; + /* StructRNA of this modifier. This is typically something like RNA_*Modifier. */ + struct StructRNA *srna; + ModifierTypeType type; ModifierTypeFlag flags; + /* Icon of the modifier. Usually something like ICON_MOD_*. */ + int icon; + /********************* Non-optional functions *********************/ /** diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c index 6f36b6ee99b..4d815077e91 100644 --- a/source/blender/blenkernel/intern/anim_data.c +++ b/source/blender/blenkernel/intern/anim_data.c @@ -1583,4 +1583,7 @@ void BKE_animdata_blend_read_expand(struct BlendExpander *expander, AnimData *ad /* drivers - assume that these F-Curves have driver data to be in this list... */ BKE_fcurve_blend_read_expand(expander, &adt->drivers); + + /* NLA data - referenced actions. */ + BKE_nla_blend_read_expand(expander, &adt->nla_tracks); } diff --git a/source/blender/blenkernel/intern/lib_override.c b/source/blender/blenkernel/intern/lib_override.c index d2b2f01a81c..4a577bbd428 100644 --- a/source/blender/blenkernel/intern/lib_override.c +++ b/source/blender/blenkernel/intern/lib_override.c @@ -783,16 +783,6 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ op_new = op_new->next, op_old = op_old->next) { lib_override_library_property_copy(op_new, op_old); } - - /* Apply rules on new override ID using old one as 'source' data. */ - /* Note that since we already remapped ID pointers in old override IDs to new ones, we - * can also apply ID pointer override rules safely here. */ - PointerRNA rnaptr_src, rnaptr_dst; - RNA_id_pointer_create(id_override_old, &rnaptr_src); - RNA_id_pointer_create(id_override_new, &rnaptr_dst); - - RNA_struct_override_apply( - bmain, &rnaptr_dst, &rnaptr_src, NULL, id_override_new->override_library); } } } @@ -800,18 +790,55 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ } FOREACH_MAIN_LISTBASE_END; - /* Delete old override IDs. */ + /* We need to apply override rules in a separate loop, after all ID pointers have been properly + * remapped, and all new local override IDs have gotten their proper original names, otherwise + * override operations based on those ID names would fail. */ FOREACH_MAIN_ID_BEGIN (bmain, id) { if (id->tag & LIB_TAG_DOIT && id->newid != NULL && ID_IS_LINKED(id)) { + ID *id_override_new = id->newid; ID *id_override_old = BLI_ghash_lookup(linkedref_to_old_override, id); if (id_override_old != NULL) { - BKE_id_delete(bmain, id_override_old); + /* Apply rules on new override ID using old one as 'source' data. */ + /* Note that since we already remapped ID pointers in old override IDs to new ones, we + * can also apply ID pointer override rules safely here. */ + PointerRNA rnaptr_src, rnaptr_dst; + RNA_id_pointer_create(id_override_old, &rnaptr_src); + RNA_id_pointer_create(id_override_new, &rnaptr_dst); + + RNA_struct_override_apply( + bmain, &rnaptr_dst, &rnaptr_src, NULL, id_override_new->override_library); } } } FOREACH_MAIN_ID_END; + /* Delete old override IDs. + * Note that we have to use tagged group deletion here, since ID deletion also uses LIB_TAG_DOIT. + * This improves performances anyway, so everything is fine. */ + FOREACH_MAIN_ID_BEGIN (bmain, id) { + if (id->tag & LIB_TAG_DOIT) { + /* Note that this work because linked IDs are always after local ones (including overrides), + * so we will only ever tag an old override ID after we have already checked it in this loop, + * hence we cannot untag it later. */ + if (id->newid != NULL && ID_IS_LINKED(id)) { + ID *id_override_old = BLI_ghash_lookup(linkedref_to_old_override, id); + + if (id_override_old != NULL) { + id->newid->tag &= ~LIB_TAG_DOIT; + id_override_old->tag |= LIB_TAG_DOIT; + } + } + id->tag &= ~LIB_TAG_DOIT; + } + } + FOREACH_MAIN_ID_END; + BKE_id_multi_tagged_delete(bmain); + + /* At this point, id_root has very likely been deleted, we need to update it to its new version. + */ + id_root = id_root_reference->newid; + /* Essentially ensures that potentially new overrides of new objects will be instantiated. */ lib_override_library_create_post_process(bmain, scene, view_layer, id_root_reference, id_root); @@ -819,7 +846,7 @@ bool BKE_lib_override_library_resync(Main *bmain, Scene *scene, ViewLayer *view_ BLI_ghash_free(linkedref_to_old_override, NULL, NULL); BKE_main_id_clear_newpoins(bmain); - BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); + BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false); /* That one should not be needed in fact. */ return success; } @@ -1825,6 +1852,14 @@ ID *BKE_lib_override_library_operations_store_start(Main *bmain, TIMEIT_START_AVERAGED(BKE_lib_override_library_operations_store_start); #endif + /* This is fully disabled for now, as it generated very hard to solve issues with Collections and + * how they reference each-other in their parents/children relations. + * Core of the issue is creating and storing those copies in a separate BMain, while collection + * copy code re-assign blindly parents/children, even if they do not belong to the same BMain. + * One solution could be to implement special flag as discussed below, and prevent any + * other-ID-reference creation/update in that case (since no differential operation is expected + * to involve those anyway). */ +#if 0 /* XXX TODO We may also want a specialized handling of things here too, to avoid copying heavy * never-overridable data (like Mesh geometry etc.)? And also maybe avoid lib * reference-counting completely (shallow copy...). */ @@ -1846,6 +1881,9 @@ ID *BKE_lib_override_library_operations_store_start(Main *bmain, storage_id = NULL; } } +#else + storage_id = NULL; +#endif local->override_library->storage = storage_id; diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 6e57dcee427..af6ffe32214 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -322,6 +322,7 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, if (mv->no[j] != 0) { fix_normal = false; + break; } } diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 828a6c99838..c58acf3a74d 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1953,56 +1953,56 @@ void BKE_nla_action_pushdown(AnimData *adt) /* add a new NLA strip to the track, which references the active action */ strip = BKE_nlastack_add_strip(adt, adt->action); + if (strip == NULL) { + return; + } - /* do other necessary work on strip */ - if (strip) { - /* clear reference to action now that we've pushed it onto the stack */ - id_us_min(&adt->action->id); - adt->action = NULL; + /* clear reference to action now that we've pushed it onto the stack */ + id_us_min(&adt->action->id); + adt->action = NULL; - /* copy current "action blending" settings from adt to the strip, - * as it was keyframed with these settings, so omitting them will - * change the effect [T54233] - * - * NOTE: We only do this when there are no tracks - */ - if (is_first == false) { - strip->blendmode = adt->act_blendmode; - strip->influence = adt->act_influence; - strip->extendmode = adt->act_extendmode; - - if (adt->act_influence < 1.0f) { - /* enable "user-controlled" influence (which will insert a default keyframe) - * so that the influence doesn't get lost on the new update - * - * NOTE: An alternative way would have been to instead hack the influence - * to not get always get reset to full strength if NLASTRIP_FLAG_USR_INFLUENCE - * is disabled but auto-blending isn't being used. However, that approach - * is a bit hacky/hard to discover, and may cause backwards compatibility issues, - * so it's better to just do it this way. - */ - strip->flag |= NLASTRIP_FLAG_USR_INFLUENCE; - BKE_nlastrip_validate_fcurves(strip); - } + /* copy current "action blending" settings from adt to the strip, + * as it was keyframed with these settings, so omitting them will + * change the effect [T54233] + * + * NOTE: We only do this when there are no tracks + */ + if (is_first == false) { + strip->blendmode = adt->act_blendmode; + strip->influence = adt->act_influence; + strip->extendmode = adt->act_extendmode; + + if (adt->act_influence < 1.0f) { + /* enable "user-controlled" influence (which will insert a default keyframe) + * so that the influence doesn't get lost on the new update + * + * NOTE: An alternative way would have been to instead hack the influence + * to not get always get reset to full strength if NLASTRIP_FLAG_USR_INFLUENCE + * is disabled but auto-blending isn't being used. However, that approach + * is a bit hacky/hard to discover, and may cause backwards compatibility issues, + * so it's better to just do it this way. + */ + strip->flag |= NLASTRIP_FLAG_USR_INFLUENCE; + BKE_nlastrip_validate_fcurves(strip); } + } - /* if the strip is the first one in the track it lives in, check if there - * are strips in any other tracks that may be before this, and set the extend - * mode accordingly - */ - if (nlastrip_is_first(adt, strip) == 0) { - /* Not first, so extend mode can only be: - * NLASTRIP_EXTEND_HOLD_FORWARD not NLASTRIP_EXTEND_HOLD, - * so that it doesn't override strips in previous tracks. */ - /* FIXME: this needs to be more automated, since user can rearrange strips */ - if (strip->extendmode == NLASTRIP_EXTEND_HOLD) { - strip->extendmode = NLASTRIP_EXTEND_HOLD_FORWARD; - } + /* if the strip is the first one in the track it lives in, check if there + * are strips in any other tracks that may be before this, and set the extend + * mode accordingly + */ + if (nlastrip_is_first(adt, strip) == 0) { + /* Not first, so extend mode can only be: + * NLASTRIP_EXTEND_HOLD_FORWARD not NLASTRIP_EXTEND_HOLD, + * so that it doesn't override strips in previous tracks. */ + /* FIXME: this needs to be more automated, since user can rearrange strips */ + if (strip->extendmode == NLASTRIP_EXTEND_HOLD) { + strip->extendmode = NLASTRIP_EXTEND_HOLD_FORWARD; } - - /* make strip the active one... */ - BKE_nlastrip_set_active(adt, strip); } + + /* make strip the active one... */ + BKE_nlastrip_set_active(adt, strip); } /* Find the active strip + track combo, and set them up as the tweaking track, diff --git a/source/blender/blenkernel/intern/subdiv_eval.c b/source/blender/blenkernel/intern/subdiv_eval.c index baee8a80f5a..201d308e096 100644 --- a/source/blender/blenkernel/intern/subdiv_eval.c +++ b/source/blender/blenkernel/intern/subdiv_eval.c @@ -184,8 +184,9 @@ void BKE_subdiv_eval_limit_point_and_derivatives(Subdiv *subdiv, { subdiv->evaluator->evaluateLimit(subdiv->evaluator, ptex_face_index, u, v, r_P, r_dPdu, r_dPdv); - /* NOTE: In a very rare occasions derivatives are evaluated to zeros. This happens, for example, - * in single vertex on Suzannne's nose (where two quads have 2 common edges). + /* NOTE: In a very rare occasions derivatives are evaluated to zeros or are exactly equal. + * This happens, for example, in single vertex on Suzannne's nose (where two quads have 2 common + * edges). * * This makes tangent space displacement (such as multires) impossible to be used in those * vertices, so those needs to be addressed in one way or another. @@ -195,7 +196,7 @@ void BKE_subdiv_eval_limit_point_and_derivatives(Subdiv *subdiv, * that giving totally unusable derivatives. */ if (r_dPdu != NULL && r_dPdv != NULL) { - if (is_zero_v3(r_dPdu) || is_zero_v3(r_dPdv)) { + if ((is_zero_v3(r_dPdu) || is_zero_v3(r_dPdv)) || equals_v3v3(r_dPdu, r_dPdv)) { subdiv->evaluator->evaluateLimit(subdiv->evaluator, ptex_face_index, u * 0.999f + 0.0005f, diff --git a/source/blender/draw/engines/eevee/eevee_occlusion.c b/source/blender/draw/engines/eevee/eevee_occlusion.c index 3c684c467a4..46f9c775335 100644 --- a/source/blender/draw/engines/eevee/eevee_occlusion.c +++ b/source/blender/draw/engines/eevee/eevee_occlusion.c @@ -132,12 +132,6 @@ void EEVEE_occlusion_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata GPU_framebuffer_clear_color(fbl->ao_accum_fb, clear); } - /* Clear texture. */ - if (DRW_state_is_image_render() || effects->taa_current_sample == 1) { - GPU_framebuffer_bind(fbl->ao_accum_fb); - GPU_framebuffer_clear_color(fbl->ao_accum_fb, clear); - } - /* Accumulation pass */ DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ADD; DRW_PASS_CREATE(psl->ao_accum_ps, state); diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.c b/source/blender/draw/engines/overlay/overlay_edit_uv.c index adbf7168394..bc41042ef02 100644 --- a/source/blender/draw/engines/overlay/overlay_edit_uv.c +++ b/source/blender/draw/engines/overlay/overlay_edit_uv.c @@ -24,6 +24,7 @@ #include "draw_cache_impl.h" #include "draw_manager_text.h" +#include "BKE_editmesh.h" #include "BKE_image.h" #include "DNA_mesh_types.h" @@ -286,12 +287,18 @@ void OVERLAY_edit_uv_cache_populate(OVERLAY_Data *vedata, Object *ob) OVERLAY_StorageList *stl = vedata->stl; OVERLAY_PrivateData *pd = stl->pd; GPUBatch *geom; - const bool is_edit_object = DRW_object_is_in_edit_mode(ob); const DRWContextState *draw_ctx = DRW_context_state_get(); + const bool is_edit_object = DRW_object_is_in_edit_mode(ob); + Mesh *me = (Mesh *)ob->data; + const bool has_active_object_uvmap = CustomData_get_active_layer(&me->ldata, CD_MLOOPUV) != -1; + const bool has_active_edit_uvmap = is_edit_object && + (CustomData_get_active_layer(&me->edit_mesh->bm->ldata, + CD_MLOOPUV) != -1); const bool draw_shadows = (draw_ctx->object_mode != OB_MODE_OBJECT) && (ob->mode == draw_ctx->object_mode); - if (is_edit_object) { + + if (has_active_edit_uvmap) { if (pd->edit_uv.do_uv_overlay) { geom = DRW_mesh_batch_cache_get_edituv_edges(ob->data); if (geom) { @@ -316,8 +323,6 @@ void OVERLAY_edit_uv_cache_populate(OVERLAY_Data *vedata, Object *ob) } if (pd->edit_uv.do_uv_stretching_overlay) { - Mesh *me = ob->data; - if (pd->edit_uv.draw_type == SI_UVDT_STRETCH_ANGLE) { geom = DRW_mesh_batch_cache_get_edituv_faces_stretch_angle(me); } @@ -328,14 +333,13 @@ void OVERLAY_edit_uv_cache_populate(OVERLAY_Data *vedata, Object *ob) geom = DRW_mesh_batch_cache_get_edituv_faces_stretch_area( me, &totals->total_area, &totals->total_area_uv); } - if (geom) { DRW_shgroup_call_obmat(pd->edit_uv_stretching_grp, geom, NULL); } } } - if (draw_shadows) { + if (draw_shadows && (has_active_object_uvmap || has_active_edit_uvmap)) { if (pd->edit_uv.do_uv_shadow_overlay) { geom = DRW_mesh_batch_cache_get_uv_edges(ob->data); if (geom) { diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 7628d8a37c6..376dcb6d811 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -676,7 +676,6 @@ char UI_block_emboss_get(uiBlock *block); void UI_block_emboss_set(uiBlock *block, char emboss); bool UI_block_is_search_only(const uiBlock *block); void UI_block_set_search_only(uiBlock *block, bool search_only); -void UI_block_set_search_filter(uiBlock *block, const char *search_filter); void UI_block_free(const struct bContext *C, uiBlock *block); void UI_blocklist_free(const struct bContext *C, struct ListBase *lb); @@ -1686,7 +1685,6 @@ struct Panel *UI_panel_begin(struct ARegion *region, bool *r_open); void UI_panel_end(const struct ARegion *region, uiBlock *block, int width, int height, bool open); -void UI_panels_scale(struct ARegion *region, float new_width); void UI_panel_label_offset(struct uiBlock *block, int *r_x, int *r_y); int UI_panel_size_y(const struct Panel *panel); bool UI_panel_is_dragging(const struct Panel *panel); @@ -1870,7 +1868,7 @@ uiLayout *UI_block_layout(uiBlock *block, void UI_block_layout_set_current(uiBlock *block, uiLayout *layout); void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y); -bool UI_block_apply_search_filter(uiBlock *block); +bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter); void UI_region_message_subscribe(struct ARegion *region, struct wmMsgBus *mbus); diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index f0d19c38537..433058260f7 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -3594,11 +3594,6 @@ void UI_block_set_search_only(uiBlock *block, bool search_only) SET_FLAG_FROM_TEST(block->flag, search_only, UI_BLOCK_SEARCH_ONLY); } -void UI_block_set_search_filter(uiBlock *block, const char *search_filter) -{ - block->search_filter = search_filter; -} - static void ui_but_build_drawstr_float(uiBut *but, double value) { size_t slen = 0; diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 766c8f95565..0c49489ab4e 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -524,12 +524,6 @@ struct uiBlock { */ char display_device[64]; - /** - * Pointer to the space's property search string. - * The block doesn't allocate this or change it. - */ - const char *search_filter; - struct PieMenuData pie_data; }; diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 2574279f0cd..23f29760a5e 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -5161,10 +5161,10 @@ void uiLayoutRootSetSearchOnly(uiLayout *layout, bool search_only) /* Disabled for performance reasons, but this could be turned on in the future. */ // #define PROPERTY_SEARCH_USE_TOOLTIPS -static bool block_search_panel_label_matches(const uiBlock *block) +static bool block_search_panel_label_matches(const uiBlock *block, const char *search_string) { if ((block->panel != NULL) && (block->panel->type != NULL)) { - if (BLI_strcasestr(block->panel->type->label, block->search_filter)) { + if (BLI_strcasestr(block->panel->type->label, search_string)) { return true; } } @@ -5294,12 +5294,12 @@ static bool button_group_has_search_match(uiButtonGroup *button_group, const cha * * \return True if the block has any search results. */ -static bool block_search_filter_tag_buttons(uiBlock *block) +static bool block_search_filter_tag_buttons(uiBlock *block, const char *search_filter) { bool has_result = false; LISTBASE_FOREACH (uiLayoutRoot *, root, &block->layouts) { LISTBASE_FOREACH (uiButtonGroup *, button_group, &root->button_groups) { - if (button_group_has_search_match(button_group, block->search_filter)) { + if (button_group_has_search_match(button_group, search_filter)) { LISTBASE_FOREACH (LinkData *, link, &button_group->buttons) { uiBut *but = link->data; but->flag |= UI_SEARCH_FILTER_MATCHES; @@ -5325,15 +5325,17 @@ static void block_search_deactivate_buttons(uiBlock *block) * * \note Must not be run after #UI_block_layout_resolve. */ -bool UI_block_apply_search_filter(uiBlock *block) +bool UI_block_apply_search_filter(uiBlock *block, const char *search_filter) { - if (!(block->search_filter && block->search_filter[0])) { + if (search_filter == NULL || search_filter[0] == '\0') { return false; } - const bool panel_label_matches = block_search_panel_label_matches(block); + const bool panel_label_matches = block_search_panel_label_matches(block, search_filter); - const bool has_result = panel_label_matches ? true : block_search_filter_tag_buttons(block); + const bool has_result = (panel_label_matches) ? + true : + block_search_filter_tag_buttons(block, search_filter); block_search_remove_search_only_roots(block); diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 2917758c995..b9ed1688e80 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -883,6 +883,28 @@ void UI_panels_set_expansion_from_seach_filter(const bContext *C, ARegion *regio /** \name Drawing * \{ */ +/** + * Draw panels, selected (panels currently being dragged) on top. + */ +void UI_panels_draw(const bContext *C, ARegion *region) +{ + /* Draw in reverse order, because #uiBlocks are added in reverse order + * and we need child panels to draw on top. */ + LISTBASE_FOREACH_BACKWARD (uiBlock *, block, ®ion->uiblocks) { + if (block->active && block->panel && !(block->panel->flag & PNL_SELECT) && + !UI_block_is_search_only(block)) { + UI_block_draw(C, block); + } + } + + LISTBASE_FOREACH_BACKWARD (uiBlock *, block, ®ion->uiblocks) { + if (block->active && block->panel && (block->panel->flag & PNL_SELECT) && + !UI_block_is_search_only(block)) { + UI_block_draw(C, block); + } + } +} + /* Triangle 'icon' for panel header. */ void UI_draw_icon_tri(float x, float y, char dir, const float color[4]) { @@ -1944,43 +1966,6 @@ void UI_panels_end(const bContext *C, ARegion *region, int *r_x, int *r_y) ui_panels_size(region, r_x, r_y); } -/** - * Draw panels, selected (panels currently being dragged) on top. - */ -void UI_panels_draw(const bContext *C, ARegion *region) -{ - /* Draw in reverse order, because #uiBlocks are added in reverse order - * and we need child panels to draw on top. */ - LISTBASE_FOREACH_BACKWARD (uiBlock *, block, ®ion->uiblocks) { - if (block->active && block->panel && !(block->panel->flag & PNL_SELECT) && - !UI_block_is_search_only(block)) { - UI_block_draw(C, block); - } - } - - LISTBASE_FOREACH_BACKWARD (uiBlock *, block, ®ion->uiblocks) { - if (block->active && block->panel && (block->panel->flag & PNL_SELECT) && - !UI_block_is_search_only(block)) { - UI_block_draw(C, block); - } - } -} - -void UI_panels_scale(ARegion *region, float new_width) -{ - LISTBASE_FOREACH (uiBlock *, block, ®ion->uiblocks) { - if (block->panel) { - const float fac = new_width / (float)block->panel->sizex; - block->panel->sizex = new_width; - - LISTBASE_FOREACH (uiBut *, but, &block->buttons) { - but->rect.xmin *= fac; - but->rect.xmax *= fac; - } - } - } -} - /** \} */ /* -------------------------------------------------------------------- */ diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c index cde70107d29..9e44c0b29cc 100644 --- a/source/blender/editors/object/object_modes.c +++ b/source/blender/editors/object/object_modes.c @@ -408,6 +408,11 @@ bool ED_object_mode_generic_has_data(struct Depsgraph *depsgraph, struct Object static bool object_switch_object_poll(bContext *C) { + + if (!U.experimental.use_switch_object_operator) { + return false; + } + if (!CTX_wm_region_view3d(C)) { return false; } diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index f06633c1c92..2e9f297b705 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2607,7 +2607,6 @@ static void ed_panel_draw(const bContext *C, strncat(block_name, unique_panel_str, INSTANCED_PANEL_UNIQUE_STR_LEN); } uiBlock *block = UI_block_begin(C, region, block_name, UI_EMBOSS); - UI_block_set_search_filter(block, search_filter); UI_block_set_search_only(block, search_only); bool open; @@ -2634,7 +2633,7 @@ static void ed_panel_draw(const bContext *C, pt->draw_header_preset(C, panel); - UI_block_apply_search_filter(block); + UI_block_apply_search_filter(block, search_filter); UI_block_layout_resolve(block, &xco, &yco); UI_block_translate(block, headerend - xco, 0); panel->layout = NULL; @@ -2666,7 +2665,7 @@ static void ed_panel_draw(const bContext *C, pt->draw_header(C, panel); - UI_block_apply_search_filter(block); + UI_block_apply_search_filter(block, search_filter); UI_block_layout_resolve(block, &xco, &yco); panel->labelofs = xco - labelx; panel->layout = NULL; @@ -2703,7 +2702,7 @@ static void ed_panel_draw(const bContext *C, pt->draw(C, panel); - UI_block_apply_search_filter(block); + UI_block_apply_search_filter(block, search_filter); UI_block_layout_resolve(block, &xco, &yco); panel->layout = NULL; diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index 0c2280f0c7e..45c43a5853d 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -735,7 +735,7 @@ static bool graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt)) SpaceGraph *sipo = CTX_wm_space_graph(C); if (sipo->mode != SIPO_MODE_DRIVERS) { - return 0; + return false; } return graph_panel_context(C, NULL, NULL); diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 90fe95c6818..6467ba65975 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -2731,7 +2731,7 @@ static bool graphkeys_framejump_poll(bContext *C) { /* prevent changes during render */ if (G.is_rendering) { - return 0; + return false; } return graphop_visible_keyframes_poll(C); @@ -3620,7 +3620,7 @@ static bool graph_driver_delete_invalid_poll(bContext *C) /* firstly, check if in Graph Editor */ if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { - return 0; + return false; } /* try to init Anim-Context stuff ourselves and check */ diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c index de25a2d990d..22c185e36e5 100644 --- a/source/blender/editors/space_graph/graph_ops.c +++ b/source/blender/editors/space_graph/graph_ops.c @@ -66,7 +66,7 @@ static bool graphview_cursor_poll(bContext *C) { /* prevent changes during render */ if (G.is_rendering) { - return 0; + return false; } return ED_operator_graphedit_active(C); diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c index 6d08fd00cab..ffac9f1c722 100644 --- a/source/blender/editors/space_graph/graph_utils.c +++ b/source/blender/editors/space_graph/graph_utils.c @@ -138,17 +138,17 @@ bool graphop_visible_keyframes_poll(bContext *C) ScrArea *area = CTX_wm_area(C); size_t items; int filter; - short found = 0; + bool found = false; /* firstly, check if in Graph Editor */ // TODO: also check for region? if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { - return 0; + return found; } /* try to init Anim-Context stuff ourselves and check */ if (ANIM_animdata_get_context(C, &ac) == 0) { - return 0; + return found; } /* loop over the visible (selection doesn't matter) F-Curves, and see if they're suitable @@ -157,7 +157,7 @@ bool graphop_visible_keyframes_poll(bContext *C) filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE); items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); if (items == 0) { - return 0; + return found; } for (ale = anim_data.first; ale; ale = ale->next) { @@ -172,7 +172,7 @@ bool graphop_visible_keyframes_poll(bContext *C) continue; } if (BKE_fcurve_are_keyframes_usable(fcu)) { - found = 1; + found = true; break; } } @@ -191,17 +191,17 @@ bool graphop_editable_keyframes_poll(bContext *C) ScrArea *area = CTX_wm_area(C); size_t items; int filter; - short found = 0; + bool found = false; /* firstly, check if in Graph Editor */ // TODO: also check for region? if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { - return 0; + return found; } /* try to init Anim-Context stuff ourselves and check */ if (ANIM_animdata_get_context(C, &ac) == 0) { - return 0; + return found; } /* loop over the editable F-Curves, and see if they're suitable @@ -210,7 +210,7 @@ bool graphop_editable_keyframes_poll(bContext *C) filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_FOREDIT | ANIMFILTER_CURVE_VISIBLE); items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); if (items == 0) { - return 0; + return found; } for (ale = anim_data.first; ale; ale = ale->next) { @@ -222,11 +222,12 @@ bool graphop_editable_keyframes_poll(bContext *C) * - F-Curve modifiers do not interfere with the result too much * (i.e. the modifier-control drawing check returns false) */ - if (fcu->bezt == NULL) { + if (fcu->bezt == NULL && fcu->fpt != NULL) { + /* This is a baked curve, it is never editable. */ continue; } if (BKE_fcurve_is_keyframable(fcu)) { - found = 1; + found = true; break; } } @@ -242,23 +243,23 @@ bool graphop_active_fcurve_poll(bContext *C) bAnimContext ac; bAnimListElem *ale; ScrArea *area = CTX_wm_area(C); - bool has_fcurve = 0; + bool has_fcurve = false; /* firstly, check if in Graph Editor */ // TODO: also check for region? if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { - return 0; + return has_fcurve; } /* try to init Anim-Context stuff ourselves and check */ if (ANIM_animdata_get_context(C, &ac) == 0) { - return 0; + return has_fcurve; } /* try to get the Active F-Curve */ ale = get_active_fcurve_channel(&ac); if (ale == NULL) { - return 0; + return has_fcurve; } /* Do we have a suitable F-Curves? @@ -300,12 +301,12 @@ bool graphop_selected_fcurve_poll(bContext *C) /* firstly, check if in Graph Editor */ // TODO: also check for region? if ((area == NULL) || (area->spacetype != SPACE_GRAPH)) { - return 0; + return false; } /* try to init Anim-Context stuff ourselves and check */ if (ANIM_animdata_get_context(C, &ac) == 0) { - return 0; + return false; } /* Get the editable + selected F-Curves, and as long as we got some, we can return. @@ -314,12 +315,12 @@ bool graphop_selected_fcurve_poll(bContext *C) filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_SEL | ANIMFILTER_FOREDIT); items = ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype); if (items == 0) { - return 0; + return false; } /* cleanup and return findings */ ANIM_animdata_freelist(&anim_data); - return 1; + return true; } /* ************************************************************** */ diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 86bb189c638..f6f3571018a 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -518,7 +518,12 @@ static int nlachannels_pushdown_exec(bContext *C, wmOperator *op) /* 'push-down' action - only usable when not in TweakMode */ BKE_nla_action_pushdown(adt); - DEG_id_tag_update_ex(CTX_data_main(C), id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); + struct Main *bmain = CTX_data_main(C); + DEG_id_tag_update_ex(bmain, id, ID_RECALC_ANIMATION); + + /* The action needs updating too, as FCurve modifiers are to be reevaluated. They won't extend + * beyond the NLA strip after pushing down to the NLA. */ + DEG_id_tag_update_ex(bmain, &adt->action->id, ID_RECALC_ANIMATION); /* set notifier that things have changed */ WM_event_add_notifier(C, NC_ANIMATION | ND_NLA_ACTCHANGE, NULL); diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 2d3f550058f..1160a5b926c 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -2137,166 +2137,12 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te) if (ob->type != OB_GPENCIL) { ModifierData *md = BLI_findlink(&ob->modifiers, tselem->nr); - switch ((ModifierType)md->type) { - case eModifierType_Subsurf: - data.icon = ICON_MOD_SUBSURF; - break; - case eModifierType_Armature: - data.icon = ICON_MOD_ARMATURE; - break; - case eModifierType_Lattice: - data.icon = ICON_MOD_LATTICE; - break; - case eModifierType_Curve: - data.icon = ICON_MOD_CURVE; - break; - case eModifierType_Build: - data.icon = ICON_MOD_BUILD; - break; - case eModifierType_Mirror: - data.icon = ICON_MOD_MIRROR; - break; - case eModifierType_Decimate: - data.icon = ICON_MOD_DECIM; - break; - case eModifierType_Wave: - data.icon = ICON_MOD_WAVE; - break; - case eModifierType_Hook: - data.icon = ICON_HOOK; - break; - case eModifierType_Softbody: - data.icon = ICON_MOD_SOFT; - break; - case eModifierType_Boolean: - data.icon = ICON_MOD_BOOLEAN; - break; - case eModifierType_ParticleSystem: - data.icon = ICON_MOD_PARTICLES; - break; - case eModifierType_ParticleInstance: - data.icon = ICON_MOD_PARTICLES; - break; - case eModifierType_EdgeSplit: - data.icon = ICON_MOD_EDGESPLIT; - break; - case eModifierType_Array: - data.icon = ICON_MOD_ARRAY; - break; - case eModifierType_UVProject: - case eModifierType_UVWarp: /* TODO, get own icon */ - data.icon = ICON_MOD_UVPROJECT; - break; - case eModifierType_Displace: - data.icon = ICON_MOD_DISPLACE; - break; - case eModifierType_Shrinkwrap: - data.icon = ICON_MOD_SHRINKWRAP; - break; - case eModifierType_Cast: - data.icon = ICON_MOD_CAST; - break; - case eModifierType_MeshDeform: - case eModifierType_SurfaceDeform: - data.icon = ICON_MOD_MESHDEFORM; - break; - case eModifierType_Bevel: - data.icon = ICON_MOD_BEVEL; - break; - case eModifierType_Smooth: - case eModifierType_LaplacianSmooth: - case eModifierType_CorrectiveSmooth: - data.icon = ICON_MOD_SMOOTH; - break; - case eModifierType_SimpleDeform: - data.icon = ICON_MOD_SIMPLEDEFORM; - break; - case eModifierType_Mask: - data.icon = ICON_MOD_MASK; - break; - case eModifierType_Cloth: - data.icon = ICON_MOD_CLOTH; - break; - case eModifierType_Explode: - data.icon = ICON_MOD_EXPLODE; - break; - case eModifierType_Collision: - case eModifierType_Surface: - data.icon = ICON_MOD_PHYSICS; - break; - case eModifierType_Fluidsim: /* deprecated, old fluid modifier */ - data.icon = ICON_MOD_FLUIDSIM; - break; - case eModifierType_Multires: - data.icon = ICON_MOD_MULTIRES; - break; - case eModifierType_Fluid: - data.icon = ICON_MOD_FLUID; - break; - case eModifierType_Solidify: - data.icon = ICON_MOD_SOLIDIFY; - break; - case eModifierType_Screw: - data.icon = ICON_MOD_SCREW; - break; - case eModifierType_Remesh: - data.icon = ICON_MOD_REMESH; - break; - case eModifierType_WeightVGEdit: - case eModifierType_WeightVGMix: - case eModifierType_WeightVGProximity: - data.icon = ICON_MOD_VERTEX_WEIGHT; - break; - case eModifierType_DynamicPaint: - data.icon = ICON_MOD_DYNAMICPAINT; - break; - case eModifierType_Ocean: - data.icon = ICON_MOD_OCEAN; - break; - case eModifierType_Warp: - data.icon = ICON_MOD_WARP; - break; - case eModifierType_Skin: - data.icon = ICON_MOD_SKIN; - break; - case eModifierType_Triangulate: - data.icon = ICON_MOD_TRIANGULATE; - break; - case eModifierType_MeshCache: - data.icon = ICON_MOD_MESHDEFORM; /* XXX, needs own icon */ - break; - case eModifierType_MeshSequenceCache: - data.icon = ICON_MOD_MESHDEFORM; /* XXX, needs own icon */ - break; - case eModifierType_Wireframe: - data.icon = ICON_MOD_WIREFRAME; - break; - case eModifierType_Weld: - data.icon = ICON_AUTOMERGE_OFF; /* XXX, needs own icon */ - break; - case eModifierType_LaplacianDeform: - data.icon = ICON_MOD_MESHDEFORM; /* XXX, needs own icon */ - break; - case eModifierType_DataTransfer: - data.icon = ICON_MOD_DATA_TRANSFER; - break; - case eModifierType_NormalEdit: - case eModifierType_WeightedNormal: - data.icon = ICON_MOD_NORMALEDIT; - break; - case eModifierType_Simulation: - data.icon = ICON_PHYSICS; /* TODO: Use correct icon. */ - break; - case eModifierType_MeshToVolume: - data.icon = ICON_VOLUME_DATA; /* TODO: Use correct icon. */ - break; - /* Default */ - case eModifierType_None: - case eModifierType_ShapeKey: - - case NUM_MODIFIER_TYPES: - data.icon = ICON_DOT; - break; + const ModifierTypeInfo *modifier_type = BKE_modifier_get_info(md->type); + if (modifier_type != NULL) { + data.icon = modifier_type->icon; + } + else { + data.icon = ICON_DOT; } } else { diff --git a/source/blender/editors/transform/transform_mode_edge_seq_slide.c b/source/blender/editors/transform/transform_mode_edge_seq_slide.c index d2474d78387..befd54c3636 100644 --- a/source/blender/editors/transform/transform_mode_edge_seq_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_seq_slide.c @@ -93,13 +93,13 @@ static void applySeqSlideValue(TransInfo *t, const float val[2]) static void applySeqSlide(TransInfo *t, const int mval[2]) { char str[UI_MAX_DRAW_STR]; - float values_final[3]; + float values_final[2] = {0.0f}; snapSequenceBounds(t, mval); if (applyNumInput(&t->num, values_final)) { if (t->con.mode & CON_APPLY) { if (t->con.mode & CON_AXIS0) { - /* Do nothing. */ + mul_v2_v2fl(values_final, t->spacemtx[0], values_final[0]); } else { mul_v2_v2fl(values_final, t->spacemtx[1], values_final[0]); diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c index 758a6d04f11..c17e6e596e0 100644 --- a/source/blender/editors/transform/transform_mode_translate.c +++ b/source/blender/editors/transform/transform_mode_translate.c @@ -355,7 +355,7 @@ static void applyTranslationValue(TransInfo *t, const float vec[3]) static void applyTranslation(TransInfo *t, const int UNUSED(mval[2])) { char str[UI_MAX_DRAW_STR]; - float global_dir[3]; + float global_dir[3] = {0.0f}; if (t->flag & T_INPUT_IS_VALUES_FINAL) { mul_v3_m3v3(global_dir, t->spacemtx, t->values); @@ -363,7 +363,7 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2])) else if (applyNumInput(&t->num, global_dir)) { if (t->con.mode & CON_APPLY) { if (t->con.mode & CON_AXIS0) { - /* Do nothing. */ + mul_v3_v3fl(global_dir, t->spacemtx[0], global_dir[0]); } else if (t->con.mode & CON_AXIS1) { mul_v3_v3fl(global_dir, t->spacemtx[1], global_dir[0]); @@ -372,6 +372,9 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2])) mul_v3_v3fl(global_dir, t->spacemtx[2], global_dir[0]); } } + else { + mul_v3_m3v3(global_dir, t->spacemtx, global_dir); + } } else { copy_v3_v3(global_dir, t->values); diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index f043dc92624..e4c0fd86377 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -2017,7 +2017,7 @@ static int smart_project_exec(bContext *C, wmOperator *op) MemArena *arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, __func__); uint objects_len = 0; - Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs( + Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data( view_layer, v3d, &objects_len); Object **objects_changed = MEM_mallocN(sizeof(*objects_changed) * objects_len, __func__); @@ -2032,6 +2032,10 @@ static int smart_project_exec(bContext *C, wmOperator *op) BMEditMesh *em = BKE_editmesh_from_object(obedit); bool changed = false; + if (!ED_uvedit_ensure_uvs(obedit)) { + continue; + } + const uint cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV); ThickFace *thick_faces = MEM_mallocN(sizeof(*thick_faces) * em->bm->totface, __func__); diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 69c010428c2..2c270a3a8c2 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -1979,12 +1979,11 @@ typedef struct WeldModifierData { /* The limit below which to merge vertices. */ float merge_dist; - unsigned int max_interactions; /* Name of vertex group to use to mask, MAX_VGROUP_NAME. */ char defgrp_name[64]; short flag; - char _pad[6]; + char _pad[2]; } WeldModifierData; /* WeldModifierData->flag */ diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index e83353e04df..1ed2fba208f 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -629,8 +629,7 @@ typedef struct UserDef_Experimental { char use_sculpt_vertex_colors; char use_image_editor_legacy_drawing; char use_tools_missing_icons; - /** `makesdna` does not allow empty structs. */ - char _pad[1]; + char use_switch_object_operator; } UserDef_Experimental; #define USER_EXPERIMENTAL_TEST(userdef, member) \ diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 605cfe7caf8..cfd87f14d48 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -492,6 +492,7 @@ extern StructRNA RNA_PropertyGroup; extern StructRNA RNA_PropertyGroupItem; extern StructRNA RNA_PythonConstraint; extern StructRNA RNA_Region; +extern StructRNA RNA_RemeshModifier; extern StructRNA RNA_RenderEngine; extern StructRNA RNA_RenderLayer; extern StructRNA RNA_RenderPass; @@ -564,6 +565,9 @@ extern StructRNA RNA_ShrinkwrapModifier; extern StructRNA RNA_SimpleDeformModifier; extern StructRNA RNA_SimplifyGpencilModifier; extern StructRNA RNA_Simulation; +#ifdef WITH_PARTICLE_NODES +extern StructRNA RNA_SimulationModifier; +#endif extern StructRNA RNA_SimulationNode; extern StructRNA RNA_SimulationNodeTree; extern StructRNA RNA_SkinModifier; @@ -679,6 +683,7 @@ extern StructRNA RNA_TrackToConstraint; extern StructRNA RNA_TransformConstraint; extern StructRNA RNA_TransformOrientationSlot; extern StructRNA RNA_TransformSequence; +extern StructRNA RNA_TriangulateModifier; extern StructRNA RNA_UILayout; extern StructRNA RNA_UIList; extern StructRNA RNA_UIPieMenu; diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c index ac4553349cc..6fd1609e77b 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.c +++ b/source/blender/makesrna/intern/rna_access_compare_override.c @@ -908,9 +908,18 @@ static void rna_property_override_apply_ex(Main *bmain, if (opop->subitem_local_name != NULL) { RNA_property_collection_lookup_string( ptr_src, prop_src, opop->subitem_local_name, &private_ptr_item_src); - if (opop->subitem_reference_name != NULL) { - RNA_property_collection_lookup_string( - ptr_dst, prop_dst, opop->subitem_reference_name, &private_ptr_item_dst); + if (opop->subitem_reference_name != NULL && + RNA_property_collection_lookup_string( + ptr_dst, prop_dst, opop->subitem_reference_name, &private_ptr_item_dst)) { + /* This is rather fragile, but the fact that local override IDs may have a different name + * than their linked reference makes it necessary. + * Basically, here we are considering that if we cannot find the original linked ID in + * the local override we are (re-)applying the operations, then it may be because soe of + * those operations have already been applied, and we may already have the local ID + * pointer we want to set. + * This happens e.g. during resync of an override, since we have already remapped all ID + * pointers to their expected values. + * In that case we simply try to get the property from the local expected name. */ } else { RNA_property_collection_lookup_string( @@ -962,6 +971,19 @@ static void rna_property_override_apply_ex(Main *bmain, ptr_item_dst = &private_ptr_item_dst; ptr_item_src = &private_ptr_item_src; ptr_item_storage = &private_ptr_item_storage; + + if (ptr_item_dst->type == NULL) { + printf("Failed to find destination sub-item '%s' of '%s' in new override data '%s'\n", + opop->subitem_reference_name, + op->rna_path, + ptr_dst->owner_id->name); + } + if (ptr_item_src->type == NULL) { + printf("Failed to find source sub-item '%s' of '%s' in old override data '%s'\n", + opop->subitem_local_name, + op->rna_path, + ptr_src->owner_id->name); + } } if (!rna_property_override_operation_apply(bmain, @@ -975,9 +997,9 @@ static void rna_property_override_apply_ex(Main *bmain, ptr_item_src, ptr_item_storage, opop)) { - /* TODO No assert here, would be much much better to just report as warning, - * failing override applications will probably be fairly common! */ - BLI_assert(0); + printf("Failed to apply '%s' override operation on %s\n", + op->rna_path, + ptr_src->owner_id->name); } } } diff --git a/source/blender/makesrna/intern/rna_collection.c b/source/blender/makesrna/intern/rna_collection.c index b0250897d6d..69f8bd85975 100644 --- a/source/blender/makesrna/intern/rna_collection.c +++ b/source/blender/makesrna/intern/rna_collection.c @@ -167,13 +167,17 @@ static bool rna_Collection_objects_override_apply(Main *bmain, Collection *coll_dst = (Collection *)ptr_dst->owner_id; if (ptr_item_dst->type == NULL || ptr_item_src->type == NULL) { - BLI_assert(0 && "invalid source or destination object."); + // BLI_assert(0 && "invalid source or destination object."); return false; } Object *ob_dst = ptr_item_dst->data; Object *ob_src = ptr_item_src->data; + if (ob_src == ob_dst) { + return true; + } + CollectionObject *cob_dst = BLI_findptr( &coll_dst->gobject, ob_dst, offsetof(CollectionObject, ob)); diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 7e4c9477c6a..b60da2c2260 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -931,17 +931,17 @@ static void rna_def_beztriple(BlenderRNA *brna) /* Boolean values */ prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "f1", 0); + RNA_def_property_boolean_sdna(prop, NULL, "f1", SELECT); RNA_def_property_ui_text(prop, "Handle 1 selected", "Handle 1 selection status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "f3", 0); + RNA_def_property_boolean_sdna(prop, NULL, "f3", SELECT); RNA_def_property_ui_text(prop, "Handle 2 selected", "Handle 2 selection status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop = RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "f2", 0); + RNA_def_property_boolean_sdna(prop, NULL, "f2", SELECT); RNA_def_property_ui_text(prop, "Control Point selected", "Control point selection status"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index d5449a69cf6..ac4395f08c9 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -2016,17 +2016,17 @@ static void rna_def_fkeyframe(BlenderRNA *brna) /* Boolean values */ prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "f1", 0); + RNA_def_property_boolean_sdna(prop, NULL, "f1", SELECT); RNA_def_property_ui_text(prop, "Handle 1 selected", "Left handle selection status"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "f3", 0); + RNA_def_property_boolean_sdna(prop, NULL, "f3", SELECT); RNA_def_property_ui_text(prop, "Handle 2 selected", "Right handle selection status"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); prop = RNA_def_property(srna, "select_control_point", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "f2", 0); + RNA_def_property_boolean_sdna(prop, NULL, "f2", SELECT); RNA_def_property_ui_text(prop, "Select", "Control point selection status"); RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME | NA_SELECTED, NULL); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 94f9fd9bb49..a3458a7b8ff 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -619,128 +619,10 @@ static void rna_UVProject_projectors_begin(CollectionPropertyIterator *iter, Poi static StructRNA *rna_Modifier_refine(struct PointerRNA *ptr) { ModifierData *md = (ModifierData *)ptr->data; - - switch ((ModifierType)md->type) { - case eModifierType_Subsurf: - return &RNA_SubsurfModifier; - case eModifierType_Lattice: - return &RNA_LatticeModifier; - case eModifierType_Curve: - return &RNA_CurveModifier; - case eModifierType_Build: - return &RNA_BuildModifier; - case eModifierType_Mirror: - return &RNA_MirrorModifier; - case eModifierType_Decimate: - return &RNA_DecimateModifier; - case eModifierType_Wave: - return &RNA_WaveModifier; - case eModifierType_Armature: - return &RNA_ArmatureModifier; - case eModifierType_Hook: - return &RNA_HookModifier; - case eModifierType_Softbody: - return &RNA_SoftBodyModifier; - case eModifierType_Boolean: - return &RNA_BooleanModifier; - case eModifierType_Array: - return &RNA_ArrayModifier; - case eModifierType_EdgeSplit: - return &RNA_EdgeSplitModifier; - case eModifierType_Displace: - return &RNA_DisplaceModifier; - case eModifierType_UVProject: - return &RNA_UVProjectModifier; - case eModifierType_Smooth: - return &RNA_SmoothModifier; - case eModifierType_Cast: - return &RNA_CastModifier; - case eModifierType_MeshDeform: - return &RNA_MeshDeformModifier; - case eModifierType_ParticleSystem: - return &RNA_ParticleSystemModifier; - case eModifierType_ParticleInstance: - return &RNA_ParticleInstanceModifier; - case eModifierType_Explode: - return &RNA_ExplodeModifier; - case eModifierType_Cloth: - return &RNA_ClothModifier; - case eModifierType_Collision: - return &RNA_CollisionModifier; - case eModifierType_Bevel: - return &RNA_BevelModifier; - case eModifierType_Shrinkwrap: - return &RNA_ShrinkwrapModifier; - case eModifierType_Mask: - return &RNA_MaskModifier; - case eModifierType_SimpleDeform: - return &RNA_SimpleDeformModifier; - case eModifierType_Multires: - return &RNA_MultiresModifier; - case eModifierType_Surface: - return &RNA_SurfaceModifier; - case eModifierType_Fluid: - return &RNA_FluidModifier; - case eModifierType_Solidify: - return &RNA_SolidifyModifier; - case eModifierType_Screw: - return &RNA_ScrewModifier; - case eModifierType_Ocean: - return &RNA_OceanModifier; - case eModifierType_Warp: - return &RNA_WarpModifier; - case eModifierType_WeightVGEdit: - return &RNA_VertexWeightEditModifier; - case eModifierType_WeightVGMix: - return &RNA_VertexWeightMixModifier; - case eModifierType_WeightVGProximity: - return &RNA_VertexWeightProximityModifier; - case eModifierType_DynamicPaint: - return &RNA_DynamicPaintModifier; - case eModifierType_Remesh: - return &RNA_RemeshModifier; - case eModifierType_Skin: - return &RNA_SkinModifier; - case eModifierType_LaplacianSmooth: - return &RNA_LaplacianSmoothModifier; - case eModifierType_Triangulate: - return &RNA_TriangulateModifier; - case eModifierType_UVWarp: - return &RNA_UVWarpModifier; - case eModifierType_MeshCache: - return &RNA_MeshCacheModifier; - case eModifierType_LaplacianDeform: - return &RNA_LaplacianDeformModifier; - case eModifierType_Weld: - return &RNA_WeldModifier; - case eModifierType_Wireframe: - return &RNA_WireframeModifier; - case eModifierType_DataTransfer: - return &RNA_DataTransferModifier; - case eModifierType_NormalEdit: - return &RNA_NormalEditModifier; - case eModifierType_CorrectiveSmooth: - return &RNA_CorrectiveSmoothModifier; - case eModifierType_MeshSequenceCache: - return &RNA_MeshSequenceCacheModifier; - case eModifierType_SurfaceDeform: - return &RNA_SurfaceDeformModifier; - case eModifierType_WeightedNormal: - return &RNA_WeightedNormalModifier; - case eModifierType_Simulation: -# ifdef WITH_PARTICLE_NODES - return &RNA_SimulationModifier; -# endif - case eModifierType_MeshToVolume: - return &RNA_MeshToVolumeModifier; - /* Default */ - case eModifierType_Fluidsim: /* deprecated */ - case eModifierType_None: - case eModifierType_ShapeKey: - case NUM_MODIFIER_TYPES: - return &RNA_Modifier; + const ModifierTypeInfo *modifier_type = BKE_modifier_get_info(md->type); + if (modifier_type != NULL) { + return modifier_type->srna; } - return &RNA_Modifier; } @@ -6339,15 +6221,6 @@ static void rna_def_modifier_weld(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Merge Distance", "Limit below which to merge vertices"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_property(srna, "max_interactions", PROP_INT, PROP_UNSIGNED); - RNA_def_property_int_sdna(prop, NULL, "max_interactions"); - RNA_def_property_ui_text( - prop, - "Duplicate Limit", - "For a better performance, limits the number of elements found per vertex. " - "(0 makes it infinite)"); - RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "defgrp_name"); RNA_def_property_ui_text( diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index cab596c10fb..8d87de23b3a 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -1306,8 +1306,6 @@ static int rna_property_override_diff_propptr(Main *bmain, /* If not yet overridden, or if we are handling sub-items (inside a collection)... */ if (op != NULL) { - BKE_lib_override_library_operations_tag(op, IDOVERRIDE_LIBRARY_TAG_UNUSED, false); - if (created || op->rna_prop_type == 0) { op->rna_prop_type = property_type; } @@ -1317,19 +1315,27 @@ static int rna_property_override_diff_propptr(Main *bmain, if (created || rna_itemname_a != NULL || rna_itemname_b != NULL || rna_itemindex_a != -1 || rna_itemindex_b != -1) { - BKE_lib_override_library_property_operation_get(op, - IDOVERRIDE_LIBRARY_OP_REPLACE, - rna_itemname_b, - rna_itemname_a, - rna_itemindex_b, - rna_itemindex_a, - true, - NULL, - &created); + IDOverrideLibraryPropertyOperation *opop; + opop = BKE_lib_override_library_property_operation_get(op, + IDOVERRIDE_LIBRARY_OP_REPLACE, + rna_itemname_b, + rna_itemname_a, + rna_itemindex_b, + rna_itemindex_a, + true, + NULL, + &created); + /* Do not use BKE_lib_override_library_operations_tag here, we do not want to validate + * as used all of its operations. */ + op->tag &= ~IDOVERRIDE_LIBRARY_TAG_UNUSED; + opop->tag &= ~IDOVERRIDE_LIBRARY_TAG_UNUSED; if (r_override_changed) { *r_override_changed = created; } } + else { + BKE_lib_override_library_operations_tag(op, IDOVERRIDE_LIBRARY_TAG_UNUSED, false); + } } } diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 7986e129067..0e1c5af8fae 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -6158,6 +6158,11 @@ static void rna_def_userdef_experimental(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_vertex_colors", 1); RNA_def_property_ui_text(prop, "Sculpt Vertex Colors", "Use the new Vertex Painting system"); + prop = RNA_def_property(srna, "use_switch_object_operator", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "use_switch_object_operator", 1); + RNA_def_property_ui_text( + prop, "Switch Object Operator", "Enable the operator to switch objects by pressing D"); + prop = RNA_def_property(srna, "use_image_editor_legacy_drawing", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "use_image_editor_legacy_drawing", 1); RNA_def_property_ui_text( diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index 80951288494..3bc8a23184b 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -192,6 +192,11 @@ if(WITH_OPENVDB) add_definitions(-DWITH_OPENVDB ${OPENVDB_DEFINITIONS}) endif() +if(WITH_EXPERIMENTAL_FEATURES) + add_definitions(-DWITH_PARTICLE_NODES) + add_definitions(-DWITH_HAIR_NODES) +endif() + # So we can have special tricks in modifier system. blender_add_lib(bf_modifiers "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c index f42f67417c3..f4b2df617af 100644 --- a/source/blender/modifiers/intern/MOD_armature.c +++ b/source/blender/modifiers/intern/MOD_armature.c @@ -278,9 +278,11 @@ ModifierTypeInfo modifierType_Armature = { /* name */ "Armature", /* structName */ "ArmatureModifierData", /* structSize */ sizeof(ArmatureModifierData), + /* srna */ &RNA_ArmatureModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_ARMATURE, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 60e1a3de67e..70e557dd577 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -1010,10 +1010,12 @@ ModifierTypeInfo modifierType_Array = { /* name */ "Array", /* structName */ "ArrayModifierData", /* structSize */ sizeof(ArrayModifierData), + /* srna */ &RNA_ArrayModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_MOD_ARRAY, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index ab024bd824d..407ba179ef8 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -446,9 +446,11 @@ ModifierTypeInfo modifierType_Bevel = { /* name */ "Bevel", /* structName */ "BevelModifierData", /* structSize */ sizeof(BevelModifierData), + /* srna */ &RNA_BevelModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_MOD_BEVEL, /* copyData */ copyData, /* deformVerts */ NULL, /* deformMatrices */ NULL, diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index cd552d4e1ad..4005b56880f 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -751,8 +751,10 @@ ModifierTypeInfo modifierType_Boolean = { /* name */ "Boolean", /* structName */ "BooleanModifierData", /* structSize */ sizeof(BooleanModifierData), + /* srna */ &RNA_BooleanModifier, /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_BOOLEAN, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c index d3caffb819c..ac6c28e24c9 100644 --- a/source/blender/modifiers/intern/MOD_build.c +++ b/source/blender/modifiers/intern/MOD_build.c @@ -331,8 +331,10 @@ ModifierTypeInfo modifierType_Build = { /* name */ "Build", /* structName */ "BuildModifierData", /* structSize */ sizeof(BuildModifierData), + /* srna */ &RNA_BuildModifier, /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_MOD_BUILD, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index 4f2f6d219d8..00f4cd63b4e 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -579,9 +579,11 @@ ModifierTypeInfo modifierType_Cast = { /* name */ "Cast", /* structName */ "CastModifierData", /* structSize */ sizeof(CastModifierData), + /* srna */ &RNA_CastModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_CAST, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 7d0f245ecad..63fc869cadf 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -284,9 +284,11 @@ ModifierTypeInfo modifierType_Cloth = { /* name */ "Cloth", /* structName */ "ClothModifierData", /* structSize */ sizeof(ClothModifierData), + /* srna */ &RNA_ClothModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_UsesPointCache | eModifierTypeFlag_Single, + /* icon */ ICON_MOD_CLOTH, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index 863e0ab7395..d05b6327ec9 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -302,8 +302,10 @@ ModifierTypeInfo modifierType_Collision = { /* name */ "Collision", /* structName */ "CollisionModifierData", /* structSize */ sizeof(CollisionModifierData), + /* srna */ &RNA_CollisionModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_Single, + /* icon */ ICON_MOD_PHYSICS, /* copyData */ NULL, diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 9fb528da736..0e6b393ece2 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -844,8 +844,10 @@ ModifierTypeInfo modifierType_CorrectiveSmooth = { /* name */ "CorrectiveSmooth", /* structName */ "CorrectiveSmoothModifierData", /* structSize */ sizeof(CorrectiveSmoothModifierData), + /* srna */ &RNA_CorrectiveSmoothModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_SMOOTH, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c index ccbe8ff94d8..7195071c705 100644 --- a/source/blender/modifiers/intern/MOD_curve.c +++ b/source/blender/modifiers/intern/MOD_curve.c @@ -218,9 +218,11 @@ ModifierTypeInfo modifierType_Curve = { /* name */ "Curve", /* structName */ "CurveModifierData", /* structSize */ sizeof(CurveModifierData), + /* srna */ &RNA_CurveModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_CURVE, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index 6d89b76c9f7..2f65e59b9ec 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -470,9 +470,11 @@ ModifierTypeInfo modifierType_DataTransfer = { /* name */ "DataTransfer", /* structName */ "DataTransferModifierData", /* structSize */ sizeof(DataTransferModifierData), + /* srna */ &RNA_DataTransferModifier, /* type */ eModifierTypeType_NonGeometrical, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_UsesPreview, + /* icon */ ICON_MOD_DATA_TRANSFER, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index 72a868cc6a7..f0bfb3cc230 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -284,8 +284,10 @@ ModifierTypeInfo modifierType_Decimate = { /* name */ "Decimate", /* structName */ "DecimateModifierData", /* structSize */ sizeof(DecimateModifierData), + /* srna */ &RNA_DecimateModifier, /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_MOD_DECIM, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index caee077c475..f66a9c3bd4a 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -502,8 +502,10 @@ ModifierTypeInfo modifierType_Displace = { /* name */ "Displace", /* structName */ "DisplaceModifierData", /* structSize */ sizeof(DisplaceModifierData), + /* srna */ &RNA_DisplaceModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_DISPLACE, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index 440b4677411..91a43423478 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -203,10 +203,12 @@ ModifierTypeInfo modifierType_DynamicPaint = { /* name */ "Dynamic Paint", /* structName */ "DynamicPaintModifierData", /* structSize */ sizeof(DynamicPaintModifierData), + /* srna */ &RNA_DynamicPaintModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_UsesPointCache | eModifierTypeFlag_Single | eModifierTypeFlag_UsesPreview, + /* icon */ ICON_MOD_DYNAMICPAINT, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index 2699896ac67..cc4fa4e7118 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -167,10 +167,12 @@ ModifierTypeInfo modifierType_EdgeSplit = { /* name */ "EdgeSplit", /* structName */ "EdgeSplitModifierData", /* structSize */ sizeof(EdgeSplitModifierData), + /* srna */ &RNA_EdgeSplitModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_EDGESPLIT, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index 0858fe9510b..1f44941d625 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -1240,8 +1240,10 @@ ModifierTypeInfo modifierType_Explode = { /* name */ "Explode", /* structName */ "ExplodeModifierData", /* structSize */ sizeof(ExplodeModifierData), + /* srna */ &RNA_ExplodeModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh, + /* icon */ ICON_MOD_EXPLODE, /* copyData */ copyData, /* deformVerts */ NULL, diff --git a/source/blender/modifiers/intern/MOD_fluid.c b/source/blender/modifiers/intern/MOD_fluid.c index d9bc78df527..1274228540d 100644 --- a/source/blender/modifiers/intern/MOD_fluid.c +++ b/source/blender/modifiers/intern/MOD_fluid.c @@ -225,8 +225,10 @@ ModifierTypeInfo modifierType_Fluid = { /* name */ "Fluid", /* structName */ "FluidModifierData", /* structSize */ sizeof(FluidModifierData), + /* srna */ &RNA_FluidModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_Single, + /* icon */ ICON_MOD_FLUIDSIM, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c index 94a9a922ff7..f13c8087270 100644 --- a/source/blender/modifiers/intern/MOD_hook.c +++ b/source/blender/modifiers/intern/MOD_hook.c @@ -558,9 +558,11 @@ ModifierTypeInfo modifierType_Hook = { /* name */ "Hook", /* structName */ "HookModifierData", /* structSize */ sizeof(HookModifierData), + /* srna */ &RNA_HookModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_HOOK, /* copyData */ copyData, /* deformVerts */ deformVerts, diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.c b/source/blender/modifiers/intern/MOD_laplaciandeform.c index 8c297f11f7d..94b50a35e17 100644 --- a/source/blender/modifiers/intern/MOD_laplaciandeform.c +++ b/source/blender/modifiers/intern/MOD_laplaciandeform.c @@ -875,8 +875,10 @@ ModifierTypeInfo modifierType_LaplacianDeform = { /* name */ "LaplacianDeform", /* structName */ "LaplacianDeformModifierData", /* structSize */ sizeof(LaplacianDeformModifierData), + /* srna */ &RNA_LaplacianDeformModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_MESHDEFORM, /* copyData */ copyData, /* deformVerts */ deformVerts, diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index 4c438256661..e7fc031840d 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -622,8 +622,10 @@ ModifierTypeInfo modifierType_LaplacianSmooth = { /* name */ "LaplacianSmooth", /* structName */ "LaplacianSmoothModifierData", /* structSize */ sizeof(LaplacianSmoothModifierData), + /* srna */ &RNA_LaplacianSmoothModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_SMOOTH, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index 75c34b3cc89..db75ca295ba 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -174,9 +174,11 @@ ModifierTypeInfo modifierType_Lattice = { /* name */ "Lattice", /* structName */ "LatticeModifierData", /* structSize */ sizeof(LatticeModifierData), + /* srna */ &RNA_LatticeModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_LATTICE, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_mask.cc b/source/blender/modifiers/intern/MOD_mask.cc index 52d2bd11748..2bf1c58b126 100644 --- a/source/blender/modifiers/intern/MOD_mask.cc +++ b/source/blender/modifiers/intern/MOD_mask.cc @@ -437,10 +437,12 @@ ModifierTypeInfo modifierType_Mask = { /* name */ "Mask", /* structName */ "MaskModifierData", /* structSize */ sizeof(MaskModifierData), + /* srna */ &RNA_MaskModifier, /* type */ eModifierTypeType_Nonconstructive, /* flags */ (ModifierTypeFlag)(eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode), + /* icon */ ICON_MOD_MASK, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc index aef9efffea3..6709d747fbd 100644 --- a/source/blender/modifiers/intern/MOD_mesh_to_volume.cc +++ b/source/blender/modifiers/intern/MOD_mesh_to_volume.cc @@ -48,6 +48,8 @@ #include "BLI_index_range.hh" #include "BLI_span.hh" +#include "RNA_access.h" + #ifdef WITH_OPENVDB # include <openvdb/openvdb.h> # include <openvdb/tools/MeshToVolume.h> @@ -282,8 +284,11 @@ ModifierTypeInfo modifierType_MeshToVolume = { /* name */ "Mesh to Volume", /* structName */ "MeshToVolumeModifierData", /* structSize */ sizeof(MeshToVolumeModifierData), + /* srna */ &RNA_MeshToVolumeModifier, /* type */ eModifierTypeType_Constructive, /* flags */ static_cast<ModifierTypeFlag>(0), + /* icon */ ICON_VOLUME_DATA, /* TODO: Use correct icon. */ + /* copyData */ BKE_modifier_copydata_generic, /* deformVerts */ NULL, diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c index 456ece7704b..aa6f876b1c6 100644 --- a/source/blender/modifiers/intern/MOD_meshcache.c +++ b/source/blender/modifiers/intern/MOD_meshcache.c @@ -380,9 +380,11 @@ ModifierTypeInfo modifierType_MeshCache = { /* name */ "MeshCache", /* structName */ "MeshCacheModifierData", /* structSize */ sizeof(MeshCacheModifierData), + /* srna */ &RNA_MeshCacheModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_MESHDEFORM, /* TODO: Use correct icon. */ /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index 16b72bb358a..48552cfb9a4 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -629,9 +629,11 @@ ModifierTypeInfo modifierType_MeshDeform = { /* name */ "MeshDeform", /* structName */ "MeshDeformModifierData", /* structSize */ sizeof(MeshDeformModifierData), + /* srna */ &RNA_MeshDeformModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_MESHDEFORM, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c index dc465ee941c..c9437605a01 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.c +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c @@ -261,8 +261,10 @@ ModifierTypeInfo modifierType_MeshSequenceCache = { /* name */ "MeshSequenceCache", /* structName */ "MeshSeqCacheModifierData", /* structSize */ sizeof(MeshSeqCacheModifierData), + /* srna */ &RNA_MeshSequenceCacheModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_MOD_MESHDEFORM, /* TODO: Use correct icon. */ /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 75c92bfd815..5098ea37333 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -216,12 +216,14 @@ ModifierTypeInfo modifierType_Mirror = { /* name */ "Mirror", /* structName */ "MirrorModifierData", /* structSize */ sizeof(MirrorModifierData), + /* srna */ &RNA_MirrorModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs | /* this is only the case when 'MOD_MIR_VGROUP' is used */ eModifierTypeFlag_UsesPreview, + /* icon */ ICON_MOD_MIRROR, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 9c7ab50cb61..2c6ee50d419 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -510,9 +510,11 @@ ModifierTypeInfo modifierType_Multires = { /* name */ "Multires", /* structName */ "MultiresModifierData", /* structSize */ sizeof(MultiresModifierData), + /* srna */ &RNA_MultiresModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_RequiresOriginalData, + /* icon */ ICON_MOD_MULTIRES, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_none.c b/source/blender/modifiers/intern/MOD_none.c index a84a10f4b6c..d5721bf988c 100644 --- a/source/blender/modifiers/intern/MOD_none.c +++ b/source/blender/modifiers/intern/MOD_none.c @@ -27,6 +27,10 @@ #include "MOD_modifiertypes.h" +#include "UI_resources.h" + +#include "RNA_access.h" + /* We only need to define isDisabled; because it always returns 1, * no other functions will be called */ @@ -42,8 +46,10 @@ ModifierTypeInfo modifierType_None = { /* name */ "None", /* structName */ "ModifierData", /* structSize */ sizeof(ModifierData), + /* srna */ &RNA_Modifier, /* type */ eModifierTypeType_None, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_NONE, /* copyData */ NULL, diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c index 9962d3a55e0..691d3741b12 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.c +++ b/source/blender/modifiers/intern/MOD_normal_edit.c @@ -782,9 +782,11 @@ ModifierTypeInfo modifierType_NormalEdit = { /* name */ "NormalEdit", /* structName */ "NormalEditModifierData", /* structSize */ sizeof(NormalEditModifierData), + /* srna */ &RNA_NormalEditModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_NORMALEDIT, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index ccd105f8f69..b9f05d0cdd3 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -758,9 +758,11 @@ ModifierTypeInfo modifierType_Ocean = { /* name */ "Ocean", /* structName */ "OceanModifierData", /* structSize */ sizeof(OceanModifierData), + /* srna */ &RNA_OceanModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_OCEAN, /* copyData */ copyData, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index 597a61c6c16..1f9b7227caf 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -671,9 +671,11 @@ ModifierTypeInfo modifierType_ParticleInstance = { /* name */ "ParticleInstance", /* structName */ "ParticleInstanceModifierData", /* structSize */ sizeof(ParticleInstanceModifierData), + /* srna */ &RNA_ParticleInstanceModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_PARTICLE_INSTANCE, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index c2f411f5247..92ab084097b 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.c +++ b/source/blender/modifiers/intern/MOD_particlesystem.c @@ -312,12 +312,14 @@ ModifierTypeInfo modifierType_ParticleSystem = { /* name */ "ParticleSystem", /* structName */ "ParticleSystemModifierData", /* structSize */ sizeof(ParticleSystemModifierData), + /* srna */ &RNA_ParticleSystemModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_UsesPointCache /* | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode */ , + /* icon */ ICON_MOD_PARTICLES, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c index 7a58b985429..fe99cec23f9 100644 --- a/source/blender/modifiers/intern/MOD_remesh.c +++ b/source/blender/modifiers/intern/MOD_remesh.c @@ -291,9 +291,11 @@ ModifierTypeInfo modifierType_Remesh = { /* name */ "Remesh", /* structName */ "RemeshModifierData", /* structSize */ sizeof(RemeshModifierData), + /* srna */ &RNA_RemeshModifier, /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_REMESH, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index 5842d05da09..8c9af71c35b 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -1247,10 +1247,12 @@ ModifierTypeInfo modifierType_Screw = { /* name */ "Screw", /* structName */ "ScrewModifierData", /* structSize */ sizeof(ScrewModifierData), + /* srna */ &RNA_ScrewModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_SCREW, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_shapekey.c b/source/blender/modifiers/intern/MOD_shapekey.c index 801995d6dbc..f7ef5f40d4e 100644 --- a/source/blender/modifiers/intern/MOD_shapekey.c +++ b/source/blender/modifiers/intern/MOD_shapekey.c @@ -31,8 +31,12 @@ #include "BKE_key.h" #include "BKE_particle.h" +#include "RNA_access.h" + #include "MOD_modifiertypes.h" +#include "UI_resources.h" + static void deformVerts(ModifierData *UNUSED(md), const ModifierEvalContext *ctx, Mesh *UNUSED(mesh), @@ -121,9 +125,11 @@ ModifierTypeInfo modifierType_ShapeKey = { /* name */ "ShapeKey", /* structName */ "ShapeKeyModifierData", /* structSize */ sizeof(ShapeKeyModifierData), + /* srna */ &RNA_Modifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_DOT, /* copyData */ NULL, diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c index fb045cf8923..1f1aa375535 100644 --- a/source/blender/modifiers/intern/MOD_shrinkwrap.c +++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c @@ -278,10 +278,12 @@ ModifierTypeInfo modifierType_Shrinkwrap = { /* name */ "Shrinkwrap", /* structName */ "ShrinkwrapModifierData", /* structSize */ sizeof(ShrinkwrapModifierData), + /* srna */ &RNA_ShrinkwrapModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_SHRINKWRAP, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index a0bd4e2f20f..456a686ebbb 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -540,11 +540,13 @@ ModifierTypeInfo modifierType_SimpleDeform = { /* name */ "SimpleDeform", /* structName */ "SimpleDeformModifierData", /* structSize */ sizeof(SimpleDeformModifierData), + /* srna */ &RNA_SimpleDeformModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_SIMPLEDEFORM, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_simulation.cc b/source/blender/modifiers/intern/MOD_simulation.cc index 7b76cb56d5d..63632c76584 100644 --- a/source/blender/modifiers/intern/MOD_simulation.cc +++ b/source/blender/modifiers/intern/MOD_simulation.cc @@ -181,8 +181,14 @@ ModifierTypeInfo modifierType_Simulation = { /* name */ "Simulation", /* structName */ "SimulationModifierData", /* structSize */ sizeof(SimulationModifierData), +#ifdef WITH_PARTICLE_NODES + /* srna */ &RNA_SimulationModifier, +#else + /* srna */ &RNA_Modifier, +#endif /* type */ eModifierTypeType_None, /* flags */ (ModifierTypeFlag)0, + /* icon */ ICON_PHYSICS, /* TODO: Use correct icon. */ /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index f9d9e206914..94d144ff412 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -2011,8 +2011,10 @@ ModifierTypeInfo modifierType_Skin = { /* name */ "Skin", /* structName */ "SkinModifierData", /* structSize */ sizeof(SkinModifierData), + /* srna */ &RNA_SkinModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_SKIN, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c index 1939437d717..7076721d8ce 100644 --- a/source/blender/modifiers/intern/MOD_smooth.c +++ b/source/blender/modifiers/intern/MOD_smooth.c @@ -272,9 +272,11 @@ ModifierTypeInfo modifierType_Smooth = { /* name */ "Smooth", /* structName */ "SmoothModifierData", /* structSize */ sizeof(SmoothModifierData), + /* srna */ &RNA_SmoothModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_SMOOTH, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c index e688ec8470c..6603de7ca71 100644 --- a/source/blender/modifiers/intern/MOD_softbody.c +++ b/source/blender/modifiers/intern/MOD_softbody.c @@ -104,10 +104,12 @@ ModifierTypeInfo modifierType_Softbody = { /* name */ "Softbody", /* structName */ "SoftbodyModifierData", /* structSize */ sizeof(SoftbodyModifierData), + /* srna */ &RNA_SoftBodyModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_RequiresOriginalData | eModifierTypeFlag_Single | eModifierTypeFlag_UsesPointCache, + /* icon */ ICON_MOD_SOFT, /* copyData */ NULL, diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index 2c84def73b0..82a293bce5c 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -260,11 +260,13 @@ ModifierTypeInfo modifierType_Solidify = { /* name */ "Solidify", /* structName */ "SolidifyModifierData", /* structSize */ sizeof(SolidifyModifierData), + /* srna */ &RNA_SolidifyModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_SOLIDIFY, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_solidify_extrude.c b/source/blender/modifiers/intern/MOD_solidify_extrude.c index 818327e120b..b97ee434597 100644 --- a/source/blender/modifiers/intern/MOD_solidify_extrude.c +++ b/source/blender/modifiers/intern/MOD_solidify_extrude.c @@ -1004,23 +1004,23 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex &result->vdata, CD_MDEFORMVERT, CD_CALLOC, NULL, result->totvert); } /* Ultimate security check. */ - if (!dvert) { - return result; - } - result->dvert = dvert; - - if (rim_defgrp_index != -1) { - for (uint i = 0; i < rimVerts; i++) { - BKE_defvert_ensure_index(&result->dvert[new_vert_arr[i]], rim_defgrp_index)->weight = 1.0f; - BKE_defvert_ensure_index(&result->dvert[(do_shell ? new_vert_arr[i] : i) + numVerts], - rim_defgrp_index) - ->weight = 1.0f; + if (dvert != NULL) { + result->dvert = dvert; + + if (rim_defgrp_index != -1) { + for (uint i = 0; i < rimVerts; i++) { + BKE_defvert_ensure_index(&result->dvert[new_vert_arr[i]], rim_defgrp_index)->weight = + 1.0f; + BKE_defvert_ensure_index(&result->dvert[(do_shell ? new_vert_arr[i] : i) + numVerts], + rim_defgrp_index) + ->weight = 1.0f; + } } - } - if (shell_defgrp_index != -1) { - for (uint i = numVerts; i < result->totvert; i++) { - BKE_defvert_ensure_index(&result->dvert[i], shell_defgrp_index)->weight = 1.0f; + if (shell_defgrp_index != -1) { + for (uint i = numVerts; i < result->totvert; i++) { + BKE_defvert_ensure_index(&result->dvert[i], shell_defgrp_index)->weight = 1.0f; + } } } } diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index 1972f857877..c3b8492db9e 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -476,10 +476,12 @@ ModifierTypeInfo modifierType_Subsurf = { /* name */ "Subdivision", /* structName */ "SubsurfModifierData", /* structSize */ sizeof(SubsurfModifierData), + /* srna */ &RNA_SubsurfModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_MOD_SUBSURF, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c index a20ba3f899e..25499212bc5 100644 --- a/source/blender/modifiers/intern/MOD_surface.c +++ b/source/blender/modifiers/intern/MOD_surface.c @@ -226,9 +226,11 @@ ModifierTypeInfo modifierType_Surface = { /* name */ "Surface", /* structName */ "SurfaceModifierData", /* structSize */ sizeof(SurfaceModifierData), + /* srna */ &RNA_SurfaceModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_NoUserAdd, + /* icon */ ICON_MOD_PHYSICS, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index 6fc2bd29add..8be95138511 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -1500,8 +1500,10 @@ ModifierTypeInfo modifierType_SurfaceDeform = { /* name */ "SurfaceDeform", /* structName */ "SurfaceDeformModifierData", /* structSize */ sizeof(SurfaceDeformModifierData), + /* srna */ &RNA_SurfaceDeformModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_MESHDEFORM, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_triangulate.c b/source/blender/modifiers/intern/MOD_triangulate.c index 87ca067fba9..3b374948349 100644 --- a/source/blender/modifiers/intern/MOD_triangulate.c +++ b/source/blender/modifiers/intern/MOD_triangulate.c @@ -152,10 +152,12 @@ ModifierTypeInfo modifierType_Triangulate = { /* name */ "Triangulate", /* structName */ "TriangulateModifierData", /* structSize */ sizeof(TriangulateModifierData), + /* srna */ &RNA_TriangulateModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_MOD_TRIANGULATE, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index 426ba640f2f..6ebced29920 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -366,9 +366,11 @@ ModifierTypeInfo modifierType_UVProject = { /* name */ "UVProject", /* structName */ "UVProjectModifierData", /* structSize */ sizeof(UVProjectModifierData), + /* srna */ &RNA_UVProjectModifier, /* type */ eModifierTypeType_NonGeometrical, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_UVPROJECT, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c index f583709f311..f0b0149a221 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.c +++ b/source/blender/modifiers/intern/MOD_uvwarp.c @@ -326,9 +326,11 @@ ModifierTypeInfo modifierType_UVWarp = { /* name */ "UVWarp", /* structName */ "UVWarpModifierData", /* structSize */ sizeof(UVWarpModifierData), + /* srna */ &RNA_UVWarpModifier, /* type */ eModifierTypeType_NonGeometrical, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_UVPROJECT, /* TODO: Use correct icon. */ /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index 2e4e4da6803..a55714e3d5e 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -533,9 +533,11 @@ ModifierTypeInfo modifierType_Warp = { /* name */ "Warp", /* structName */ "WarpModifierData", /* structSize */ sizeof(WarpModifierData), + /* srna */ &RNA_WarpModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_WARP, /* copyData */ copyData, /* deformVerts */ deformVerts, diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index ae0c59ed9ef..580697486b3 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -495,9 +495,11 @@ ModifierTypeInfo modifierType_Wave = { /* name */ "Wave", /* structName */ "WaveModifierData", /* structSize */ sizeof(WaveModifierData), + /* srna */ &RNA_WaveModifier, /* type */ eModifierTypeType_OnlyDeform, /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_WAVE, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c index fc7ac822874..16c389d3453 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.c +++ b/source/blender/modifiers/intern/MOD_weighted_normal.c @@ -747,9 +747,11 @@ ModifierTypeInfo modifierType_WeightedNormal = { /* name */ "WeightedNormal", /* structName */ "WeightedNormalModifierData", /* structSize */ sizeof(WeightedNormalModifierData), + /* srna */ &RNA_WeightedNormalModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, + /* icon */ ICON_MOD_VERTEX_WEIGHT, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index 4cc19ab895e..e2a08f88ec1 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -423,9 +423,11 @@ ModifierTypeInfo modifierType_WeightVGEdit = { /* name */ "VertexWeightEdit", /* structName */ "WeightVGEditModifierData", /* structSize */ sizeof(WeightVGEditModifierData), + /* srna */ &RNA_VertexWeightEditModifier, /* type */ eModifierTypeType_NonGeometrical, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_UsesPreview, + /* icon */ ICON_MOD_VERTEX_WEIGHT, /* copyData */ copyData, diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 81d4a04fa78..1e60afc2e84 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -510,9 +510,11 @@ ModifierTypeInfo modifierType_WeightVGMix = { /* name */ "VertexWeightMix", /* structName */ "WeightVGMixModifierData", /* structSize */ sizeof(WeightVGMixModifierData), + /* srna */ &RNA_VertexWeightMixModifier, /* type */ eModifierTypeType_NonGeometrical, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_UsesPreview, + /* icon */ ICON_MOD_VERTEX_WEIGHT, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index c857ac53022..68a9ecac887 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -719,9 +719,11 @@ ModifierTypeInfo modifierType_WeightVGProximity = { /* name */ "VertexWeightProximity", /* structName */ "WeightVGProximityModifierData", /* structSize */ sizeof(WeightVGProximityModifierData), + /* srna */ &RNA_VertexWeightProximityModifier, /* type */ eModifierTypeType_NonGeometrical, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_UsesPreview, + /* icon */ ICON_MOD_VERTEX_WEIGHT, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_weld.c b/source/blender/modifiers/intern/MOD_weld.c index d7d24062fc5..a902da2496e 100644 --- a/source/blender/modifiers/intern/MOD_weld.c +++ b/source/blender/modifiers/intern/MOD_weld.c @@ -27,12 +27,17 @@ * - Review weight and vertex color interpolation.; */ +//#define USE_WELD_DEBUG +//#define USE_WELD_NORMALS +//#define USE_BVHTREEKDOP + #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" #include "BLI_alloca.h" -#include "BLI_kdopbvh.h" +#include "BLI_bitmap.h" +#include "BLI_kdtree.h" #include "BLI_math.h" #include "BLT_translation.h" @@ -43,7 +48,10 @@ #include "DNA_object_types.h" #include "DNA_screen_types.h" -#include "BKE_bvhutils.h" +#ifdef USE_BVHTREEKDOP +# include "BKE_bvhutils.h" +#endif + #include "BKE_context.h" #include "BKE_deform.h" #include "BKE_mesh.h" @@ -60,9 +68,6 @@ #include "MOD_modifiertypes.h" #include "MOD_ui_common.h" -//#define USE_WELD_DEBUG -//#define USE_WELD_NORMALS - /* Indicates when the element was not computed. */ #define OUT_OF_CONTEXT (uint)(-1) /* Indicates if the edge or face will be collapsed. */ @@ -136,9 +141,6 @@ typedef struct WeldMesh { /* Group of vertices to be merged. */ struct WeldGroup *vert_groups; uint *vert_groups_buffer; - /* From the original index of the vertex, this indicates which group it is or is going to be - * merged. */ - uint *vert_groups_map; /* Group of edges to be merged. */ struct WeldGroupEdge *edge_groups; @@ -202,21 +204,6 @@ static bool weld_iter_loop_of_poly_begin(WeldLoopOfPolyIter *iter, static bool weld_iter_loop_of_poly_next(WeldLoopOfPolyIter *iter); -static void weld_assert_vert_dest_map_setup(const BVHTreeOverlap *overlap, - const uint overlap_len, - const uint *vert_dest_map) -{ - const BVHTreeOverlap *overlap_iter = &overlap[0]; - for (uint i = overlap_len; i--; overlap_iter++) { - uint indexA = overlap_iter->indexA; - uint indexB = overlap_iter->indexB; - uint va_dst = vert_dest_map[indexA]; - uint vb_dst = vert_dest_map[indexB]; - - BLI_assert(va_dst == vb_dst); - } -} - static void weld_assert_edge_kill_len(const WeldEdge *wedge, const uint wedge_len, const uint supposed_kill_len) @@ -383,56 +370,10 @@ static void weld_assert_poly_len(const WeldPoly *wp, const WeldLoop *wloop) * \{ */ static void weld_vert_ctx_alloc_and_setup(const uint mvert_len, - const BVHTreeOverlap *overlap, - const uint overlap_len, uint *r_vert_dest_map, WeldVert **r_wvert, - uint *r_wvert_len, - uint *r_vert_kill_len) + uint *r_wvert_len) { - range_vn_u(r_vert_dest_map, mvert_len, 0); - - uint vert_kill_len = 0; - const BVHTreeOverlap *overlap_iter = &overlap[0]; - for (uint i = 0; i < overlap_len; i++, overlap_iter++) { - uint indexA = overlap_iter->indexA; - uint indexB = overlap_iter->indexB; - - BLI_assert(indexA < indexB); - - uint va_dst = r_vert_dest_map[indexA]; - while (va_dst != r_vert_dest_map[va_dst]) { - va_dst = r_vert_dest_map[va_dst]; - } - uint vb_dst = r_vert_dest_map[indexB]; - while (vb_dst != r_vert_dest_map[vb_dst]) { - vb_dst = r_vert_dest_map[vb_dst]; - } - if (va_dst == vb_dst) { - continue; - } - if (va_dst > vb_dst) { - SWAP(uint, va_dst, vb_dst); - } - vert_kill_len++; - r_vert_dest_map[vb_dst] = va_dst; - } - - /* Fix #r_vert_dest_map for next step. */ - for (uint i = 0; i < mvert_len; i++) { - if (i == r_vert_dest_map[i]) { - r_vert_dest_map[i] = OUT_OF_CONTEXT; - continue; - } - - uint v = i; - while (v != r_vert_dest_map[v] && r_vert_dest_map[v] != OUT_OF_CONTEXT) { - v = r_vert_dest_map[v]; - } - r_vert_dest_map[v] = v; - r_vert_dest_map[i] = v; - } - /* Vert Context. */ uint wvert_len = 0; @@ -450,13 +391,8 @@ static void weld_vert_ctx_alloc_and_setup(const uint mvert_len, } } -#ifdef USE_WELD_DEBUG - weld_assert_vert_dest_map_setup(overlap, overlap_len, r_vert_dest_map); -#endif - *r_wvert = MEM_reallocN(wvert, sizeof(*wvert) * wvert_len); *r_wvert_len = wvert_len; - *r_vert_kill_len = vert_kill_len; } static void weld_vert_groups_setup(const uint mvert_len, @@ -1382,8 +1318,8 @@ static void weld_poly_loop_ctx_setup(const MLoop *mloop, * \{ */ static void weld_mesh_context_create(const Mesh *mesh, - BVHTreeOverlap *overlap, - const uint overlap_len, + uint *vert_dest_map, + const uint vert_kill_len, WeldMesh *r_weld_mesh) { const MEdge *medge = mesh->medge; @@ -1394,19 +1330,13 @@ static void weld_mesh_context_create(const Mesh *mesh, const uint mloop_len = mesh->totloop; const uint mpoly_len = mesh->totpoly; - uint *vert_dest_map = MEM_mallocN(sizeof(*vert_dest_map) * mvert_len, __func__); uint *edge_dest_map = MEM_mallocN(sizeof(*edge_dest_map) * medge_len, __func__); struct WeldGroup *v_links = MEM_callocN(sizeof(*v_links) * mvert_len, __func__); WeldVert *wvert; uint wvert_len; - weld_vert_ctx_alloc_and_setup(mvert_len, - overlap, - overlap_len, - vert_dest_map, - &wvert, - &wvert_len, - &r_weld_mesh->vert_kill_len); + r_weld_mesh->vert_kill_len = vert_kill_len; + weld_vert_ctx_alloc_and_setup(mvert_len, vert_dest_map, &wvert, &wvert_len); uint *edge_ctx_map; WeldEdge *wedge; @@ -1449,7 +1379,6 @@ static void weld_mesh_context_create(const Mesh *mesh, &r_weld_mesh->edge_groups_buffer, &r_weld_mesh->edge_groups); - r_weld_mesh->vert_groups_map = vert_dest_map; r_weld_mesh->edge_groups_map = edge_dest_map; MEM_freeN(v_links); MEM_freeN(wvert); @@ -1461,7 +1390,6 @@ static void weld_mesh_context_free(WeldMesh *weld_mesh) { MEM_freeN(weld_mesh->vert_groups); MEM_freeN(weld_mesh->vert_groups_buffer); - MEM_freeN(weld_mesh->vert_groups_map); MEM_freeN(weld_mesh->edge_groups); MEM_freeN(weld_mesh->edge_groups_buffer); @@ -1620,6 +1548,7 @@ static void customdata_weld( /** \name Weld Modifier Main * \{ */ +#ifdef USE_BVHTREEKDOP struct WeldOverlapData { const MVert *mvert; float merge_dist_sq; @@ -1635,6 +1564,7 @@ static bool bvhtree_weld_overlap_cb(void *userdata, int index_a, int index_b, in } return false; } +#endif static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContext *ctx, Mesh *mesh) { @@ -1672,48 +1602,114 @@ static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContex } } - /* Get overlap map. */ - /* TODO: For a better performanse use KD-Tree. */ - struct BVHTreeFromMesh treedata; - BVHTree *bvhtree = bvhtree_from_mesh_verts_ex(&treedata, - mvert, - totvert, - false, - v_mask, - v_mask_act, - wmd->merge_dist / 2, - 2, - 6, - 0, - NULL, - NULL); + /* From the original index of the vertex. + * This indicates which vert it is or is going to be merged. */ + uint *vert_dest_map = MEM_malloc_arrayN(totvert, sizeof(*vert_dest_map), __func__); + uint vert_kill_len = 0; +#ifdef USE_BVHTREEKDOP + { + /* Get overlap map. */ + struct BVHTreeFromMesh treedata; + BVHTree *bvhtree = bvhtree_from_mesh_verts_ex(&treedata, + mvert, + totvert, + false, + v_mask, + v_mask_act, + wmd->merge_dist / 2, + 2, + 6, + 0, + NULL, + NULL); + + if (bvhtree) { + struct WeldOverlapData data; + data.mvert = mvert; + data.merge_dist_sq = square_f(wmd->merge_dist); + + uint overlap_len; + BVHTreeOverlap *overlap = BLI_bvhtree_overlap_ex(bvhtree, + bvhtree, + &overlap_len, + bvhtree_weld_overlap_cb, + &data, + 1, + BVH_OVERLAP_RETURN_PAIRS); + + free_bvhtree_from_mesh(&treedata); + if (overlap) { + range_vn_u(vert_dest_map, totvert, 0); + + const BVHTreeOverlap *overlap_iter = &overlap[0]; + for (uint i = 0; i < overlap_len; i++, overlap_iter++) { + uint indexA = overlap_iter->indexA; + uint indexB = overlap_iter->indexB; + + BLI_assert(indexA < indexB); + + uint va_dst = vert_dest_map[indexA]; + while (va_dst != vert_dest_map[va_dst]) { + va_dst = vert_dest_map[va_dst]; + } + uint vb_dst = vert_dest_map[indexB]; + while (vb_dst != vert_dest_map[vb_dst]) { + vb_dst = vert_dest_map[vb_dst]; + } + if (va_dst == vb_dst) { + continue; + } + if (va_dst > vb_dst) { + SWAP(uint, va_dst, vb_dst); + } + vert_kill_len++; + vert_dest_map[vb_dst] = va_dst; + } - if (v_mask) { - MEM_freeN(v_mask); - } + /* Fix #r_vert_dest_map for next step. */ + for (uint i = 0; i < totvert; i++) { + if (i == vert_dest_map[i]) { + vert_dest_map[i] = OUT_OF_CONTEXT; + } + else { + uint v = i; + while (v != vert_dest_map[v] && vert_dest_map[v] != OUT_OF_CONTEXT) { + v = vert_dest_map[v]; + } + vert_dest_map[v] = v; + vert_dest_map[i] = v; + } + } - if (bvhtree == NULL) { - return result; + MEM_freeN(overlap); + } + } } +#else + { + vert_dest_map = MEM_malloc_arrayN(totvert, sizeof(*vert_dest_map), __func__); + KDTree_3d *tree = BLI_kdtree_3d_new(totvert); + for (i = 0; i < totvert; i++) { + if (!(v_mask && !BLI_BITMAP_TEST(v_mask, i))) { + BLI_kdtree_3d_insert(tree, i, mvert[i].co); + } + vert_dest_map[i] = OUT_OF_CONTEXT; + } - struct WeldOverlapData data; - data.mvert = mvert; - data.merge_dist_sq = square_f(wmd->merge_dist); - - uint overlap_len; - BVHTreeOverlap *overlap = BLI_bvhtree_overlap_ex(bvhtree, - bvhtree, - &overlap_len, - bvhtree_weld_overlap_cb, - &data, - wmd->max_interactions, - BVH_OVERLAP_RETURN_PAIRS); + BLI_kdtree_3d_balance(tree); + vert_kill_len = BLI_kdtree_3d_calc_duplicates_fast( + tree, wmd->merge_dist, false, (int *)vert_dest_map); + BLI_kdtree_3d_free(tree); + } +#endif - free_bvhtree_from_mesh(&treedata); + if (v_mask) { + MEM_freeN(v_mask); + } - if (overlap_len) { + if (vert_kill_len) { WeldMesh weld_mesh; - weld_mesh_context_create(mesh, overlap, overlap_len, &weld_mesh); + weld_mesh_context_create(mesh, vert_dest_map, vert_kill_len, &weld_mesh); mloop = mesh->mloop; mpoly = mesh->mpoly; @@ -1732,7 +1728,7 @@ static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContex /* Vertices */ - uint *vert_final = weld_mesh.vert_groups_map; + uint *vert_final = vert_dest_map; uint *index_iter = &vert_final[0]; int dest_index = 0; for (i = 0; i < totvert; i++, index_iter++) { @@ -1905,7 +1901,7 @@ static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContex weld_mesh_context_free(&weld_mesh); } - MEM_freeN(overlap); + MEM_freeN(vert_dest_map); return result; } @@ -1920,7 +1916,6 @@ static void initData(ModifierData *md) WeldModifierData *wmd = (WeldModifierData *)md; wmd->merge_dist = 0.001f; - wmd->max_interactions = 1; wmd->defgrp_name[0] = '\0'; } @@ -1946,7 +1941,6 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel) uiLayoutSetPropSep(layout, true); uiItemR(layout, ptr, "merge_threshold", 0, IFACE_("Distance"), ICON_NONE); - uiItemR(layout, ptr, "max_interactions", 0, NULL, ICON_NONE); modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL); modifier_panel_end(layout, ptr); @@ -1961,10 +1955,12 @@ ModifierTypeInfo modifierType_Weld = { /* name */ "Weld", /* structName */ "WeldModifierData", /* structSize */ sizeof(WeldModifierData), + /* srna */ &RNA_WeldModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs, + /* icon */ ICON_AUTOMERGE_OFF, /* TODO: Use correct icon. */ /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/modifiers/intern/MOD_wireframe.c b/source/blender/modifiers/intern/MOD_wireframe.c index 602e0bf3eda..a24ea8b8b0f 100644 --- a/source/blender/modifiers/intern/MOD_wireframe.c +++ b/source/blender/modifiers/intern/MOD_wireframe.c @@ -180,8 +180,10 @@ ModifierTypeInfo modifierType_Wireframe = { /* name */ "Wireframe", /* structName */ "WireframeModifierData", /* structSize */ sizeof(WireframeModifierData), + /* srna */ &RNA_WireframeModifier, /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, + /* icon */ ICON_MOD_WIREFRAME, /* copyData */ BKE_modifier_copydata_generic, diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 2d581a4765e..8b40c96e8d7 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -36,6 +36,7 @@ #include "DNA_particle_types.h" #include "DNA_scene_types.h" #include "DNA_sequence_types.h" +#include "DNA_space_types.h" #include "DNA_userdef_types.h" #include "MEM_guardedalloc.h" @@ -1502,8 +1503,14 @@ static void do_render_seq(Render *re) tot_views = BKE_scene_multiview_num_views_get(&re->r); ibuf_arr = MEM_mallocN(sizeof(ImBuf *) * tot_views, "Sequencer Views ImBufs"); - BKE_sequencer_new_render_data( - re->main, re->pipeline_depsgraph, re->scene, re_x, re_y, 100, true, &context); + BKE_sequencer_new_render_data(re->main, + re->pipeline_depsgraph, + re->scene, + re_x, + re_y, + SEQ_PROXY_RENDER_SIZE_SCENE, + true, + &context); /* the renderresult gets destroyed during the rendering, so we first collect all ibufs * and then we populate the final renderesult */ diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index ae672aa3b5c..b85586691f8 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -279,35 +279,9 @@ endif() set(BLENDER_TEXT_FILES - ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt - ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt ${CMAKE_SOURCE_DIR}/release/text/copyright.txt # generate this file # ${CMAKE_SOURCE_DIR}/release/text/readme.html - ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bfont.ttf.txt -) - -if(WITH_PYTHON) - list(APPEND BLENDER_TEXT_FILES - ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt - ) -endif() - -if(WITH_OPENCOLORIO) - list(APPEND BLENDER_TEXT_FILES - ${CMAKE_SOURCE_DIR}/release/text/ocio-license.txt - ) -endif() - -if(WITH_MEM_JEMALLOC) - list(APPEND BLENDER_TEXT_FILES - ${CMAKE_SOURCE_DIR}/release/text/jemalloc-license.txt - ) -endif() - -list(APPEND BLENDER_TEXT_FILES - ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-droidsans.ttf.txt - ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bmonofont-i18n.ttf.txt ) @@ -1077,6 +1051,12 @@ if(DEFINED BLENDER_TEXT_FILES_DESTINATION) FILES ${BLENDER_TEXT_FILES} DESTINATION "${BLENDER_TEXT_FILES_DESTINATION}" ) + + install( + DIRECTORY + ${CMAKE_SOURCE_DIR}/release/license + DESTINATION "${BLENDER_TEXT_FILES_DESTINATION}" +) endif() # install more files specified elsewhere diff --git a/tests/gtests/runner/CMakeLists.txt b/tests/gtests/runner/CMakeLists.txt index c1487e45b26..6640d798ed6 100644 --- a/tests/gtests/runner/CMakeLists.txt +++ b/tests/gtests/runner/CMakeLists.txt @@ -86,7 +86,11 @@ set(_GOOGLETEST_DISCOVER_TESTS_SCRIPT if(APPLE) set(_test_release_dir ${TEST_INSTALL_DIR}/Blender.app/Contents/Resources/${BLENDER_VERSION}) else() - set(_test_release_dir ${TEST_INSTALL_DIR}/${BLENDER_VERSION}) + if(WIN32 OR WITH_INSTALL_PORTABLE) + set(_test_release_dir ${TEST_INSTALL_DIR}/${BLENDER_VERSION}) + else() + set(_test_release_dir ${TEST_INSTALL_DIR}/share/blender/${BLENDER_VERSION}) + endif() endif() gtest_discover_tests(blender_test diff --git a/tests/python/bl_constraints.py b/tests/python/bl_constraints.py index 323dd874ac0..09c76bca6bd 100644 --- a/tests/python/bl_constraints.py +++ b/tests/python/bl_constraints.py @@ -44,7 +44,7 @@ class AbstractConstraintTests(unittest.TestCase): collection = top_collection.children[self.layer_collection] collection.exclude = False - def assert_matrix(self, actual_matrix, expect_matrix, object_name: str, places=6, delta=None): + def assert_matrix(self, actual_matrix, expect_matrix, object_name: str, places=None, delta=1e-6): """Asserts that the matrices almost equal.""" self.assertEqual(len(actual_matrix), 4, 'Expected a 4x4 matrix') |