Anim: View FCurve of Property in the Graph Editor #114407
|
@ -72,7 +72,7 @@ macro(BLENDER_SRC_GTEST_EX)
|
|||
if(DEFINED PTHREADS_LIBRARIES) # Needed for GLOG.
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ${PTHREADS_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_OPENMP_STATIC)
|
||||
if(WITH_OPENMP AND WITH_OPENMP_STATIC)
|
||||
target_link_libraries(${TARGET_NAME} PRIVATE ${OpenMP_LIBRARIES})
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
|
|
|
@ -104,3 +104,13 @@ if(UNIX AND (NOT APPLE) AND LIBDIR AND (EXISTS ${LIBDIR}))
|
|||
)
|
||||
unset(_libdir_stale)
|
||||
endif()
|
||||
|
||||
# Detect update in 4.1 to shared library OpenImageDenoise.
|
||||
if(UNIX AND
|
||||
DEFINED OPENIMAGEDENOISE_LIBRARY AND
|
||||
OPENIMAGEDENOISE_LIBRARY MATCHES "libOpenImageDenoise.a$" AND
|
||||
(EXISTS ${LIBDIR}/openimagedenoise/lib/libOpenImageDenoise.so OR
|
||||
EXISTS ${LIBDIR}/openimagedenoise/lib/libOpenImageDenoise.dylib))
|
||||
message(STATUS "Auto updating CMake configuration for dynamic OpenImageDenoise")
|
||||
unset_cache_variables("^OPENIMAGEDENOISE")
|
||||
endif()
|
||||
|
|
|
@ -65,7 +65,7 @@ HIPRTDevice::HIPRTDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
|
|||
functions_table(NULL),
|
||||
scratch_buffer_size(0),
|
||||
scratch_buffer(this, "scratch_buffer", MEM_DEVICE_ONLY),
|
||||
visibility(this, "visibility", MEM_READ_ONLY),
|
||||
prim_visibility(this, "prim_visibility", MEM_GLOBAL),
|
||||
instance_transform_matrix(this, "instance_transform_matrix", MEM_READ_ONLY),
|
||||
transform_headers(this, "transform_headers", MEM_READ_ONLY),
|
||||
user_instance_id(this, "user_instance_id", MEM_GLOBAL),
|
||||
|
@ -104,7 +104,7 @@ HIPRTDevice::~HIPRTDevice()
|
|||
{
|
||||
HIPContextScope scope(this);
|
||||
user_instance_id.free();
|
||||
visibility.free();
|
||||
prim_visibility.free();
|
||||
hiprt_blas_ptr.free();
|
||||
blas_ptr.free();
|
||||
instance_transform_matrix.free();
|
||||
|
@ -388,54 +388,72 @@ hiprtGeometryBuildInput HIPRTDevice::prepare_triangle_blas(BVHHIPRT *bvh, Mesh *
|
|||
hiprtGeometryBuildInput geom_input;
|
||||
geom_input.geomType = Triangle;
|
||||
|
||||
if (mesh->has_motion_blur() &&
|
||||
!(bvh->params.num_motion_triangle_steps == 0 || bvh->params.use_spatial_split))
|
||||
{
|
||||
if (mesh->has_motion_blur()) {
|
||||
|
||||
const Attribute *attr_mP = mesh->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION);
|
||||
const float3 *vert_steps = attr_mP->data_float3();
|
||||
const size_t num_verts = mesh->get_verts().size();
|
||||
const size_t num_steps = mesh->get_motion_steps();
|
||||
const size_t num_triangles = mesh->num_triangles();
|
||||
|
||||
const int num_bvh_steps = bvh->params.num_motion_triangle_steps * 2 + 1;
|
||||
const float num_bvh_steps_inv_1 = 1.0f / (num_bvh_steps - 1);
|
||||
|
||||
const float3 *verts = mesh->get_verts().data();
|
||||
int num_bounds = 0;
|
||||
bvh->custom_primitive_bound.alloc(num_triangles * num_bvh_steps);
|
||||
|
||||
for (uint j = 0; j < num_triangles; j++) {
|
||||
Mesh::Triangle t = mesh->get_triangle(j);
|
||||
const float3 *verts = mesh->get_verts().data();
|
||||
if (bvh->params.num_motion_triangle_steps == 0 || bvh->params.use_spatial_split) {
|
||||
bvh->custom_primitive_bound.alloc(num_triangles);
|
||||
bvh->custom_prim_info.resize(num_triangles);
|
||||
for (uint j = 0; j < num_triangles; j++) {
|
||||
Mesh::Triangle t = mesh->get_triangle(j);
|
||||
BoundBox bounds = BoundBox::empty;
|
||||
t.bounds_grow(verts, bounds);
|
||||
for (size_t step = 0; step < num_steps - 1; step++) {
|
||||
t.bounds_grow(vert_steps + step * num_verts, bounds);
|
||||
}
|
||||
|
||||
const size_t num_verts = mesh->get_verts().size();
|
||||
const size_t num_steps = mesh->get_motion_steps();
|
||||
const float3 *vert_steps = attr_mP->data_float3();
|
||||
|
||||
float3 prev_verts[3];
|
||||
t.motion_verts(verts, vert_steps, num_verts, num_steps, 0.0f, prev_verts);
|
||||
BoundBox prev_bounds = BoundBox::empty;
|
||||
prev_bounds.grow(prev_verts[0]);
|
||||
prev_bounds.grow(prev_verts[1]);
|
||||
prev_bounds.grow(prev_verts[2]);
|
||||
|
||||
for (int bvh_step = 1; bvh_step < num_bvh_steps; ++bvh_step) {
|
||||
const float curr_time = (float)(bvh_step)*num_bvh_steps_inv_1;
|
||||
float3 curr_verts[3];
|
||||
t.motion_verts(verts, vert_steps, num_verts, num_steps, curr_time, curr_verts);
|
||||
BoundBox curr_bounds = BoundBox::empty;
|
||||
curr_bounds.grow(curr_verts[0]);
|
||||
curr_bounds.grow(curr_verts[1]);
|
||||
curr_bounds.grow(curr_verts[2]);
|
||||
BoundBox bounds = prev_bounds;
|
||||
bounds.grow(curr_bounds);
|
||||
if (bounds.valid()) {
|
||||
const float prev_time = (float)(bvh_step - 1) * num_bvh_steps_inv_1;
|
||||
bvh->custom_primitive_bound[num_bounds] = bounds;
|
||||
bvh->custom_prim_info[num_bounds].x = j;
|
||||
bvh->custom_prim_info[num_bounds].y = mesh->primitive_type();
|
||||
bvh->prims_time[num_bounds].x = curr_time;
|
||||
bvh->prims_time[num_bounds].y = prev_time;
|
||||
num_bounds++;
|
||||
}
|
||||
prev_bounds = curr_bounds;
|
||||
}
|
||||
}
|
||||
else {
|
||||
const int num_bvh_steps = bvh->params.num_motion_triangle_steps * 2 + 1;
|
||||
const float num_bvh_steps_inv_1 = 1.0f / (num_bvh_steps - 1);
|
||||
|
||||
bvh->custom_primitive_bound.alloc(num_triangles * num_bvh_steps);
|
||||
bvh->custom_prim_info.resize(num_triangles * num_bvh_steps);
|
||||
|
||||
for (uint j = 0; j < num_triangles; j++) {
|
||||
Mesh::Triangle t = mesh->get_triangle(j);
|
||||
float3 prev_verts[3];
|
||||
t.motion_verts(verts, vert_steps, num_verts, num_steps, 0.0f, prev_verts);
|
||||
BoundBox prev_bounds = BoundBox::empty;
|
||||
prev_bounds.grow(prev_verts[0]);
|
||||
prev_bounds.grow(prev_verts[1]);
|
||||
prev_bounds.grow(prev_verts[2]);
|
||||
|
||||
for (int bvh_step = 1; bvh_step < num_bvh_steps; ++bvh_step) {
|
||||
const float curr_time = (float)(bvh_step)*num_bvh_steps_inv_1;
|
||||
float3 curr_verts[3];
|
||||
t.motion_verts(verts, vert_steps, num_verts, num_steps, curr_time, curr_verts);
|
||||
BoundBox curr_bounds = BoundBox::empty;
|
||||
curr_bounds.grow(curr_verts[0]);
|
||||
curr_bounds.grow(curr_verts[1]);
|
||||
curr_bounds.grow(curr_verts[2]);
|
||||
BoundBox bounds = prev_bounds;
|
||||
bounds.grow(curr_bounds);
|
||||
if (bounds.valid()) {
|
||||
const float prev_time = (float)(bvh_step - 1) * num_bvh_steps_inv_1;
|
||||
bvh->custom_primitive_bound[num_bounds] = bounds;
|
||||
bvh->custom_prim_info[num_bounds].x = j;
|
||||
bvh->custom_prim_info[num_bounds].y = mesh->primitive_type();
|
||||
bvh->prims_time[num_bounds].x = curr_time;
|
||||
bvh->prims_time[num_bounds].y = prev_time;
|
||||
num_bounds++;
|
||||
}
|
||||
prev_bounds = curr_bounds;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -449,7 +467,6 @@ hiprtGeometryBuildInput HIPRTDevice::prepare_triangle_blas(BVHHIPRT *bvh, Mesh *
|
|||
geom_input.geomType = Motion_Triangle;
|
||||
}
|
||||
else {
|
||||
|
||||
size_t triangle_size = mesh->get_triangles().size();
|
||||
void *triangle_data = mesh->get_triangles().data();
|
||||
|
||||
|
@ -480,6 +497,7 @@ hiprtGeometryBuildInput HIPRTDevice::prepare_triangle_blas(BVHHIPRT *bvh, Mesh *
|
|||
geom_input.type = hiprtPrimitiveTypeTriangleMesh;
|
||||
geom_input.triangleMesh.primitive = &(bvh->triangle_mesh);
|
||||
}
|
||||
|
||||
return geom_input;
|
||||
}
|
||||
|
||||
|
@ -800,7 +818,7 @@ hiprtScene HIPRTDevice::build_tlas(BVHHIPRT *bvh,
|
|||
|
||||
size_t num_object = objects.size();
|
||||
user_instance_id.alloc(num_object);
|
||||
visibility.alloc(num_object);
|
||||
prim_visibility.alloc(num_object);
|
||||
hiprt_blas_ptr.alloc(num_object);
|
||||
blas_ptr.alloc(num_object);
|
||||
transform_headers.alloc(num_object);
|
||||
|
@ -913,7 +931,7 @@ hiprtScene HIPRTDevice::build_tlas(BVHHIPRT *bvh,
|
|||
transform_headers[num_instances] = current_header;
|
||||
|
||||
user_instance_id[num_instances] = blender_instance_id;
|
||||
visibility[num_instances] = mask;
|
||||
prim_visibility[num_instances] = mask;
|
||||
hiprt_blas_ptr[num_instances] = (uint64_t)hiprt_geom_current;
|
||||
num_instances++;
|
||||
}
|
||||
|
@ -928,7 +946,7 @@ hiprtScene HIPRTDevice::build_tlas(BVHHIPRT *bvh,
|
|||
scene_input_ptr.frameType = hiprtFrameTypeMatrix;
|
||||
|
||||
user_instance_id.copy_to_device();
|
||||
visibility.copy_to_device();
|
||||
prim_visibility.copy_to_device();
|
||||
hiprt_blas_ptr.copy_to_device();
|
||||
blas_ptr.copy_to_device();
|
||||
transform_headers.copy_to_device();
|
||||
|
@ -942,7 +960,7 @@ hiprtScene HIPRTDevice::build_tlas(BVHHIPRT *bvh,
|
|||
instance_transform_matrix.host_pointer = 0;
|
||||
}
|
||||
|
||||
scene_input_ptr.instanceMasks = (void *)visibility.device_pointer;
|
||||
scene_input_ptr.instanceMasks = (void *)prim_visibility.device_pointer;
|
||||
scene_input_ptr.instanceGeometries = (void *)hiprt_blas_ptr.device_pointer;
|
||||
scene_input_ptr.instanceTransformHeaders = (void *)transform_headers.device_pointer;
|
||||
scene_input_ptr.instanceFrames = (void *)instance_transform_matrix.device_pointer;
|
||||
|
|
|
@ -82,7 +82,11 @@ class HIPRTDevice : public HIPDevice {
|
|||
* are defined on the GPU side as members of KernelParamsHIPRT struct the host memory is copied
|
||||
* to GPU through const_copy_to() function. */
|
||||
|
||||
device_vector<uint32_t> visibility;
|
||||
/* Originally, visibility was only passed to HIP RT but after a bug report it was noted it was
|
||||
* required for custom primitives (i.e., motion triangles). This buffer, however, has visibility
|
||||
* per object not per primitive so the same buffer as the one that is passed to HIP RT can be
|
||||
* used. */
|
||||
device_vector<uint32_t> prim_visibility;
|
||||
|
||||
/* instance_transform_matrix passes transform matrix of instances converted from Cycles Transform
|
||||
* format to instanceFrames member of hiprtSceneBuildInput. */
|
||||
|
|
|
@ -980,66 +980,96 @@ char *OneapiDevice::device_capabilities()
|
|||
# endif
|
||||
|
||||
capabilities << std::string("\t") << name << "\n";
|
||||
capabilities << "\t\tsycl::info::platform::name\t\t\t"
|
||||
<< device.get_platform().get_info<sycl::info::platform::name>() << "\n";
|
||||
|
||||
# define WRITE_ATTR(attribute_name, attribute_variable) \
|
||||
capabilities << "\t\tsycl::info::device::" #attribute_name "\t\t\t" << attribute_variable \
|
||||
<< "\n";
|
||||
# define GET_NUM_ATTR(attribute) \
|
||||
# define GET_ATTR(attribute) \
|
||||
{ \
|
||||
size_t attribute = (size_t)device.get_info<sycl::info::device ::attribute>(); \
|
||||
capabilities << "\t\tsycl::info::device::" #attribute "\t\t\t" << attribute << "\n"; \
|
||||
capabilities << "\t\tsycl::info::device::" #attribute "\t\t\t" \
|
||||
<< device.get_info<sycl::info::device ::attribute>() << "\n"; \
|
||||
}
|
||||
# define GET_INTEL_ATTR(attribute) \
|
||||
{ \
|
||||
if (device.has(sycl::aspect::ext_intel_##attribute)) { \
|
||||
capabilities << "\t\tsycl::ext::intel::info::device::" #attribute "\t\t\t" \
|
||||
<< device.get_info<sycl::ext::intel::info::device ::attribute>() << "\n"; \
|
||||
} \
|
||||
}
|
||||
# define GET_ASPECT(aspect_) \
|
||||
{ \
|
||||
capabilities << "\t\tdevice::has(" #aspect_ ")\t\t\t" << device.has(sycl::aspect ::aspect_) \
|
||||
<< "\n"; \
|
||||
}
|
||||
|
||||
GET_NUM_ATTR(vendor_id)
|
||||
GET_NUM_ATTR(max_compute_units)
|
||||
GET_NUM_ATTR(max_work_item_dimensions)
|
||||
|
||||
GET_ATTR(vendor)
|
||||
GET_ATTR(driver_version)
|
||||
GET_ATTR(max_compute_units)
|
||||
GET_ATTR(max_clock_frequency)
|
||||
GET_ATTR(global_mem_size)
|
||||
GET_INTEL_ATTR(pci_address)
|
||||
GET_INTEL_ATTR(gpu_eu_simd_width)
|
||||
GET_INTEL_ATTR(gpu_eu_count)
|
||||
GET_INTEL_ATTR(gpu_slices)
|
||||
GET_INTEL_ATTR(gpu_subslices_per_slice)
|
||||
GET_INTEL_ATTR(gpu_eu_count_per_subslice)
|
||||
GET_INTEL_ATTR(gpu_hw_threads_per_eu)
|
||||
GET_INTEL_ATTR(max_mem_bandwidth)
|
||||
GET_ATTR(max_work_group_size)
|
||||
GET_ATTR(max_work_item_dimensions)
|
||||
sycl::id<3> max_work_item_sizes =
|
||||
device.get_info<sycl::info::device::max_work_item_sizes<3>>();
|
||||
WRITE_ATTR(max_work_item_sizes_dim0, ((size_t)max_work_item_sizes.get(0)))
|
||||
WRITE_ATTR(max_work_item_sizes_dim1, ((size_t)max_work_item_sizes.get(1)))
|
||||
WRITE_ATTR(max_work_item_sizes_dim2, ((size_t)max_work_item_sizes.get(2)))
|
||||
WRITE_ATTR(max_work_item_sizes[0], max_work_item_sizes.get(0))
|
||||
WRITE_ATTR(max_work_item_sizes[1], max_work_item_sizes.get(1))
|
||||
WRITE_ATTR(max_work_item_sizes[2], max_work_item_sizes.get(2))
|
||||
|
||||
GET_NUM_ATTR(max_work_group_size)
|
||||
GET_NUM_ATTR(max_num_sub_groups)
|
||||
GET_NUM_ATTR(sub_group_independent_forward_progress)
|
||||
GET_ATTR(max_num_sub_groups)
|
||||
for (size_t sub_group_size : device.get_info<sycl::info::device::sub_group_sizes>()) {
|
||||
WRITE_ATTR(sub_group_size[], sub_group_size)
|
||||
}
|
||||
GET_ATTR(sub_group_independent_forward_progress)
|
||||
|
||||
GET_NUM_ATTR(preferred_vector_width_char)
|
||||
GET_NUM_ATTR(preferred_vector_width_short)
|
||||
GET_NUM_ATTR(preferred_vector_width_int)
|
||||
GET_NUM_ATTR(preferred_vector_width_long)
|
||||
GET_NUM_ATTR(preferred_vector_width_float)
|
||||
GET_NUM_ATTR(preferred_vector_width_double)
|
||||
GET_NUM_ATTR(preferred_vector_width_half)
|
||||
GET_ATTR(preferred_vector_width_char)
|
||||
GET_ATTR(preferred_vector_width_short)
|
||||
GET_ATTR(preferred_vector_width_int)
|
||||
GET_ATTR(preferred_vector_width_long)
|
||||
GET_ATTR(preferred_vector_width_float)
|
||||
GET_ATTR(preferred_vector_width_double)
|
||||
GET_ATTR(preferred_vector_width_half)
|
||||
|
||||
GET_NUM_ATTR(native_vector_width_char)
|
||||
GET_NUM_ATTR(native_vector_width_short)
|
||||
GET_NUM_ATTR(native_vector_width_int)
|
||||
GET_NUM_ATTR(native_vector_width_long)
|
||||
GET_NUM_ATTR(native_vector_width_float)
|
||||
GET_NUM_ATTR(native_vector_width_double)
|
||||
GET_NUM_ATTR(native_vector_width_half)
|
||||
GET_ATTR(address_bits)
|
||||
GET_ATTR(max_mem_alloc_size)
|
||||
GET_ATTR(mem_base_addr_align)
|
||||
GET_ATTR(error_correction_support)
|
||||
GET_ATTR(is_available)
|
||||
|
||||
size_t max_clock_frequency = device.get_info<sycl::info::device::max_clock_frequency>();
|
||||
WRITE_ATTR(max_clock_frequency, max_clock_frequency)
|
||||
GET_ASPECT(cpu)
|
||||
GET_ASPECT(gpu)
|
||||
GET_ASPECT(fp16)
|
||||
GET_ASPECT(atomic64)
|
||||
GET_ASPECT(usm_host_allocations)
|
||||
GET_ASPECT(usm_device_allocations)
|
||||
GET_ASPECT(usm_shared_allocations)
|
||||
GET_ASPECT(usm_system_allocations)
|
||||
|
||||
GET_NUM_ATTR(address_bits)
|
||||
GET_NUM_ATTR(max_mem_alloc_size)
|
||||
# ifdef __SYCL_ANY_DEVICE_HAS_ext_oneapi_non_uniform_groups__
|
||||
GET_ASPECT(ext_oneapi_non_uniform_groups)
|
||||
# endif
|
||||
# ifdef __SYCL_ANY_DEVICE_HAS_ext_oneapi_bindless_images__
|
||||
GET_ASPECT(ext_oneapi_bindless_images)
|
||||
# endif
|
||||
# ifdef __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_semaphore_import__
|
||||
GET_ASPECT(ext_oneapi_interop_semaphore_import)
|
||||
# endif
|
||||
# ifdef __SYCL_ANY_DEVICE_HAS_ext_oneapi_interop_semaphore_export__
|
||||
GET_ASPECT(ext_oneapi_interop_semaphore_export)
|
||||
# endif
|
||||
|
||||
/* NOTE(@nsirgien): Implementation doesn't use image support as bindless images aren't
|
||||
* supported so we always return false, even if device supports HW texture usage acceleration.
|
||||
*/
|
||||
bool image_support = false;
|
||||
WRITE_ATTR(image_support, (size_t)image_support)
|
||||
|
||||
GET_NUM_ATTR(max_parameter_size)
|
||||
GET_NUM_ATTR(mem_base_addr_align)
|
||||
GET_NUM_ATTR(global_mem_size)
|
||||
GET_NUM_ATTR(local_mem_size)
|
||||
GET_NUM_ATTR(error_correction_support)
|
||||
GET_NUM_ATTR(profiling_timer_resolution)
|
||||
GET_NUM_ATTR(is_available)
|
||||
|
||||
# undef GET_NUM_ATTR
|
||||
# undef GET_INTEL_ATTR
|
||||
# undef GET_ASPECT
|
||||
# undef GET_ATTR
|
||||
# undef WRITE_ATTR
|
||||
capabilities << "\n";
|
||||
}
|
||||
|
|
|
@ -177,7 +177,6 @@ ccl_device_inline bool motion_triangle_custom_intersect(const hiprtRay &ray,
|
|||
void *payload,
|
||||
hiprtHit &hit)
|
||||
{
|
||||
# ifdef MOTION_BLUR
|
||||
RayPayload *local_payload = (RayPayload *)payload;
|
||||
KernelGlobals kg = local_payload->kg;
|
||||
int object_id = kernel_data_fetch(user_instance_id, hit.instanceID);
|
||||
|
@ -202,7 +201,7 @@ ccl_device_inline bool motion_triangle_custom_intersect(const hiprtRay &ray,
|
|||
local_payload->visibility,
|
||||
object_id,
|
||||
prim_id_global,
|
||||
prim_id_local);
|
||||
hit.instanceID);
|
||||
|
||||
if (b_hit) {
|
||||
hit.uv.x = isect.u;
|
||||
|
@ -212,9 +211,6 @@ ccl_device_inline bool motion_triangle_custom_intersect(const hiprtRay &ray,
|
|||
local_payload->prim_type = isect.type;
|
||||
}
|
||||
return b_hit;
|
||||
# else
|
||||
return false;
|
||||
# endif
|
||||
}
|
||||
|
||||
ccl_device_inline bool motion_triangle_custom_local_intersect(const hiprtRay &ray,
|
||||
|
|
|
@ -76,7 +76,7 @@ if(WITH_OPENSUBDIV)
|
|||
${OPENSUBDIV_LIBRARIES}
|
||||
)
|
||||
|
||||
if(WITH_OPENMP_STATIC)
|
||||
if(WITH_OPENMP AND WITH_OPENMP_STATIC)
|
||||
list(APPEND LIB
|
||||
${OpenMP_LIBRARIES}
|
||||
)
|
||||
|
|
|
@ -17,6 +17,12 @@ def keyconfig_update(keyconfig_data, keyconfig_version):
|
|||
# Only copy once.
|
||||
has_copy = False
|
||||
|
||||
def get_transform_modal_map():
|
||||
for km_name, _km_parms, km_items_data in keyconfig_data:
|
||||
if km_name == "Transform Modal Map":
|
||||
return km_items_data
|
||||
print("not found")
|
||||
|
||||
# Default repeat to false.
|
||||
if keyconfig_version <= (2, 92, 0):
|
||||
if not has_copy:
|
||||
|
@ -69,18 +75,16 @@ def keyconfig_update(keyconfig_data, keyconfig_version):
|
|||
keyconfig_data = copy.deepcopy(keyconfig_data)
|
||||
has_copy = True
|
||||
|
||||
for km_name, _km_parms, km_items_data in keyconfig_data:
|
||||
if km_name == "Transform Modal Map":
|
||||
km_items = km_items_data["items"]
|
||||
for (item_modal, item_event, _item_prop) in km_items:
|
||||
if item_modal == 'TRANSLATE':
|
||||
km_items.append(('VERT_EDGE_SLIDE', item_event, None))
|
||||
elif item_modal == 'ROTATE':
|
||||
km_items.append(('TRACKBALL', item_event, None))
|
||||
if km_items_data := get_transform_modal_map():
|
||||
km_items = km_items_data["items"]
|
||||
for (item_modal, item_event, _item_prop) in km_items:
|
||||
if item_modal == 'TRANSLATE':
|
||||
km_items.append(('VERT_EDGE_SLIDE', item_event, None))
|
||||
elif item_modal == 'ROTATE':
|
||||
km_items.append(('TRACKBALL', item_event, None))
|
||||
|
||||
# The modal key for "Rotate Normals" also didn't exist until then.
|
||||
km_items.append(('ROTATE_NORMALS', {"type": 'N', "value": 'PRESS'}, None))
|
||||
break
|
||||
# The modal key for "Rotate Normals" also didn't exist until then.
|
||||
km_items.append(('ROTATE_NORMALS', {"type": 'N', "value": 'PRESS'}, None))
|
||||
|
||||
if keyconfig_version <= (4, 0, 3):
|
||||
if not has_copy:
|
||||
|
@ -88,10 +92,32 @@ def keyconfig_update(keyconfig_data, keyconfig_version):
|
|||
has_copy = True
|
||||
|
||||
# "Snap Source Toggle" did not exist until then.
|
||||
for km_name, _km_parms, km_items_data in keyconfig_data:
|
||||
if km_name == "Transform Modal Map":
|
||||
km_items_data["items"].append(("EDIT_SNAP_SOURCE_ON", {"type": 'B', "value": 'PRESS'}, None))
|
||||
km_items_data["items"].append(("EDIT_SNAP_SOURCE_OFF", {"type": 'B', "value": 'PRESS'}, None))
|
||||
break
|
||||
if km_items_data := get_transform_modal_map():
|
||||
km_items_data["items"].append(("EDIT_SNAP_SOURCE_ON", {"type": 'B', "value": 'PRESS'}, None))
|
||||
km_items_data["items"].append(("EDIT_SNAP_SOURCE_OFF", {"type": 'B', "value": 'PRESS'}, None))
|
||||
|
||||
if keyconfig_version <= (4, 1, 5):
|
||||
if km_items_data := get_transform_modal_map():
|
||||
def use_alt_navigate():
|
||||
km_item = next((i for i in km_items_data["items"] if i[0] ==
|
||||
"PROPORTIONAL_SIZE" and i[1]["type"] == 'TRACKPADPAN'), None)
|
||||
if km_item:
|
||||
return "alt" not in km_item[1] or km_item[1]["alt"] is False
|
||||
|
||||
# Fallback.
|
||||
import bpy
|
||||
return getattr(
|
||||
bpy.context.window_manager.keyconfigs.active.preferences,
|
||||
"use_alt_navigation",
|
||||
False)
|
||||
|
||||
if use_alt_navigate():
|
||||
if not has_copy:
|
||||
keyconfig_data = copy.deepcopy(keyconfig_data)
|
||||
has_copy = True
|
||||
km_items_data = get_transform_modal_map()
|
||||
|
||||
km_items_data["items"].append(
|
||||
("PASSTHROUGH_NAVIGATE", {"type": 'LEFT_ALT', "value": 'ANY', "any": True}, None))
|
||||
|
||||
return keyconfig_data
|
||||
|
|
|
@ -153,8 +153,6 @@ def draw(layout, context, context_member, property_type, *, use_edit=True):
|
|||
if not rna_item:
|
||||
return
|
||||
|
||||
from bpy.utils import escape_identifier
|
||||
|
||||
if rna_item.id_data.library is not None:
|
||||
use_edit = False
|
||||
is_lib_override = rna_item.id_data.override_library and rna_item.id_data.override_library.reference
|
||||
|
|
|
@ -359,16 +359,13 @@ def _template_items_transform_actions(
|
|||
items = [
|
||||
("transform.translate", {"type": params.select_mouse, "value": 'CLICK_DRAG'}, None),
|
||||
op_tool_optional(
|
||||
("transform.translate", {"type": 'G', "value": 'PRESS'},
|
||||
{"properties": [("alt_navigation", params.use_alt_navigation)]}),
|
||||
("transform.translate", {"type": 'G', "value": 'PRESS'}, None),
|
||||
(op_tool_cycle, "builtin.move"), params),
|
||||
op_tool_optional(
|
||||
("transform.rotate", {"type": 'R', "value": 'PRESS'},
|
||||
{"properties": [("alt_navigation", params.use_alt_navigation)]}),
|
||||
("transform.rotate", {"type": 'R', "value": 'PRESS'}, None),
|
||||
(op_tool_cycle, "builtin.rotate"), params),
|
||||
op_tool_optional(
|
||||
("transform.resize", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("alt_navigation", params.use_alt_navigation)]}),
|
||||
("transform.resize", {"type": 'S', "value": 'PRESS'}, None),
|
||||
(op_tool_cycle, "builtin.scale"), params),
|
||||
]
|
||||
|
||||
|
@ -3753,8 +3750,7 @@ def km_grease_pencil_stroke_edit_mode(params):
|
|||
("gpencil.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None),
|
||||
# Extrude and move selected points
|
||||
op_tool_optional(
|
||||
("gpencil.extrude_move", {"type": 'E', "value": 'PRESS'},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("alt_navigation", params.use_alt_navigation)])]}),
|
||||
("gpencil.extrude_move", {"type": 'E', "value": 'PRESS'}, None),
|
||||
(op_tool_cycle, "builtin.extrude"), params),
|
||||
# Delete
|
||||
op_menu("VIEW3D_MT_edit_gpencil_delete", {"type": 'X', "value": 'PRESS'}),
|
||||
|
@ -4683,10 +4679,8 @@ def km_object_mode(params):
|
|||
op_menu("VIEW3D_MT_add", {"type": 'A', "value": 'PRESS', "shift": True}),
|
||||
op_menu("VIEW3D_MT_object_apply", {"type": 'A', "value": 'PRESS', "ctrl": True}),
|
||||
op_menu("VIEW3D_MT_make_links", {"type": 'L', "value": 'PRESS', "ctrl": True}),
|
||||
("object.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("alt_navigation", params.use_alt_navigation)])]}),
|
||||
("object.duplicate_move_linked", {"type": 'D', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("alt_navigation", params.use_alt_navigation)])]}),
|
||||
("object.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None),
|
||||
("object.duplicate_move_linked", {"type": 'D', "value": 'PRESS', "alt": True}, None),
|
||||
("object.join", {"type": 'J', "value": 'PRESS', "ctrl": True}, None),
|
||||
("wm.context_toggle", {"type": 'PERIOD', "value": 'PRESS', "ctrl": True},
|
||||
{"properties": [("data_path", 'tool_settings.use_transform_data_origin')]}),
|
||||
|
@ -4870,13 +4864,10 @@ def km_paint_curve(params):
|
|||
("paintcurve.delete_point", {"type": 'DEL', "value": 'PRESS'}, None),
|
||||
("paintcurve.draw", {"type": 'RET', "value": 'PRESS'}, None),
|
||||
("paintcurve.draw", {"type": 'NUMPAD_ENTER', "value": 'PRESS'}, None),
|
||||
("transform.translate", {"type": 'G', "value": 'PRESS'},
|
||||
{"properties": [("alt_navigation", params.use_alt_navigation)]}),
|
||||
("transform.translate", {"type": 'G', "value": 'PRESS'}, None),
|
||||
("transform.translate", {"type": params.select_mouse, "value": 'CLICK_DRAG'}, None),
|
||||
("transform.rotate", {"type": 'R', "value": 'PRESS'},
|
||||
{"properties": [("alt_navigation", params.use_alt_navigation)]}),
|
||||
("transform.resize", {"type": 'S', "value": 'PRESS'},
|
||||
{"properties": [("alt_navigation", params.use_alt_navigation)]}),
|
||||
("transform.rotate", {"type": 'R', "value": 'PRESS'}, None),
|
||||
("transform.resize", {"type": 'S', "value": 'PRESS'}, None),
|
||||
])
|
||||
|
||||
return keymap
|
||||
|
@ -5613,8 +5604,7 @@ def km_edit_mesh(params):
|
|||
("mesh.normals_make_consistent", {"type": 'N', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("inside", True)]}),
|
||||
op_tool_optional(
|
||||
("view3d.edit_mesh_extrude_move_normal", {"type": 'E', "value": 'PRESS'},
|
||||
{"properties": [("alt_navigation", params.use_alt_navigation)]}),
|
||||
("view3d.edit_mesh_extrude_move_normal", {"type": 'E', "value": 'PRESS'}, None),
|
||||
(op_tool_cycle, "builtin.extrude_region"), params),
|
||||
op_menu("VIEW3D_MT_edit_mesh_extrude", {"type": 'E', "value": 'PRESS', "alt": True}),
|
||||
("transform.edge_crease", {"type": 'E', "value": 'PRESS', "shift": True}, None),
|
||||
|
@ -5631,13 +5621,11 @@ def km_edit_mesh(params):
|
|||
# No tool is available for this.
|
||||
("mesh.rip_move", {"type": 'V', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("MESH_OT_rip", [("use_fill", True)],)]}),
|
||||
("mesh.rip_edge_move", {"type": 'D', "value": 'PRESS', "alt": True},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("alt_navigation", params.use_alt_navigation)])]}),
|
||||
("mesh.rip_edge_move", {"type": 'D', "value": 'PRESS', "alt": True}, None),
|
||||
op_menu("VIEW3D_MT_edit_mesh_merge", {"type": 'M', "value": 'PRESS'}),
|
||||
op_menu("VIEW3D_MT_edit_mesh_split", {"type": 'M', "value": 'PRESS', "alt": True}),
|
||||
("mesh.edge_face_add", {"type": 'F', "value": 'PRESS', "repeat": True}, None),
|
||||
("mesh.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("alt_navigation", params.use_alt_navigation)])]}),
|
||||
("mesh.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None),
|
||||
op_menu("VIEW3D_MT_mesh_add", {"type": 'A', "value": 'PRESS', "shift": True}),
|
||||
("mesh.separate", {"type": 'P', "value": 'PRESS'}, None),
|
||||
("mesh.split", {"type": 'Y', "value": 'PRESS'}, None),
|
||||
|
@ -5758,8 +5746,7 @@ def km_edit_armature(params):
|
|||
("armature.dissolve", {"type": 'X', "value": 'PRESS', "ctrl": True}, None),
|
||||
("armature.dissolve", {"type": 'DEL', "value": 'PRESS', "ctrl": True}, None),
|
||||
op_tool_optional(
|
||||
("armature.extrude_move", {"type": 'E', "value": 'PRESS'},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("alt_navigation", params.use_alt_navigation)])]}),
|
||||
("armature.extrude_move", {"type": 'E', "value": 'PRESS'}, None),
|
||||
(op_tool_cycle, "builtin.extrude"), params),
|
||||
("armature.extrude_forked", {"type": 'E', "value": 'PRESS', "shift": True}, None),
|
||||
("armature.click_extrude", {"type": params.action_mouse, "value": 'CLICK', "ctrl": True}, None),
|
||||
|
@ -6024,8 +6011,7 @@ def km_edit_curve_legacy(params):
|
|||
("curve.separate", {"type": 'P', "value": 'PRESS'}, None),
|
||||
("curve.split", {"type": 'Y', "value": 'PRESS'}, None),
|
||||
op_tool_optional(
|
||||
("curve.extrude_move", {"type": 'E', "value": 'PRESS'},
|
||||
{"properties": [("TRANSFORM_OT_translate", [("alt_navigation", params.use_alt_navigation)])]}),
|
||||
("curve.extrude_move", {"type": 'E', "value": 'PRESS'}, None),
|
||||
(op_tool_cycle, "builtin.extrude"), params),
|
||||
("curve.duplicate_move", {"type": 'D', "value": 'PRESS', "shift": True}, None),
|
||||
("curve.make_segment", {"type": 'F', "value": 'PRESS'}, None),
|
||||
|
@ -6196,6 +6182,9 @@ def km_transform_modal_map(params):
|
|||
("PRECISION", {"type": 'RIGHT_SHIFT', "value": 'ANY', "any": True}, None),
|
||||
])
|
||||
|
||||
if params.use_alt_navigation:
|
||||
items.append(("PASSTHROUGH_NAVIGATE", {"type": 'LEFT_ALT', "value": 'ANY', "any": True}, None))
|
||||
|
||||
return keymap
|
||||
|
||||
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
if "bpy" in locals():
|
||||
from importlib import reload
|
||||
if "anim_utils" in locals():
|
||||
reload(anim_utils)
|
||||
del reload
|
||||
|
||||
|
||||
import bpy
|
||||
from bpy.types import Operator
|
||||
|
|
|
@ -284,7 +284,6 @@ class NewGeometryNodeTreeAssign(Operator):
|
|||
return geometry_modifier_poll(context)
|
||||
|
||||
def execute(self, context):
|
||||
space = context.space_data
|
||||
modifier = get_context_modifier(context)
|
||||
if not modifier:
|
||||
return {'CANCELLED'}
|
||||
|
|
|
@ -166,8 +166,6 @@ class NodeAddZoneOperator(NodeAddOperator):
|
|||
space = context.space_data
|
||||
tree = space.edit_tree
|
||||
|
||||
props = self.properties
|
||||
|
||||
self.deselect_nodes(context)
|
||||
input_node = self.create_node(context, self.input_node_type)
|
||||
output_node = self.create_node(context, self.output_node_type)
|
||||
|
|
|
@ -219,7 +219,6 @@ def extend(obj, EXTEND_MODE, use_uv_selection):
|
|||
|
||||
def main(context, operator):
|
||||
use_uv_selection = True
|
||||
view = context.space_data
|
||||
if context.space_data and context.space_data.type == 'VIEW_3D':
|
||||
use_uv_selection = False # When called from the 3D editor, UV selection is ignored.
|
||||
|
||||
|
|
|
@ -15,12 +15,6 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator):
|
|||
bl_label = "Extrude Individual and Move"
|
||||
bl_idname = "view3d.edit_mesh_extrude_individual_move"
|
||||
|
||||
alt_navigation: BoolProperty(
|
||||
name="alt_navigation",
|
||||
default=False,
|
||||
description="Transform Navigation with Alt",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
obj = context.active_object
|
||||
|
@ -41,7 +35,6 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator):
|
|||
"orient_type": 'NORMAL',
|
||||
"constraint_axis": (False, False, True),
|
||||
"release_confirm": False,
|
||||
"alt_navigation": self.alt_navigation,
|
||||
},
|
||||
)
|
||||
elif select_mode[2] and totface > 1:
|
||||
|
@ -49,14 +42,12 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator):
|
|||
'INVOKE_REGION_WIN',
|
||||
TRANSFORM_OT_shrink_fatten={
|
||||
"release_confirm": False,
|
||||
"alt_navigation": self.alt_navigation,
|
||||
})
|
||||
elif select_mode[1] and totedge >= 1:
|
||||
bpy.ops.mesh.extrude_edges_move(
|
||||
'INVOKE_REGION_WIN',
|
||||
TRANSFORM_OT_translate={
|
||||
"release_confirm": False,
|
||||
"alt_navigation": self.alt_navigation,
|
||||
},
|
||||
)
|
||||
else:
|
||||
|
@ -64,7 +55,6 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(Operator):
|
|||
'INVOKE_REGION_WIN',
|
||||
TRANSFORM_OT_translate={
|
||||
"release_confirm": False,
|
||||
"alt_navigation": self.alt_navigation,
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -87,19 +77,13 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||
description="Dissolves adjacent faces and intersects new geometry",
|
||||
)
|
||||
|
||||
alt_navigation: BoolProperty(
|
||||
name="alt_navigation",
|
||||
default=False,
|
||||
description="Transform Navigation with Alt",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
obj = context.active_object
|
||||
return (obj is not None and obj.mode == 'EDIT')
|
||||
|
||||
@staticmethod
|
||||
def extrude_region(context, use_vert_normals, dissolve_and_intersect, alt_navigation):
|
||||
def extrude_region(context, use_vert_normals, dissolve_and_intersect):
|
||||
mesh = context.object.data
|
||||
|
||||
totface = mesh.total_face_sel
|
||||
|
@ -112,7 +96,6 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||
'INVOKE_REGION_WIN',
|
||||
TRANSFORM_OT_shrink_fatten={
|
||||
"release_confirm": False,
|
||||
"alt_navigation": alt_navigation,
|
||||
},
|
||||
)
|
||||
elif dissolve_and_intersect:
|
||||
|
@ -125,7 +108,6 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||
"orient_type": 'NORMAL',
|
||||
"constraint_axis": (False, False, True),
|
||||
"release_confirm": False,
|
||||
"alt_navigation": alt_navigation,
|
||||
},
|
||||
)
|
||||
else:
|
||||
|
@ -135,7 +117,6 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||
"orient_type": 'NORMAL',
|
||||
"constraint_axis": (False, False, True),
|
||||
"release_confirm": False,
|
||||
"alt_navigation": alt_navigation,
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -150,14 +131,12 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||
# "constraint_axis": (True, True, False),
|
||||
"constraint_axis": (False, False, False),
|
||||
"release_confirm": False,
|
||||
"alt_navigation": alt_navigation,
|
||||
})
|
||||
else:
|
||||
bpy.ops.mesh.extrude_region_move(
|
||||
'INVOKE_REGION_WIN',
|
||||
TRANSFORM_OT_translate={
|
||||
"release_confirm": False,
|
||||
"alt_navigation": alt_navigation,
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -167,7 +146,7 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
|
|||
|
||||
def execute(self, context):
|
||||
return VIEW3D_OT_edit_mesh_extrude_move.extrude_region(
|
||||
context, False, self.dissolve_and_intersect, self.alt_navigation)
|
||||
context, False, self.dissolve_and_intersect)
|
||||
|
||||
def invoke(self, context, _event):
|
||||
return self.execute(context)
|
||||
|
@ -178,19 +157,13 @@ class VIEW3D_OT_edit_mesh_extrude_shrink_fatten(Operator):
|
|||
bl_label = "Extrude and Move on Individual Normals"
|
||||
bl_idname = "view3d.edit_mesh_extrude_move_shrink_fatten"
|
||||
|
||||
alt_navigation: BoolProperty(
|
||||
name="alt_navigation",
|
||||
default=False,
|
||||
description="Transform Navigation with Alt",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
obj = context.active_object
|
||||
return (obj is not None and obj.mode == 'EDIT')
|
||||
|
||||
def execute(self, context):
|
||||
return VIEW3D_OT_edit_mesh_extrude_move.extrude_region(context, True, False, self.alt_navigation)
|
||||
return VIEW3D_OT_edit_mesh_extrude_move.extrude_region(context, True, False)
|
||||
|
||||
def invoke(self, context, _event):
|
||||
return self.execute(context)
|
||||
|
@ -201,12 +174,6 @@ class VIEW3D_OT_edit_mesh_extrude_manifold_normal(Operator):
|
|||
bl_label = "Extrude Manifold Along Normals"
|
||||
bl_idname = "view3d.edit_mesh_extrude_manifold_normal"
|
||||
|
||||
alt_navigation: BoolProperty(
|
||||
name="alt_navigation",
|
||||
default=False,
|
||||
description="Transform Navigation with Alt",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
obj = context.active_object
|
||||
|
@ -222,7 +189,6 @@ class VIEW3D_OT_edit_mesh_extrude_manifold_normal(Operator):
|
|||
"orient_type": 'NORMAL',
|
||||
"constraint_axis": (False, False, True),
|
||||
"release_confirm": False,
|
||||
"alt_navigation": self.alt_navigation,
|
||||
},
|
||||
)
|
||||
return {'FINISHED'}
|
||||
|
|
|
@ -8,7 +8,6 @@ import bpy
|
|||
from bpy.types import (
|
||||
Menu,
|
||||
Operator,
|
||||
bpy_prop_array,
|
||||
)
|
||||
from bpy.props import (
|
||||
BoolProperty,
|
||||
|
@ -35,7 +34,7 @@ def _rna_path_prop_search_for_context_impl(context, edit_text, unique_attrs):
|
|||
line = context_prefix + edit_text
|
||||
cursor = len(line)
|
||||
namespace = {"context": context}
|
||||
comp_prefix, _, comp_options = intellisense.expand(line=line, cursor=len(line), namespace=namespace, private=False)
|
||||
comp_prefix, _, comp_options = intellisense.expand(line=line, cursor=cursor, namespace=namespace, private=False)
|
||||
prefix = comp_prefix[len(context_prefix):] # Strip "context."
|
||||
for attr in comp_options.split("\n"):
|
||||
if attr.endswith((
|
||||
|
@ -66,7 +65,6 @@ def rna_path_prop_search_for_context(self, context, edit_text):
|
|||
# Users are very unlikely to be setting shortcuts in the preferences, skip this.
|
||||
if area.type == 'PREFERENCES':
|
||||
continue
|
||||
space = area.spaces.active
|
||||
# Ignore the same region type multiple times in an area.
|
||||
# Prevents the 3D-viewport quad-view from attempting to expand 3 extra times for e.g.
|
||||
region_type_unique = set()
|
||||
|
|
|
@ -662,7 +662,6 @@ class NODE_MT_geometry_node_add_all(Menu):
|
|||
bl_label = ""
|
||||
|
||||
def draw(self, context):
|
||||
snode = context.space_data
|
||||
layout = self.layout
|
||||
layout.menu("NODE_MT_geometry_node_GEO_ATTRIBUTE")
|
||||
layout.menu("NODE_MT_geometry_node_GEO_INPUT")
|
||||
|
|
|
@ -47,7 +47,6 @@ class DATA_PT_grease_pencil_layers(DataButtonsPanel, Panel):
|
|||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
ob = context.object
|
||||
grease_pencil = context.grease_pencil
|
||||
layer = grease_pencil.layers.active
|
||||
|
||||
|
|
|
@ -595,9 +595,6 @@ class EeveeRaytracingOptionsPanel(RenderButtonsPanel, Panel):
|
|||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
|
||||
scene = context.scene
|
||||
eevee = scene.eevee
|
||||
|
||||
layout.prop(props, "resolution_scale")
|
||||
layout.prop(props, "sample_clamp")
|
||||
|
||||
|
|
|
@ -1200,14 +1200,10 @@ class VIEW3D_MT_transform_base:
|
|||
# TODO: get rid of the custom text strings?
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
alt_navigation = getattr(
|
||||
context.window_manager.keyconfigs.active.preferences,
|
||||
"use_alt_navigation",
|
||||
False)
|
||||
|
||||
layout.operator("transform.translate").alt_navigation = alt_navigation
|
||||
layout.operator("transform.rotate").alt_navigation = alt_navigation
|
||||
layout.operator("transform.resize", text="Scale").alt_navigation = alt_navigation
|
||||
layout.operator("transform.translate")
|
||||
layout.operator("transform.rotate")
|
||||
layout.operator("transform.resize", text="Scale")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
@ -1228,18 +1224,13 @@ class VIEW3D_MT_transform_base:
|
|||
# Generic transform menu - geometry types
|
||||
class VIEW3D_MT_transform(VIEW3D_MT_transform_base, Menu):
|
||||
def draw(self, context):
|
||||
alt_navigation = getattr(
|
||||
context.window_manager.keyconfigs.active.preferences,
|
||||
"use_alt_navigation",
|
||||
False)
|
||||
|
||||
# base menu
|
||||
VIEW3D_MT_transform_base.draw(self, context)
|
||||
|
||||
# generic...
|
||||
layout = self.layout
|
||||
if context.mode == 'EDIT_MESH':
|
||||
layout.operator("transform.shrink_fatten", text="Shrink/Fatten").alt_navigation = alt_navigation
|
||||
layout.operator("transform.shrink_fatten", text="Shrink/Fatten")
|
||||
layout.operator("transform.skin_resize")
|
||||
elif context.mode in ['EDIT_CURVE', 'EDIT_GREASE_PENCIL', 'EDIT_CURVES']:
|
||||
layout.operator("transform.transform", text="Radius").mode = 'CURVE_SHRINKFATTEN'
|
||||
|
@ -1248,10 +1239,8 @@ class VIEW3D_MT_transform(VIEW3D_MT_transform_base, Menu):
|
|||
layout.separator()
|
||||
props = layout.operator("transform.translate", text="Move Texture Space")
|
||||
props.texture_space = True
|
||||
props.alt_navigation = alt_navigation
|
||||
props = layout.operator("transform.resize", text="Scale Texture Space")
|
||||
props.texture_space = True
|
||||
props.alt_navigation = alt_navigation
|
||||
|
||||
|
||||
# Object-specific extensions to Transform menu
|
||||
|
@ -1405,7 +1394,6 @@ class VIEW3D_MT_view(Menu):
|
|||
def draw(self, context):
|
||||
layout = self.layout
|
||||
view = context.space_data
|
||||
prefs = context.preferences
|
||||
|
||||
layout.prop(view, "show_region_toolbar")
|
||||
layout.prop(view, "show_region_ui")
|
||||
|
@ -4481,11 +4469,6 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
|
|||
col.operator("mesh.delete", text="Delete Edges").type = 'EDGE'
|
||||
|
||||
if is_face_mode:
|
||||
alt_navigation = getattr(
|
||||
context.window_manager.keyconfigs.active.preferences,
|
||||
"use_alt_navigation",
|
||||
False)
|
||||
|
||||
col = row.column(align=True)
|
||||
|
||||
col.label(text="Face", icon='FACESEL')
|
||||
|
@ -4497,11 +4480,11 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
|
|||
col.separator()
|
||||
|
||||
col.operator("view3d.edit_mesh_extrude_move_normal",
|
||||
text="Extrude Faces").alt_navigation = alt_navigation
|
||||
text="Extrude Faces")
|
||||
col.operator("view3d.edit_mesh_extrude_move_shrink_fatten",
|
||||
text="Extrude Faces Along Normals").alt_navigation = alt_navigation
|
||||
text="Extrude Faces Along Normals")
|
||||
col.operator("mesh.extrude_faces_move",
|
||||
text="Extrude Individual Faces").TRANSFORM_OT_shrink_fatten.alt_navigation = alt_navigation
|
||||
text="Extrude Individual Faces")
|
||||
|
||||
col.operator("mesh.inset")
|
||||
col.operator("mesh.poke")
|
||||
|
@ -4553,11 +4536,6 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
|
|||
def draw(self, context):
|
||||
from math import pi
|
||||
|
||||
alt_navigation = getattr(
|
||||
context.window_manager.keyconfigs.active.preferences,
|
||||
"use_alt_navigation",
|
||||
False)
|
||||
|
||||
layout = self.layout
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
|
||||
|
@ -4567,22 +4545,22 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
|
|||
|
||||
if mesh.total_face_sel:
|
||||
layout.operator("view3d.edit_mesh_extrude_move_normal",
|
||||
text="Extrude Faces").alt_navigation = alt_navigation
|
||||
text="Extrude Faces")
|
||||
layout.operator("view3d.edit_mesh_extrude_move_shrink_fatten",
|
||||
text="Extrude Faces Along Normals").alt_navigation = alt_navigation
|
||||
text="Extrude Faces Along Normals")
|
||||
layout.operator(
|
||||
"mesh.extrude_faces_move",
|
||||
text="Extrude Individual Faces").TRANSFORM_OT_shrink_fatten.alt_navigation = alt_navigation
|
||||
text="Extrude Individual Faces")
|
||||
layout.operator("view3d.edit_mesh_extrude_manifold_normal",
|
||||
text="Extrude Manifold").alt_navigation = alt_navigation
|
||||
text="Extrude Manifold")
|
||||
|
||||
if mesh.total_edge_sel and (select_mode[0] or select_mode[1]):
|
||||
layout.operator("mesh.extrude_edges_move",
|
||||
text="Extrude Edges").TRANSFORM_OT_translate.alt_navigation = alt_navigation
|
||||
text="Extrude Edges")
|
||||
|
||||
if mesh.total_vert_sel and select_mode[0]:
|
||||
layout.operator("mesh.extrude_vertices_move",
|
||||
text="Extrude Vertices").TRANSFORM_OT_translate.alt_navigation = alt_navigation
|
||||
text="Extrude Vertices")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
@ -4741,22 +4719,15 @@ class VIEW3D_MT_edit_mesh_faces(Menu):
|
|||
bl_idname = "VIEW3D_MT_edit_mesh_faces"
|
||||
|
||||
def draw(self, context):
|
||||
alt_navigation = getattr(
|
||||
context.window_manager.keyconfigs.active.preferences,
|
||||
"use_alt_navigation",
|
||||
False)
|
||||
|
||||
layout = self.layout
|
||||
|
||||
layout.operator_context = 'INVOKE_REGION_WIN'
|
||||
|
||||
layout.operator("view3d.edit_mesh_extrude_move_normal",
|
||||
text="Extrude Faces").alt_navigation = alt_navigation
|
||||
text="Extrude Faces")
|
||||
layout.operator("view3d.edit_mesh_extrude_move_shrink_fatten",
|
||||
text="Extrude Faces Along Normals").alt_navigation = alt_navigation
|
||||
layout.operator(
|
||||
"mesh.extrude_faces_move",
|
||||
text="Extrude Individual Faces").TRANSFORM_OT_shrink_fatten.alt_navigation = alt_navigation
|
||||
text="Extrude Faces Along Normals")
|
||||
layout.operator("mesh.extrude_faces_move", text="Extrude Individual Faces")
|
||||
|
||||
layout.separator()
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import bpy
|
||||
import nodeitems_utils
|
||||
from nodeitems_utils import (
|
||||
NodeCategory,
|
||||
NodeItem,
|
||||
|
|
|
@ -29,7 +29,7 @@ extern "C" {
|
|||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 5
|
||||
#define BLENDER_FILE_SUBVERSION 6
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
||||
|
|
|
@ -1451,7 +1451,7 @@ static void object_get_datamask(const Depsgraph *depsgraph,
|
|||
*r_need_mapping = (editing || (ob->mode & (OB_MODE_WEIGHT_PAINT | OB_MODE_VERTEX_PAINT)));
|
||||
}
|
||||
|
||||
/* check if we need tfaces & mcols due to face select or texture paint */
|
||||
/* Check if we need #MTFace & loop-color due to face select or texture paint. */
|
||||
if ((ob->mode & OB_MODE_TEXTURE_PAINT) || editing) {
|
||||
r_mask->lmask |= CD_MASK_PROP_FLOAT2 | CD_MASK_PROP_BYTE_COLOR;
|
||||
r_mask->fmask |= CD_MASK_MTFACE;
|
||||
|
|
|
@ -382,6 +382,7 @@ set(SRC
|
|||
BLI_voronoi_2d.h
|
||||
BLI_voxel.h
|
||||
BLI_winstuff.h
|
||||
BLI_winstuff_com.hh
|
||||
PIL_time.h
|
||||
PIL_time_utildefines.h
|
||||
|
||||
|
|
|
@ -1825,6 +1825,8 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
|
|||
}
|
||||
}
|
||||
|
||||
/* 401 6 did not require any do_version here. */
|
||||
|
||||
/**
|
||||
* Versioning code until next subversion bump goes here.
|
||||
*
|
||||
|
|
|
@ -345,8 +345,6 @@ if(WITH_COMPOSITOR_CPU)
|
|||
operations/COM_GaussianXBlurOperation.h
|
||||
operations/COM_GaussianYBlurOperation.cc
|
||||
operations/COM_GaussianYBlurOperation.h
|
||||
operations/COM_SummedAreaTableOperation.h
|
||||
operations/COM_SummedAreaTableOperation.cc
|
||||
operations/COM_KuwaharaAnisotropicOperation.cc
|
||||
operations/COM_KuwaharaAnisotropicOperation.h
|
||||
operations/COM_KuwaharaAnisotropicStructureTensorOperation.cc
|
||||
|
@ -361,6 +359,8 @@ if(WITH_COMPOSITOR_CPU)
|
|||
operations/COM_PosterizeOperation.h
|
||||
operations/COM_SMAAOperation.cc
|
||||
operations/COM_SMAAOperation.h
|
||||
operations/COM_SummedAreaTableOperation.cc
|
||||
operations/COM_SummedAreaTableOperation.h
|
||||
operations/COM_VariableSizeBokehBlurOperation.cc
|
||||
operations/COM_VariableSizeBokehBlurOperation.h
|
||||
|
||||
|
@ -666,8 +666,8 @@ if(WITH_COMPOSITOR_CPU)
|
|||
tests/COM_BufferArea_test.cc
|
||||
tests/COM_BufferRange_test.cc
|
||||
tests/COM_BuffersIterator_test.cc
|
||||
tests/COM_NodeOperation_test.cc
|
||||
tests/COM_ComputeSummedAreaTableOperation_test.cc
|
||||
tests/COM_NodeOperation_test.cc
|
||||
)
|
||||
set(TEST_INC
|
||||
)
|
||||
|
|
|
@ -230,9 +230,9 @@ set(SRC
|
|||
DRW_engine.h
|
||||
DRW_pbvh.hh
|
||||
DRW_select_buffer.hh
|
||||
intern/attribute_convert.hh
|
||||
intern/DRW_gpu_wrapper.hh
|
||||
intern/DRW_render.h
|
||||
intern/attribute_convert.hh
|
||||
intern/draw_attributes.hh
|
||||
intern/draw_cache.h
|
||||
intern/draw_cache_extract.hh
|
||||
|
|
|
@ -121,9 +121,8 @@ int BIF_countTransformOrientation(const bContext *C);
|
|||
#define P_CURSOR_EDIT (1 << 16)
|
||||
#define P_CLNOR_INVALIDATE (1 << 17)
|
||||
#define P_VIEW2D_EDGE_PAN (1 << 18)
|
||||
#define P_VIEW3D_ALT_NAVIGATION (1 << 19)
|
||||
/* For properties performed when confirming the transformation. */
|
||||
#define P_POST_TRANSFORM (1 << 20)
|
||||
#define P_POST_TRANSFORM (1 << 19)
|
||||
|
||||
void Transform_Properties(wmOperatorType *ot, int flags);
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ struct rctf;
|
|||
struct rcti;
|
||||
struct wmEvent;
|
||||
struct wmGizmo;
|
||||
struct wmKeyMapItem;
|
||||
struct wmWindow;
|
||||
struct wmWindowManager;
|
||||
|
||||
|
@ -212,7 +213,7 @@ bool ED_view3d_depth_unproject_v3(const ARegion *region,
|
|||
*
|
||||
* \note modal map events can also be used in `ED_view3d_navigation_do`.
|
||||
*/
|
||||
ViewOpsData *ED_view3d_navigation_init(bContext *C, const bool use_alt_navigation);
|
||||
ViewOpsData *ED_view3d_navigation_init(bContext *C, const wmKeyMapItem *kmi_merge);
|
||||
bool ED_view3d_navigation_do(bContext *C,
|
||||
ViewOpsData *vod,
|
||||
const wmEvent *event,
|
||||
|
|
|
@ -404,7 +404,7 @@ struct ViewOpsData_Utility : ViewOpsData {
|
|||
/* Used by #ED_view3d_navigation_do. */
|
||||
bool is_modal_event;
|
||||
|
||||
ViewOpsData_Utility(bContext *C, const bool use_alt_navigation = false)
|
||||
ViewOpsData_Utility(bContext *C, const wmKeyMapItem *kmi_merge = nullptr)
|
||||
: ViewOpsData(), keymap_items(), is_modal_event(false)
|
||||
{
|
||||
this->init_context(C);
|
||||
|
@ -427,9 +427,31 @@ struct ViewOpsData_Utility : ViewOpsData {
|
|||
continue;
|
||||
}
|
||||
|
||||
wmKeyMapItem *kmi_copy = WM_keymap_add_item_copy(&keymap_tmp, kmi);
|
||||
if (use_alt_navigation) {
|
||||
kmi_copy->alt = true;
|
||||
wmKeyMapItem *kmi_cpy = WM_keymap_add_item_copy(&keymap_tmp, kmi);
|
||||
if (kmi_merge) {
|
||||
if (kmi_merge->shift == 1 || ELEM(kmi_merge->type, EVT_RIGHTSHIFTKEY, EVT_LEFTSHIFTKEY)) {
|
||||
kmi_cpy->shift = 1;
|
||||
}
|
||||
if (kmi_merge->ctrl == 1 || ELEM(kmi_merge->type, EVT_LEFTCTRLKEY, EVT_RIGHTCTRLKEY)) {
|
||||
kmi_cpy->ctrl = 1;
|
||||
}
|
||||
if (kmi_merge->alt == 1 || ELEM(kmi_merge->type, EVT_LEFTALTKEY, EVT_RIGHTALTKEY)) {
|
||||
kmi_cpy->alt = 1;
|
||||
}
|
||||
if (kmi_merge->oskey == 1 || ELEM(kmi_merge->type, EVT_OSKEY)) {
|
||||
kmi_cpy->oskey = 1;
|
||||
}
|
||||
if (!ELEM(kmi_merge->type,
|
||||
EVT_LEFTCTRLKEY,
|
||||
EVT_LEFTALTKEY,
|
||||
EVT_RIGHTALTKEY,
|
||||
EVT_RIGHTCTRLKEY,
|
||||
EVT_RIGHTSHIFTKEY,
|
||||
EVT_LEFTSHIFTKEY,
|
||||
EVT_OSKEY))
|
||||
{
|
||||
kmi_cpy->keymodifier |= kmi_merge->type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1037,13 +1059,13 @@ static const ViewOpsType *view3d_navigation_type_from_idname(const char *idname)
|
|||
|
||||
/* Unlike `viewops_data_create`, `ED_view3d_navigation_init` creates a navigation context along
|
||||
* with an array of `wmKeyMapItem`s used for navigation. */
|
||||
ViewOpsData *ED_view3d_navigation_init(bContext *C, const bool use_alt_navigation)
|
||||
ViewOpsData *ED_view3d_navigation_init(bContext *C, const wmKeyMapItem *kmi_merge)
|
||||
{
|
||||
if (!CTX_wm_region_view3d(C)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return new ViewOpsData_Utility(C, use_alt_navigation);
|
||||
return new ViewOpsData_Utility(C, kmi_merge);
|
||||
}
|
||||
|
||||
bool ED_view3d_navigation_do(bContext *C,
|
||||
|
|
|
@ -709,6 +709,8 @@ static bool transform_modal_item_poll(const wmOperator *op, int value)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case TFM_MODAL_PASSTHROUGH_NAVIGATE:
|
||||
return t->vod != nullptr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -763,6 +765,7 @@ wmKeyMap *transform_modal_keymap(wmKeyConfig *keyconf)
|
|||
{TFM_MODAL_AUTOCONSTRAINT, "AUTOCONSTRAIN", 0, "Automatic Constraint", ""},
|
||||
{TFM_MODAL_AUTOCONSTRAINTPLANE, "AUTOCONSTRAINPLANE", 0, "Automatic Constraint Plane", ""},
|
||||
{TFM_MODAL_PRECISION, "PRECISION", 0, "Precision Mode", ""},
|
||||
{TFM_MODAL_PASSTHROUGH_NAVIGATE, "PASSTHROUGH_NAVIGATE", 0, "Navigate", ""},
|
||||
{0, nullptr, 0, nullptr, nullptr},
|
||||
};
|
||||
|
||||
|
|
|
@ -283,6 +283,8 @@ enum {
|
|||
|
||||
TFM_MODAL_EDIT_SNAP_SOURCE_ON = 34,
|
||||
TFM_MODAL_EDIT_SNAP_SOURCE_OFF = 35,
|
||||
|
||||
TFM_MODAL_PASSTHROUGH_NAVIGATE = 36,
|
||||
};
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -644,18 +644,6 @@ static bool fcu_test_selected(FCurve *fcu)
|
|||
return false;
|
||||
}
|
||||
|
||||
static void invert_snap(eSnapMode &snap_mode)
|
||||
{
|
||||
if (snap_mode & SCE_SNAP_TO_FRAME) {
|
||||
snap_mode &= ~SCE_SNAP_TO_FRAME;
|
||||
snap_mode |= SCE_SNAP_TO_SECOND;
|
||||
}
|
||||
else if (snap_mode & SCE_SNAP_TO_SECOND) {
|
||||
snap_mode &= ~SCE_SNAP_TO_SECOND;
|
||||
snap_mode |= SCE_SNAP_TO_FRAME;
|
||||
}
|
||||
}
|
||||
|
||||
/* This function is called on recalc_data to apply the transforms applied
|
||||
* to the transdata on to the actual keyframe data
|
||||
*/
|
||||
|
@ -668,10 +656,6 @@ static void flushTransGraphData(TransInfo *t)
|
|||
|
||||
eSnapMode snap_mode = t->tsnap.mode;
|
||||
|
||||
if (t->modifiers & MOD_SNAP_INVERT) {
|
||||
invert_snap(snap_mode);
|
||||
}
|
||||
|
||||
TransDataContainer *tc = TRANS_DATA_CONTAINER_FIRST_SINGLE(t);
|
||||
/* flush to 2d vector from internally used 3d vector */
|
||||
for (a = 0,
|
||||
|
|
|
@ -687,9 +687,20 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
|
|||
TFM_EDGE_SLIDE,
|
||||
TFM_VERT_SLIDE))
|
||||
{
|
||||
const bool use_alt_navigation = (prop = RNA_struct_find_property(op->ptr, "alt_navigation")) &&
|
||||
RNA_property_boolean_get(op->ptr, prop);
|
||||
t->vod = ED_view3d_navigation_init(C, use_alt_navigation);
|
||||
wmWindowManager *wm = CTX_wm_manager(C);
|
||||
wmKeyMap *keymap = WM_keymap_active(wm, op->type->modalkeymap);
|
||||
const wmKeyMapItem *kmi_passthrough = nullptr;
|
||||
LISTBASE_FOREACH (const wmKeyMapItem *, kmi, &keymap->items) {
|
||||
if (kmi->flag & KMI_INACTIVE) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (kmi->propvalue == TFM_MODAL_PASSTHROUGH_NAVIGATE) {
|
||||
kmi_passthrough = kmi;
|
||||
break;
|
||||
}
|
||||
}
|
||||
t->vod = ED_view3d_navigation_init(C, kmi_passthrough);
|
||||
}
|
||||
|
||||
setTransformViewMatrices(t);
|
||||
|
|
|
@ -807,12 +807,6 @@ void Transform_Properties(wmOperatorType *ot, int flags)
|
|||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
}
|
||||
|
||||
if (flags & P_VIEW3D_ALT_NAVIGATION) {
|
||||
prop = RNA_def_boolean(
|
||||
ot->srna, "alt_navigation", false, "Transform Navigation with Alt", nullptr);
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
}
|
||||
|
||||
if (flags & P_POST_TRANSFORM) {
|
||||
prop = RNA_def_boolean(ot->srna,
|
||||
"use_automerge_and_split",
|
||||
|
@ -847,7 +841,7 @@ static void TRANSFORM_OT_translate(wmOperatorType *ot)
|
|||
Transform_Properties(ot,
|
||||
P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_ALIGN_SNAP |
|
||||
P_OPTIONS | P_GPENCIL_EDIT | P_CURSOR_EDIT | P_VIEW2D_EDGE_PAN |
|
||||
P_VIEW3D_ALT_NAVIGATION | P_POST_TRANSFORM);
|
||||
P_POST_TRANSFORM);
|
||||
}
|
||||
|
||||
static void TRANSFORM_OT_resize(wmOperatorType *ot)
|
||||
|
@ -886,7 +880,7 @@ static void TRANSFORM_OT_resize(wmOperatorType *ot)
|
|||
|
||||
Transform_Properties(ot,
|
||||
P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP |
|
||||
P_OPTIONS | P_GPENCIL_EDIT | P_CENTER | P_VIEW3D_ALT_NAVIGATION);
|
||||
P_OPTIONS | P_GPENCIL_EDIT | P_CENTER);
|
||||
}
|
||||
|
||||
static void TRANSFORM_OT_skin_resize(wmOperatorType *ot)
|
||||
|
@ -963,7 +957,7 @@ static void TRANSFORM_OT_rotate(wmOperatorType *ot)
|
|||
|
||||
Transform_Properties(ot,
|
||||
P_ORIENT_AXIS | P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR |
|
||||
P_GEO_SNAP | P_GPENCIL_EDIT | P_CENTER | P_VIEW3D_ALT_NAVIGATION);
|
||||
P_GEO_SNAP | P_GPENCIL_EDIT | P_CENTER);
|
||||
}
|
||||
|
||||
static void TRANSFORM_OT_tilt(wmOperatorType *ot)
|
||||
|
@ -1102,7 +1096,7 @@ static void TRANSFORM_OT_shrink_fatten(wmOperatorType *ot)
|
|||
|
||||
WM_operatortype_props_advanced_begin(ot);
|
||||
|
||||
Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_VIEW3D_ALT_NAVIGATION);
|
||||
Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP);
|
||||
}
|
||||
|
||||
static void TRANSFORM_OT_tosphere(wmOperatorType *ot)
|
||||
|
@ -1208,7 +1202,7 @@ static void TRANSFORM_OT_edge_slide(wmOperatorType *ot)
|
|||
"When Even mode is active, flips between the two adjacent edge loops");
|
||||
RNA_def_boolean(ot->srna, "use_clamp", true, "Clamp", "Clamp within the edge extents");
|
||||
|
||||
Transform_Properties(ot, P_MIRROR | P_GEO_SNAP | P_CORRECT_UV | P_VIEW3D_ALT_NAVIGATION);
|
||||
Transform_Properties(ot, P_MIRROR | P_GEO_SNAP | P_CORRECT_UV);
|
||||
}
|
||||
|
||||
static void TRANSFORM_OT_vert_slide(wmOperatorType *ot)
|
||||
|
@ -1243,7 +1237,7 @@ static void TRANSFORM_OT_vert_slide(wmOperatorType *ot)
|
|||
"When Even mode is active, flips between the two adjacent edge loops");
|
||||
RNA_def_boolean(ot->srna, "use_clamp", true, "Clamp", "Clamp within the edge extents");
|
||||
|
||||
Transform_Properties(ot, P_MIRROR | P_GEO_SNAP | P_CORRECT_UV | P_VIEW3D_ALT_NAVIGATION);
|
||||
Transform_Properties(ot, P_MIRROR | P_GEO_SNAP | P_CORRECT_UV);
|
||||
}
|
||||
|
||||
static void TRANSFORM_OT_edge_crease(wmOperatorType *ot)
|
||||
|
@ -1391,8 +1385,8 @@ static void TRANSFORM_OT_transform(wmOperatorType *ot)
|
|||
|
||||
Transform_Properties(ot,
|
||||
P_ORIENT_AXIS | P_ORIENT_MATRIX | P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR |
|
||||
P_ALIGN_SNAP | P_GPENCIL_EDIT | P_CENTER | P_VIEW3D_ALT_NAVIGATION |
|
||||
P_POST_TRANSFORM | P_OPTIONS);
|
||||
P_ALIGN_SNAP | P_GPENCIL_EDIT | P_CENTER | P_POST_TRANSFORM |
|
||||
P_OPTIONS);
|
||||
}
|
||||
|
||||
static int transform_from_gizmo_invoke(bContext *C, wmOperator * /*op*/, const wmEvent *event)
|
||||
|
|
|
@ -129,10 +129,28 @@ bool validSnap(const TransInfo *t)
|
|||
|
||||
void transform_snap_flag_from_modifiers_set(TransInfo *t)
|
||||
{
|
||||
if (ELEM(t->spacetype, SPACE_GRAPH, SPACE_ACTION, SPACE_NLA)) {
|
||||
if (ELEM(t->spacetype, SPACE_ACTION, SPACE_NLA)) {
|
||||
/* Those space-types define their own invert behavior instead of toggling it on/off. */
|
||||
return;
|
||||
}
|
||||
if (t->spacetype == SPACE_GRAPH) {
|
||||
/* This is to stay consistent with the behavior from 3.6. */
|
||||
if (t->modifiers & MOD_SNAP_INVERT) {
|
||||
t->tsnap.mode |= SCE_SNAP_TO_INCREMENT;
|
||||
}
|
||||
else {
|
||||
t->tsnap.mode &= ~SCE_SNAP_TO_INCREMENT;
|
||||
}
|
||||
/* In 3.6 when snapping was disabled, pressing the invert button would turn on snapping.
|
||||
* But it wouldn't turn it off when it was enabled. */
|
||||
if ((t->modifiers & MOD_SNAP) || (t->modifiers & MOD_SNAP_INVERT)) {
|
||||
t->tsnap.flag |= SCE_SNAP;
|
||||
}
|
||||
else {
|
||||
t->tsnap.flag &= ~SCE_SNAP;
|
||||
}
|
||||
return;
|
||||
}
|
||||
SET_FLAG_FROM_TEST(t->tsnap.flag,
|
||||
(((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) == MOD_SNAP) ||
|
||||
((t->modifiers & (MOD_SNAP | MOD_SNAP_INVERT)) == MOD_SNAP_INVERT)),
|
||||
|
|
|
@ -140,7 +140,7 @@ bool MTLCommandBufferManager::submit(bool wait)
|
|||
MTL_LOG_WARNING(
|
||||
"Maximum number of command buffers in flight. Host will wait until GPU work has "
|
||||
"completed. Consider increasing GHOST_ContextCGL::max_command_buffer_count or reducing "
|
||||
"work fragmentation to better utilise system hardware. Command buffers are flushed upon "
|
||||
"work fragmentation to better utilize system hardware. Command buffers are flushed upon "
|
||||
"GPUContext switches, this is the most common cause of excessive command buffer "
|
||||
"generation.");
|
||||
}
|
||||
|
|
|
@ -936,7 +936,7 @@ bool MTLFrameBuffer::add_color_attachment(gpu::MTLTexture *texture,
|
|||
}
|
||||
else {
|
||||
MTL_LOG_ERROR(
|
||||
"Passing in null texture to MTLFrameBuffer::addColourAttachment (This could be due to not "
|
||||
"Passing in null texture to MTLFrameBuffer::add_color_attachment (This could be due to not "
|
||||
"all texture types being supported).");
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -34,18 +34,18 @@ static bool imb_is_grayscale_texture_format_compatible(const ImBuf *ibuf)
|
|||
if (IMB_colormanagement_space_is_srgb(ibuf->byte_buffer.colorspace) ||
|
||||
IMB_colormanagement_space_is_scene_linear(ibuf->byte_buffer.colorspace))
|
||||
{
|
||||
/* Gresycale byte buffers with these color transforms utilise float buffers under the hood
|
||||
/* Grey-scale byte buffers with these color transforms utilize float buffers under the hood
|
||||
* and can therefore be optimized. */
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
/* TODO: Support grayscale byte buffers.
|
||||
/* TODO: Support gray-scale byte buffers.
|
||||
* The challenge is that Blender always stores byte images as RGBA. */
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* Only imbufs with colorspace that do not modify the chrominance of the texture data relative
|
||||
/* Only #IMBuf's with color-space that do not modify the chrominance of the texture data relative
|
||||
* to the scene color space can be uploaded as single channel textures. */
|
||||
if (IMB_colormanagement_space_is_data(ibuf->float_buffer.colorspace) ||
|
||||
IMB_colormanagement_space_is_srgb(ibuf->float_buffer.colorspace) ||
|
||||
|
|
|
@ -222,6 +222,7 @@ static void import_startjob(void *customdata, wmJobWorkerStatus *worker_status)
|
|||
|
||||
WM_main_add_notifier(NC_SCENE | ND_LAYER, nullptr);
|
||||
|
||||
BKE_view_layer_synced_ensure(data->scene, data->view_layer);
|
||||
data->view_layer->active_collection = BKE_layer_collection_first_from_scene_collection(
|
||||
data->view_layer, import_collection);
|
||||
}
|
||||
|
|
|
@ -9091,8 +9091,15 @@ PyDoc_STRVAR(pyrna_unregister_class_doc,
|
|||
"\n"
|
||||
" Unload the Python class from blender.\n"
|
||||
"\n"
|
||||
" If the class has an *unregister* class method it will be called\n"
|
||||
" before unregistering.\n");
|
||||
" :arg cls: Blender type class, \n"
|
||||
" see :mod:`bpy.utils.register_class` for classes which can \n"
|
||||
" be registered.\n"
|
||||
" :type cls: class\n"
|
||||
"\n"
|
||||
" .. note::\n"
|
||||
"\n"
|
||||
" If the class has an *unregister* class method it will be called\n"
|
||||
" before unregistering.\n");
|
||||
PyMethodDef meth_bpy_unregister_class = {
|
||||
"unregister_class",
|
||||
pyrna_unregister_class,
|
||||
|
|
Loading…
Reference in New Issue