Files
test/source
Nathan Vegdahl 56d8c11304 Core: Add more variables for path templates
This PR adds several more built-in variables for path templates:

- `scene_name`: name of the current scene.
- `camera_name`: name of the current camera.
- `node_name`: only for paths owned by a node; the name of the node.
- `blend_name_lib`: name of the blend file of the ID the path property
  is on, sans file extension.
- `blend_dir`: path up to (but not including) the currently open blend
  file.
- `blend_dir_lib`: path up to (but not including) the blend file of the
  ID the path property is on.

Additionally, adding support for `node_name` required re-thinking the
"path template type" system a bit:

Previously, the the `PropertyPathTemplateType` of a property completely
dictated what variables were made available to it. However, if we stuck
with that system then we would need to split
`PROP_VARIABLES_RENDER_OUTPUT` into two enum items: one for "normal"
render output paths like the one that lives on the `Scene`, and one for
"node" render output paths like the ones on the File Output node.

Instead of doing that, this PR makes `PropertyPathTemplateType` only
responsible for dictating the "purpose-specific" variables. In this
case, render-specific variables like fps, resolution, etc. Then the
availability of variables like `node_name` are instead based on what
owns the path (a node or not, in this case). There are also general
variables, like `blend_name`, that are now available to all path
templates.

(Part of #133001)

Pull Request: https://projects.blender.org/blender/blender/pulls/139438
2025-06-27 11:07:04 +02:00
..