Skip to content

Commit

Permalink
Merge branch 'release/0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Jan 4, 2015
2 parents c6f6a08 + 76f9e45 commit da1d1e3
Show file tree
Hide file tree
Showing 31 changed files with 582 additions and 87 deletions.
6 changes: 3 additions & 3 deletions app/deploy_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ make clean
make qmake
rm -rf antimony.app

make
make -j8
macdeployqt antimony.app

cd antimony.app/Contents/PlugIns
Expand All @@ -35,8 +35,8 @@ install_name_tool -change /usr/local/Frameworks/Python.framework/Versions/3.4/Py
cd ../../..
cp -r fab antimony.app/Contents/Frameworks/Python.framework/Versions/3.4/lib/python3.4/fab

cp ../README.md .
tar -cvzf antimony.tar.gz antimony.app README.md
cp ../README.md ../doc/USAGE.md .
tar -cvzf antimony.tar.gz antimony.app README.md USAGE.md
rm README.md

if [ `whoami` = "mkeeter" ]; then
Expand Down
70 changes: 45 additions & 25 deletions app/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 27 additions & 9 deletions app/make_icon.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
#!/bin/bash
set -e

INK=/Applications/Inkscape.app/Contents/Resources/bin/inkscape
INKPATH=(
/Applications/Inkscape.app
/opt/homebrew-cask/Caskroom/inkscape/0.48.5-2/Inkscape.app
)

if [[ -z "$1" ]]
for i in "${INKPATH[@]}"
do
bin=$i/Contents/Resources/bin/inkscape
if [ -e $bin ]; then
INK=$bin
break
fi
done

if [ -z "$INK" ]; then
echo "Could not find Inkscape executable."
exit
fi

if [[ -z "$1" ]]
then
echo "SVG file needed."
exit;
echo "SVG file needed."
exit
fi

BASE=`basename "$1" .svg`
SVG="$1"

$INK -z -D -e "$BASE-16x.png" -f $SVG -w 16 -h 16
$INK -z -D -e "$BASE-32x.png" -f $SVG -w 32 -h 32
$INK -z -D -e "$BASE-128.png" -f $SVG -w 128 -h 128
$INK -z -D -e "$BASE-256.png" -f $SVG -w 256 -h 256
$INK -z -D -e "$BASE-512.png" -f $SVG -w 512 -h 512
$INK -z -D -e "$BASE-16x.png" -f $SVG -w 16 -h 16
$INK -z -D -e "$BASE-32x.png" -f $SVG -w 32 -h 32
$INK -z -D -e "$BASE-128.png" -f $SVG -w 128 -h 128
$INK -z -D -e "$BASE-256.png" -f $SVG -w 256 -h 256
$INK -z -D -e "$BASE-512.png" -f $SVG -w 512 -h 512

png2icns sb.icns $BASE-*.png
Binary file modified app/sb.icns
Binary file not shown.
92 changes: 92 additions & 0 deletions doc/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
User's Guide to Antimony
========================

Antimony is a tool for computer-aided design (CAD).

There are three window types, each of which gives a different perspective on the scene.

Graph window
------------
The graph window shows a graph representation of the current model.

Pan with the left mouse button;
zoom with the mouse wheel.

When you first start designing, the window should be empty.
Add new nodes either with the *Add* menu or by pressing Shift+A.

Each node has a name and one or more data values.
The name is in the upper left corner and can be edited;
data values are inside of the box.

Each datum's text field is evaluated as a chunk of Python code.
These code snippets are executed in a global namespace that includes nodes by name.
For example, given a Point node named `p0`,
here are valid values for its `y` datum:
- `1`
- `2 + 3`
- `p0.x * 2`

If a code snippet is invalid, the text field's border will turn red.
Hover over it with the mouse to see the Python traceback.

Shift + left-click on a datum's text field and drag right or left to slide values up and down.

Datums can be connected using the I/O ports on the right and left.
Click and drag on the right-hand port to start a connection;
release the mouse button on a left-hand port to finish it.
While dragging, pressing Shift will snap the connection to the nearest valid port.

Any shape datum with an unconnected output port will be rendered.

3D viewport
-----------
The 3D viewport shows a 2D or 3D view of the current model.
It is rendered and refined in real time.

Pan with the left mouse button;
rotate with the right;
zoom with the mouse wheel.
The axis selector in the top right snaps the view to a particular axis.
When looking along a main axis,
the mouse pointer's coordinates are shown in the botton left.

As in the graph window,
nodes can be added from the *Add* menu or with Shift+A.

Certain types of nodes put controls into this viewport.
For example, the default Circle node places a center-point and radius in the viewport.
These controls can be dragged with the left mouse button.
If multiple controls are overlapping,
right-clicking will open up a list and one can be chosen to raise above the others.

Script editor
-------------
A script editor is used to edit the Python code of a Script node.
To open the script editor,
add a Script node in the graph view
then choose "Edit Script" from the menu icon in the top right of the node.

There are three panes in the editor window:
- The top pane is the script
- The middle pane is any output sent to `stdout` (e.g. with `print`)
- The botton pane is any Python error that occured during execution

The lower two panes only appear when needed
(i.e. when something was sent to `stdout`
or an error occurred respectively).

When an error occurs, the relevant line will be highlighted in red.

Scripting is standard Python 3.x with a few extra functions:
- `input(name, type)` creates an input datum of the given type
and injects it into the namespace. `name` must be a string
and `type` must be either `float`, `int`, or `fab.types.Shape`
(or simply `Shape` depending on how it was imported).
- `output(name, value)` creates an output datum with the given name and value
(the type is automatically determined and must be either `float` or `Shape`)
- `title(value)` sets the title of the node,
which is shown in a graph window in the upper-right corner of the node.

Note that `input` and `output` will create new rows in the graph view
for the datums that they add to the node.
12 changes: 12 additions & 0 deletions doc/release-notes/0.7.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Antimony 0.7.1
--------------

Features:
- Added `title` property (that can be set by Script node).
- Display `stdout`, errors in separate panes when editing script.
- Improved icon.
- Added polar iteration node, which rotates input about a point multiple times.
- Wrote basic usage guide

Bug fixes:
- When a node is deleted from a 3D view, undo/redo now re-creates connections
Loading

0 comments on commit da1d1e3

Please sign in to comment.