Ralf61 opened this issue on Nov 13, 2004 ยท 6 posts
Ralf61 posted Sat, 13 November 2004 at 8:49 AM
I want to render some comic illustration from python in poser. But how can i antialias them as I would do from menu:
Render/Antialias Document
This is what the code in my program looks at the moment:
poser.Scene().AntialiasNow
poser.Scene().DrawAll()
poser.Scene().SaveImage("tif",name)
I Tried to swap antialais and drawall but nothing helped. The image that is saved is not antialised. Thanks for any help!
ockham posted Sat, 13 November 2004 at 10:45 AM
There's one obvious error: you need the
parentheses on AntialiasNow because it's
a function call.
Also, I don't think you need the DrawAll,
because the AntialiasNow does its own draw.
But even after that, I agree that the
antialiasing action is NOT happening.
Here's how I'd write it:
import poser
scene=poser.Scene()
scene.AntialiasNow()
scene.SaveImage("tif",name)
You may need to do a full render.
Bear in mind that RenderToNewWindow
works in Python, but there's no
way to save the NewWindow as a file.
(This is a really bad problem with
the Poser setup itself.)
You'll have to be sure RenderToNewWindow
is off, then render to the document
window, then save as you have done.
import poser scene=poser.Scene() scene.SetRenderToNewWindow(0) scene.Render() scene.SaveImage("tif",name)
Message edited on: 11/13/2004 10:52
Ralf61 posted Sat, 13 November 2004 at 11:09 AM
Thank you Ockham, but the problem is, I don't want to make a render because I want the look "Cartoon with Outline". And if I render the image, I get a 3D-look. What I need is a function that does exactly the same as the menu function: Render/Antialias Document...
ockham posted Sat, 13 November 2004 at 11:21 AM
As far as I can tell, AntialiasNow simply does nothing. I tried AntialiasNow(1) but that wasn't any better. Maybe someone else has the solution!
Ralf61 posted Sat, 13 November 2004 at 11:40 AM
Thanks four your help so far ockham, if I find a solution, i post it here .... Ralf
duckmango posted Sun, 14 November 2004 at 4:23 PM
This isn't much help, but I thought perhaps the AntialiasNow() function could work with the SetDisplayStyle codes, as in:
scene.SetDisplayStyle(poser.kDisplayCodeSKETCHSHADED)
scene.AntialiasNow()
but no such luck. Like Ockham's already reported, AntialiasNow just doesn't seem to do anything.