Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-08Fix deprecation warnings about printf() on macOSSergey Sharybin
The new Xcode 14.1 brings the new Apple Clang compiler which considers sprintf unsafe and geenrates deprecation warnings suggesting to sue snprintf instead. This only happens for C++ code by default, and C code can still use sprintf without any warning. This changes does the following: - Whenever is trivial replace sprintf() with BLI_snprintf. - For all other cases use the newly introduced BLI_sprintf which is a wrapper around sprintf() but without warning. There is a discouragement note in the BLI_sprintf comment to suggest use of BLI_snprintf when the size is known. Differential Revision: https://developer.blender.org/D16410
2022-10-10IO: support Presets in Alembic, Collada, OBJ, STL, USD importersAras Pranckevicius
The exporters already had Preset functionality, but the importers did not.
2022-09-14Fix T49814: Collada Import Ignores Vertex NormalsMyron Carey
We now import and apply custom normals using a similar strategy to the STL importer. We store custom normal data for each loop as we read each MPoly and then apply it to the mesh after `BKE_mesh_calc_edges()` is called. The new behavior is optional and may be disabled in the Collada import UI. When disabled, we use the old behavior of only using normals to determine whether or not to smooth shade an MPoly. ---- Patch as requested in {T49814}. The Collada import UI now has an additional checkbox, similar to the glTF and FBX import UIs: {F13428264} Here is a test Collada file with a simple test cube with flipped custom normals: {F13428260} {F13428282} And a sphere where the two halves are disconnected geometry, but has custom normals that make the halves appear to be connected: {F13436363} {F13436368} I've tested it on a number of my own meshes, and the custom normals appear to be imported correctly. I'm not too sure about how I've plumbed the option down, though, or whether this is the most proper way to apply custom normals. Reviewed By: gaiaclary Differential Revision: https://developer.blender.org/D15804
2022-09-07Cleanup: factor out "set default filepath" into a ↵Aras Pranckevicius
ED_fileselect_ensure_default_filepath Follow up to D15904, a bunch of places had exact same logic for "is filepath set? if not, set some default one", so factor all that out into a separate ED_fileselect_ensure_default_filepath function.
2022-09-07Fix T100797: C++ exporters do not remember the path on subsequent exportsAras Pranckevicius
Most/all C++ based IO code had a pattern of doing using RNA_struct_property_is_set to check whether a default path needs to be set. However, it returns false for properties restored from "previous operator settings" (property restoration code sets IDP_FLAG_GHOST flag on them, which "is set" sees and goes "nope, not set"). The fix here is to apply similar logic as 10 years ago in the T32855 fix (rBdb250a4): use RNA_struct_property_is_set_ex instead. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D15904
2022-09-05I18n: translate untitled file namesDamien Picard
When saving, the default file name is "untitled" regardless of selected language. This can be translated, like many graphical applications do. This applies to: - blend file - alembic file - collada file - obj file - usd file - rendered image - grease pencil export - subtitles export - other Python exports through ExportHelper Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15868
2022-06-05Cleanup: assign operator type flags in their initializationCampbell Barton
Some operators OR'ed the existing flags in a way that made it seem the value might already have some values set. Replace this with assignment as no flags are set and the convention with almost all operators is to write the value directly.
2022-03-18Cleanup: Compilation warningsSergey Sharybin
Mainly -Wset-but-unused-variable. Makes default compilation on macOS way less noisy. Differential Revision: https://developer.blender.org/D14357
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-04-19Cleanup: use 'wmOperator.ptr' in draw functionsCampbell Barton
Draw functions used RNA_pointer_create to create the pointer, however this already exists in the operator.
2021-04-19Fix creating operator properties without an owner_idCampbell Barton
Any dynamic enum access would not use the callback. Always set the owner_id to avoid this causing problems. Oversight in 919558854d624f5db40acfa9f5674ac8c94873b6
2021-02-10Cleanup: remove redundant headers in source/blender/editors/Campbell Barton
Remove redundant headers using `./source/tools/utils_maintenance/code_clean.py` Reviewed By: jmonteath Ref D10364
2020-12-24UI: Cleanup spelling of compound wordsYevgeny Makarov
Approximately 138 changes in the spelling of compound words and proper names like "Light Probe", "Shrink/Fatten", "Face Map". In many cases, hyphens were used where they aren't correct, like "re-fit". Other common changes include: - "Datablock" -> "data-block" - "Floating point" -> "floating-point" - "Ngons" -> "n-gons" These changes help give the language used in the interface a consistent, more professional feel. Differential Revision: https://developer.blender.org/D9923
2020-12-24Cleanup: Fix capitalization in various UI stringsYevgeny Makarov
Approximately 195 changes of capitalization to conform to MLA title style. UI labels and property names should use MLA title case, while descriptions should be capitalized like regular prose, generally with only the start of a sentence capitalized. Differential Revision: https://developer.blender.org/D9922
2020-11-03Fix C operators can't set default display or sort type for File BrowserJulian Eisel
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-07-21UI: Use consistent layout for custom operator UIHans Goudey
Operators are one of the last places in Blender to use older UI designs that don't fit in with recent style conventions. This commit updates these custom operator UI callbacks for consistency and clarity. Some of the code is also simplified a lot. Some of the older operator layouts were much more complex (in terms of code) than they needed to be. See the differential revision for a before and after screenshot of each operator. Differential Revision: https://developer.blender.org/D8326
2020-07-03Cleanup: Editors, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/editors` module. No functional changes.
2020-06-22Add undo step to Alembic and Collada importers...Bastien Montagne
Re T77754.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-06Cleanup: move Alembic, AVI, Collada, and USD to `source/blender/io`Sybren A. Stüvel
This moves the `alembic`, `avi`, `collada`, and `usd` modules into a common `io` directory. This also cleans up some `#include "../../{somedir}/{somefile}.h"` by adding `../../io/{somedir}` to `CMakeLists.txt` and then just using `#include "{somefile}.h"`. No functional changes.
2020-01-22Alembic & Collada: Show sidebar by default in file browserJulian Eisel
Importers/exporters should show the sidebar by default (if they have any settings). For some reason this was missing for the Alembic and Collada exporters.
2019-07-07UI: Cleanup tooltip formatAaron Carlisle
2019-07-07UI: Cleanup tooltip formatAaron Carlisle
2019-05-28Cleanup: clang formatCampbell Barton
2019-05-27cleanup: Collada exporter renamed 'transrotloc' to 'decomposed'Gaia Clary
The collada exporter allows to export transforms either as Matrix or as a decomposition of Translation, Rotation aand Scale. The decomposition option was falsely named "TransRotLoc". I renamed it to the much more descriptive word "Decomposed". The tooltip already contains sufficient information, so there is no need to change that.
2019-05-27fix: collada transformtype must be identical for animation export and object ↵Gaia Clary
export When exporting an object we can choose the transformation type 'Matrix' or 'trans/rot/scale' When exporting an animation we have the same choice regarding the used transformation type. However we must make sure that animations and objects use the same transformation type within one colleda export. The user interface is now reworked such that the correct settings are always guaranteed. I also reworked the tool tips
2019-05-24Collada: Remove property with empty identifierSergey Sharybin
This is not a valid property. Additionally, there is very much the same property with a valid identifier defined few lines below.
2019-05-23Collada exporter updateGaia Clary
Added new feature: Collada: global axis rotation upon export (UI) The new feature allows to specify the target rest coordinate system upon export. This allows for example to export a character that is in Blender orientation (Y forward) to match the Secondlife orientation where (-X forward) - Refactor:Added new utility methods to collada_utils Made BCMatrix class more powerfull moved Blender related structures into new BlenderContext class added class wrapper to encapsulate ExportSettings structure Added blender context getters to ExportSettings added access methods to BlenderContext into ExportSettings class Moved class BCMatrix into BlenderContext moved utility functions from collada_util into BlenderContext replace own function for parenting by a call to ED_object_parent_set() - Cleanup: removed obsolete parameters from methods renamed parameters for better understanding cleanup whitespace and indentation removed obsolete comments
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-22Cleanup: style, use braces for editorsCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-15Cleanup: indentation, wrappingCampbell Barton
Mostly functions wrapping args, not confirming to our style guide.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-03Cleanup: trailing commasCampbell Barton
Needed for clan-format not to wrap onto one line.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-05fix T59743: Collada exporter: Add option for exporting flat curvesGaia Clary
The Collada exporter suppresses the export of flat animation curves to optimize the animation (in fact to make the exported file smaller). But sometimes it is important to also have the flat curves exported because they may be needed to define an initial transformation to a fixed location - like translating the weapon from the ground floor to the back of the model in the report. I added a new option "all keyed curves" which is disabled by default but when enabled it also exports flat curves. feedback is very welcome
2018-12-24Fix/cleanup typos and such in UI messages (and some comments).Bastien Montagne
2018-12-24Fix/cleanup another bunch of UI messages issues.Bastien Montagne
Also (mostly in comments): behaviour -> behavior (we use American English).
2018-12-20Cleanup: argument wrapping indentationCampbell Barton
2018-12-07Depsgraph: Remove duplicated sets of recalc/update flagsSergey Sharybin
There were at least three copies of those: - OB_RECALC* family of flags, which are rudiment of an old dependency graph system. - PSYS_RECALC* which were used by old dependency graph system as a separate set since the graph itself did not handle particle systems. - DEG_TAG_* which was used to tag IDs. Now there is a single set, which defines what can be tagged and queried for an update. It also has some aggregate flags to make queries simpler. Lets once and for all solve the madness of those flags, stick to a single set, which will not overlap with anything or require any extra conversion. Technically, shouldn't be measurable user difference, but some of the agregate flags for few dependency graph components did change. Fixes T58632: Particle don't update rotation settings
2018-11-28Fix COLLADA build warning.Brecht Van Lommel
This properties does not appear to be used anymore.
2018-11-27Cleanup: style, includesCampbell Barton
2018-11-25Merge branch 'master' into blender2.8Campbell Barton
2018-11-23Partial rewrite of the Collada Module for Blender 2.8Gaia Clary
Most important changes are in the Animation exporter and Animation Importer. There is still some cleaning up to be done. But the Exporter/Importer basically work within Blender 2.8 Some details: User Interface: The interface has been reorganized to look more like the FBX interface. New options in user interface: * keep_keyframes: When sampling the distance between 2 keyframes is defined by the sampling rate. Furthermore the keyframes defined in the FCurves are not exported. However when this option is enabled then also the defined keyframes will be added to the exported fcurves * keep_smooth_curves: When sampling we do not use FCurves. So we also have no Curve handles for smooth exporting. However when this option is enabled, Blender does its best to recreate the handles for export. This is a very experimental feature and it is know to break when: - the exported animated objects have parent inverse matrices different from the unit matrix - The exported objects have negative scaling There may be many other situations when this feature breaks. This needs to be further tested. It may be removed later or replaced by something less wonky. BlenderContext: is a new class that contains the bridge to Blender. It contains pointers to the current export/import context plus derived values of Depsgraph, Scene, Main Reporting: I reorganized the output on the Blender Console to become more informative and more readable Preservation of Item names: name attributes are now encoded with XML entities. This makes sure that i can export/import names exactly defined in the tool. This affects material names, bone names and object names. Hierarchy export: * Object and Bone Hierarchies are now exported correctly by taking the Blender parent/child hierarchy into account * Export also not selected intermediate objects Problem: When we export an Object Hierarchy, then we must export all elements of the hierarchy to maintain the transforms. This is especially important when exporting animated objects, because the animation curves are exported as relative curves based on the parent-child hierarchy. If an intermediate animated object is missing then the exported animation breaks. Solution: If the "Selected" Optioon is enabled, then take care to also export all objects which are not selected and hidden, but which are parents of selected objects. Node Based Material Importer (wip): Added basic support for Materials with diffuse color and diffuse textures. More properties (opacity, emission) need changes in the used shader. Note: Materials are all constructed by using the principled BSDF shader. Animation Exporter: * Massive optimization of the Animation Bake tool (Animation Sampler). Instead of sampling each fcurve separately, i now sample all exported fcurves simultaneously. So i avoid many (many!) scene updates during animation export. * Add support for Continuous Acceleration (Fcurve handles) This allows us to create smoother FCurves during importing Collada Animation curves. Possibly this should become an option ionstead of a fixed import feature. * Add support for sampling curves (to bake animations) * The animation sampler now can be used for any animation curve. Before the sampler only looked at curves which are supported by Standard Collada 1.4. However the Collada exporter currently ignores all animation curves which are not covered by the 1.4.1 Collada Standards. There is still some room for improvements here (work in progres) Known issues: * Some exports do currently not work reliably, among those are the camera animations, material animations and light animations those animations will be added back next (work in progres) * Exporting animation curves with keyframes (and tangents) sometimes results in odd curves (when parent inverse matrix is involved) This needs to be checked in more depth (probably it can not be solved). * Export of "all animations in scene" is disabled because the Collada Importer can not handle this reliably at the moment (work in progres). * Support for Animation Clip export Added one extra level to the exported animations such that now all scene animations are enclosed: <Animation name="id_name(ob)_Action"> <Animation>...</Animation> ... </Animation> Animation Importer: * Import of animations for objects with multiple materials When importing multiple materials for one object, the imported material animation curves have all been assigned to the first material in the object. Error handling (wip): The Importer was a bit confused as it sometimes ignored fatal parsing errors and continued to import. I did my best to unconfuse it, but i believe that this needs to be tested more. Refactoring: update : move generation of effect id names into own function update : adjust importer/exporter for no longer supported HEMI lights cleanup: Removed no lopnger existing attribute from the exporter presets cleanup: Removed not needed Context attribute from DocumentExporter fix : Avoid duplicate deletion of temporary items cleanup: fixed indentation and white space issues update : Make BCAnimation class more self contained cleanup: Renamed classes, updated comments for better reading cleanup: Moved static class functions to collada_utils cleanup: Moved typedefs to more intuitive locations cleanup: indentation and class method declarations cleanup: Removed no longer needed methods update : Moved Classes into separate files cleanup: Added comments cleanup: take care of name conventions ... : many more small changes, not helpful to list them all
2018-11-07Cleanup: remove some useless BKE_library and BKE_main includes.Bastien Montagne
Makes it simpler to make some changes... Also fix order of some includes (use alphabetical please).
2018-11-07Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'Bastien Montagne
That kind of implicit includes should really only be done when totally, absolutely necessary, and ideally only with rather simple 'second-level' headers. Otherwise not being explicit with includes always end up biting in unexpected ways...
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: BLI path extension APICampbell Barton
Use BLI_path_extension_* prefix.