Add post effects [SOLVED]
On 07/03/2017 at 01:08, xxxxxxxx wrote:
I am new (so please don't kill me if I overlooked something in the forum search ;-)
We are producers of 180° fulldome content for a planetarium. I used to develop with python, so I started building tools to make our artists' work as easy as possible. We are using 2 camera post effects - WideField Cam 4D and CV-VR. I figured out the IDs, and I've been able to switch them on and off once they are in the effects list, but I'd like to make some improvements, so I need a little help:
- How can I add a post effect if it is not in the list?
- How can I get a list of the effect's parameters and change them? Guess it has something to do with a container instance?
Thank you very much!
ScienceDome, experimenta Heilbronn
This is the way I change the camera effect:
CV_VR = 1036331
WFCAM = 1019517
CAMERA_POST_EFFECTS = (CV_VR, WFCAM)
def SetActiveCamera(self, post_id) :
post = renderdata.GetFirstVideoPost()
if post.GetType() in CAMERA_POST_EFFECTS and not post.GetType() == post_id:
if post.GetType() == post_id:
post = post.GetNext()
On 07/03/2017 at 01:32, xxxxxxxx wrote:
Hello and welcome,
to add a post effect you need to know the ID of that post effect. With that ID you can create the post effect using the BaseList2D constructor. You can then add the created post effect to the render data with InsertVideoPost() or InsertVideoPostLast().
To get a list of all parameter IDs of a given object you can simply look into the header file that defines these parameter IDs. For example the IDs for the "Color Correction" post effect are defined in the frameworks\cinema.framework\source\description\pvfilter.h header file in your Cinema 4D installation.
Alternatively you can just drag&drop a parameter into the text-field of the console window. Then the parameter ID will appear there.
To change a parameter you can simple call SetParameter() on the post effect object.
On 08/03/2017 at 00:35, xxxxxxxx wrote:
Perfect - this is exactly what I needed to know.
Thanks Sebastian, you really helped me out!