We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello all,
i'm trying to set the stroke of an imported obj file i'm importing into the drawing with no success. funnily, the setFill() function works just fine.
at the moment, the setStroke() function has no effect on the drawing.
suggestions?
thanks
PShape p;
void setup() {
size (500, 500, P3D);
p = loadShape("poly.obj");
p.setFill(color(150, 0, 0, 100));
p.setStrokeWeight(10);
p.setStroke(color(0));
}
void draw() {
background(214);
shape(p, 0, 0);
}
Answers
Hi - I've come looking for answers to the same problem. I notice although the auto-complete has setStrokeWeight as an available option, it isn't being highlighted blue by the IDE like setStroke is, which is looking like more like 'feature incomplete' rather than a bug to me, but it'd be nice if it worked :/
Well, I've tried all sorts of .obj files but I can't get any of the setXXX functions to work on them, whether I invoke disableStyle first or not. Weird!
I'm not sure, but possibly related to recent discussion of PShape setVisible --
https://forum.processing.org/two/discussion/comment/79677/#Comment_79677
The link that jeremydouglass provided is probably very important in this context. This seems to be some sort of rather common problem with PShape children that affects not only loaded shapes, but also other ones.