projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use <= when comparing distances to give priority to the uppermost duck in the event...
[synfig.git]
/
synfig-core
/
trunk
/
src
/
modules
/
mod_particle
/
plant.cpp
diff --git
a/synfig-core/trunk/src/modules/mod_particle/plant.cpp
b/synfig-core/trunk/src/modules/mod_particle/plant.cpp
index
60652a4
..
47b13a3
100644
(file)
--- a/
synfig-core/trunk/src/modules/mod_particle/plant.cpp
+++ b/
synfig-core/trunk/src/modules/mod_particle/plant.cpp
@@
-76,7
+76,7
@@
SYNFIG_LAYER_SET_CVS_ID(Plant,"$Id$");
Plant::Plant():
Plant::Plant():
- o
ffset
(0,0),
+ o
rigin
(0,0),
split_angle(Angle::deg(10)),
gravity(0,-0.1),
velocity(0.3),
split_angle(Angle::deg(10)),
gravity(0,-0.1),
velocity(0.3),
@@
-287,7
+287,7
@@
Plant::set_param(const String & param, const ValueBase &value)
needs_sync_=true;
return true;
}
needs_sync_=true;
return true;
}
- IMPORT(o
ffset
);
+ IMPORT(o
rigin
);
IMPORT_PLUS(split_angle,needs_sync_=true);
IMPORT_PLUS(gravity,needs_sync_=true);
IMPORT_PLUS(gradient,needs_sync_=true);
IMPORT_PLUS(split_angle,needs_sync_=true);
IMPORT_PLUS(gravity,needs_sync_=true);
IMPORT_PLUS(gradient,needs_sync_=true);
@@
-313,6
+313,9
@@
Plant::set_param(const String & param, const ValueBase &value)
IMPORT(size);
IMPORT(size_as_alpha);
IMPORT(reverse);
IMPORT(size);
IMPORT(size_as_alpha);
IMPORT(reverse);
+ IMPORT(use_width);
+
+ IMPORT_AS(origin,"offset");
return Layer_Composite::set_param(param,value);
}
return Layer_Composite::set_param(param,value);
}
@@
-347,7
+350,7
@@
Plant::get_param(const String& param)const
if(param=="seed")
return random.get_seed();
EXPORT(bline);
if(param=="seed")
return random.get_seed();
EXPORT(bline);
- EXPORT(o
ffset
);
+ EXPORT(o
rigin
);
EXPORT(split_angle);
EXPORT(gravity);
EXPORT(velocity);
EXPORT(split_angle);
EXPORT(gravity);
EXPORT(velocity);
@@
-359,9
+362,9
@@
Plant::get_param(const String& param)const
EXPORT(random_factor);
EXPORT(drag);
EXPORT(size);
EXPORT(random_factor);
EXPORT(drag);
EXPORT(size);
-
EXPORT(size_as_alpha);
EXPORT(reverse);
EXPORT(size_as_alpha);
EXPORT(reverse);
+ EXPORT(use_width);
EXPORT_NAME();
EXPORT_NAME();
@@
-379,12
+382,12
@@
Plant::get_param_vocab()const
ret.push_back(ParamDesc("bline")
.set_local_name(_("Vertices"))
.set_description(_("A list of BLine Points"))
ret.push_back(ParamDesc("bline")
.set_local_name(_("Vertices"))
.set_description(_("A list of BLine Points"))
- .set_origin("o
ffset
")
+ .set_origin("o
rigin
")
.set_hint("width")
);
.set_hint("width")
);
- ret.push_back(ParamDesc("o
ffset
")
- .set_local_name(_("O
ffset
"))
+ ret.push_back(ParamDesc("o
rigin
")
+ .set_local_name(_("O
rigin
"))
);
ret.push_back(ParamDesc("gradient")
);
ret.push_back(ParamDesc("gradient")
@@
-459,6
+462,11
@@
Plant::get_param_vocab()const
.set_description(_("Drag slows the growth"))
);
.set_description(_("Drag slows the growth"))
);
+ ret.push_back(ParamDesc("use_width")
+ .set_local_name(_("Use Width"))
+ .set_description(_("Scale the velocity by the bline's width"))
+ );
+
return ret;
}
return ret;
}
@@
-484,8
+492,8
@@
Plant::accelerated_render(Context context,Surface *surface,int quality, const Re
dest_surface.set_wh(surface->get_w(),surface->get_h());
dest_surface.clear();
dest_surface.set_wh(surface->get_w(),surface->get_h());
dest_surface.clear();
- const Point tl(renddesc.get_tl()-o
ffset
);
- const Point br(renddesc.get_br()-o
ffset
);
+ const Point tl(renddesc.get_tl()-o
rigin
);
+ const Point br(renddesc.get_br()-o
rigin
);
const int w(renddesc.get_w());
const int h(renddesc.get_h());
const int w(renddesc.get_w());
const int h(renddesc.get_h());