-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
153 changed files
with
2,032 additions
and
2,980 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Antimony 0.7.6 | ||
-------------- | ||
|
||
This is a major release in terms of architecture: | ||
All nodes are now defined as scripts, and scripts now have the power to | ||
define UI primitives (points and wireframes) that show up in 3D views. | ||
|
||
Files saved with `0.7.5` and earlier will be automatically upgraded to | ||
using script nodes (instead of hard-coded nodes). This backwards | ||
compatibility will be removed in later releases. | ||
|
||
If you have a file for which automatic upgrading fails, send it in as | ||
a bug report for further investigation. | ||
|
||
**Features:** | ||
- Added `fab.ui` namespace, with hooks to create 3D view objects from scripts. | ||
- `fab.ui.point` allows points with user-defined drag functions | ||
- `fab.ui.wireframe` creates user-defined wireframes | ||
- Added `fab.color` namespace with a set of standard colors. | ||
- Ported all hard-coded nodes into scripts. | ||
- Skip early render stages if they are sufficiently fast. | ||
- Show error message if Save As or Export target file isn't writable. | ||
- New inspectors are placed in the center of a canvas if possible. | ||
- Automatically upgrade hard-coded nodes in older files to scripts. | ||
|
||
**Bugfixes:** | ||
- Build issue: `sb` directory is now created before subfolders are copied. | ||
- Off-by-one line highlighting error in script panes. | ||
- Weird namespace issue in scripts. | ||
- Remove white border in script UI (Linux). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from _hooks.ui import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import fab | ||
|
||
title('Circle') | ||
|
||
input('x', float) | ||
input('y', float) | ||
input('r', float, 1) | ||
|
||
output('shape', fab.shapes.circle(x, y, r)) | ||
|
||
# UI | ||
fab.ui.wireframe([ | ||
(math.cos(i/36. * 2*math.pi) * r + x, | ||
math.sin(i/36. * 2*math.pi) * r + y, 0) | ||
for i in range(36)], close=True) | ||
fab.ui.point(x, y, 0) | ||
fab.ui.point(x + r, y, 0, drag=(r, None, None)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import fab | ||
|
||
title('Point (2D)') | ||
|
||
input('x', float) | ||
input('y', float) | ||
|
||
fab.ui.point(x, y, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import fab | ||
|
||
title('Rectangle') | ||
|
||
input('xmin', float) | ||
input('ymin', float) | ||
input('xmax', float, 1) | ||
input('ymax', float, 1) | ||
|
||
output('shape', fab.shapes.rectangle(xmin, xmax, ymin, ymax)) | ||
|
||
# UI | ||
fab.ui.wireframe([(xmin, ymin, 0), (xmax, ymin, 0), | ||
(xmax, ymax, 0), (xmin, ymax, 0)], close=True) | ||
fab.ui.point(xmin, ymin, 0) | ||
fab.ui.point(xmax, ymax, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import fab | ||
|
||
title('Text') | ||
|
||
input('x', float) | ||
input('y', float) | ||
input('text', str) | ||
input('scale', float, 1) | ||
|
||
output('shape', fab.shapes.text(text, x, y, scale)) | ||
|
||
# UI | ||
fab.ui.wireframe([(x, y, 0), (x, y+scale, 0)]) | ||
fab.ui.point(x, y, 0) | ||
fab.ui.point(x, y + scale, 0, drag=(None, scale, None)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import fab | ||
|
||
title('Triangle') | ||
|
||
input('x0', float) | ||
input('y0', float) | ||
input('x1', float, 1) | ||
input('y1', float, 0) | ||
input('x2', float, 0) | ||
input('y2', float, 1) | ||
|
||
output('shape', fab.shapes.triangle(x0, y0, x1, y1, x2, y2)) | ||
|
||
# UI | ||
fab.ui.wireframe([(x0, y0, 0), (x1, y1, 0), (x2, y2, 0)], close=True) | ||
fab.ui.point(x0, y0, 0) | ||
fab.ui.point(x1, y1, 0) | ||
fab.ui.point(x2, y2, 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import fab | ||
|
||
title('Cone') | ||
|
||
input('x', float) | ||
input('y', float) | ||
input('z0', float) | ||
input('z1', float, 1) | ||
input('r', float, 1) | ||
|
||
output('shape', fab.shapes.cone(x, y, z0, z1, r)) | ||
|
||
# UI | ||
fab.ui.wireframe([ | ||
(math.cos(i/36. * 2*math.pi) * r + x, | ||
math.sin(i/36. * 2*math.pi) * r + y, z0) | ||
for i in range(36)], close=True) | ||
fab.ui.wireframe([(x,y,z0), (x+r,y,z0)]) | ||
fab.ui.wireframe([(x,y,z0), (x,y,z1)]) | ||
|
||
fab.ui.point(x, y, z0) | ||
fab.ui.point(x, y, z1) | ||
fab.ui.point(x + r, y, z0, drag=(r, None, None)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import fab | ||
|
||
title('Cube') | ||
|
||
input('xmin', float) | ||
input('ymin', float) | ||
input('zmin', float) | ||
input('xmax', float, 1) | ||
input('ymax', float, 1) | ||
input('zmax', float, 1) | ||
|
||
output('shape', fab.shapes.cube(xmin, xmax, ymin, ymax, zmin, zmax)) | ||
|
||
# UI | ||
fab.ui.wireframe([(xmin, ymin, zmin), (xmax, ymin, zmin), | ||
(xmax, ymax, zmin), (xmin, ymax, zmin)], close=True) | ||
fab.ui.wireframe([(xmin, ymin, zmax), (xmax, ymin, zmax), | ||
(xmax, ymax, zmax), (xmin, ymax, zmax)], close=True) | ||
fab.ui.wireframe([(xmin, ymin, zmin), (xmin, ymax, zmin), | ||
(xmin, ymax, zmax), (xmin, ymin, zmax)], close=True) | ||
fab.ui.wireframe([(xmax, ymin, zmin), (xmax, ymax, zmin), | ||
(xmax, ymax, zmax), (xmax, ymin, zmax)], close=True) | ||
fab.ui.point(xmin, ymin, zmin) | ||
fab.ui.point(xmax, ymax, zmax) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import fab | ||
|
||
title('Cylinder') | ||
|
||
input('x', float) | ||
input('y', float) | ||
input('z0', float) | ||
input('z1', float, 1) | ||
input('r', float, 1) | ||
|
||
output('shape', fab.shapes.cylinder(x, y, z0, z1, r)) | ||
|
||
# UI | ||
fab.ui.wireframe([(x, y, z0), (x, y, z1)]) | ||
fab.ui.wireframe([(x, y, z0), (x+r, y, z0)]) | ||
|
||
fab.ui.wireframe([ | ||
(math.cos(i/36. * 2*math.pi) * r + x, | ||
math.sin(i/36. * 2*math.pi) * r + y, z0) | ||
for i in range(36)], close=True) | ||
|
||
fab.ui.wireframe([ | ||
(math.cos(i/36. * 2*math.pi) * r + x, | ||
math.sin(i/36. * 2*math.pi) * r + y, z1) | ||
for i in range(36)], close=True) | ||
|
||
fab.ui.point(x, y, z0) | ||
fab.ui.point(x, y, z1) | ||
fab.ui.point(x + r, y, z0, drag=(r, None, None)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import fab | ||
|
||
title('Extrude') | ||
|
||
input('_x', float) | ||
input('_y', float) | ||
input('z0', float) | ||
input('z1', float, 1) | ||
|
||
input('input', fab.types.Shape) | ||
output('shape', fab.shapes.extrude_z(input, z0, z1)) | ||
|
||
# UI | ||
fab.ui.wireframe([(_x, _y, z0), (_x, _y, z1)], color=fab.color.green) | ||
fab.ui.point(_x, _y, z0, color=fab.color.green) | ||
fab.ui.point(_x, _y, z1, color=fab.color.green) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import fab | ||
|
||
title('Point (3D)') | ||
|
||
input('x', float) | ||
input('y', float) | ||
input('z', float) | ||
|
||
# UI | ||
fab.ui.point(x, y, z) | ||
|
Oops, something went wrong.