forked from bartvdbraak/blender
Fix a few warnings. One was an actual bug in freestyle where stroke attributes
were not properly interpolated.
This commit is contained in:
parent
afb4b65167
commit
f4fe1b8e77
@ -445,6 +445,8 @@ static int new_node_tree_exec(bContext *C, wmOperator *op)
|
|||||||
}
|
}
|
||||||
else if (snode)
|
else if (snode)
|
||||||
idname = snode->tree_idname;
|
idname = snode->tree_idname;
|
||||||
|
else
|
||||||
|
return OPERATOR_CANCELLED;
|
||||||
|
|
||||||
if (RNA_struct_property_is_set(op->ptr, "name")) {
|
if (RNA_struct_property_is_set(op->ptr, "name")) {
|
||||||
RNA_string_get(op->ptr, "name", treename);
|
RNA_string_get(op->ptr, "name", treename);
|
||||||
|
@ -338,8 +338,8 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
|
|||||||
/* if group output is not externally linked,
|
/* if group output is not externally linked,
|
||||||
* convert the constant input value to ensure somewhat consistent behavior */
|
* convert the constant input value to ensure somewhat consistent behavior */
|
||||||
if (num_external_links == 0) {
|
if (num_external_links == 0) {
|
||||||
bNodeSocket *sock = node_group_find_input_socket(gnode, identifier);
|
/* XXX TODO bNodeSocket *sock = node_group_find_input_socket(gnode, identifier);
|
||||||
BLI_assert(sock);
|
BLI_assert(sock);*/
|
||||||
|
|
||||||
/* XXX TODO nodeSocketCopy(ntree, link->tosock->new_sock, link->tonode->new_node, ntree, sock, gnode);*/
|
/* XXX TODO nodeSocketCopy(ntree, link->tosock->new_sock, link->tonode->new_node, ntree, sock, gnode);*/
|
||||||
}
|
}
|
||||||
@ -366,8 +366,8 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
|
|||||||
/* if group output is not internally linked,
|
/* if group output is not internally linked,
|
||||||
* convert the constant output value to ensure somewhat consistent behavior */
|
* convert the constant output value to ensure somewhat consistent behavior */
|
||||||
if (num_internal_links == 0) {
|
if (num_internal_links == 0) {
|
||||||
bNodeSocket *sock = node_group_find_output_socket(gnode, identifier);
|
/* XXX TODO bNodeSocket *sock = node_group_find_output_socket(gnode, identifier);
|
||||||
BLI_assert(sock);
|
BLI_assert(sock);*/
|
||||||
|
|
||||||
/* XXX TODO nodeSocketCopy(ntree, link->tosock, link->tonode, ntree, sock, gnode); */
|
/* XXX TODO nodeSocketCopy(ntree, link->tosock, link->tonode, ntree, sock, gnode); */
|
||||||
}
|
}
|
||||||
|
@ -125,10 +125,6 @@ protected:
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __MACH__
|
|
||||||
# define sqrtf(x) (sqrt(x))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<class Map>
|
template<class Map>
|
||||||
float GaussianFilter::getSmoothedPixel(Map *map, int x, int y)
|
float GaussianFilter::getSmoothedPixel(Map *map, int x, int y)
|
||||||
{
|
{
|
||||||
|
@ -113,8 +113,8 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute& a1, const StrokeAttribut
|
|||||||
if (a1._userAttributesReal->size() == a2._userAttributesReal->size()) {
|
if (a1._userAttributesReal->size() == a2._userAttributesReal->size()) {
|
||||||
_userAttributesReal = new realMap;
|
_userAttributesReal = new realMap;
|
||||||
realMap::iterator it1 = a1._userAttributesReal->begin(), it1end = a1._userAttributesReal->end();
|
realMap::iterator it1 = a1._userAttributesReal->begin(), it1end = a1._userAttributesReal->end();
|
||||||
realMap::iterator it2 = a2._userAttributesReal->begin(), it2end = a2._userAttributesReal->end();
|
realMap::iterator it2 = a2._userAttributesReal->begin();
|
||||||
for (; it1 != it1end; ++it1) {
|
for (; it1 != it1end; ++it1, ++it2) {
|
||||||
(*_userAttributesReal)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
|
(*_userAttributesReal)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,8 +126,8 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute& a1, const StrokeAttribut
|
|||||||
if (a1._userAttributesVec2f->size() == a2._userAttributesVec2f->size()) {
|
if (a1._userAttributesVec2f->size() == a2._userAttributesVec2f->size()) {
|
||||||
_userAttributesVec2f = new Vec2fMap;
|
_userAttributesVec2f = new Vec2fMap;
|
||||||
Vec2fMap::iterator it1 = a1._userAttributesVec2f->begin(), it1end = a1._userAttributesVec2f->end();
|
Vec2fMap::iterator it1 = a1._userAttributesVec2f->begin(), it1end = a1._userAttributesVec2f->end();
|
||||||
Vec2fMap::iterator it2 = a2._userAttributesVec2f->begin(), it2end = a2._userAttributesVec2f->end();
|
Vec2fMap::iterator it2 = a2._userAttributesVec2f->begin();
|
||||||
for (; it1 != it1end; ++it1) {
|
for (; it1 != it1end; ++it1, ++it2) {
|
||||||
(*_userAttributesVec2f)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
|
(*_userAttributesVec2f)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,8 +139,8 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute& a1, const StrokeAttribut
|
|||||||
if (a1._userAttributesVec3f->size() == a2._userAttributesVec3f->size()) {
|
if (a1._userAttributesVec3f->size() == a2._userAttributesVec3f->size()) {
|
||||||
_userAttributesVec3f = new Vec3fMap;
|
_userAttributesVec3f = new Vec3fMap;
|
||||||
Vec3fMap::iterator it1 = a1._userAttributesVec3f->begin(), it1end = a1._userAttributesVec3f->end();
|
Vec3fMap::iterator it1 = a1._userAttributesVec3f->begin(), it1end = a1._userAttributesVec3f->end();
|
||||||
Vec3fMap::iterator it2 = a2._userAttributesVec3f->begin(), it2end = a2._userAttributesVec3f->end();
|
Vec3fMap::iterator it2 = a2._userAttributesVec3f->begin();
|
||||||
for (; it1 != it1end; ++it1) {
|
for (; it1 != it1end; ++it1, ++it2) {
|
||||||
(*_userAttributesVec3f)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
|
(*_userAttributesVec3f)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -659,8 +659,6 @@ void Stroke::RemoveVertex(StrokeVertex *iVertex)
|
|||||||
|
|
||||||
void Stroke::InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next)
|
void Stroke::InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next)
|
||||||
{
|
{
|
||||||
vertex_container::iterator it = _Vertices.begin(), itend = _Vertices.end();
|
|
||||||
|
|
||||||
vertex_container::iterator itnext = next.getIt();
|
vertex_container::iterator itnext = next.getIt();
|
||||||
_Vertices.insert(itnext, iVertex);
|
_Vertices.insert(itnext, iVertex);
|
||||||
UpdateLength();
|
UpdateLength();
|
||||||
|
Loading…
Reference in New Issue
Block a user