Age | Commit message (Collapse) | Author |
|
|
|
|
|
When exporting a PDF, the image was displaced towards top right a few pixels.
Also removed is_orthographic variable because is not needed now.
|
|
|
|
|
|
|
|
Note that these changes are limited simple cases as these kinds of
changes could allow for errors when refactoring code when the known
state is not so obvious.
|
|
The camera was not checked before doing the export.
|
|
This fix is ported from official NanoSVG git
|
|
|
|
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
|
|
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
|
|
|
|
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
|