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
2021-09-06Fix tests broken by rB58632a7f3c0f1be6.Bastien Montagne
Commits breaking RNA API should always run all tests, and do text search in python code base to ensure everything is updated as needed.
2021-09-01Unittest: Extend and basic linking tests and add basic append tests.Bastien Montagne
We could check many more things still, but this should already cover most basic common cases.
2021-08-27Refactor IDProperty UI data storageHans Goudey
The storage of IDProperty UI data (min, max, default value, etc) is quite complicated. For every property, retrieving a single one of these values involves three string lookups. First for the "_RNA_UI" group property, then another for a group with the property's name, then for the data value name. Not only is this inefficient, it's hard to reason about, unintuitive, and not at all self-explanatory. This commit replaces that system with a UI data struct directly in the IDProperty. If it's not used, the only cost is of a NULL pointer. Beyond storing the description, name, and RNA subtype, derived structs are used to store type specific UI data like min and max. Note that this means that addons using (abusing) the `_RNA_UI` custom property will have to be changed. A few places in the addons repository will be changed after this commit with D9919. **Before** Before, first the _RNA_UI subgroup is retrieved the _RNA_UI group, then the subgroup for the original property, then specific UI data is accessed like any other IDProperty. ``` prop = rna_idprop_ui_prop_get(idproperties_owner, "prop_name", create=True) prop["min"] = 1.0 ``` **After** After, the `id_properties_ui` function for RNA structs returns a python object specifically for managing an IDProperty's UI data. ``` ui_data = idproperties_owner.id_properties_ui("prop_name") ui_data.update(min=1.0) ``` In addition to `update`, there are now other functions: - `as_dict`: Returns a dictionary of the property's UI data. - `clear`: Removes the property's UI data. - `update_from`: Copy UI data between properties, even if they have different owners. Differential Revision: https://developer.blender.org/D9697
2021-08-24Added more Geometry Node testsHimanshi Kalra
* Attributes * Utilities * Volume Test folder located in `lib\tests\modeling\geometry_nodes` It contains around 34 new tests. * attribute clamp + other attribute nodes * Curve Primitive nodes * Mesh Primitive nodes * delete geometry * convex hull * subdivision surface * boolean intersect * boolean diff * volume to mesh Reviewed By: zazizizou, JacquesLucke Differential Revision: https://developer.blender.org/D12250
2021-08-04LibOverride RNA API: add removal of properties and operations.Bastien Montagne
This should complete the basics of RNA API for library overrides. Ref. T86656.
2021-08-04LibOverride: Add RNA API to reset/delete overrides.Bastien Montagne
Ref. T86656.
2021-08-04Tweak to recent liboverride API addition: naming.Bastien Montagne
Rename new API function introduced in recent rB3b0fab6dfaa0 to match our convention to put the action (verb) at the end of names: `operations_update`. Sorry for not catching that during review.
2021-08-04Override: API update_operations.Jeroen Bakker
The update_operations function will update the override structure of the local object. When working with overrides the override structure is only updated when the work-file is stored. When using scripts you might want to enforce the update of override properties and operations. This function removes a hack on the test cases. Reviewed By: mont29 Maniphest Tasks: T86656 Differential Revision: https://developer.blender.org/D10848
2021-08-02Geometry Nodes: increase threshold to make regression tests passJacques Lucke
The real fix here is to use some kind of relative error in `customdata_compare` instead of the absolute error used now. If vertex coordinates get larger in magnitude, the allowed error should increase as well.
2021-07-29PyAPI: support multi-dimensional arrays for bpy.props vector typesCampbell Barton
- Multi-dimensional boolean, int and float vector types are supported. - A sequence of int's for the "size" is used to declare dimensions. - Nested sequences are required for default arguments. Now it's possible to define matrix properties, for e.g: bpy.props.FloatVectorProperty(size=(4, 4), subtype='MATRIX')
2021-07-27Regression Testing: Running tests based on blend filesHimanshi Kalra
Runs tests based on blend files with minimum python interaction. Developed as part of GSoC 2021 - Regression Testing of Geometry Nodes. Earlier, tests were built from scratch by adding a modifier/operation from the Python API. Now, tests can also be created inside blender and are compared using Python script. Features: Automatically adding expected object if it doesn't exist. This patch adds tests for the following Geometry Nodes category: * Curves * Geometry * Mesh * Points The implemented UML diagram for refactoring of mesh test framework. {F10225906} Technical Changes: SpecMeshTest: It adds the modifier/operation based on the Spec provided. BlendFileTest: It applies already existing modifier/operation from the blend file. Test folders hierarchy with tests. This folder should be extracted to `lib\tests\modeling` {F10240651} Note: The `geometry_nodes` folder might lie under another `geometry_nodes` folder while extracting, please double check. Use the inner-most one. The hierarchy should be: -`lib\tests\modeling\geometry_nodes\mesh` -`lib\tests\modeling\geometry_nodes\points` and so on. * From `ctest` the tests should be run as `ctest -R geo_node -C [Configuration]` on Windows. * Each single test can be run with its entire name e..g `ctest -R geo_node_geometry_join_geometry`.(just an example). Run `ctest -N -R geo_node` to see all tests. * From blender, the tests can be run `blender -b path\to\blend\file --python path\to\geo_node_test.py` Reviewed By: zazizizou, JacquesLucke Differential Revision: https://developer.blender.org/D11611
2021-07-13Event Simulate: and a --time-actions command line argumentCampbell Barton
When enabled, print the time taken between running actions.
2021-07-11Cleanup: correct spelling in comments, remove profanityCampbell Barton
2021-07-06Alembic: remove non-functional "Renderable Objects" only optionPhilipp Oeser
When introduced in {rB61050f75b13e} this was actually working (meaning it checked the Outliner OB_RESTRICT_RENDER flag and skipped the object if desired). Behavior has since then been commented in rBae6e9401abb7 and apparently refactored out in rB2917df21adc8. If checked, it seemed to be working (objects marked non-renderable in the Outliner were pruned from the export), however unchecking that option did not include them in the export. Now it changed - for the worse if you like - in rBa95f86359673 which made it so if "Renderable Objects" only is checked, it will still export objects invisible in renders. So since we now have the non-functional option with a broken/misleading default, it is better to just remove it entirely. In fact it has been superseeded by the "Visible Objects" option (this does the same thing: depsgraph is evaluated in render mode) and as a second step (and to make this even clearer) a choice whether Render or Viewport evaluation is used can be added (just like the USD exporter has). When that choice is explicit, it's also clear which visibility actually matters. This is breaking API usage, should be in release notes. ref. T89594 Maniphest Tasks: T89594 Differential Revision: https://developer.blender.org/D11808
2021-07-06Cleanup: pep8Campbell Barton
2021-07-02Copy Transforms: implement Remove Target Shear and more Mix options.Alexander Gavrilov
This constraint can be naturally viewed as a prototype for a future 4x4 matrix math node (or subset thereof), since its basic semantics already is matrix assignment. Thus it makes sense to add math options to this constraint to increase flexibility in the meantime. This patch adds support for several operations that would be useful: - An option to remove shear in the incoming target matrix. Shear is known to cause issues for various mathematical operations, so an option to remove it at key points is useful. Constraints based on Euler like Copy Rotation and Limit Rotation already have always enabled shear removal built in, because their math doesn't work correctly with shear. In the future node system shear removal would be a separate node (and currently Limit Rotation can be used as a Remove Shear constraint). However removing shear from the result of the target space conversion before mixing (similar to Copy Rotation) has to be built into Copy Transforms itself as an option. - More ways to combine the target and owner matrices. Similar to multiple Inherit Scale modes for parenting, there are multiple ways one may want to combine matrices based on context. This implements 3 variants for each of the Before/After modes (one of them already existing). - Full implements regular matrix multiplication as the most basic option. The downside is the risk of creating shear. - Aligned emulates the 'anti-shear' Aligned Inherit Scale mode, and basically uses Full for location, and Split for rotation/scale. (This choice already existed.) - Split Channels combines location, rotation and scale separately. Looking at D7547 there is demand for Split Channels in some cases, so I think it makes sense to include it in Copy Transforms too, so that the Mix menu items can be identical for it and the Action constraint. Differential Revision: https://developer.blender.org/D9469
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-06-14PyAPI: remove deprecated bpy.app.binary_path_pythonCampbell Barton
2021-06-09Tests: temporarily increase threshold for OpenImageDenoise testBrecht Van Lommel
Until all platforms have the same version, this helps the tests pass.
2021-06-08PyAPI: use keyword only argumentsCampbell Barton
Use keyword only arguments for the following functions. - addon_utils.module_bl_info 2nd arg `info_basis`. - addon_utils.modules 1st `module_cache`, 2nd arg `refresh`. - addon_utils.modules_refresh 1st arg `module_cache`. - bl_app_template_utils.activate 1nd arg `template_id`. - bl_app_template_utils.import_from_id 2nd arg `ignore_not_found`. - bl_app_template_utils.import_from_path 2nd arg `ignore_not_found`. - bl_keymap_utils.keymap_from_toolbar.generate 2nd & 3rd args `use_fallback_keys` & `use_reset`. - bl_keymap_utils.platform_helpers.keyconfig_data_oskey_from_ctrl 2nd arg `filter_fn`. - bl_ui_utils.bug_report_url.url_prefill_from_blender 1st arg `addon_info`. - bmesh.types.BMFace.copy 1st & 2nd args `verts`, `edges`. - bmesh.types.BMesh.calc_volume 1st arg `signed`. - bmesh.types.BMesh.from_mesh 2nd..4th args `face_normals`, `use_shape_key`, `shape_key_index`. - bmesh.types.BMesh.from_object 3rd & 4th args `cage`, `face_normals`. - bmesh.types.BMesh.transform 2nd arg `filter`. - bmesh.types.BMesh.update_edit_mesh 2nd & 3rd args `loop_triangles`, `destructive`. - bmesh.types.{BMVertSeq,BMEdgeSeq,BMFaceSeq}.sort 1st & 2nd arg `key`, `reverse`. - bmesh.utils.face_split 4th..6th args `coords`, `use_exist`, `example`. - bpy.data.libraries.load 2nd..4th args `link`, `relative`, `assets_only`. - bpy.data.user_map 1st..3rd args `subset`, `key_types, `value_types`. - bpy.msgbus.subscribe_rna 5th arg `options`. - bpy.path.abspath 2nd & 3rd args `start` & `library`. - bpy.path.clean_name 2nd arg `replace`. - bpy.path.ensure_ext 3rd arg `case_sensitive`. - bpy.path.module_names 2nd arg `recursive`. - bpy.path.relpath 2nd arg `start`. - bpy.types.EditBone.transform 2nd & 3rd arg `scale`, `roll`. - bpy.types.Operator.as_keywords 1st arg `ignore`. - bpy.types.Struct.{keyframe_insert,keyframe_delete} 2nd..5th args `index`, `frame`, `group`, `options`. - bpy.types.WindowManager.popup_menu 2nd & 3rd arg `title`, `icon`. - bpy.types.WindowManager.popup_menu_pie 3rd & 4th arg `title`, `icon`. - bpy.utils.app_template_paths 1st arg `subdir`. - bpy.utils.app_template_paths 1st arg `subdir`. - bpy.utils.blend_paths 1st..3rd args `absolute`, `packed`, `local`. - bpy.utils.execfile 2nd arg `mod`. - bpy.utils.keyconfig_set 2nd arg `report`. - bpy.utils.load_scripts 1st & 2nd `reload_scripts` & `refresh_scripts`. - bpy.utils.preset_find 3rd & 4th args `display_name`, `ext`. - bpy.utils.resource_path 2nd & 3rd arg `major`, `minor`. - bpy.utils.script_paths 1st..4th args `subdir`, `user_pref`, `check_all`, `use_user`. - bpy.utils.smpte_from_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.smpte_from_seconds 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.system_resource 2nd arg `subdir`. - bpy.utils.time_from_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.time_to_frame 2nd & 3rd args `fps`, `fps_base`. - bpy.utils.units.to_string 4th..6th `precision`, `split_unit`, `compatible_unit`. - bpy.utils.units.to_value 4th arg `str_ref_unit`. - bpy.utils.user_resource 2nd & 3rd args `subdir`, `create` - bpy_extras.view3d_utils.location_3d_to_region_2d 4th arg `default`. - bpy_extras.view3d_utils.region_2d_to_origin_3d 4th arg `clamp`. - gpu.offscreen.unbind 1st arg `restore`. - gpu_extras.batch.batch_for_shader 4th arg `indices`. - gpu_extras.batch.presets.draw_circle_2d 4th arg `segments`. - gpu_extras.presets.draw_circle_2d 4th arg `segments`. - imbuf.types.ImBuf.resize 2nd arg `resize`. - imbuf.write 2nd arg `filepath`. - mathutils.kdtree.KDTree.find 2nd arg `filter`. - nodeitems_utils.NodeCategory 3rd & 4th arg `descriptions`, `items`. - nodeitems_utils.NodeItem 2nd..4th args `label`, `settings`, `poll`. - nodeitems_utils.NodeItemCustom 1st & 2nd arg `poll`, `draw`. - rna_prop_ui.draw 5th arg `use_edit`. - rna_prop_ui.rna_idprop_ui_get 2nd arg `create`. - rna_prop_ui.rna_idprop_ui_prop_clear 3rd arg `remove`. - rna_prop_ui.rna_idprop_ui_prop_get 3rd arg `create`. - rna_xml.xml2rna 2nd arg `root_rna`. - rna_xml.xml_file_write 4th arg `skip_typemap`.
2021-06-07Cleanup: use keywords for unit testsCampbell Barton
Prepare for function calls to be keyword only.
2021-06-07Cleanup: quiet warning accessing deprecated attribute in bl_testCampbell Barton
2021-06-06Event Simulate: and a --keep-open command line argumentCampbell Barton
It can be useful to investigate the state of the file after event simulation runs.
2021-06-02Fix swapped x/y in event simulation scriptCampbell Barton
Incorrect area center calculation, also correct comments.
2021-05-28Tests: add utility to generate interactive user actionsCampbell Barton
A utility that supports passing in actions as command line arguments for writing reproducible interactions, benchmarking, profiling and testing. Unlike regular scripts this is able to control model operators usefully. Typical ways of controlling Blender using this utility are via operator id's, menu search and explicit events. Others methods can be added as needed. See the doc-string for example usage.
2021-05-18Merge branch 'blender-v2.93-release'Antonio Vazquez
2021-05-18Fix ocean modifier giving different result on Arm than x86Brecht Van Lommel
And re-enable the test on macOS Arm. Ref T78710
2021-05-18Merge branch 'blender-v2.93-release'Sebastián Barschkis
2021-05-18Tests: Disabled physics ocean test on macOS arm64Sebastián Barschkis
Test is failing and needs further investigation.
2021-05-18Tests: Remove threshold param from physics ocean mesh testSebastián Barschkis
This was not the reason for the test failure on macOS arm64.
2021-05-18Tests: Increased threshold param for physics_ocean testSebastián Barschkis
Adjusting threshold to see what the buildbot will make of this.
2021-05-17Tests: Added threshold to physics ocean mesh testSebastián Barschkis
The physics_ocean test is currently failing on macOS arm. This is one attempt to fix this issue.
2021-05-17Mathutils: add a Matrix.LocRotScale constructor for combining channels.Alexander Gavrilov
Combining location, rotation and scale channels into a matrix is a standard task, so while it is easily accomplished by constructing and multiplying 3 matrices, having a standard utility allows for more clear code. The new constructor builds a 4x4 matrix from separate location, rotation and scale values. Rotation can be represented as a 3x3 Matrix, Quaternion or Euler value, while the other two inputs are vectors. Unneeded inputs can be replaced with None. Differential Revision: https://developer.blender.org/D11264
2021-05-14PyAPI: use iterators for ID property methods (keys, values & items)Campbell Barton
- Matches changes in Python 3.x dictionary methods. - Iterating now raises a run-time error if the property-group changes size during iteration. - IDPropertyGroup.iteritems() has been removed. - IDPropertyGroup View & Iterator types have been added. - Some set functionality from dict_keys/values/items aren't yet supported (isdisjoint method and boolean set style operations). Proposed as part of T85675.
2021-05-14Merge branch 'blender-v2.93-release'Campbell Barton
2021-05-14Fix memory leak in IDPropertyGroup.pop()Campbell Barton
When popping ID-property groups/arrays, ID-property was removed but not freed. Now the value is converted to a native Python type and freed.
2021-05-14Cleanup: clang-formatCampbell Barton
2021-04-29Added Operator tests: unsubdivide, shading, vertex connect and mark seamHimanshi Kalra
Added tests for: * Mark Seam * Shade flat * Shade smooth * Unsubdivide * Vertex Connect Path * select nth (Checkered Deselect) Notes: 1) Shade flat, shade smooth are base test cases (to check mesh doesn't change for real) Updated blend file: tests/modeling/operators.blend Reviewed By: zazizizou, mont29 Differential Revision: https://developer.blender.org/D10893
2021-03-29Cleanup: Updated Documentation Library Overrides.Jeroen Bakker
2021-03-29Overrides: API to create an override template.Jeroen Bakker
This is functionality that isn't accessible via the user interface. The API allows the creation and modification of an override template that holds rules that needs to be checked when overriding the asset. The API is setup that it cannot be changed after creation. Later on when the system is more mature we will allow changing overrides operations. NOTE: This is an experimental feature and should not be used in productions. Reviewed By: mont29, sebbas Differential Revision: https://developer.blender.org/D10792
2021-03-27Automated testing: selection operators test casesHabib Gahbiche
added 22 more test cases for following operators: - edges select sharp - loop multi select - select all - select faces by sides - select interior faces - select less - select linked {F9853218} Reviewed By: calra, mont29 Differential Revision: https://developer.blender.org/D10400
2021-03-26Compositor automated testingHabib Gahbiche
Added support for compositor tests. Compositor tests can be added, executed and viewed in a similar way to cycles and other render engines tests. Running test: `ctest -R compositor` Updating test: `BLENDER_TEST_UPDATE=1 ctest -R compositor` Viewing test results: typically saved under `build_folder/tests/compositor/report.html` Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6334
2021-03-22Fix: wrong use of assert in recent commit.Jeroen Bakker
2021-03-22LibraryOverrides: Initial Test Case.Jeroen Bakker
Added a first test case for review. This will be the base for future test cases. The current API is sufficient for what is expected for such a low level API. One concern is that you need to trigger a save in order to update the library overrides structure. Not expected from TD/Dev point of view. Test cases are very important when implementing restrictive mode as it is a second evaluation mode that has impact on the (current) permissive mode. Reviewed By: Sebastián Barschkis, Bastien Montagne Differential Revision: https://developer.blender.org/D10747
2021-03-15Cleanup: update comments, remove ifdef'd codeCampbell Barton
2021-03-14Tests: add script_validate_keymapCampbell Barton
This checks the generated key-map data matches the result of re-exporting and re-importing. This shows up various inconsistencies, including: - Unused keymaps. - Unknown/unused data in the keymap. - Event arguments that don't make sense. - Event values that don't match the event type (tweak direction on keyboard event for example).
2021-03-04Tests: don't write thumbnails when running testsCampbell Barton
Also replace WM_OT_read_factory_settings with WM_OT_read_homefile so the preferences don't have to be reloaded.
2021-02-13Tests: Add additional object to convert curve to mesh fileHans Goudey
2021-02-11Mesh automated testing: compare selectionHabib Gahbiche
MeshTest now compares selection between evaluated mesh and expected mesh. This way, we can test more operators such as `faces_select_linked_flat` Note: selection comparison intentionally does not happen in BKE_mesh_cmp() on C side but rather on Python side, because selection is independent of mesh generation. Reviewed By: calra, mont29 Differential Revision: https://developer.blender.org/D10279
2021-02-11Mesh automated testing: improve progress printingHabib Gahbiche
Print number of total tests with each test to show how many tests have been executed and how many are left. Example: `Running test 27/36: PlaneFaceSplitByEdges...` Reviewed By: calra, mont29 Differential Revision: https://developer.blender.org/D10278