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-07-06Cleanup: pep8Campbell Barton
2021-01-27Fix T81834: Images not properly duplicated in node_shader_utilsCampbell Barton
Oversight in fb10eaf6e8a4f959cd5d46fd1bb7e8fb26b67205
2020-12-29Fix T83749: Better handling of alpha in generic Nodes material wrapper for ↵Bastien Montagne
IO add-ons. Try to detect if a given image may have valid alpha data or not (based on number of channels and depth). This may be a bit doggy in theory, but in practice it should cover most fields as expected. We can always adjust the euristic here in other wrong cases appear. This will affect all import add-ons using that node shader wrapper (at least OBJ and FBX ones).
2020-10-02Cleanup: pep8, blank linesCampbell Barton
2020-09-17Shaders: add emission strength input to Principled BSDF nodeAlex Strand
This impacts I/O add-ons. OBJ, FBX and Collada have been updated, glTF not yet. Differential Revision: https://developer.blender.org/D4971
2020-09-16Fix T80684: Node shader wrapper: Tweak handling of alpha textures.Bastien Montagne
There is no ideal solution here, but we can assume by default that we should use the Alpha output from a texture used for transparency data. This will break people using a dedicated B&W texture for this alpha pass, but we cannot really handle all cases properly in this wrapper, we only try to support the most common ones to some extent.
2019-10-17Node shader wrapper: use 'Non-Color' profile for BW textures inputs.Bastien Montagne
All the single-value texture inputs of Principled BSDF node should use non-color colorspace profile, not sRGB one (issue raised in https://blender.stackexchange.com/questions/155617, thanks). That also revealed another issue - since those color space settings are stored at the image level itself, not the node one, we need to duplicate those image data-blocks when we use same picture for e.g. base color (sRGB) and specular (non-color) inputs... For now using a basic mechanism for that, might generate several extra, uneeded copies of the image ID, but that’s better than breaking custom settings and such. Note that while this will modify the behavior of the impporters using that node wrapper, no change should be needed in IO add-ons themselves.
2019-10-10Node Shader wrapper: add access to the Emission color of Principled BSDF node.Bastien Montagne
This did not exist when that wrapper was created, but is supported by many formats, so worth supporting it now. See also T70666.
2019-10-09Fix T70596: Wrong default scale value for node wrapper tool.Bastien Montagne
This affected all exporter add-ons using that wrapper to handle the node shaders... sigh...
2019-09-07Fix node_shader_utils problems with new mapping nodePhilipp Oeser
Since rBbaaa89a0bc54 we have to access the mapping node differently. This doesnt take actual linkage of the new sockets into account (but this wasnt done for most sockets on the Principled BSDF node either) Also the min/max of the mapping node was removed entirely. It was decided upon removing this from node_shader_utils as well (and replace this by existing access to the Extension parameter of the Texture node). Part of solving T69526. Differential Revision: https://developer.blender.org/D5693
2019-07-30Py node shader wrapper: Add clamping to official min/max values.Bastien Montagne
Taking values from relevant node definition C file... Related to T67889.
2019-07-04node_shader_utils: add possibility to override image colorspacePhilipp Oeser
'is_data' since the move from 'cycles_shader_compat' (2.79) to 'PrincipledBSDFWrapper' (2.8) we lost the ability to (automatically) set this colorspace setting for imported textures. This was useful for e.g. normalmaps to always assume 'Non-Color' data. This adds the possibility to overide and uses this for normalmaps... Fixes T66368 Reviewers: mont29, brecht Maniphest Tasks: T66368 Differential Revision: https://developer.blender.org/D5176
2019-06-26Fix typo pratially breaking node shader wrapper (used by IO add-ons).andreas atteneder
Reported with patch as D5140 by andreas atteneder (@atti), thanks!
2019-05-15Py NodeShader wrapper helper: add support for new Alpha setting of ↵Bastien Montagne
Principled BSDF. Now that we have real alpha in BSDF, it's much better option for transparency, than previously used Transmission value. Related to T64609.
2019-05-09Cleanup: unused args/vars/imports in modulesCampbell Barton
2019-03-17Cleanup: unused variablesCampbell Barton
2019-01-30Fix T61017: node_shader_utils did not handle diffuse_color correctlyJacques Lucke
2019-01-30Cleanup: line lengthCampbell Barton
2018-11-16Fix related to T57851: broken normalmap handling in py shader wrapper.Bastien Montagne
Pretty stupid mistake...
2018-11-15Fix node_shader_utils: "Specular Tint" is a float (not a color)Philipp Oeser
2018-10-17node_shader_utils: Proper fix for node_normalmap accessor returning ellipsis ↵Bastien Montagne
value. Ellipsis value is internal ingredient only, to tag hidden _node_normalmap 'real' property as not yet initialized. Public node_normalmap accessor should never ever have that value, it's either None or a valid node!
2018-10-17Revert "Fix error on FBX export after material changes"Bastien Montagne
This reverts commit ce4cfbe108d0641832d86a731ea32f596220b7c5. Obviously wrong 'fix', please do not touch other dev’s code, especially in active/WIP area, when you do not fully understand it.
2018-10-17Fix error on FBX export after material changesDalai Felinto
Update the addons repository as well.
2018-10-16node_shader_utils: fix bad setting of use_nodes in readonly case.Bastien Montagne
Also added access to extension property in texture wrapper.
2018-10-13node_shader_utils: several fixes, improvements and cleanups.Bastien Montagne
Fix broken behavior in case of texcoords mapping (we do need texcoords node in all cases, then, even for UV coords...). Use nodes by default when generating new write-allowed wrapper around a material. Do not try to find nodes in existing tree all the time, do it only once, even for lazy-initialized nodes (through accessors). Fix ugly spacing in property accessors (since it looks like some people do not like a single 'block' with both getters, setters and prop definition, at least use one sep line everywhere (and two sep lines to separate properties)...
2018-10-12Python: change node_shader_utils diffuse RGBA to base_color RGB.Brecht Van Lommel
Best to give its actual name so it's clear that the Principled BSDF does not have a diffuse color exactly, and does not have an alpha component. Also image textures use UVs by default, so avoid creating a texture coordinate node for that.
2018-10-01Cleanup: use tuple unpackingCampbell Barton
2018-10-01Cleanup: pep8, unused importCampbell Barton
2018-09-28Python IO: Initial nodal shader support for import AND export.Bastien Montagne
That new bpy_extras' node_shader_utils module is remotely based on existing addons' cycles_shader_compat module. It has some key differences though: - It is based on Principled shader, instead of the noodle combination of half a dozen simpler shaders. - It does not do any value conversion (like e.g. clamping, which was only suited for FBX). Any conversion/adaptation is to be done by each IO add-on. - It extensively uses accessors to offer: - Easy read/write of values, hiding all the hairy noodly nodes (principled shader helps a lot here). - lazy creation of most nodes on accessing (when generating a material), which avoids getting unused nodes in final shader. - We only use Principled BSDF so far though, which means some features supported by previous system are not yet implemented in new one. Note that, even though we support 'exporting' side of things, this will only work for a very specific (and basic) kind of shader. This will have to be clearly explained in end-user documentation. Also, that code has had some basic testing, but most certainly needs a lot more refinement. As proof-of-concept, OBJ IO script will be updated to use that new system after that commit.