diff options
author | Hans Goudey <h.goudey@me.com> | 2020-12-09 17:35:24 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-09 17:35:24 +0300 |
commit | 043926bfd2867782be99e6ee9c77e4ae1aedec7b (patch) | |
tree | ef9b4e8ceb0c35d3ca7a39a57894009c06820db9 | |
parent | ae4afcfbee2c55f82ceda1461a264d1f7af31fc1 (diff) | |
parent | 37bf71ad0475549e0458f1e864a30c68c5880e88 (diff) |
Merge branch 'master' into geometry-nodes-point-separate-node
41 files changed, 855 insertions, 165 deletions
diff --git a/extern/audaspace/README.blender b/extern/audaspace/README.blender new file mode 100644 index 00000000000..97c0dd8c768 --- /dev/null +++ b/extern/audaspace/README.blender @@ -0,0 +1,5 @@ +Project: Audaspace +URL: https://audaspace.github.io/ +License: Apache 2.0 +Upstream version: 1.3 (Last Release) +Local modifications: None diff --git a/extern/bullet2/README.blender b/extern/bullet2/README.blender new file mode 100644 index 00000000000..48b71fe06df --- /dev/null +++ b/extern/bullet2/README.blender @@ -0,0 +1,5 @@ +Project: Bullet Continuous Collision Detection and Physics Library +URL: http://bulletphysics.org +License: zlib +Upstream version: 3.07 +Local modifications: Fixed inertia diff --git a/extern/ceres/README.blender b/extern/ceres/README.blender index 0b6063c9703..20e5dda6f57 100644 --- a/extern/ceres/README.blender +++ b/extern/ceres/README.blender @@ -1,4 +1,5 @@ Project: Ceres Solver URL: http://ceres-solver.org/ +License: BSD 3-Clause Upstream version 2.0.0 Local modifications: None diff --git a/extern/curve_fit_nd/README.blender b/extern/curve_fit_nd/README.blender index db520ea524e..8e70fd796bb 100644 --- a/extern/curve_fit_nd/README.blender +++ b/extern/curve_fit_nd/README.blender @@ -1,5 +1,5 @@ Project: Curve-Fit-nD URL: https://github.com/ideasman42/curve-fit-nd License: BSD 3-Clause -Upstream version: Unknown (Last Release) +Upstream version: ddcd5bd (Last Release) Local modifications: None diff --git a/extern/draco/README.blender b/extern/draco/README.blender new file mode 100644 index 00000000000..b9c3bbb967d --- /dev/null +++ b/extern/draco/README.blender @@ -0,0 +1,5 @@ +Project: Draco +URL: https://google.github.io/draco/ +License: Apache 2.0 +Upstream version: 1.3.6 +Local modifications: None diff --git a/extern/gflags/README.blender b/extern/gflags/README.blender index be68c310997..068c0507d04 100644 --- a/extern/gflags/README.blender +++ b/extern/gflags/README.blender @@ -1,6 +1,6 @@ Project: Google Flags URL: https://github.com/gflags/gflags -License: New BSD +License: BSD 3-Clause Upstream version: 2.2.1 (46f73f88b18) Local modifications: diff --git a/extern/glew-es/LICENSE.txt b/extern/glew-es/LICENSE.txt new file mode 100644 index 00000000000..f7078042e95 --- /dev/null +++ b/extern/glew-es/LICENSE.txt @@ -0,0 +1,73 @@ +The OpenGL Extension Wrangler Library +Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org> +Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org> +Copyright (C) 2002, Lev Povalahev +All rights reserved. + +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. +* The name of the author 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. + + +Mesa 3-D graphics library +Version: 7.0 + +Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + +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 +BRIAN PAUL 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. + + +Copyright (c) 2007 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are 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 Materials. + +THE MATERIALS ARE 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 +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. diff --git a/extern/glew-es/README.blender b/extern/glew-es/README.blender new file mode 100644 index 00000000000..59a932a07f1 --- /dev/null +++ b/extern/glew-es/README.blender @@ -0,0 +1,5 @@ +Project: The OpenGL Extension Wrangler Library +URL: http://glew.sourceforge.net/ +License: Check LICENSE.txt +Upstream version: 2.0.0 +Local modifications: None diff --git a/extern/glew/LICENSE.txt b/extern/glew/LICENSE.txt new file mode 100644 index 00000000000..f7078042e95 --- /dev/null +++ b/extern/glew/LICENSE.txt @@ -0,0 +1,73 @@ +The OpenGL Extension Wrangler Library +Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org> +Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org> +Copyright (C) 2002, Lev Povalahev +All rights reserved. + +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. +* The name of the author 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. + + +Mesa 3-D graphics library +Version: 7.0 + +Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + +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 +BRIAN PAUL 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. + + +Copyright (c) 2007 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are 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 Materials. + +THE MATERIALS ARE 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 +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. diff --git a/extern/glew/README.blender b/extern/glew/README.blender new file mode 100644 index 00000000000..59a932a07f1 --- /dev/null +++ b/extern/glew/README.blender @@ -0,0 +1,5 @@ +Project: The OpenGL Extension Wrangler Library +URL: http://glew.sourceforge.net/ +License: Check LICENSE.txt +Upstream version: 2.0.0 +Local modifications: None diff --git a/extern/glog/README.blender b/extern/glog/README.blender index 62cd065ef0f..5b4dab199bf 100644 --- a/extern/glog/README.blender +++ b/extern/glog/README.blender @@ -1,6 +1,6 @@ Project: Google Logging URL: https://github.com/google/glog -License: New BSD +License: BSD 3-Clause Upstream version: 0.4.0, 96a2f23dca4 Local modifications: * Added per-platform config.h files so no configuration-time diff --git a/extern/gmock/README.blender b/extern/gmock/README.blender index 3f9d80362d8..23e750177b8 100644 --- a/extern/gmock/README.blender +++ b/extern/gmock/README.blender @@ -1,5 +1,5 @@ Project: Google C++ Testing Framework URL: https://github.com/google/googletest -License: New BSD +License: BSD 3-Clause Upstream version: 1.10.0 (703bd9caab5) Local modifications: None diff --git a/extern/gtest/README.blender b/extern/gtest/README.blender index 3f9d80362d8..23e750177b8 100644 --- a/extern/gtest/README.blender +++ b/extern/gtest/README.blender @@ -1,5 +1,5 @@ Project: Google C++ Testing Framework URL: https://github.com/google/googletest -License: New BSD +License: BSD 3-Clause Upstream version: 1.10.0 (703bd9caab5) Local modifications: None diff --git a/extern/lzma/README.blender b/extern/lzma/README.blender new file mode 100644 index 00000000000..0111946e30e --- /dev/null +++ b/extern/lzma/README.blender @@ -0,0 +1,5 @@ +Project: LZMA SDK +URL: https://www.7-zip.org/sdk.html +License: Public Domain +Upstream version: 4.65 +Local modifications: None diff --git a/extern/lzo/README.blender b/extern/lzo/README.blender new file mode 100644 index 00000000000..d91500b7780 --- /dev/null +++ b/extern/lzo/README.blender @@ -0,0 +1,5 @@ +Project: miniLZO - mini subset of the LZO real-time data compression librar +URL: http://www.oberhumer.com/opensource/lzo/ +License: GPLv2+ +Upstream version: 2.08 +Local modifications: None diff --git a/extern/mantaflow/README.blender b/extern/mantaflow/README.blender new file mode 100644 index 00000000000..bc1e2a164dc --- /dev/null +++ b/extern/mantaflow/README.blender @@ -0,0 +1,5 @@ +Project: Mantaflow +URL: http://mantaflow.com/ +License: Apache 2.0 +Upstream version: 0.13 +Local modifications: None diff --git a/release/datafiles/locale b/release/datafiles/locale -Subproject 1c0e9c29fd33963ff42ff9252a64016abda8d2a +Subproject 9e40c01dffd3f720b23b906d20df8e999d34a4a diff --git a/release/license/ISC.txt b/release/license/ISC.txt deleted file mode 100644 index 5923726e458..00000000000 --- a/release/license/ISC.txt +++ /dev/null @@ -1,14 +0,0 @@ -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/lts/README.md b/release/lts/README.md new file mode 100644 index 00000000000..8f7b6f0b87a --- /dev/null +++ b/release/lts/README.md @@ -0,0 +1,41 @@ +This folder contains several scripts to smoothen the Blender LTS releases. + +create_download_urls.py +======================= + +This python script is used to generate the download urls which we can +copy-paste directly into the CMS of www.blender.org. + +Usage: create_download_urls.py --version 2.83.7 + +Arguments: + --version VERSION Version string in the form of {major}.{minor}.{build} + (eg 2.83.7) + +The resulting html will be printed to the console. + +create_release_notes.py +======================= + +This python script is used to generate the release notes which we can +copy-paste directly into the CMS of www.blender.org and stores. + +Usage: ./create_release_notes.py --task=T77348 --version=2.83.7 + +Arguments: + --version VERSION Version string in the form of {major}.{minor}.{build} + (e.g. 2.83.7) + --task TASK Phabricator ticket that is contains the release notes + information (e.g. T77348) + --format FORMAT Format the result in `text`, `steam`, `wiki` or `html` + +Requirements +============ + +* Python 3.8 or later +* Python phabricator client version 0.7.0 + https://pypi.org/project/phabricator/ + +For convenience the python modules can be installed using pip + + pip3 install -r ./requirements.txt
\ No newline at end of file diff --git a/release/lts/create_download_urls.py b/release/lts/create_download_urls.py new file mode 100755 index 00000000000..0d0b2554d2a --- /dev/null +++ b/release/lts/create_download_urls.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python3 + +import argparse +import datetime + + +DESCRIPTION = ("This python script is used to generate the download urls " + "which we can copy-paste directly into the CMS of " + "www.blender.org") +USAGE = "create_download_urls --version=2.83.7" +# Used date format: "September 30, 2020" +DATE_FORMAT = "%B %d, %Y" + + +class Version: + """ + Version class that extracts the major, minor and build from + a version string + """ + def __init__(self, version: str): + self.version = version + v = version.split(".") + self.major = v[0] + self.minor = v[1] + self.build = v[2] + + def __str__(self) -> str: + return self.version + + +def get_download_file_names(version: Version): + yield f"blender-{version}-linux64.tar.xz" + yield f"blender-{version}-macOS.dmg" + yield f"blender-{version}-windows64.msi" + yield f"blender-{version}-windows64.zip" + + +def get_download_url(version: Version, file_name: str) -> str: + """ + Get the download url for the given version and file_name + """ + return (f"https://www.blender.org/download/Blender{version.major}" + f".{version.minor}/{file_name}") + + +def generate_html(version: Version) -> str: + """ + Generate download urls and format them into an HTML string + """ + today = datetime.date.today() + lines = [] + lines.append(f"Released on {today.strftime(DATE_FORMAT)}.") + lines.append("") + lines.append("<ul>") + for file_name in get_download_file_names(version): + download_url = get_download_url(version, file_name) + lines.append(f" <li><a href=\"{download_url}\">{file_name}</a></li>") + lines.append("</ul>") + + return "\n".join(lines) + + +def print_download_urls(version: Version): + """ + Generate the download urls and print them to the console. + """ + print(generate_html(version)) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=DESCRIPTION, usage=USAGE) + parser.add_argument("--version", + required=True, + help=("Version string in the form of {major}.{minor}." + "{build} (eg 2.83.7)")) + args = parser.parse_args() + + print_download_urls(version=Version(args.version)) diff --git a/release/lts/create_release_notes.py b/release/lts/create_release_notes.py new file mode 100755 index 00000000000..2a396dca6b0 --- /dev/null +++ b/release/lts/create_release_notes.py @@ -0,0 +1,166 @@ +#!/usr/bin/env python3 + +import argparse +import phabricator + + +DESCRIPTION = ("This python script is used to generate the release notes " + "which we can copy-paste directly into the CMS of " + "www.blender.org and stores.") +USAGE = "./create_release_notes.py --task=T77348 --version=2.83.7" + + +class ReleaseLogLine: + """ + Class containing the information of a single line of the release log + + Instance attributes: + + * line: (str) the original line used to create this log line + * task_id: (int or None) the extracted task id associated with this log + line. Can be None if the log line isn't associated with a task. + * commit_id: (str or None) the extracted commit id associated with this log + line. Only filled when no `task_id` could be found. + * ref: (str) `task_id` or `commit_id` of this line, including `T` for tasks + or `D` for diffs. + * title: (str) title of this log line. When constructed this attribute is + an empty string. The called needs to retrieve the title from the + backend. + * url: (str) url of the ticket task or commit. + """ + def __init__(self, line: str): + self.line=line + items = line.split("|") + self.task_id = None + self.commit_id = None + try: + task_id = int(items[1].strip()[1:]) + self.task_id = task_id + self.ref = f"T{self.task_id}" + except ValueError: + # no task + commit_string = items[3].strip() + commits = commit_string.split(",") + commit_id = commits[0] + commit_id = commit_id.replace("{", "").replace("}", "") + if not commit_id.startswith("rB"): + commit_id = f"rB{commit_id}" + self.commit_id = commit_id + + self.ref = f"{self.commit_id}" + + self.title = "" + self.url = f"https://developer.blender.org/{self.ref}" + + def __format_as_html(self)-> str: + return f" <li>{self.title} [<a href=\"{self.url}\">{self.ref}</a>]</li>" + + def __format_as_text(self) ->str: + return f"* {self.title} [{self.ref}]" + + def __format_as_steam(self) -> str: + return f"* {self.title} ([url={self.url}]{self.ref}[/url])" + + def __format_as_wiki(self) -> str: + if self.task_id: + return f"* {self.title} [{{{{BugReport|{self.task_id}}}}}]" + else: + return f"* {self.title} [{{{{GitCommit|{self.commit_id[2:]}}}}}]" + + def format(self, format: str) -> str: + """ + Format this line + + :attr format: the desired format. Possible values are 'text', 'steam' or 'html' + :type string: + """ + if format == 'html': + return self.__format_as_html() + elif format == 'steam': + return self.__format_as_steam() + elif format == 'wiki': + return self.__format_as_wiki() + else: + return self.__format_as_text() + + +def format_title(title: str) -> str: + title = title.strip() + if not title.endswith("."): + title = title + "." + return title + + +def extract_release_notes(version: str, task_id: int): + """ + Extract all release notes logs + + # Process + + 1. Retrieval of description of the gived `task_id`. + 2. Find rows for the given `version` and convert to `ReleaseLogLine`. + 3. based on the associated task or commit retrieves the title of the log + line. + """ + phab = phabricator.Phabricator() + phab.update_interfaces() + task = phab.maniphest.info(task_id=task_id) + description = task["description"] + lines = description.split("\n") + start_index = lines.index(f"## Blender {version} ##") + lines = lines[start_index+1:] + for line in lines: + if not line.strip(): + continue + if line.startswith("| **Report**"): + continue + if line.startswith("## Blender"): + break + + log_line = ReleaseLogLine(line) + if log_line.task_id: + issue_task = phab.maniphest.info(task_id=log_line.task_id) + log_line.title = format_title(issue_task.title) + yield log_line + elif log_line.commit_id: + commits = phab.diffusion.commit.search(constraints={"identifiers":[log_line.commit_id]}) + commit = commits.data[0] + commit_message = commit['fields']['message'] + commit_title = commit_message.split("\n")[0] + log_line.title = format_title(commit_title) + yield log_line + + +def print_release_notes(version: str, format: str, task_id: int): + """ + Generate and print the release notes to the console. + """ + if format == 'html': + print("<ul>") + if format == 'steam': + print("[ul]") + for log_item in extract_release_notes(version=version, task_id=task_id): + print(log_item.format(format=format)) + if format == 'html': + print("</ul>") + if format == 'steam': + print("[/ul]") + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=DESCRIPTION, usage=USAGE) + parser.add_argument( + "--version", + required=True, + help="Version string in the form of {major}.{minor}.{build} (e.g. 2.83.7)") + parser.add_argument( + "--task", + required=True, + help="Phabricator ticket that is contains the release notes information (e.g. T77348)") + parser.add_argument( + "--format", + help="Format the result in `text`, `steam`, `wiki` or `html`", + default="text") + args = parser.parse_args() + + print_release_notes(version=args.version, format=args.format, task_id=int(args.task[1:])) diff --git a/release/lts/requirements.txt b/release/lts/requirements.txt new file mode 100644 index 00000000000..dc91ba85b01 --- /dev/null +++ b/release/lts/requirements.txt @@ -0,0 +1 @@ +phabricator==0.7.0
\ No newline at end of file diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 7faa6b379fd818b8af8cf8279ff9f43cbdbb169 +Subproject 1191a172ac389e3d068a8ef7d16f36457e67e3b diff --git a/release/scripts/modules/rna_prop_ui.py b/release/scripts/modules/rna_prop_ui.py index 8fdd66dff9f..e3158118146 100644 --- a/release/scripts/modules/rna_prop_ui.py +++ b/release/scripts/modules/rna_prop_ui.py @@ -49,7 +49,7 @@ def rna_idprop_ui_del(item): def rna_idprop_quote_path(prop): - return "[\"%s\"]" % prop.replace("\"", "\\\"") + return "[\"%s\"]" % bpy.utils.escape_identifier(prop) def rna_idprop_ui_prop_update(item, prop): diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 387e93cb769..bd1c99fdeb3 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1147,10 +1147,11 @@ rna_default = StringProperty( maxlen=1024, ) -rna_property = StringProperty( +rna_custom_property = StringProperty( name="Property Name", description="Property name edit", - maxlen=1024, + # Match `MAX_IDPROP_NAME - 1` in Blender's source. + maxlen=63, ) rna_min = FloatProperty( @@ -1196,7 +1197,7 @@ class WM_OT_properties_edit(Operator): bl_options = {'REGISTER', 'INTERNAL'} data_path: rna_path - property: rna_property + property: rna_custom_property value: rna_value default: rna_default min: rna_min @@ -1265,6 +1266,7 @@ class WM_OT_properties_edit(Operator): data_path = self.data_path prop = self.property + prop_escape = bpy.utils.escape_identifier(prop) prop_old = getattr(self, "_last_prop", [None])[0] @@ -1289,7 +1291,7 @@ class WM_OT_properties_edit(Operator): # Reassign item[prop] = value_eval - item.property_overridable_library_set('["%s"]' % prop, self.is_overridable_library) + item.property_overridable_library_set('["%s"]' % prop_escape, self.is_overridable_library) rna_idprop_ui_prop_update(item, prop) self._last_prop[:] = [prop] @@ -1322,7 +1324,7 @@ class WM_OT_properties_edit(Operator): # If we have changed the type of the property, update its potential anim curves! if prop_type_old != prop_type_new: - data_path = '["%s"]' % bpy.utils.escape_identifier(prop) + data_path = '["%s"]' % prop_escape done = set() def _update(fcurves): @@ -1364,13 +1366,16 @@ class WM_OT_properties_edit(Operator): rna_idprop_value_item_type ) + prop = self.property + prop_escape = bpy.utils.escape_identifier(prop) + data_path = self.data_path if not data_path: self.report({'ERROR'}, "Data path not set") return {'CANCELLED'} - self._last_prop = [self.property] + self._last_prop = [prop] item = eval("context.%s" % data_path) @@ -1379,7 +1384,7 @@ class WM_OT_properties_edit(Operator): return {'CANCELLED'} # retrieve overridable static - is_overridable = item.is_property_overridable_library('["%s"]' % self.property) + is_overridable = item.is_property_overridable_library('["%s"]' % prop_escape) self.is_overridable_library = bool(is_overridable) # default default value @@ -1390,7 +1395,7 @@ class WM_OT_properties_edit(Operator): self.default = "" # setup defaults - prop_ui = rna_idprop_ui_prop_get(item, self.property, False) # don't create + prop_ui = rna_idprop_ui_prop_get(item, prop, False) # don't create if prop_ui: self.min = prop_ui.get("min", -1000000000) self.max = prop_ui.get("max", 1000000000) @@ -1548,7 +1553,7 @@ class WM_OT_properties_remove(Operator): bl_options = {'UNDO', 'INTERNAL'} data_path: rna_path - property: rna_property + property: rna_custom_property def execute(self, context): from rna_prop_ui import ( diff --git a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c index f7caf8e4c6a..8755dea51e1 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/snap3d_gizmo.c @@ -50,7 +50,6 @@ #include "WM_api.h" #include "WM_types.h" -#include "wm.h" /* own includes */ #include "../gizmo_geometry.h" @@ -66,7 +65,13 @@ typedef struct SnapGizmo3D { /* We could have other snap contexts, for now only support 3D view. */ SnapObjectContext *snap_context_v3d; - int mval[2]; + + /* Copy of the parameters of the last event state in order to detect updates. */ + struct { + int x; + int y; + short shift, ctrl, alt, oskey; + } last_eventstate; #ifdef USE_SNAP_DETECT_FROM_KEYMAP_HACK wmKeyMap *keymap; @@ -77,6 +82,37 @@ typedef struct SnapGizmo3D { short snap_elem; } SnapGizmo3D; +/* Checks if the current event is different from the one captured in the last update. */ +static bool eventstate_has_changed(SnapGizmo3D *snap_gizmo, const wmWindowManager *wm) +{ + if (wm && wm->winactive) { + const wmEvent *event = wm->winactive->eventstate; + if ((event->x != snap_gizmo->last_eventstate.x) || + (event->y != snap_gizmo->last_eventstate.y) || + (event->ctrl != snap_gizmo->last_eventstate.ctrl) || + (event->shift != snap_gizmo->last_eventstate.shift) || + (event->alt != snap_gizmo->last_eventstate.alt) || + (event->oskey != snap_gizmo->last_eventstate.oskey)) { + return true; + } + } + return false; +} + +/* Copies the current eventstate. */ +static void eventstate_save(SnapGizmo3D *snap_gizmo, const wmWindowManager *wm) +{ + if (wm && wm->winactive) { + const wmEvent *event = wm->winactive->eventstate; + snap_gizmo->last_eventstate.x = event->x; + snap_gizmo->last_eventstate.y = event->y; + snap_gizmo->last_eventstate.ctrl = event->ctrl; + snap_gizmo->last_eventstate.shift = event->shift; + snap_gizmo->last_eventstate.alt = event->alt; + snap_gizmo->last_eventstate.oskey = event->oskey; + } +} + #ifdef USE_SNAP_DETECT_FROM_KEYMAP_HACK static bool invert_snap(SnapGizmo3D *snap_gizmo, const wmWindowManager *wm) { @@ -84,6 +120,15 @@ static bool invert_snap(SnapGizmo3D *snap_gizmo, const wmWindowManager *wm) return false; } + const wmEvent *event = wm->winactive->eventstate; + if ((event->ctrl == snap_gizmo->last_eventstate.ctrl) && + (event->shift == snap_gizmo->last_eventstate.shift) && + (event->alt == snap_gizmo->last_eventstate.alt) && + (event->oskey == snap_gizmo->last_eventstate.oskey)) { + /* Nothing has changed. */ + return snap_gizmo->invert_snap; + } + if (snap_gizmo->keymap == NULL) { /* Lazy initialization. */ snap_gizmo->keymap = WM_modalkeymap_find(wm->defaultconf, "Generic Gizmo Tweak Modal Map"); @@ -92,7 +137,6 @@ static bool invert_snap(SnapGizmo3D *snap_gizmo, const wmWindowManager *wm) const int snap_on = snap_gizmo->snap_on; wmKeyMap *keymap = WM_keymap_active(wm, snap_gizmo->keymap); - const wmEvent *event = wm->winactive->eventstate; for (wmKeyMapItem *kmi = keymap->items.first; kmi; kmi = kmi->next) { if (kmi->flag & KMI_INACTIVE) { continue; @@ -250,12 +294,6 @@ short ED_gizmotypes_snap_3d_update(wmGizmo *gz, float r_nor[3]) { SnapGizmo3D *snap_gizmo = (SnapGizmo3D *)gz; - Scene *scene = DEG_get_input_scene(depsgraph); - float co[3], no[3]; - short snap_elem = 0; - int snap_elem_index[3] = {-1, -1, -1}; - int index = -1; - if (snap_gizmo->use_snap_override != -1) { if (snap_gizmo->use_snap_override == false) { snap_gizmo->snap_elem = 0; @@ -265,7 +303,12 @@ short ED_gizmotypes_snap_3d_update(wmGizmo *gz, #ifdef USE_SNAP_DETECT_FROM_KEYMAP_HACK snap_gizmo->invert_snap = invert_snap(snap_gizmo, wm); +#endif + eventstate_save(snap_gizmo, wm); + Scene *scene = DEG_get_input_scene(depsgraph); + +#ifdef USE_SNAP_DETECT_FROM_KEYMAP_HACK if (snap_gizmo->use_snap_override == -1) { const ToolSettings *ts = scene->toolsettings; if (snap_gizmo->invert_snap != !(ts->snap_flag & SCE_SNAP)) { @@ -273,10 +316,13 @@ short ED_gizmotypes_snap_3d_update(wmGizmo *gz, return 0; } } -#else - UNUSED_VARS(wm); #endif + float co[3], no[3]; + short snap_elem = 0; + int snap_elem_index[3] = {-1, -1, -1}; + int index = -1; + wmGizmoProperty *gz_prop = WM_gizmo_target_property_find(gz, "snap_elements"); int snap_elements = RNA_property_enum_get(&gz_prop->ptr, gz_prop->prop); if (gz_prop->prop != snap_gizmo->prop_snap_force) { @@ -381,14 +427,17 @@ static void snap_gizmo_draw(const bContext *C, wmGizmo *gz) return; } - ARegion *region = CTX_wm_region(C); - RegionView3D *rv3d = region->regiondata; + wmWindowManager *wm = CTX_wm_manager(C); + if (eventstate_has_changed(snap_gizmo, wm)) { + /* The eventstate has changed but the snap has not been updated. + * This means that the current position is no longer valid. */ + snap_gizmo->snap_elem = 0; + return; + } - /* Ideally, we shouldn't assign values here. - * But `test_select` is not called during navigation. - * And `snap_elem` is not really useful in this case. */ - if ((rv3d->rflag & RV3D_NAVIGATING) || - (!(gz->state & WM_GIZMO_STATE_HIGHLIGHT) && !wm_gizmomap_modal_get(region->gizmo_map))) { + RegionView3D *rv3d = CTX_wm_region_data(C); + if (rv3d->rflag & RV3D_NAVIGATING) { + /* Don't draw the gizmo while navigating. It can be distracting. */ snap_gizmo->snap_elem = 0; return; } @@ -418,30 +467,17 @@ static void snap_gizmo_draw(const bContext *C, wmGizmo *gz) static int snap_gizmo_test_select(bContext *C, wmGizmo *gz, const int mval[2]) { SnapGizmo3D *snap_gizmo = (SnapGizmo3D *)gz; - -#ifdef USE_SNAP_DETECT_FROM_KEYMAP_HACK wmWindowManager *wm = CTX_wm_manager(C); - const bool invert = invert_snap(snap_gizmo, wm); - if (snap_gizmo->invert_snap == invert && snap_gizmo->mval[0] == mval[0] && - snap_gizmo->mval[1] == mval[1]) { + if (!eventstate_has_changed(snap_gizmo, wm)) { /* Performance, do not update. */ return snap_gizmo->snap_elem ? 0 : -1; } - snap_gizmo->invert_snap = invert; -#else - if (snap_gizmo->mval[0] == mval[0] && snap_gizmo->mval[1] == mval[1]) { - /* Performance, do not update. */ - return snap_gizmo->snap_elem ? 0 : -1; - } -#endif - copy_v2_v2_int(snap_gizmo->mval, mval); - ARegion *region = CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); const float mval_fl[2] = {UNPACK2(mval)}; short snap_elem = ED_gizmotypes_snap_3d_update( - gz, CTX_data_ensure_evaluated_depsgraph(C), region, v3d, NULL, mval_fl, NULL, NULL); + gz, CTX_data_ensure_evaluated_depsgraph(C), region, v3d, wm, mval_fl, NULL, NULL); if (snap_elem) { ED_region_tag_redraw_editor_overlays(region); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index ffa44083473..6e933e53a8f 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -90,7 +90,7 @@ FileSelectParams *ED_fileselect_get_active_params(const SpaceFile *sfile) /** * \note RNA_struct_property_is_set_ex is used here because we want * the previously used settings to be used here rather than overriding them */ -static void fileselect_ensure_file_params(SpaceFile *sfile) +static FileSelectParams *fileselect_ensure_updated_file_params(SpaceFile *sfile) { FileSelectParams *params; wmOperator *op = sfile->op; @@ -323,12 +323,14 @@ static void fileselect_ensure_file_params(SpaceFile *sfile) if (sfile->layout) { sfile->layout->dirty = true; } + + return params; } FileSelectParams *ED_fileselect_ensure_active_params(SpaceFile *sfile) { if (!sfile->params) { - fileselect_ensure_file_params(sfile); + fileselect_ensure_updated_file_params(sfile); } return sfile->params; } @@ -369,7 +371,7 @@ void ED_fileselect_set_params_from_userdef(SpaceFile *sfile) wmOperator *op = sfile->op; UserDef_FileSpaceData *sfile_udata = &U.file_space_data; - FileSelectParams *params = ED_fileselect_ensure_active_params(sfile); + FileSelectParams *params = fileselect_ensure_updated_file_params(sfile); if (!op) { return; } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index ae34cd6cf6d..c3e4eceef6e 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -72,7 +72,9 @@ /* ************************************************************************** */ /* INSERT DUPLICATE AND BAKE KEYFRAMES */ -/* ******************** Insert Keyframes Operator ************************* */ +/* -------------------------------------------------------------------- */ +/** \name Insert Keyframes Operator + * \{ */ /* Mode defines for insert keyframes tool. */ typedef enum eGraphKeys_InsertKey_Types { @@ -290,7 +292,11 @@ void GRAPH_OT_keyframe_insert(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_insertkey_types, 0, "Type", ""); } -/* ******************** Click-Insert Keyframes Operator ************************* */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Click-Insert Keyframes Operator + * \{ */ static int graphkeys_click_insert_exec(bContext *C, wmOperator *op) { @@ -444,8 +450,13 @@ void GRAPH_OT_click_insert(wmOperatorType *ot) "Extend selection instead of deselecting everything first"); } -/* ******************** Copy/Paste Keyframes Operator ************************* */ -/* NOTE: the backend code for this is shared with the dopesheet editor */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Copy/Paste Keyframes Operator + * + * \note the back-end code for this is shared with the dope-sheet editor. + * \{ */ static short copy_graph_keys(bAnimContext *ac) { @@ -605,7 +616,11 @@ void GRAPH_OT_paste(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_SKIP_SAVE); } -/* ******************** Duplicate Keyframes Operator ************************* */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Duplicate Keyframes Operator + * \{ */ static void duplicate_graph_keys(bAnimContext *ac) { @@ -667,7 +682,11 @@ void GRAPH_OT_duplicate(wmOperatorType *ot) RNA_def_enum(ot->srna, "mode", rna_enum_transform_mode_types, TFM_TRANSLATION, "Mode", ""); } -/* ******************** Delete Keyframes Operator ************************* */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Delete Keyframes Operator + * \{ */ static bool delete_graph_keys(bAnimContext *ac) { @@ -746,7 +765,11 @@ void GRAPH_OT_delete(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/* ******************** Clean Keyframes Operator ************************* */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Clean Keyframes Operator + * \{ */ static void clean_graph_keys(bAnimContext *ac, float thresh, bool clean_chan) { @@ -816,8 +839,13 @@ void GRAPH_OT_clean(wmOperatorType *ot) RNA_def_boolean(ot->srna, "channels", false, "Channels", ""); } -/* ******************** Bake F-Curve Operator *********************** */ -/* This operator bakes the data of the selected F-Curves to F-Points */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Bake F-Curve Operator + * + * This operator bakes the data of the selected F-Curves to F-Points. + * \{ */ /* Bake each F-Curve into a set of samples. */ static void bake_graph_curves(bAnimContext *ac, int start, int end) @@ -899,8 +927,13 @@ void GRAPH_OT_bake(wmOperatorType *ot) /* TODO: add props for start/end frames (Joshua Leung 2009) */ } -/* ******************** Un-Bake F-Curve Operator *********************** */ -/* This operator unbakes the data of the selected F-Points to F-Curves. */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Un-Bake F-Curve Operator + * + * This operator un-bakes the data of the selected F-Points to F-Curves. + * \{ */ /* Un-Bake F-Points into F-Curves. */ static void unbake_graph_curves(bAnimContext *ac, int start, int end) @@ -970,8 +1003,13 @@ void GRAPH_OT_unbake(wmOperatorType *ot) #ifdef WITH_AUDASPACE -/* ******************** Sound Bake F-Curve Operator *********************** */ -/* This operator bakes the given sound to the selected F-Curves */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Sound Bake F-Curve Operator + * + * This operator bakes the given sound to the selected F-Curves. + * \{ */ /* ------------------- */ @@ -1204,10 +1242,14 @@ void GRAPH_OT_sound_bake(wmOperatorType *ot) 0.1); } -/* ******************** Sample Keyframes Operator *********************** */ -/* This operator 'bakes' the values of the curve into new keyframes between pairs +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Sample Keyframes Operator + * + * This operator 'bakes' the values of the curve into new keyframes between pairs * of selected keyframes. It is useful for creating keyframes for tweaking overlap. - */ + * \{ */ /* Evaluates the curves between each selected keyframe on each frame, and keys the value. */ static void sample_graph_keys(bAnimContext *ac) @@ -1267,10 +1309,14 @@ void GRAPH_OT_sample(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } +/** \} */ + /* ************************************************************************** */ /* EXTRAPOLATION MODE AND KEYFRAME HANDLE SETTINGS */ -/* ******************** Set Extrapolation-Type Operator *********************** */ +/* -------------------------------------------------------------------- */ +/** \name Set Extrapolation-Type Operator + * \{ */ /* Defines for make/clear cyclic extrapolation tools. */ #define MAKE_CYCLIC_EXPO -1 @@ -1400,7 +1446,11 @@ void GRAPH_OT_extrapolation_type(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_expo_types, 0, "Type", ""); } -/* ******************** Set Interpolation-Type Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Set Interpolation-Type Operator + * \{ */ /* This function is responsible for setting interpolation mode for keyframes. */ static void setipo_graph_keys(bAnimContext *ac, short mode) @@ -1474,7 +1524,11 @@ void GRAPH_OT_interpolation_type(wmOperatorType *ot) ot->srna, "type", rna_enum_beztriple_interpolation_mode_items, 0, "Type", ""); } -/* ******************** Set Easing Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Set Easing Operator + * \{ */ static void seteasing_graph_keys(bAnimContext *ac, short mode) { @@ -1545,7 +1599,11 @@ void GRAPH_OT_easing_type(wmOperatorType *ot) ot->srna, "type", rna_enum_beztriple_interpolation_easing_items, 0, "Type", ""); } -/* ******************** Set Handle-Type Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Set Handle-Type Operator + * \{ */ /* This function is responsible for setting handle-type of selected keyframes. */ static void sethandles_graph_keys(bAnimContext *ac, short mode) @@ -1624,15 +1682,19 @@ void GRAPH_OT_handle_type(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_keyframe_handle_type_items, 0, "Type", ""); } +/** \} */ + /* ************************************************************************** */ /* EULER FILTER */ -/* ***************** 'Euler Filter' Operator **************************** */ -/* Euler filter tools (as seen in Maya), are necessary for working with 'baked' +/* -------------------------------------------------------------------- */ +/** \name 'Euler Filter' Operator + * + * Euler filter tools (as seen in Maya), are necessary for working with 'baked' * rotation curves (with Euler rotations). The main purpose of such tools is to * resolve any discontinuities that may arise in the curves due to the clamping * of values to -180 degrees to 180 degrees. - */ + * \{ */ /* Set of three euler-rotation F-Curves. */ typedef struct tEulerFilter { @@ -1955,10 +2017,14 @@ void GRAPH_OT_euler_filter(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } +/** \} */ + /* ************************************************************************** */ /* SNAPPING */ -/* ***************** Jump to Selected Frames Operator *********************** */ +/* -------------------------------------------------------------------- */ +/** \name Jump to Selected Frames Operator + * \{ */ static bool graphkeys_framejump_poll(bContext *C) { @@ -2110,7 +2176,11 @@ void GRAPH_OT_snap_cursor_value(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/* ******************** Snap Keyframes Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Snap Keyframes Operator + * \{ */ /* Defines for snap keyframes tool. */ static const EnumPropertyItem prop_graphkeys_snap_types[] = { @@ -2262,7 +2332,11 @@ void GRAPH_OT_snap(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_snap_types, 0, "Type", ""); } -/* ******************** Mirror Keyframes Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Mirror Keyframes Operator + * \{ */ /* Defines for mirror keyframes tool. */ static const EnumPropertyItem prop_graphkeys_mirror_types[] = { @@ -2421,7 +2495,11 @@ void GRAPH_OT_mirror(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", prop_graphkeys_mirror_types, 0, "Type", ""); } -/* ******************** Smooth Keyframes Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Smooth Keyframes Operator + * \{ */ static int graphkeys_smooth_exec(bContext *C, wmOperator *UNUSED(op)) { @@ -2475,10 +2553,14 @@ void GRAPH_OT_smooth(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } +/** \} */ + /* ************************************************************************** */ /* F-CURVE MODIFIERS */ -/* ******************** Add F-Modifier Operator *********************** */ +/* -------------------------------------------------------------------- */ +/** \name Add F-Modifier Operator + * \{ */ static const EnumPropertyItem *graph_fmodifier_itemf(bContext *C, PointerRNA *UNUSED(ptr), @@ -2596,7 +2678,11 @@ void GRAPH_OT_fmodifier_add(wmOperatorType *ot) ot->srna, "only_active", 1, "Only Active", "Only add F-Modifier to active F-Curve"); } -/* ******************** Copy F-Modifiers Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Copy F-Modifiers Operator + * \{ */ static int graph_fmodifier_copy_exec(bContext *C, wmOperator *op) { @@ -2658,7 +2744,11 @@ void GRAPH_OT_fmodifier_copy(wmOperatorType *ot) #endif } -/* ******************** Paste F-Modifiers Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Paste F-Modifiers Operator + * \{ */ static int graph_fmodifier_paste_exec(bContext *C, wmOperator *op) { @@ -2746,10 +2836,14 @@ void GRAPH_OT_fmodifier_paste(wmOperatorType *ot) "Replace existing F-Modifiers, instead of just appending to the end of the existing list"); } +/** \} */ + /* ************************************************************************** */ /* Drivers */ -/* ******************** Copy Driver Vars Operator *********************** */ +/* -------------------------------------------------------------------- */ +/** \name Copy Driver Variables Operator + * \{ */ static int graph_driver_vars_copy_exec(bContext *C, wmOperator *op) { @@ -2786,7 +2880,11 @@ void GRAPH_OT_driver_variables_copy(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/* ******************** Paste Driver Vars Operator *********************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Paste Driver Variables Operator + * \{ */ static int graph_driver_vars_paste_exec(bContext *C, wmOperator *op) { @@ -2838,7 +2936,11 @@ void GRAPH_OT_driver_variables_paste(wmOperatorType *ot) "existing list"); } -/* ************************************************************************** */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Delete Invalid Drivers Operator + * \{ */ static int graph_driver_delete_invalid_exec(bContext *C, wmOperator *op) { @@ -2926,3 +3028,5 @@ void GRAPH_OT_driver_delete_invalid(wmOperatorType *ot) /* Flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } + +/** \} */ diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c index fdba74ed3a6..9b0ce27b1e3 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c @@ -315,8 +315,6 @@ static bool view3d_ruler_item_mousemove(struct Depsgraph *depsgraph, const float eps_bias = 0.0002f; float dist_px = MVAL_MAX_PX_DIST * U.pixelsize; /* snap dist */ - WM_gizmo_set_flag(snap_gizmo, WM_GIZMO_HIDDEN, true); - if (ruler_item) { RulerInteraction *inter = ruler_item->gz.interaction_data; float *co = ruler_item->co[inter->co_index]; @@ -388,12 +386,8 @@ static bool view3d_ruler_item_mousemove(struct Depsgraph *depsgraph, snap_gizmo->ptr, ruler_info->snap_data.prop_prevpoint, prev_point); } - short snap_elem = ED_gizmotypes_snap_3d_update( + ED_gizmotypes_snap_3d_update( snap_gizmo, depsgraph, ruler_info->region, v3d, ruler_info->wm, mval_fl, co, NULL); - - if (snap_elem) { - WM_gizmo_set_flag(snap_gizmo, WM_GIZMO_HIDDEN, false); - } } return true; } @@ -1074,7 +1068,6 @@ static void gizmo_ruler_exit(bContext *C, wmGizmo *gz, const bool cancel) if (!cancel) { if (ruler_info->state == RULER_STATE_DRAG) { - WM_gizmo_set_flag(ruler_info->snap_data.gizmo, WM_GIZMO_HIDDEN, false); RNA_property_unset(ruler_info->snap_data.gizmo->ptr, ruler_info->snap_data.prop_prevpoint); ruler_state_set(ruler_info, RULER_STATE_NORMAL); } diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c index 7e8ed276766..bd71a768c0f 100644 --- a/source/blender/editors/space_view3d/view3d_placement.c +++ b/source/blender/editors/space_view3d/view3d_placement.c @@ -1357,7 +1357,6 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve const float mval_fl[2] = {UNPACK2(event->mval)}; /* Calculate the snap location on mouse-move or when toggling snap. */ - bool is_snap_found_prev = ipd->is_snap_found; ipd->is_snap_found = false; if (ipd->use_snap) { if (ipd->snap_gizmo != NULL) { @@ -1366,7 +1365,7 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve CTX_data_ensure_evaluated_depsgraph(C), ipd->region, ipd->v3d, - NULL, + G_MAIN->wm.first, mval_fl, ipd->snap_co, NULL)) { @@ -1376,12 +1375,6 @@ static int view3d_interactive_add_modal(bContext *C, wmOperator *op, const wmEve } } - /* Workaround because test_select doesn't run at the same time as the modal operator. */ - if (is_snap_found_prev != ipd->is_snap_found) { - wmGizmoMap *gzmap = ipd->region->gizmo_map; - WM_gizmo_highlight_set(gzmap, ipd->is_snap_found ? ipd->snap_gizmo : NULL); - } - if (ipd->step_index == STEP_BASE) { if (ipd->is_snap_found) { closest_to_plane_normalized_v3( 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 1682b5bfe31..7ccfd0149bd 100644 --- a/source/blender/editors/transform/transform_mode_edge_seq_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_seq_slide.c @@ -50,7 +50,7 @@ static eRedrawFlag seq_slide_handleEvent(struct TransInfo *t, const wmEvent *eve { BLI_assert(t->mode == TFM_SEQ_SLIDE); wmKeyMapItem *kmi = t->custom.mode.data; - if (event->type == kmi->type && event->val == kmi->val) { + if (kmi && event->type == kmi->type && event->val == kmi->val) { /* Allows the 'Expand to fit' effect to be enabled as a toogle. */ t->flag ^= T_ALT_TRANSFORM; return TREDRAW_HARD; @@ -73,12 +73,11 @@ static void headerSeqSlide(TransInfo *t, const float val[2], char str[UI_MAX_DRA ofs += BLI_snprintf( str + ofs, UI_MAX_DRAW_STR - ofs, TIP_("Sequence Slide: %s%s, ("), &tvec[0], t->con.text); - if (t->keymap) { - wmKeyMapItem *kmi = t->custom.mode.data; - if (kmi) { - ofs += WM_keymap_item_to_string(kmi, false, str + ofs, UI_MAX_DRAW_STR - ofs); - } + wmKeyMapItem *kmi = t->custom.mode.data; + if (kmi) { + ofs += WM_keymap_item_to_string(kmi, false, str + ofs, UI_MAX_DRAW_STR - ofs); } + ofs += BLI_snprintf(str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(" or Alt) Expand to fit %s"), @@ -157,7 +156,9 @@ void initSeqSlide(TransInfo *t) t->num.unit_type[0] = B_UNIT_NONE; t->num.unit_type[1] = B_UNIT_NONE; - /* Workaround to use the same key as the modal keymap. */ - t->custom.mode.data = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_TRANSLATE); + if (t->keymap) { + /* Workaround to use the same key as the modal keymap. */ + t->custom.mode.data = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_TRANSLATE); + } } /** \} */ diff --git a/source/blender/editors/transform/transform_mode_shrink_fatten.c b/source/blender/editors/transform/transform_mode_shrink_fatten.c index 6058a2824e9..2a5c631df41 100644 --- a/source/blender/editors/transform/transform_mode_shrink_fatten.c +++ b/source/blender/editors/transform/transform_mode_shrink_fatten.c @@ -50,7 +50,7 @@ static eRedrawFlag shrinkfatten_handleEvent(struct TransInfo *t, const wmEvent * { BLI_assert(t->mode == TFM_SHRINKFATTEN); wmKeyMapItem *kmi = t->custom.mode.data; - if (event->type == kmi->type && event->val == kmi->val) { + if (kmi && event->type == kmi->type && event->val == kmi->val) { /* Allows the 'Even Thickness' effect to be enabled as a toogle. */ t->flag ^= T_ALT_TRANSFORM; return TREDRAW_HARD; @@ -90,12 +90,11 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) } ofs += BLI_strncpy_rlen(str + ofs, ", (", sizeof(str) - ofs); - if (t->keymap) { - wmKeyMapItem *kmi = t->custom.mode.data; - if (kmi) { - ofs += WM_keymap_item_to_string(kmi, false, str + ofs, sizeof(str) - ofs); - } + wmKeyMapItem *kmi = t->custom.mode.data; + if (kmi) { + ofs += WM_keymap_item_to_string(kmi, false, str + ofs, sizeof(str) - ofs); } + BLI_snprintf(str + ofs, sizeof(str) - ofs, TIP_(" or Alt) Even Thickness %s"), @@ -149,8 +148,10 @@ void initShrinkFatten(TransInfo *t) t->flag |= T_NO_CONSTRAINT; - /* Workaround to use the same key as the modal keymap. */ - t->custom.mode.data = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_RESIZE); + if (t->keymap) { + /* Workaround to use the same key as the modal keymap. */ + t->custom.mode.data = WM_modalkeymap_find_propvalue(t->keymap, TFM_MODAL_RESIZE); + } } } /** \} */ diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc index 7e948149a7f..f683a70b4e6 100644 --- a/source/blender/gpu/opengl/gl_backend.cc +++ b/source/blender/gpu/opengl/gl_backend.cc @@ -131,19 +131,11 @@ void GLBackend::platform_init() } } - /* Since Blender 2.91 AMD TeraScale 2 GPUs crashes during startup. */ - if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_WIN, GPU_DRIVER_ANY)) { - if (strstr(renderer, "Radeon HD 4") || strstr(renderer, "Radeon HD 5") || - strstr(renderer, "Radeon HD 6") || strstr(renderer, "ATI FirePro V4") || - strstr(renderer, "AMD Radeon R5 2")) { - GPG.support_level = GPU_SUPPORT_LEVEL_UNSUPPORTED; - } - } - /* Driver 20.11.2 fixes a lot of issues for the Navi cards, but introduces new ones + /* Driver 20.11.2/3 fixes a lot of issues for the Navi cards, but introduces new ones * for Polaris based cards cards. The viewport has glitches but doesn't crash. - * See T82856 */ + * See T82856,T83574. */ if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_WIN, GPU_DRIVER_OFFICIAL) && - strstr(version, " 20.11.2 ")) { + (strstr(version, " 20.11.2 ") || strstr(version, " 20.11.3 "))) { if (strstr(renderer, "Radeon RX 460 ") || strstr(renderer, "Radeon RX 470 ") || strstr(renderer, "Radeon RX 480 ") || strstr(renderer, "Radeon RX 490 ") || strstr(renderer, "Radeon RX 560 ") || strstr(renderer, "Radeon RX 570 ") || @@ -152,8 +144,10 @@ void GLBackend::platform_init() } } if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_ANY)) { + /* Platform seems to work when SB backend is disabled. This can be done + * by adding the environment variable `R600_DEBUG=nosb`. */ if (strstr(renderer, "AMD CEDAR")) { - GPG.support_level = GPU_SUPPORT_LEVEL_UNSUPPORTED; + GPG.support_level = GPU_SUPPORT_LEVEL_LIMITED; } } } @@ -253,10 +247,6 @@ static void detect_workarounds() return; } - /* Some Intel drivers have issues with using mips as framebuffer targets if - * GL_TEXTURE_MAX_LEVEL is higher than the target mip. - * Only check at the end after all other workarounds because this uses the drawing code. */ - GCaps.mip_render_workaround = detect_mip_render_workaround(); /* Limit support for GLEW_ARB_base_instance to OpenGL 4.0 and higher. NVIDIA Quadro FX 4800 * (TeraScale) report that they support GLEW_ARB_base_instance, but the driver does not support * GLEW_ARB_draw_indirect as it has an OpenGL3 context what also matches the minimum needed @@ -277,6 +267,7 @@ static void detect_workarounds() (strstr(version, "4.5.13399") || strstr(version, "4.5.13417") || strstr(version, "4.5.13422"))) { GLContext::unused_fb_slot_workaround = true; + GCaps.mip_render_workaround = true; GCaps.shader_image_load_store_support = false; GCaps.broken_amd_driver = true; } @@ -368,6 +359,13 @@ static void detect_workarounds() } } + /* Some Intel drivers have issues with using mips as framebuffer targets if + * GL_TEXTURE_MAX_LEVEL is higher than the target mip. + * Only check at the end after all other workarounds because this uses the drawing code. + * Also after device/driver flags to avoid the check that causes pre GCN Radeon to crash. */ + if (GCaps.mip_render_workaround == false) { + GCaps.mip_render_workaround = detect_mip_render_workaround(); + } /* Disable multidraw if the base instance cannot be read. */ if (GLContext::shader_draw_parameters_support == false) { GLContext::multi_draw_indirect_support = false; diff --git a/source/blender/makesdna/DNA_modifier_defaults.h b/source/blender/makesdna/DNA_modifier_defaults.h index f73f43ddade..e122d50cba8 100644 --- a/source/blender/makesdna/DNA_modifier_defaults.h +++ b/source/blender/makesdna/DNA_modifier_defaults.h @@ -801,6 +801,7 @@ #define _DNA_DEFAULT_WeldModifierData \ { \ .merge_dist = 0.001f, \ + .mode = MOD_WELD_MODE_ALL, \ .defgrp_name = "", \ } diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index af7d7e9310f..03cf4aca963 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -2004,7 +2004,8 @@ typedef struct WeldModifierData { /* Name of vertex group to use to mask, MAX_VGROUP_NAME. */ char defgrp_name[64]; - short flag; + char mode; + char flag; char _pad[2]; } WeldModifierData; @@ -2013,6 +2014,12 @@ enum { MOD_WELD_INVERT_VGROUP = (1 << 0), }; +/* #WeldModifierData.mode */ +enum { + MOD_WELD_MODE_ALL = 0, + MOD_WELD_MODE_CONNECTED = 1, +}; + typedef struct DataTransferModifierData { ModifierData modifier; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index 4991f34c3f6..1aac9c0c0c2 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -4993,7 +4993,9 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int len++; p++; while (*p && (*p != quote || escape)) { - escape = (*p == '\\'); + /* A pair of back-slashes represents a single back-slash, + * only use a single back-slash for escaping. */ + escape = (escape == 0) && (*p == '\\'); len++; p++; } @@ -5033,11 +5035,17 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int /* copy string, taking into account escaped ] */ if (bracket) { for (p = *path, i = 0, j = 0; i < len; i++, p++) { - if (*p == '\\' && *(p + 1) == quote) { - } - else { - buf[j++] = *p; + if (*p == '\\') { + if (*(p + 1) == '\\') { + /* Un-escape pairs of back-slashes into a single back-slash. */ + p++; + i += 1; + } + else if (*(p + 1) == quote) { + continue; + } } + buf[j++] = *p; } buf[j] = 0; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index f0836ae59ad..99304d29e00 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -6231,6 +6231,12 @@ static void rna_def_modifier_weld(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; + static const EnumPropertyItem mode_items[] = { + {MOD_WELD_MODE_ALL, "ALL", 0, "All", "Full merge by distance"}, + {MOD_WELD_MODE_CONNECTED, "CONNECTED", 0, "Connected", "Only merge along the edges"}, + {0, NULL, 0, NULL, NULL}, + }; + srna = RNA_def_struct(brna, "WeldModifier", "Modifier"); RNA_def_struct_ui_text(srna, "Weld Modifier", "Weld modifier"); RNA_def_struct_sdna(srna, "WeldModifierData"); @@ -6238,6 +6244,11 @@ static void rna_def_modifier_weld(BlenderRNA *brna) RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, mode_items); + RNA_def_property_ui_text(prop, "Mode", "Mode defines the merge rule"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "merge_dist"); RNA_def_property_range(prop, 0, FLT_MAX); diff --git a/source/blender/modifiers/intern/MOD_weld.c b/source/blender/modifiers/intern/MOD_weld.c index 1a25c24fedc..e34dcf48c19 100644 --- a/source/blender/modifiers/intern/MOD_weld.c +++ b/source/blender/modifiers/intern/MOD_weld.c @@ -1567,6 +1567,12 @@ static bool bvhtree_weld_overlap_cb(void *userdata, int index_a, int index_b, in } #endif +/** Use for #MOD_WELD_MODE_CONNECTED calculation. */ +struct WeldVertexCluster { + float co[3]; + uint merged_verts; +}; + static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContext *ctx, Mesh *mesh) { Mesh *result = mesh; @@ -1606,6 +1612,7 @@ static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContex * 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; + if (wmd->mode == MOD_WELD_MODE_ALL) #ifdef USE_BVHTREEKDOP { /* Get overlap map. */ @@ -1701,6 +1708,80 @@ static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContex BLI_kdtree_3d_free(tree); } #endif + else { + BLI_assert(wmd->mode == MOD_WELD_MODE_CONNECTED); + + MEdge *medge, *me; + + medge = mesh->medge; + totvert = mesh->totvert; + totedge = mesh->totedge; + + struct WeldVertexCluster *vert_clusters = MEM_malloc_arrayN( + totvert, sizeof(*vert_clusters), __func__); + struct WeldVertexCluster *vc = &vert_clusters[0]; + for (uint i = 0; i < totvert; i++, vc++) { + copy_v3_v3(vc->co, mvert[i].co); + vc->merged_verts = 0; + } + const float merge_dist_sq = square_f(wmd->merge_dist); + + range_vn_u(vert_dest_map, totvert, 0); + + /* Collapse Edges that are shorter than the threshold. */ + me = &medge[0]; + for (uint i = 0; i < totedge; i++, me++) { + uint v1 = me->v1; + uint v2 = me->v2; + + while (v1 != vert_dest_map[v1]) { + v1 = vert_dest_map[v1]; + } + while (v2 != vert_dest_map[v2]) { + v2 = vert_dest_map[v2]; + } + if (v1 == v2) { + continue; + } + if (v_mask && (!BLI_BITMAP_TEST(v_mask, v1) || !BLI_BITMAP_TEST(v_mask, v2))) { + continue; + } + if (v1 > v2) { + SWAP(uint, v1, v2); + } + struct WeldVertexCluster *v1_cluster = &vert_clusters[v1]; + struct WeldVertexCluster *v2_cluster = &vert_clusters[v2]; + + float edgedir[3]; + sub_v3_v3v3(edgedir, v2_cluster->co, v1_cluster->co); + const float dist_sq = len_squared_v3(edgedir); + if (dist_sq <= merge_dist_sq) { + float influence = (v2_cluster->merged_verts + 1) / + (float)(v1_cluster->merged_verts + v2_cluster->merged_verts + 2); + madd_v3_v3fl(v1_cluster->co, edgedir, influence); + + v1_cluster->merged_verts += v2_cluster->merged_verts + 1; + vert_dest_map[v2] = v1; + vert_kill_len++; + } + } + + MEM_freeN(vert_clusters); + + 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 (v_mask) { MEM_freeN(v_mask); @@ -1940,6 +2021,7 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel) uiLayoutSetPropSep(layout, true); + uiItemR(layout, ptr, "mode", 0, NULL, ICON_NONE); uiItemR(layout, ptr, "merge_threshold", 0, IFACE_("Distance"), ICON_NONE); modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL); diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index a8b66f3f2fe..63fb685e66d 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -20,8 +20,6 @@ #include <Python.h> -#include <string.h> - #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" @@ -255,7 +253,7 @@ static int BPy_IDGroup_SetName(BPy_IDProperty *self, PyObject *value, void *UNUS name = _PyUnicode_AsStringAndSize(value, &name_size); - if (name_size > MAX_IDPROP_NAME) { + if (name_size >= MAX_IDPROP_NAME) { PyErr_SetString(PyExc_TypeError, "string length cannot exceed 63 characters!"); return -1; } @@ -367,16 +365,11 @@ static const char *idp_try_read_name(PyObject *name_obj) return NULL; } - if (name_size > MAX_IDPROP_NAME) { + if (name_size >= MAX_IDPROP_NAME) { PyErr_SetString(PyExc_KeyError, "the length of IDProperty names is limited to 63 characters"); return NULL; } - - if (strchr(name, '\"') || strchr(name, '\\') || strchr(name, '\'')) { - PyErr_SetString(PyExc_KeyError, "IDProperty names cannot include \", \\, or \'"); - return NULL; - } } else { name = ""; diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index d45c8e8b131..9d69d91c8c8 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -3494,7 +3494,6 @@ PyObject *BPy_CollectionProperty(PyObject *self, PyObject *args, PyObject *kw) if (!RNA_struct_is_a(ptype, &RNA_PropertyGroup)) { PyErr_Format(PyExc_TypeError, "CollectionProperty(...) expected an RNA type derived from %.200s", - RNA_struct_ui_name(&RNA_ID), RNA_struct_ui_name(&RNA_PropertyGroup)); return NULL; } diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index c6a1c565350..2651ec2554f 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -667,9 +667,6 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo # else printf(" $TMP or $TMPDIR Store temporary files here.\n"); # endif -# ifdef WITH_SDL - printf(" $SDL_AUDIODRIVER LibSDL audio driver - alsa, esd, dma.\n"); -# endif exit(0); |