Merge branch 'blender-v3.0-release'
This commit is contained in:
commit
101fa4a425
|
@ -161,6 +161,11 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph,
|
|||
if (is_instance) {
|
||||
persistent_id_array = b_instance.persistent_id();
|
||||
persistent_id = persistent_id_array.data;
|
||||
if (!b_ob_info.is_real_object_data()) {
|
||||
/* Remember which object data the geometry is coming from, so that we can sync it when the
|
||||
* object has changed. */
|
||||
instance_geometries_by_object[b_ob_info.real_object.ptr.data].insert(b_ob_info.object_data);
|
||||
}
|
||||
}
|
||||
|
||||
/* light is handled separately */
|
||||
|
@ -560,6 +565,7 @@ void BlenderSync::sync_objects(BL::Depsgraph &b_depsgraph,
|
|||
else {
|
||||
geometry_motion_synced.clear();
|
||||
}
|
||||
instance_geometries_by_object.clear();
|
||||
|
||||
/* initialize culling */
|
||||
BlenderObjectCulling culling(scene, b_scene);
|
||||
|
|
|
@ -183,6 +183,15 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d
|
|||
(object_subdivision_type(b_ob, preview, experimental) != Mesh::SUBDIVISION_NONE)) {
|
||||
BL::ID key = BKE_object_is_modified(b_ob) ? b_ob : b_ob.data();
|
||||
geometry_map.set_recalc(key);
|
||||
|
||||
/* Sync all contained geometry instances as well when the object changed.. */
|
||||
map<void *, set<BL::ID>>::const_iterator instance_geometries =
|
||||
instance_geometries_by_object.find(b_ob.ptr.data);
|
||||
if (instance_geometries != instance_geometries_by_object.end()) {
|
||||
for (BL::ID geometry : instance_geometries->second) {
|
||||
geometry_map.set_recalc(geometry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (updated_geometry) {
|
||||
|
|
|
@ -225,6 +225,8 @@ class BlenderSync {
|
|||
set<Geometry *> geometry_synced;
|
||||
set<Geometry *> geometry_motion_synced;
|
||||
set<Geometry *> geometry_motion_attribute_synced;
|
||||
/** Remember which geometries come from which objects to be able to sync them after changes. */
|
||||
map<void *, set<BL::ID>> instance_geometries_by_object;
|
||||
set<float> motion_times;
|
||||
void *world_map;
|
||||
bool world_recalc;
|
||||
|
|
|
@ -4591,6 +4591,15 @@ static OutputFieldDependency get_interface_output_field_dependency(const NodeRef
|
|||
return socket_decl.output_field_dependency();
|
||||
}
|
||||
|
||||
static FieldInferencingInterface get_dummy_field_inferencing_interface(const NodeRef &node)
|
||||
{
|
||||
FieldInferencingInterface inferencing_interface;
|
||||
inferencing_interface.inputs.append_n_times(InputSocketFieldType::None, node.inputs().size());
|
||||
inferencing_interface.outputs.append_n_times(OutputFieldDependency::ForDataSource(),
|
||||
node.outputs().size());
|
||||
return inferencing_interface;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about how the node interacts with fields.
|
||||
* In the future, this information can be stored in the node declaration. This would allow this
|
||||
|
@ -4604,6 +4613,10 @@ static FieldInferencingInterface get_node_field_inferencing_interface(const Node
|
|||
if (group == nullptr) {
|
||||
return FieldInferencingInterface();
|
||||
}
|
||||
if (!ntreeIsRegistered(group)) {
|
||||
/* This can happen when there is a linked node group that was not found (see T92799). */
|
||||
return get_dummy_field_inferencing_interface(node);
|
||||
}
|
||||
if (group->field_inferencing_interface == nullptr) {
|
||||
/* Update group recursively. */
|
||||
update_field_inferencing(*group);
|
||||
|
|
|
@ -4792,6 +4792,7 @@ static const char *cpp_classes =
|
|||
"\n"
|
||||
" bool operator==(const Pointer &other) const { return ptr.data == other.ptr.data; }\n"
|
||||
" bool operator!=(const Pointer &other) const { return ptr.data != other.ptr.data; }\n"
|
||||
" bool operator<(const Pointer &other) const { return ptr.data < other.ptr.data; }\n"
|
||||
"\n"
|
||||
" PointerRNA ptr;\n"
|
||||
"};\n"
|
||||
|
|
Loading…
Reference in New Issue