Isotropix Forums

Set camera by find_object()

Discuss about expressions in Clarisse

Set camera by find_object()

Unread postby buzz3d » Wed Jun 12, 2019 3:22 pm

Hi everyone,

I am trying set "Active Camera" and "Renderer" on the layer by expression.

my project and print: https://drive.google.com/drive/folders/ ... sp=sharing

Active Camera : find_object("./scene/abc/*", "perspective")
Renderer: find_object("./setup/render/*", "path_tracer")

Can anybody help me ?

Thanks!
buzz3d
 
Posts: 7
Joined: Wed Jun 12, 2019 2:53 pm

Re: Set camera by find_object()

Unread postby dcourtois » Wed Jun 12, 2019 4:43 pm

Hi,

find_object is not a valid function. We have find_item which I think is what you want to use. You can check the logs in Clarisse to check SeExpr compilation errors. If you try using find_object, the error is "Function find_object has no definition".

You can check our documentation. It lists all the functions available. The one you want (find_item) is documented here: https://clarissewiki.com/4.0/constant-and-functions-referen.html. And in its doc, it's stated that the first parameter follow the rules for Groups, which is also documented here: https://clarissewiki.com/4.0/rule_based_inclusion_exclusion.html and that the second parameter is a class name. And "path_tracer" is not a class name. Class names in Clarisse always use "ThisTypeOfNotation". You want "CameraPerspective" and "RendererRaytracer" (it's in the "Type" column of the Browser view)

Hope this helps.

Regards,
Damien.
User avatar
dcourtois
 
Posts: 72
Joined: Tue Jul 25, 2017 3:15 pm

Re: Set camera by find_object()

Unread postby buzz3d » Wed Jun 12, 2019 6:33 pm

Hi Damien,

Thanks for help. I put "find_item('project://<context>/<context>/*', 'RendererRaytracer')" and it worked.

:D :D :D :D
buzz3d
 
Posts: 7
Joined: Wed Jun 12, 2019 2:53 pm


Return to Expressions