mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
This enables support for storing bundles in geometries by default. This provides the ability to store arbitrary data on a geometry set, allowing it to be passed whereever the geometry is passed, including across object boundaries. This opens up significant new opportunities for building declarative systems where the overall behavior is controlled by multiple objects. For example, it allows creating force field objects which can be fed into simulation systems. The geometry bundles can generally store all kinds of data that is supported by geometry nodes, including fields, closures, other bundles and other geometry. One notable exception is that anonymous attributes are removed as geometry leaves geometry nodes, aka at the end of the evaluation of each modifier. This constraint is necessary currently, because the lifetimes of these attributes can't be tracked reliably outside of Geometry Nodes. This adds two new nodes: * Set Geometry Bundle: Updates the bundle stored in the geometry. If there was a bundle already, the old one is discarded. * Get Geometry Bundle: Retrieve the bundle in a geometry, optionally removing it from the geometry. Pull Request: https://projects.blender.org/blender/blender/pulls/159175
18 lines
496 B
Python
18 lines
496 B
Python
# SPDX-FileCopyrightText: 2009-2022 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
import os
|
|
import sys
|
|
import bpy
|
|
|
|
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
|
|
from modules.mesh_test import BlendFileTest
|
|
|
|
geo_node_test = BlendFileTest("test_object", "expected_object", threshold=1e-4)
|
|
result = geo_node_test.run_test()
|
|
|
|
# Telling `ctest` about the failed test by raising Exception.
|
|
if not result:
|
|
raise Exception("Failed {}".format(geo_node_test.test_name))
|