[fusion-commits] Cube reflection and cylinder effect plugin: Changes to 'master' (5e859c4a993586a7462388df4feb8b8a6931404b)
onestone at server.opencompositing.org
onestone at server.opencompositing.org
Wed May 14 17:50:39 CEST 2008
New commits:
commit 5e859c4a993586a7462388df4feb8b8a6931404b
Author: Dennis Kasprzyk <onestone at opencompositing.org>
Date: Wed May 14 17:50:38 2008 +0200
Added option to control unfold cube deformation.
cubeaddon.c | 12 +++++++-----
cubeaddon.xml.in | 5 +++++
2 files changed, 12 insertions(+), 5 deletions(-)
Modified: fusion/plugins/cubeaddon/cubeaddon.c
===================================================================
--- fusion/plugins/cubeaddon/cubeaddon.c
+++ fusion/plugins/cubeaddon/cubeaddon.c
@@ -525,7 +525,7 @@ cubeaddonShouldPaintViewport (CompScreen *s,
outputPtr, order);
WRAP (cas, cs, shouldPaintViewport, cubeaddonShouldPaintViewport);
- if (rv)
+ if (rv || cs->unfolded)
return rv;
if (cas->deform > 0.0 && cubeaddonGetDeformation (s) == DeformationCylinder)
@@ -866,7 +866,7 @@ cubeaddonAddWindowGeometry (CompWindow *w,
float a1, a2, ang;
- if (cubeaddonGetDeformation (s) == DeformationCylinder)
+ if (cubeaddonGetDeformation (s) == DeformationCylinder || cs->unfolded)
{
yi = region->extents.y2 - region->extents.y1;
radSquare = (cs->distance * cs->distance) + 0.25;
@@ -1007,7 +1007,7 @@ cubeaddonAddWindowGeometry (CompWindow *w,
}
}
- if (cubeaddonGetDeformation (s) == DeformationCylinder)
+ if (cubeaddonGetDeformation (s) == DeformationCylinder || cs->unfolded)
{
lastX = -1000000000.0;
@@ -1268,14 +1268,16 @@ cubeaddonPaintTransformedOutput (CompScreen *s,
&& s->hsize * cs->nOutput > 2 && s->desktopWindowCount &&
(cs->rotationState == RotationManual ||
(cs->rotationState == RotationChange &&
- !cubeaddonGetCylinderManualOnly (s)) || cas->wasDeformed))
+ !cubeaddonGetCylinderManualOnly (s)) || cas->wasDeformed) &&
+ (!cs->unfolded || cubeaddonGetUnfoldDeformation (s)))
{
float x, progress;
(*cs->getRotation) (s, &x, &x, &progress);
cas->deform = progress;
- if (cubeaddonGetSphereAspect (s) > 0.0 && cs->invert == 1)
+ if (cubeaddonGetSphereAspect (s) > 0.0 && cs->invert == 1 &&
+ cubeaddonGetDeformation (s) == DeformationSphere)
{
float scale, val = cubeaddonGetSphereAspect (s) * cas->deform;
Modified: fusion/plugins/cubeaddon/cubeaddon.xml.in
===================================================================
--- fusion/plugins/cubeaddon/cubeaddon.xml.in
+++ fusion/plugins/cubeaddon/cubeaddon.xml.in
@@ -166,6 +166,11 @@
<_name>Sphere</_name>
</desc>
</option>
+ <option name="unfold_deformation" type="bool">
+ <_short>Unfold cube deformation</_short>
+ <_long>Deformation in unfold cube mode.</_long>
+ <default>true</default>
+ </option>
<option name="cylinder_manual_only" type="bool">
<_short>Deform only on mouse rotate</_short>
<_long>Initiates cube cylinder deformation only if rotation is mouse driven.</_long>
More information about the commits
mailing list