Merge branch 'blender-v3.1-release'
This commit is contained in:
commit
e1ec2d0251
|
@ -1514,9 +1514,12 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
|||
row.prop(self, "peer_memory")
|
||||
|
||||
if compute_device_type == 'METAL':
|
||||
row = layout.row()
|
||||
row.use_property_split = True
|
||||
row.prop(self, "use_metalrt")
|
||||
import platform
|
||||
# MetalRT only works on Apple Silicon at present, pending argument encoding fixes on AMD
|
||||
if platform.machine() == 'arm64':
|
||||
row = layout.row()
|
||||
row.use_property_split = True
|
||||
row.prop(self, "use_metalrt")
|
||||
|
||||
|
||||
def draw(self, context):
|
||||
|
|
|
@ -1574,18 +1574,13 @@ void BlenderSync::sync_lights(BL::Depsgraph &b_depsgraph, bool update_all)
|
|||
}
|
||||
}
|
||||
|
||||
void BlenderSync::sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d)
|
||||
void BlenderSync::sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all)
|
||||
{
|
||||
/* for auto refresh images */
|
||||
ImageManager *image_manager = scene->image_manager;
|
||||
const int frame = b_scene.frame_current();
|
||||
const bool auto_refresh_update = image_manager->set_animation_frame_update(frame);
|
||||
|
||||
shader_map.pre_sync();
|
||||
|
||||
sync_world(b_depsgraph, b_v3d, auto_refresh_update);
|
||||
sync_lights(b_depsgraph, auto_refresh_update);
|
||||
sync_materials(b_depsgraph, auto_refresh_update);
|
||||
sync_world(b_depsgraph, b_v3d, update_all);
|
||||
sync_lights(b_depsgraph, update_all);
|
||||
sync_materials(b_depsgraph, update_all);
|
||||
}
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
|
|
@ -246,7 +246,12 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
|
|||
int height,
|
||||
void **python_thread_state)
|
||||
{
|
||||
if (!has_updates_) {
|
||||
/* For auto refresh images. */
|
||||
ImageManager *image_manager = scene->image_manager;
|
||||
const int frame = b_scene.frame_current();
|
||||
const bool auto_refresh_update = image_manager->set_animation_frame_update(frame);
|
||||
|
||||
if (!has_updates_ && !auto_refresh_update) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -261,7 +266,7 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render,
|
|||
sync_view_layer(b_view_layer);
|
||||
sync_integrator(b_view_layer, background);
|
||||
sync_film(b_view_layer, b_v3d);
|
||||
sync_shaders(b_depsgraph, b_v3d);
|
||||
sync_shaders(b_depsgraph, b_v3d, auto_refresh_update);
|
||||
sync_images();
|
||||
|
||||
geometry_synced.clear(); /* use for objects and motion sync */
|
||||
|
|
|
@ -114,7 +114,7 @@ class BlenderSync {
|
|||
/* Shader */
|
||||
array<Node *> find_used_shaders(BL::Object &b_ob);
|
||||
void sync_world(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all);
|
||||
void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d);
|
||||
void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all);
|
||||
void sync_nodes(Shader *shader, BL::ShaderNodeTree &b_ntree);
|
||||
|
||||
/* Object */
|
||||
|
|
|
@ -77,11 +77,11 @@ MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
|
|||
}
|
||||
case METAL_GPU_APPLE: {
|
||||
max_threads_per_threadgroup = 512;
|
||||
use_metalrt = info.use_metalrt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
use_metalrt = info.use_metalrt;
|
||||
if (auto metalrt = getenv("CYCLES_METALRT")) {
|
||||
use_metalrt = (atoi(metalrt) != 0);
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ static void iter_snap_objects(SnapObjectContext *sctx,
|
|||
}
|
||||
}
|
||||
else if (snap_select == SNAP_NOT_SELECTED) {
|
||||
if (is_object_active && !(base->object->mode & OB_MODE_OBJECT)) {
|
||||
if (is_object_active && base->object->mode != OB_MODE_OBJECT) {
|
||||
/* Pass. Consider the selection of elements being edited. */
|
||||
}
|
||||
else if ((base->flag & BASE_SELECTED) || (base->flag_legacy & BA_WAS_SEL)) {
|
||||
|
|
Loading…
Reference in New Issue