Age | Commit message (Collapse) | Author |
|
The camera was not checked before doing the export.
|
|
This fix is ported from official NanoSVG git
|
|
|
|
Read and write generated coordinates (also known as "original
coordinates", "reference coordinates", or "orcos") from and to Alembic.
A custom geometry property named "Pref" is used for (hopefully)
interoperability with Maya and Houdini. For now it's only guaranteed for
Blender-to-Blender.
Export: writing generated coordinates is optional (on by default).
Import: generated coordinates are always read whenever the reading of
vertex data is enabled.
Manifest Task: T88081
|
|
Treat a missing <diffuse> the same as a black diffuse color.
The easiest way to see this bug is with a Collada shader like
```
<constant>
<emission>
<color sid="emission">1 0 0 1</color>
</emission>
</constant>
```
The Collada spec says this should be just
```
color = <emission>
```
ie. red everywhere. The importer slots the red into the Principled Emission socket, but since it leaves the Base Color as the default off-white, this is added to red, and the material looks white-pink in the light and red only in the shadows.
Putting black in the Base Color makes it look red everywhere.
D10939 will also eliminate the much-less-noticeable specular term for this case.
Reviewed By: gaiaclary
Differential Revision: https://developer.blender.org/D10941
|
|
|
|
- rename boolean is_zero by more descriptive has_specularity
- add some clarifying comments (and TODO)
|
|
Collada shaders with black <specular> should import with Specular=0.
(A missing <specular> is the same as black.)
The general specular conversion is hard, but this case is common and easy.
Fixes the specular for all <constant>/<lambert> shaders, and <blinn>/<phong>
shaders with black/omitted <specular>. Before this they all looked too "shiny".
Reviewed By: gaiaclary
Differential Revision: https://developer.blender.org/D10939
|
|
As in the old Blender Internal baking code, this still relies on there being a
good mapping to the original vertices.
|
|
|
|
Before, the camera parameters were calculated only for first frame.
If the camera is animated, these values need to be recalculated in order to get the new camera view position and export the strokes as expected.
Also fixed the export of PDF when the view is not in camera view. PDF export, needs to be done in camera view.
|
|
Now the operators work like other areas of Blender using the list of selected objects.
Also, the name has been changed to:
```Layers:
- Copy Layer to Selected
- Copy All Layers to Selected
Materials:
- Copy Material to Selected
- Copy All Materials to Selected```
Reviewed By: mendio, pablovazquez, pepeland
Differential Revision: https://developer.blender.org/D11216
|
|
|
|
An emission texture is currently connected to the Base Color socket. It should connect to the Emission socket, like a constant does.
Reviewed By: gaiaclary
Differential Revision: https://developer.blender.org/D10990
|
|
|
|
|
|
Export UV maps to Alembic on every frame. This makes the export of UV
maps consistent with mesh normals. In the case of static UV maps it may
cause a slight slowdown (since they're exported on every frame now), but
due to the deduplication performed by the Alembic library, the resulting
files will be the same size anyway.
Thanks to @CodyWinch for providing the solution to the problem, and
writing the original patch D8397.
Differential Revision: https://developer.blender.org/D8397
|
|
|
|
While rB6b18678e34bf did the correct updates, it did it a bit early (not
covering all possible node tree changes).
Now do the ntreeUpdateTree() at the very end of the material import
instead.
Thx @scurest investigating.
Maniphest Tasks: T86314
Differential Revision: https://developer.blender.org/D11159
|
|
Fix for the Arc commands (A/a) to successfully parse the 4th and 5th arguments.
Fix for floats without a specified integer part, like `.123`
File for testing:
{F10042021}
Reviewed By: filedescriptor
Differential Revision: https://developer.blender.org/D11099
|
|
There were still some invisible strokes.
|
|
|
|
The exporting was creating a pdf state for each stroke, but this was necessary only for strokes with opacity.
Now, the state is only created when needed and remove the state variable from class.
Also, avoid exporting invisible strokes.
|
|
When trying to export a GPencil object to SVG from outside the camera
view, the expoted file would contain invalid data. This was because the
calculation of the bounding box did not have any objects to
iterate over.
The fix makes sure we create the object list before trying to calculate
the bounding box.
Reviewed By: antoniov
Maniphest Tasks: T87479
Differential Revision: https://developer.blender.org/D10975
|
|
|
|
This was missing from rB19dfb6ea1f6745c0dbc2ce21839c30184b553878.
|
|
This was missing from rB19dfb6ea1f6745c0dbc2ce21839c30184b553878.
|
|
This removes a lot of unnecessary code that is generated by
the compiler automatically.
In very few cases, a defaulted destructor in a .cc file is
still necessary, because of forward declarations in the header.
I removed some defaulted virtual destructors, because they are not
necessary, when the parent class has a virtual destructor already.
Defaulted constructors are only necessary when there is another
constructor, but the class should still be default constructible.
Differential Revision: https://developer.blender.org/D10911
|
|
The importer was not checking if both were enabled. Now a new material is created if it's needed.
|
|
The attribute was missing.
|
|
|
|
Follow documented convention for file naming.
|
|
The calculation of the 2D point was wrong when using orthographic mode.
Also small cleanup in float3 variable.
Differential Revision: https://developer.blender.org/D10828
|
|
|
|
|
|
|
|
rBa8a92cd15a52 was adding external libraries includes to `INC`, which is
reserved to internal project includes.
`INC` does not allow duplicates, and when using system libs both PugiXML
and Haru headers are under the same path.
|
|
|
|
This patch adds support to export and import grease pencil in several formats.
Inlude:
* Export SVG
* Export PDF (always from camera view)
* Import SVG
The import and export only support solid colors and not gradients or textures.
Requires libharu and pugixml.
For importing SVG, the NanoSVG lib is used, but this does not require installation (just a .h file embedded in the project folder)
Example of PDF export: https://youtu.be/BMm0KeMJsI4
Reviewed By: #grease_pencil, HooglyBoogly
Maniphest Tasks: T83190, T79875, T83191, T83192
Differential Revision: https://developer.blender.org/D10482
|
|
Make sure we have valid links and link pointers using
'ntreeUpdateTree()'.
Maniphest Tasks: T86314
Differential Revision: https://developer.blender.org/D10793
|
|
This reverts a part of rBd3960164163c910d5031a8f076c41b39e0a5503d.
It is not a `std::shared_ptr` but a `boost::shared_ptr`.
This could probably be fixed differently, but `NOLINT` is fine now.
|
|
|
|
|
|
|
|
* USD and OpenVDB headers use deprecated TBB headers, suppress all deprecation
warnings there since we have no control over them.
* For our own TBB includes, use the individual headers rather than the tbb.h that
includes everything to avoid warnings, rather than suppressing all.
This is in anticipation of the TBB 2020 upgrade in D10359. Ref D10361.
|
|
Use newer `using` semantic for type definition.
Solves modernize-use-using Clang-Tidy warning.
|
|
|
|
|
|
|
|
Comment blocks not conforming to convention.
|