Fix: Inconsistent input drag editing for factor properties #112004

Open
Guillermo Venegas wants to merge 5 commits from guishe/blender:fix-mouse-drag-edit-factor into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
385 changed files with 3395 additions and 8087 deletions
Showing only changes of commit 8d428fb120 - Show all commits

View File

@ -335,8 +335,8 @@ static void ExportCurveSegments(Scene *scene, Hair *hair, ParticleCurveData *CDa
if (attr_normal) {
/* NOTE: the geometry normals are not computed for legacy particle hairs. This hair
* system is expected to be discarded. */
attr_normal->add(make_float3(1.0f, 0.0f, 0.0f));
* system is expected to be deprecated. */
attr_normal->add(make_float3(0.0f, 0.0f, 0.0f));
}
num_curve_keys++;

View File

@ -172,29 +172,27 @@ static PyObject *create_func(PyObject * /*self*/, PyObject *args)
/* RNA */
ID *bScreen = (ID *)PyLong_AsVoidPtr(pyscreen);
PointerRNA engineptr;
RNA_pointer_create(NULL, &RNA_RenderEngine, (void *)PyLong_AsVoidPtr(pyengine), &engineptr);
PointerRNA engineptr = RNA_pointer_create(
NULL, &RNA_RenderEngine, (void *)PyLong_AsVoidPtr(pyengine));
BL::RenderEngine engine(engineptr);
PointerRNA preferencesptr;
RNA_pointer_create(
NULL, &RNA_Preferences, (void *)PyLong_AsVoidPtr(pypreferences), &preferencesptr);
PointerRNA preferencesptr = RNA_pointer_create(
NULL, &RNA_Preferences, (void *)PyLong_AsVoidPtr(pypreferences));
BL::Preferences preferences(preferencesptr);
PointerRNA dataptr;
RNA_main_pointer_create((Main *)PyLong_AsVoidPtr(pydata), &dataptr);
PointerRNA dataptr = RNA_main_pointer_create((Main *)PyLong_AsVoidPtr(pydata));
BL::BlendData data(dataptr);
PointerRNA regionptr;
RNA_pointer_create(bScreen, &RNA_Region, pylong_as_voidptr_typesafe(pyregion), &regionptr);
PointerRNA regionptr = RNA_pointer_create(
bScreen, &RNA_Region, pylong_as_voidptr_typesafe(pyregion));
BL::Region region(regionptr);
PointerRNA v3dptr;
RNA_pointer_create(bScreen, &RNA_SpaceView3D, pylong_as_voidptr_typesafe(pyv3d), &v3dptr);
PointerRNA v3dptr = RNA_pointer_create(
bScreen, &RNA_SpaceView3D, pylong_as_voidptr_typesafe(pyv3d));
BL::SpaceView3D v3d(v3dptr);
PointerRNA rv3dptr;
RNA_pointer_create(bScreen, &RNA_RegionView3D, pylong_as_voidptr_typesafe(pyrv3d), &rv3dptr);
PointerRNA rv3dptr = RNA_pointer_create(
bScreen, &RNA_RegionView3D, pylong_as_voidptr_typesafe(pyrv3d));
BL::RegionView3D rv3d(rv3dptr);
/* create session */
@ -231,8 +229,8 @@ static PyObject *render_func(PyObject * /*self*/, PyObject *args)
BlenderSession *session = (BlenderSession *)PyLong_AsVoidPtr(pysession);
PointerRNA depsgraphptr;
RNA_pointer_create(NULL, &RNA_Depsgraph, (ID *)PyLong_AsVoidPtr(pydepsgraph), &depsgraphptr);
PointerRNA depsgraphptr = RNA_pointer_create(
NULL, &RNA_Depsgraph, (ID *)PyLong_AsVoidPtr(pydepsgraph));
BL::Depsgraph b_depsgraph(depsgraphptr);
/* Allow Blender to execute other Python scripts. */
@ -277,11 +275,8 @@ static PyObject *draw_func(PyObject * /*self*/, PyObject *args)
ID *b_screen = (ID *)PyLong_AsVoidPtr(py_screen);
PointerRNA b_space_image_ptr;
RNA_pointer_create(b_screen,
&RNA_SpaceImageEditor,
pylong_as_voidptr_typesafe(py_space_image),
&b_space_image_ptr);
PointerRNA b_space_image_ptr = RNA_pointer_create(
b_screen, &RNA_SpaceImageEditor, pylong_as_voidptr_typesafe(py_space_image));
BL::SpaceImageEditor b_space_image(b_space_image_ptr);
session->draw(b_space_image);
@ -309,12 +304,11 @@ static PyObject *bake_func(PyObject * /*self*/, PyObject *args)
BlenderSession *session = (BlenderSession *)PyLong_AsVoidPtr(pysession);
PointerRNA depsgraphptr;
RNA_pointer_create(NULL, &RNA_Depsgraph, PyLong_AsVoidPtr(pydepsgraph), &depsgraphptr);
PointerRNA depsgraphptr = RNA_pointer_create(
NULL, &RNA_Depsgraph, PyLong_AsVoidPtr(pydepsgraph));
BL::Depsgraph b_depsgraph(depsgraphptr);
PointerRNA objectptr;
RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyobject), &objectptr);
PointerRNA objectptr = RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyobject));
BL::Object b_object(objectptr);
python_thread_state_save(&session->python_thread_state);
@ -355,12 +349,11 @@ static PyObject *reset_func(PyObject * /*self*/, PyObject *args)
BlenderSession *session = (BlenderSession *)PyLong_AsVoidPtr(pysession);
PointerRNA dataptr;
RNA_main_pointer_create((Main *)PyLong_AsVoidPtr(pydata), &dataptr);
PointerRNA dataptr = RNA_main_pointer_create((Main *)PyLong_AsVoidPtr(pydata));
BL::BlendData b_data(dataptr);
PointerRNA depsgraphptr;
RNA_pointer_create(NULL, &RNA_Depsgraph, PyLong_AsVoidPtr(pydepsgraph), &depsgraphptr);
PointerRNA depsgraphptr = RNA_pointer_create(
NULL, &RNA_Depsgraph, PyLong_AsVoidPtr(pydepsgraph));
BL::Depsgraph b_depsgraph(depsgraphptr);
python_thread_state_save(&session->python_thread_state);
@ -381,8 +374,8 @@ static PyObject *sync_func(PyObject * /*self*/, PyObject *args)
BlenderSession *session = (BlenderSession *)PyLong_AsVoidPtr(pysession);
PointerRNA depsgraphptr;
RNA_pointer_create(NULL, &RNA_Depsgraph, PyLong_AsVoidPtr(pydepsgraph), &depsgraphptr);
PointerRNA depsgraphptr = RNA_pointer_create(
NULL, &RNA_Depsgraph, PyLong_AsVoidPtr(pydepsgraph));
BL::Depsgraph b_depsgraph(depsgraphptr);
python_thread_state_save(&session->python_thread_state);
@ -439,15 +432,12 @@ static PyObject *osl_update_node_func(PyObject * /*self*/, PyObject *args)
return NULL;
/* RNA */
PointerRNA dataptr;
RNA_main_pointer_create((Main *)PyLong_AsVoidPtr(pydata), &dataptr);
PointerRNA dataptr = RNA_main_pointer_create((Main *)PyLong_AsVoidPtr(pydata));
BL::BlendData b_data(dataptr);
PointerRNA nodeptr;
RNA_pointer_create((ID *)PyLong_AsVoidPtr(pynodegroup),
&RNA_ShaderNodeScript,
(void *)PyLong_AsVoidPtr(pynode),
&nodeptr);
PointerRNA nodeptr = RNA_pointer_create((ID *)PyLong_AsVoidPtr(pynodegroup),
&RNA_ShaderNodeScript,
(void *)PyLong_AsVoidPtr(pynode));
BL::ShaderNodeScript b_node(nodeptr);
/* update bytecode hash */
@ -747,23 +737,18 @@ static PyObject *denoise_func(PyObject * /*self*/, PyObject *args, PyObject *key
}
/* Get device specification from preferences and scene. */
PointerRNA preferencesptr;
RNA_pointer_create(
NULL, &RNA_Preferences, (void *)PyLong_AsVoidPtr(pypreferences), &preferencesptr);
PointerRNA preferencesptr = RNA_pointer_create(
NULL, &RNA_Preferences, (void *)PyLong_AsVoidPtr(pypreferences));
BL::Preferences b_preferences(preferencesptr);
PointerRNA sceneptr;
RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyscene), &sceneptr);
PointerRNA sceneptr = RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyscene));
BL::Scene b_scene(sceneptr);
DeviceInfo device = blender_device_info(b_preferences, b_scene, true, true);
/* Get denoising parameters from view layer. */
PointerRNA viewlayerptr;
RNA_pointer_create((ID *)PyLong_AsVoidPtr(pyscene),
&RNA_ViewLayer,
PyLong_AsVoidPtr(pyviewlayer),
&viewlayerptr);
PointerRNA viewlayerptr = RNA_pointer_create(
(ID *)PyLong_AsVoidPtr(pyscene), &RNA_ViewLayer, PyLong_AsVoidPtr(pyviewlayer));
BL::ViewLayer b_view_layer(viewlayerptr);
DenoiseParams params = BlenderSync::get_denoise_params(b_scene, b_view_layer, true);
@ -851,8 +836,7 @@ static PyObject *debug_flags_update_func(PyObject * /*self*/, PyObject *args)
return NULL;
}
PointerRNA sceneptr;
RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyscene), &sceneptr);
PointerRNA sceneptr = RNA_id_pointer_create((ID *)PyLong_AsVoidPtr(pyscene));
BL::Scene b_scene(sceneptr);
debug_flags_sync_from_scene(b_scene);

View File

@ -120,8 +120,7 @@ void BlenderSync::sync_recalc(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d
if (geom->is_mesh()) {
Mesh *mesh = static_cast<Mesh *>(geom);
if (mesh->get_subdivision_type() != Mesh::SUBDIVISION_NONE) {
PointerRNA id_ptr;
RNA_id_pointer_create((::ID *)iter.first.id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create((::ID *)iter.first.id);
geometry_map.set_recalc(BL::ID(id_ptr));
}
}

View File

@ -147,7 +147,7 @@ ccl_device_inline
}
#ifdef __SHADOW_LINKING__
if (intersection_skip_shadow_link(kg, ray, prim_object)) {
if (intersection_skip_shadow_link(kg, ray->self, prim_object)) {
continue;
}
#endif

View File

@ -132,7 +132,7 @@ ccl_device_noinline bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg,
}
#ifdef __SHADOW_LINKING__
if (intersection_skip_shadow_link(kg, ray, prim_object)) {
if (intersection_skip_shadow_link(kg, ray->self, prim_object)) {
continue;
}
#endif

View File

@ -255,15 +255,15 @@ ccl_device_inline bool intersection_skip_self_local(ccl_ray_data const RaySelfPr
}
#ifdef __SHADOW_LINKING__
ccl_device_inline uint64_t ray_get_shadow_set_membership(KernelGlobals kg,
ccl_private const Ray *ray)
ccl_device_inline uint64_t
ray_get_shadow_set_membership(KernelGlobals kg, ccl_ray_data const RaySelfPrimitives &self)
{
if (ray->self.light != LAMP_NONE) {
return kernel_data_fetch(lights, ray->self.light).shadow_set_membership;
if (self.light != LAMP_NONE) {
return kernel_data_fetch(lights, self.light).shadow_set_membership;
}
if (ray->self.light_object != OBJECT_NONE) {
return kernel_data_fetch(objects, ray->self.light_object).shadow_set_membership;
if (self.light_object != OBJECT_NONE) {
return kernel_data_fetch(objects, self.light_object).shadow_set_membership;
}
return LIGHT_LINK_MASK_ALL;
@ -271,7 +271,7 @@ ccl_device_inline uint64_t ray_get_shadow_set_membership(KernelGlobals kg,
#endif
ccl_device_inline bool intersection_skip_shadow_link(KernelGlobals kg,
ccl_private const Ray *ray,
ccl_ray_data const RaySelfPrimitives &self,
const int isect_object)
{
#ifdef __SHADOW_LINKING__
@ -279,7 +279,7 @@ ccl_device_inline bool intersection_skip_shadow_link(KernelGlobals kg,
return false;
}
const uint64_t set_membership = ray_get_shadow_set_membership(kg, ray);
const uint64_t set_membership = ray_get_shadow_set_membership(kg, self);
if (set_membership == LIGHT_LINK_MASK_ALL) {
return false;
}

View File

@ -211,11 +211,18 @@ ccl_device int bsdf_hair_huang_setup(ccl_private ShaderData *sd,
/* Align local frame with the ray direction so that `phi_i == 0`. */
bsdf->N = X;
}
kernel_assert(!is_zero(bsdf->N) && isfinite_safe(bsdf->N));
/* Fill extra closure. */
bsdf->extra->Z = safe_normalize(cross(bsdf->N, sd->dPdu));
bsdf->extra->Y = safe_normalize(cross(bsdf->extra->Z, bsdf->N));
if (is_zero(bsdf->N) || !isfinite_safe(bsdf->N)) {
bsdf->extra->Y = Y;
/* Construct arbitrary local coordinate system. The implementation should ensure smooth
* transition along the hair shaft. */
make_orthonormals(Y, &bsdf->extra->Z, &bsdf->N);
}
else {
bsdf->extra->Z = safe_normalize(cross(bsdf->N, sd->dPdu));
bsdf->extra->Y = safe_normalize(cross(bsdf->extra->Z, bsdf->N));
}
const float3 I = make_float3(
dot(sd->wi, bsdf->N), dot(sd->wi, bsdf->extra->Y), dot(sd->wi, bsdf->extra->Z));

View File

@ -298,7 +298,7 @@ ccl_device_forceinline void kernel_embree_filter_intersection_func_impl(
}
#ifdef __SHADOW_LINKING__
if (intersection_skip_shadow_link(kg, cray, kernel_embree_get_hit_object(hit))) {
if (intersection_skip_shadow_link(kg, cray->self, kernel_embree_get_hit_object(hit))) {
*args->valid = 0;
return;
}
@ -339,7 +339,7 @@ ccl_device_forceinline void kernel_embree_filter_occluded_shadow_all_func_impl(
}
#ifdef __SHADOW_LINKING__
if (intersection_skip_shadow_link(kg, cray, current_isect.object)) {
if (intersection_skip_shadow_link(kg, cray->self, current_isect.object)) {
*args->valid = 0;
return;
}

View File

@ -53,7 +53,7 @@ TReturn metalrt_local_hit(constant KernelParamsMetal &launch_params_metal,
if ((object != payload.local_object) || context.intersection_skip_self_local(payload.self, prim))
{
/* Only intersect with matching object and skip self-intersecton. */
/* Only intersect with matching object and skip self-intersection. */
result.accept = false;
result.continue_search = true;
return result;
@ -132,10 +132,10 @@ __anyhit__cycles_metalrt_local_hit_tri_prim(
float2 barycentrics [[barycentric_coord]],
float ray_tmax [[distance]])
{
// instance_id, aka the user_id has been removed. If we take this function we optimized the
// SSS for starting traversal from a primitive acceleration structure instead of the root of the
// global AS. this means we will always be intersecting the correct object no need for the userid
// to check
/* instance_id, aka the user_id has been removed. If we take this function we optimized the
* SSS for starting traversal from a primitive acceleration structure instead of the root of the
* global AS. this means we will always be intersecting the correct object no need for the
* user-id to check */
return metalrt_local_hit<TriangleIntersectionResult, METALRT_HIT_TRIANGLE>(
launch_params_metal, payload, payload.local_object, primitive_id, barycentrics, ray_tmax);
}
@ -218,6 +218,13 @@ bool metalrt_shadow_all_hit(constant KernelParamsMetal &launch_params_metal,
return true;
}
# ifdef __SHADOW_LINKING__
if (context.intersection_skip_shadow_link(nullptr, payload.self, object)) {
/* continue search */
return true;
}
# endif
# ifndef __TRANSPARENT_SHADOWS__
/* No transparent shadows support compiled in, make opaque. */
payload.result = true;
@ -372,6 +379,14 @@ inline TReturnType metalrt_visibility_test(
/* Shadow ray early termination. */
if (visibility & PATH_RAY_SHADOW_OPAQUE) {
# ifdef __SHADOW_LINKING__
if (context.intersection_skip_shadow_link(nullptr, payload.self, object)) {
result.accept = false;
result.continue_search = true;
return result;
}
# endif
if (context.intersection_skip_self_shadow(payload.self, object, prim)) {
result.accept = false;
result.continue_search = true;

View File

@ -185,7 +185,7 @@ extern "C" __global__ void __anyhit__kernel_optix_shadow_all_hit()
}
# ifdef __SHADOW_LINKING__
if (intersection_skip_shadow_link(nullptr, ray, object)) {
if (intersection_skip_shadow_link(nullptr, ray->self, object)) {
return optixIgnoreIntersection();
}
# endif
@ -334,7 +334,7 @@ extern "C" __global__ void __anyhit__kernel_optix_visibility_test()
if (visibility & PATH_RAY_SHADOW_OPAQUE) {
#ifdef __SHADOW_LINKING__
if (intersection_skip_shadow_link(nullptr, ray, object)) {
if (intersection_skip_shadow_link(nullptr, ray->self, object)) {
return optixIgnoreIntersection();
}
#endif

View File

@ -28,7 +28,7 @@ ccl_device bool ray_sphere_intersect(float3 ray_P,
return false;
}
const float d_sin_theta_sq = d_sq - d_cos_theta * d_cos_theta;
const float d_sin_theta_sq = len_squared(d_vec - d_cos_theta * ray_D);
if (d_sin_theta_sq > r_sq) {
/* Closest point on ray outside sphere. */

View File

@ -11,6 +11,7 @@
*/
#include <stdexcept>
#include <vector>
#include "GHOST_ISystem.hh"
#include "GHOST_SystemHeadless.hh"
@ -37,10 +38,15 @@ GHOST_TBacktraceFn GHOST_ISystem::m_backtrace_fn = nullptr;
GHOST_TSuccess GHOST_ISystem::createSystem(bool verbose, [[maybe_unused]] bool background)
{
/* When GHOST fails to start, report the back-ends that were attempted.
* A Verbose argument could be supported in printing isn't always desired. */
const char *backends_attempted[8] = {nullptr};
int backends_attempted_num = 0;
struct GHOST_BackendInfo {
const char *id = nullptr;
/** The cause of the failure. */
std::string failure_msg;
};
std::vector<GHOST_BackendInfo> backends_attempted;
GHOST_TSuccess success;
if (!m_system) {
@ -60,13 +66,13 @@ GHOST_TSuccess GHOST_ISystem::createSystem(bool verbose, [[maybe_unused]] bool b
#elif defined(WITH_GHOST_X11) && defined(WITH_GHOST_WAYLAND)
/* Special case, try Wayland, fall back to X11. */
if (has_wayland_libraries) {
backends_attempted[backends_attempted_num++] = "WAYLAND";
backends_attempted.push_back({"WAYLAND"});
try {
m_system = new GHOST_SystemWayland(background);
}
catch (const std::runtime_error &e) {
if (verbose) {
fprintf(stderr, "GHOST: %s\n", e.what());
backends_attempted.back().failure_msg = e.what();
}
delete m_system;
m_system = nullptr;
@ -81,33 +87,39 @@ GHOST_TSuccess GHOST_ISystem::createSystem(bool verbose, [[maybe_unused]] bool b
if (!m_system) {
/* Try to fallback to X11. */
backends_attempted[backends_attempted_num++] = "X11";
backends_attempted.push_back({"X11"});
try {
m_system = new GHOST_SystemX11();
}
catch (const std::runtime_error &) {
catch (const std::runtime_error &e) {
if (verbose) {
backends_attempted.back().failure_msg = e.what();
}
delete m_system;
m_system = nullptr;
}
}
#elif defined(WITH_GHOST_X11)
backends_attempted[backends_attempted_num++] = "X11";
backends_attempted.push_back({"X11"});
try {
m_system = new GHOST_SystemX11();
}
catch (const std::runtime_error &) {
catch (const std::runtime_error &e) {
if (verbose) {
backends_attempted.back().failure_msg = e.what();
}
delete m_system;
m_system = nullptr;
}
#elif defined(WITH_GHOST_WAYLAND)
if (has_wayland_libraries) {
backends_attempted[backends_attempted_num++] = "WAYLAND";
backends_attempted.push_back({"WAYLAND"});
try {
m_system = new GHOST_SystemWayland(background);
}
catch (const std::runtime_error &e) {
if (verbose) {
fprintf(stderr, "GHOST: %s\n", e.what());
backends_attempted.back().failure_msg = e.what();
}
delete m_system;
m_system = nullptr;
@ -120,36 +132,53 @@ GHOST_TSuccess GHOST_ISystem::createSystem(bool verbose, [[maybe_unused]] bool b
m_system = nullptr;
}
#elif defined(WITH_GHOST_SDL)
backends_attempted[backends_attempted_num++] = "SDL";
backends_attempted.push_back({"SDL"});
try {
m_system = new GHOST_SystemSDL();
}
catch (const std::runtime_error &) {
catch (const std::runtime_error &e) {
if (verbose) {
backends_attempted.back().failure_msg = e.what();
}
delete m_system;
m_system = nullptr;
}
#elif defined(WIN32)
backends_attempted[backends_attempted_num++] = "WIN32";
backends_attempted.push_back({"WIN32"});
m_system = new GHOST_SystemWin32();
#elif defined(__APPLE__)
backends_attempted[backends_attempted_num++] = "COCOA";
backends_attempted.push_back({"COCOA"});
m_system = new GHOST_SystemCocoa();
#endif
if (m_system) {
m_system_backend_id = backends_attempted[backends_attempted_num - 1];
m_system_backend_id = backends_attempted.back().id;
}
else if (verbose) {
bool show_messages = false;
fprintf(stderr, "GHOST: failed to initialize display for back-end(s): [");
for (int i = 0; i < backends_attempted_num; i++) {
for (int i = 0; i < backends_attempted.size(); i++) {
const GHOST_BackendInfo &backend_item = backends_attempted[i];
if (i != 0) {
fprintf(stderr, ", ");
}
fprintf(stderr, "'%s'", backends_attempted[i]);
fprintf(stderr, "'%s'", backend_item.id);
if (!backend_item.failure_msg.empty()) {
show_messages = true;
}
}
fprintf(stderr, "]\n");
if (show_messages) {
for (int i = 0; i < backends_attempted.size(); i++) {
const GHOST_BackendInfo &backend_item = backends_attempted[i];
fprintf(stderr,
" '%s': %s\n",
backend_item.id,
backend_item.failure_msg.empty() ? "<unknown>" :
backend_item.failure_msg.c_str());
}
}
}
success = m_system != nullptr ? GHOST_kSuccess : GHOST_kFailure;
}
else {

View File

@ -23,7 +23,7 @@
GHOST_SystemSDL::GHOST_SystemSDL() : GHOST_System()
{
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) != 0) {
throw std::runtime_error("Error initializing SDL: " + std::string(SDL_GetError()));
throw std::runtime_error(SDL_GetError());
}
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

View File

@ -3736,7 +3736,8 @@ static void keyboard_handle_keymap(void *data,
char *map_str = static_cast<char *>(mmap(nullptr, size, PROT_READ, MAP_PRIVATE, fd, 0));
if (map_str == MAP_FAILED) {
close(fd);
throw std::runtime_error("keymap mmap failed: " + std::string(std::strerror(errno)));
CLOG_INFO(LOG, 2, "keymap mmap failed: %s", std::strerror(errno));
return;
}
xkb_keymap *keymap = xkb_keymap_new_from_string(
@ -5596,7 +5597,7 @@ GHOST_SystemWayland::GHOST_SystemWayland(bool background)
display_->wl.display = wl_display_connect(nullptr);
if (!display_->wl.display) {
display_destroy_and_free_all();
throw std::runtime_error("Wayland: unable to connect to display!");
throw std::runtime_error("unable to connect to display!");
}
/* This may be removed later if decorations are required, needed as part of registration. */
@ -5649,7 +5650,7 @@ GHOST_SystemWayland::GHOST_SystemWayland(bool background)
"falling back to X11\n");
# endif
display_destroy_and_free_all();
throw std::runtime_error("Wayland: unable to find libdecor!");
throw std::runtime_error("unable to find libdecor!");
}
}
else {
@ -5664,7 +5665,7 @@ GHOST_SystemWayland::GHOST_SystemWayland(bool background)
decor.context = libdecor_new(display_->wl.display, &libdecor_interface);
if (!decor.context) {
display_destroy_and_free_all();
throw std::runtime_error("Wayland: unable to create window decorations!");
throw std::runtime_error("unable to create window decorations!");
}
}
else
@ -5675,7 +5676,7 @@ GHOST_SystemWayland::GHOST_SystemWayland(bool background)
const GWL_XDG_Decor_System &decor = *display_->xdg_decor;
if (!decor.shell) {
display_destroy_and_free_all();
throw std::runtime_error("Wayland: unable to access xdg_shell!");
throw std::runtime_error("unable to access xdg_shell!");
}
}

View File

@ -114,7 +114,7 @@ GHOST_SystemX11::GHOST_SystemX11()
m_display = XOpenDisplay(nullptr);
if (!m_display) {
throw std::runtime_error("X11: Unable to open a display");
throw std::runtime_error("unable to open a display!");
}
#ifdef USE_X11_ERROR_HANDLERS

View File

@ -153,7 +153,13 @@ class GHOST_XrGraphicsBindingOpenGL : public GHOST_IXrGraphicsBinding {
# if defined(WITH_GHOST_X11)
/* #GHOST_SystemX11. */
oxr_binding.egl.type = XR_TYPE_GRAPHICS_BINDING_EGL_MNDX;
oxr_binding.egl.getProcAddress = eglGetProcAddress;
# if XR_CURRENT_API_VERSION >= XR_MAKE_VERSION(1, 0, 29)
oxr_binding.egl.getProcAddress = reinterpret_cast<PFN_xrEglGetProcAddressMNDX>(
eglGetProcAddress);
# else
oxr_binding.egl.getProcAddress = reinterpret_cast<PFNEGLGETPROCADDRESSPROC>(
eglGetProcAddress);
# endif
oxr_binding.egl.display = ctx_egl.getDisplay();
oxr_binding.egl.config = ctx_egl.getConfig();
oxr_binding.egl.context = ctx_egl.getContext();

View File

@ -673,17 +673,18 @@ def preset_find(name, preset_path, *, display_name=False, ext=".py"):
def keyconfig_init():
# Key configuration initialization and refresh, called from the Blender
# window manager on startup and refresh.
default_config = "Blender"
active_config = _preferences.keymap.active_keyconfig
# Load the default key configuration.
default_filepath = preset_find("Blender", "keyconfig")
keyconfig_set(default_filepath)
filepath = preset_find(default_config, "keyconfig")
keyconfig_set(filepath)
# Set the active key configuration if different
filepath = preset_find(active_config, "keyconfig")
if filepath and filepath != default_filepath:
keyconfig_set(filepath)
# Set the active key configuration if different.
if default_config != active_config:
filepath = preset_find(active_config, "keyconfig")
if filepath:
keyconfig_set(filepath)
def keyconfig_set(filepath, *, report=None):
@ -693,6 +694,10 @@ def keyconfig_set(filepath, *, report=None):
print("loading preset:", filepath)
keyconfigs = _bpy.context.window_manager.keyconfigs
name = splitext(basename(filepath))[0]
# Store the old key-configuration case of error, to know if it should be removed or not on failure.
kc_old = keyconfigs.get(name)
try:
error_msg = ""
@ -701,14 +706,13 @@ def keyconfig_set(filepath, *, report=None):
import traceback
error_msg = traceback.format_exc()
name = splitext(basename(filepath))[0]
kc_new = keyconfigs.get(name)
if error_msg:
if report is not None:
report({'ERROR'}, error_msg)
print(error_msg)
if kc_new is not None:
if (kc_new is not None) and (kc_new != kc_old):
keyconfigs.remove(kc_new)
return False

View File

@ -22,6 +22,26 @@ def guess_player_path(preset):
test_path = "/Applications/DJV2.app/Contents/Resources/bin/djv"
if os.path.exists(test_path):
player_path = test_path
elif sys.platform == "win32":
import winreg
# NOTE: This can be removed if/when DJV adds their executable to the PATH.
# See issue 449 on their GITHUB project page.
reg_path = r"SOFTWARE\Classes\djv\shell\open\command"
reg_value = None
try:
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, reg_path, 0, winreg.KEY_READ) as regkey:
reg_value = winreg.QueryValue(regkey, None)
except OSError:
pass
if reg_value:
# Remove trailing command line arguments from the path. The
# registry value looks like: `<full path>\djv.exe "%1"`.
binary = "djv.exe"
index = reg_value.find(binary)
if index > 0:
player_path = reg_value[:index + len(binary)]
elif preset == 'FRAMECYCLER':
player_path = "framecycler"

View File

@ -360,6 +360,7 @@ class NODE_MT_geometry_node_GEO_MESH_READ(Menu):
node_add_menu.add_node_type(layout, "GeometryNodeToolFaceSet")
node_add_menu.add_node_type(layout, "GeometryNodeInputMeshFaceIsPlanar")
node_add_menu.add_node_type(layout, "GeometryNodeInputShadeSmooth")
node_add_menu.add_node_type(layout, "GeometryNodeInputEdgeSmooth")
node_add_menu.add_node_type(layout, "GeometryNodeInputMeshIsland")
node_add_menu.add_node_type(layout, "GeometryNodeInputShortestEdgePaths")
node_add_menu.add_node_type(layout, "GeometryNodeInputMeshVertexNeighbors")

View File

@ -238,7 +238,7 @@ class DATA_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel):
class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Armature

View File

@ -486,8 +486,7 @@ class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_property_type = bpy.types.Bone, bpy.types.EditBone, bpy.types.PoseBone
@property

View File

@ -29,8 +29,7 @@ class CAMERA_PT_presets(PresetPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
class CAMERA_PT_safe_areas_presets(PresetPanel, Panel):
@ -42,8 +41,7 @@ class CAMERA_PT_safe_areas_presets(PresetPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
class DATA_PT_context_camera(CameraButtonsPanel, Panel):
@ -53,8 +51,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -76,8 +73,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -124,7 +120,7 @@ class DATA_PT_lens(CameraButtonsPanel, Panel):
col.prop(cam, "fisheye_polynomial_k3", text="K3")
col.prop(cam, "fisheye_polynomial_k4", text="K4")
elif engine in {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}:
elif engine in {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'}:
if cam.lens_unit == 'MILLIMETERS':
col.prop(cam, "lens")
elif cam.lens_unit == 'FOV':
@ -150,8 +146,7 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -204,8 +199,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header_preset(self, _context):
CAMERA_PT_presets.draw_panel_header(self.layout)
@ -235,7 +229,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
bl_label = "Depth of Field"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'}
def draw_header(self, context):
cam = context.camera
@ -262,7 +256,7 @@ class DATA_PT_camera_dof(CameraButtonsPanel, Panel):
class DATA_PT_camera_dof_aperture(CameraButtonsPanel, Panel):
bl_label = "Aperture"
bl_parent_id = "DATA_PT_camera_dof"
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -290,8 +284,7 @@ class DATA_PT_camera_background_image(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
cam = context.camera
@ -402,8 +395,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -440,8 +432,7 @@ class DATA_PT_camera_display_composition_guides(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -472,8 +463,7 @@ class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
cam = context.camera
@ -507,8 +497,7 @@ class DATA_PT_camera_safe_areas_center_cut(CameraButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
cam = context.camera
@ -536,8 +525,7 @@ class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Camera

View File

@ -123,8 +123,7 @@ class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -502,8 +501,7 @@ class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Curve

View File

@ -25,8 +25,7 @@ class DATA_PT_context_curves(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -47,8 +46,7 @@ class DATA_PT_curves_surface(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -135,8 +133,7 @@ class DATA_PT_CURVES_attributes(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
curves = context.curves
@ -165,8 +162,7 @@ class DATA_PT_custom_props_curves(DataButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Curves if hasattr(bpy.types, "Curves") else None

View File

@ -71,8 +71,7 @@ class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Lattice

View File

@ -26,8 +26,7 @@ class DATA_PT_context_light(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE_NEXT',
'BLENDER_EEVEE',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -53,7 +52,7 @@ class DATA_PT_preview(DataButtonsPanel, Panel):
class DATA_PT_light(DataButtonsPanel, Panel):
bl_label = "Light"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -244,8 +243,7 @@ class DATA_PT_spot(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE_NEXT',
'BLENDER_EEVEE',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -272,8 +270,7 @@ class DATA_PT_custom_props_light(DataButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE_NEXT',
'BLENDER_EEVEE',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Light

View File

@ -163,7 +163,7 @@ class MeshButtonsPanel:
class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
bl_label = ""
bl_options = {'HIDE_HEADER'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -181,7 +181,7 @@ class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
class DATA_PT_normals(MeshButtonsPanel, Panel):
bl_label = "Normals"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -203,7 +203,7 @@ class DATA_PT_normals(MeshButtonsPanel, Panel):
class DATA_PT_texture_space(MeshButtonsPanel, Panel):
bl_label = "Texture Space"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -223,7 +223,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, Panel):
class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
bl_label = "Vertex Groups"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -279,7 +279,7 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
bl_label = "Shape Keys"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -376,7 +376,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
bl_label = "UV Maps"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -396,7 +396,7 @@ class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
class DATA_PT_remesh(MeshButtonsPanel, Panel):
bl_label = "Remesh"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -426,7 +426,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
class DATA_PT_customdata(MeshButtonsPanel, Panel):
bl_label = "Geometry Data"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -446,7 +446,7 @@ class DATA_PT_customdata(MeshButtonsPanel, Panel):
class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Mesh
@ -495,7 +495,7 @@ class MESH_UL_attributes(UIList):
class DATA_PT_mesh_attributes(MeshButtonsPanel, Panel):
bl_label = "Attributes"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
mesh = context.mesh
@ -620,7 +620,7 @@ class MESH_UL_color_attributes_selector(UIList, ColorAttributesListBase):
class DATA_PT_vertex_colors(DATA_PT_mesh_attributes, Panel):
bl_label = "Color Attributes"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
mesh = context.mesh

View File

@ -63,8 +63,7 @@ class DATA_PT_mball_texture_space(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -123,8 +122,7 @@ class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.MetaBall

View File

@ -23,19 +23,21 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
def draw(self, _context):
layout = self.layout
layout.operator("wm.call_menu", text="Add Modifier", icon='ADD').name="OBJECT_MT_modifier_add"
layout.operator("wm.call_menu", text="Add Modifier", icon='ADD').name = "OBJECT_MT_modifier_add"
layout.template_modifiers()
class OBJECT_MT_modifier_add(Menu):
bl_label = "Add Modifier"
bl_options = {'SEARCH_ON_KEY_PRESS'}
def draw(self, context):
layout = self.layout
ob_type = context.object.type
geometry_nodes_supported = ob_type in {'MESH', 'CURVE', 'CURVES', 'FONT', 'SURFACE', 'VOLUME', 'POINTCLOUD'}
if geometry_nodes_supported:
layout.operator("object.modifier_add", text="Empty Modifier").type='NODES'
layout.operator("object.modifier_add", text="Empty Modifier").type = 'NODES'
layout.separator()
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
layout.menu("OBJECT_MT_modifier_add_edit")
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'VOLUME'}:
@ -56,19 +58,43 @@ class OBJECT_MT_modifier_add_edit(Menu):
layout = self.layout
ob_type = context.object.type
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Data Transfer", icon='MOD_DATA_TRANSFER').type='DATA_TRANSFER'
layout.operator(
"object.modifier_add",
text="Data Transfer",
icon='MOD_DATA_TRANSFER',
).type = 'DATA_TRANSFER'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
layout.operator("object.modifier_add", text="Mesh Cache", icon='MOD_MESHDEFORM').type='MESH_CACHE'
layout.operator("object.modifier_add", text="Mesh Cache", icon='MOD_MESHDEFORM').type = 'MESH_CACHE'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
layout.operator("object.modifier_add", text="Mesh Sequence Cache", icon='MOD_MESHDEFORM').type='MESH_SEQUENCE_CACHE'
layout.operator(
"object.modifier_add",
text="Mesh Sequence Cache",
icon='MOD_MESHDEFORM',
).type = 'MESH_SEQUENCE_CACHE'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Normal Edit", icon='MOD_NORMALEDIT').type='NORMAL_EDIT'
layout.operator("object.modifier_add", text="Weighted Normal", icon='MOD_NORMALEDIT').type='WEIGHTED_NORMAL'
layout.operator("object.modifier_add", text="UV Project", icon='MOD_UVPROJECT').type='UV_PROJECT'
layout.operator("object.modifier_add", text="UV Warp", icon='MOD_UVPROJECT').type='UV_WARP'
layout.operator("object.modifier_add", text="Vertex Weight Edit", icon='MOD_VERTEX_WEIGHT').type='VERTEX_WEIGHT_EDIT'
layout.operator("object.modifier_add", text="Vertex Weight Mix", icon='MOD_VERTEX_WEIGHT').type='VERTEX_WEIGHT_MIX'
layout.operator("object.modifier_add", text="Vertex Weight Proximity", icon='MOD_VERTEX_WEIGHT').type='VERTEX_WEIGHT_PROXIMITY'
layout.operator("object.modifier_add", text="Normal Edit", icon='MOD_NORMALEDIT').type = 'NORMAL_EDIT'
layout.operator(
"object.modifier_add",
text="Weighted Normal",
icon='MOD_NORMALEDIT',
).type = 'WEIGHTED_NORMAL'
layout.operator("object.modifier_add", text="UV Project", icon='MOD_UVPROJECT').type = 'UV_PROJECT'
layout.operator("object.modifier_add", text="UV Warp", icon='MOD_UVPROJECT').type = 'UV_WARP'
layout.operator(
"object.modifier_add",
text="Vertex Weight Edit",
icon='MOD_VERTEX_WEIGHT',
).type = 'VERTEX_WEIGHT_EDIT'
layout.operator(
"object.modifier_add",
text="Vertex Weight Mix",
icon='MOD_VERTEX_WEIGHT',
).type = 'VERTEX_WEIGHT_MIX'
layout.operator(
"object.modifier_add",
text="Vertex Weight Proximity",
icon='MOD_VERTEX_WEIGHT',
).type = 'VERTEX_WEIGHT_PROXIMITY'
layout.template_modifier_asset_menu_items(catalog_path=self.bl_label)
@ -79,37 +105,37 @@ class OBJECT_MT_modifier_add_generate(Menu):
layout = self.layout
ob_type = context.object.type
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
layout.operator("object.modifier_add", text="Array", icon='MOD_ARRAY').type='ARRAY'
layout.operator("object.modifier_add", text="Bevel", icon='MOD_BEVEL').type='BEVEL'
layout.operator("object.modifier_add", text="Array", icon='MOD_ARRAY').type = 'ARRAY'
layout.operator("object.modifier_add", text="Bevel", icon='MOD_BEVEL').type = 'BEVEL'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Boolean", icon='MOD_BOOLEAN').type='BOOLEAN'
layout.operator("object.modifier_add", text="Boolean", icon='MOD_BOOLEAN').type = 'BOOLEAN'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
layout.operator("object.modifier_add", text="Build", icon='MOD_BUILD').type='BUILD'
layout.operator("object.modifier_add", text="Decimate", icon='MOD_DECIM').type='DECIMATE'
layout.operator("object.modifier_add", text="Edge Split", icon='MOD_EDGESPLIT').type='EDGE_SPLIT'
layout.operator("object.modifier_add", text="Build", icon='MOD_BUILD').type = 'BUILD'
layout.operator("object.modifier_add", text="Decimate", icon='MOD_DECIM').type = 'DECIMATE'
layout.operator("object.modifier_add", text="Edge Split", icon='MOD_EDGESPLIT').type = 'EDGE_SPLIT'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Mask", icon='MOD_MASK').type='MASK'
layout.operator("object.modifier_add", text="Mask", icon='MOD_MASK').type = 'MASK'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
layout.operator("object.modifier_add", text="Mirror", icon='MOD_MIRROR').type='MIRROR'
layout.operator("object.modifier_add", text="Mirror", icon='MOD_MIRROR').type = 'MIRROR'
if ob_type == 'VOLUME':
layout.operator("object.modifier_add", text="Mesh to Volume", icon='VOLUME_DATA').type='MESH_TO_VOLUME'
layout.operator("object.modifier_add", text="Mesh to Volume", icon='VOLUME_DATA').type = 'MESH_TO_VOLUME'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Multiresolution", icon='MOD_MULTIRES').type='MULTIRES'
layout.operator("object.modifier_add", text="Multiresolution", icon='MOD_MULTIRES').type = 'MULTIRES'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
layout.operator("object.modifier_add", text="Remesh", icon='MOD_REMESH').type='REMESH'
layout.operator("object.modifier_add", text="Screw", icon='MOD_SCREW').type='SCREW'
layout.operator("object.modifier_add", text="Remesh", icon='MOD_REMESH').type = 'REMESH'
layout.operator("object.modifier_add", text="Screw", icon='MOD_SCREW').type = 'SCREW'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Skin", icon='MOD_SKIN').type='SKIN'
layout.operator("object.modifier_add", text="Skin", icon='MOD_SKIN').type = 'SKIN'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
layout.operator("object.modifier_add", text="Solidify", icon='MOD_SOLIDIFY').type='SOLIDIFY'
layout.operator("object.modifier_add", text="Subdivision Surface", icon='MOD_SUBSURF').type='SUBSURF'
layout.operator("object.modifier_add", text="Triangulate", icon='MOD_TRIANGULATE').type='TRIANGULATE'
layout.operator("object.modifier_add", text="Solidify", icon='MOD_SOLIDIFY').type = 'SOLIDIFY'
layout.operator("object.modifier_add", text="Subdivision Surface", icon='MOD_SUBSURF').type = 'SUBSURF'
layout.operator("object.modifier_add", text="Triangulate", icon='MOD_TRIANGULATE').type = 'TRIANGULATE'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Volume to Mesh", icon='VOLUME_DATA').type='VOLUME_TO_MESH'
layout.operator("object.modifier_add", text="Volume to Mesh", icon='VOLUME_DATA').type = 'VOLUME_TO_MESH'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
layout.operator("object.modifier_add", text="Weld", icon='AUTOMERGE_OFF').type='WELD'
layout.operator("object.modifier_add", text="Weld", icon='AUTOMERGE_OFF').type = 'WELD'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Wireframe", icon='MOD_WIREFRAME').type='WIREFRAME'
layout.operator("object.modifier_add", text="Wireframe", icon='MOD_WIREFRAME').type = 'WIREFRAME'
layout.template_modifier_asset_menu_items(catalog_path=self.bl_label)
@ -120,31 +146,36 @@ class OBJECT_MT_modifier_add_deform(Menu):
layout = self.layout
ob_type = context.object.type
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
layout.operator("object.modifier_add", text="Armature", icon='MOD_ARMATURE').type='ARMATURE'
layout.operator("object.modifier_add", text="Cast", icon='MOD_CAST').type='CAST'
layout.operator("object.modifier_add", text="Curve", icon='MOD_CURVE').type='CURVE'
layout.operator("object.modifier_add", text="Armature", icon='MOD_ARMATURE').type = 'ARMATURE'
layout.operator("object.modifier_add", text="Cast", icon='MOD_CAST').type = 'CAST'
layout.operator("object.modifier_add", text="Curve", icon='MOD_CURVE').type = 'CURVE'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Displace", icon='MOD_DISPLACE').type='DISPLACE'
layout.operator("object.modifier_add", text="Displace", icon='MOD_DISPLACE').type = 'DISPLACE'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
layout.operator("object.modifier_add", text="Hook", icon='HOOK').type='HOOK'
layout.operator("object.modifier_add", text="Hook", icon='HOOK').type = 'HOOK'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Laplacian Deform", icon='MOD_MESHDEFORM').type='LAPLACIANDEFORM'
layout.operator("object.modifier_add", text="Laplacian Deform",
icon='MOD_MESHDEFORM').type = 'LAPLACIANDEFORM'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
layout.operator("object.modifier_add", text="Lattice", icon='MOD_LATTICE').type='LATTICE'
layout.operator("object.modifier_add", text="Mesh Deform", icon='MOD_MESHDEFORM').type='MESH_DEFORM'
layout.operator("object.modifier_add", text="Shrinkwrap", icon='MOD_SHRINKWRAP').type='SHRINKWRAP'
layout.operator("object.modifier_add", text="Simple Deform", icon='MOD_SIMPLEDEFORM').type='SIMPLE_DEFORM'
layout.operator("object.modifier_add", text="Lattice", icon='MOD_LATTICE').type = 'LATTICE'
layout.operator("object.modifier_add", text="Mesh Deform", icon='MOD_MESHDEFORM').type = 'MESH_DEFORM'
layout.operator("object.modifier_add", text="Shrinkwrap", icon='MOD_SHRINKWRAP').type = 'SHRINKWRAP'
layout.operator("object.modifier_add", text="Simple Deform", icon='MOD_SIMPLEDEFORM').type = 'SIMPLE_DEFORM'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE'}:
layout.operator("object.modifier_add", text="Smooth", icon='MOD_SMOOTH').type='SMOOTH'
layout.operator("object.modifier_add", text="Smooth", icon='MOD_SMOOTH').type = 'SMOOTH'
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Smooth Corrective", icon='MOD_SMOOTH').type='CORRECTIVE_SMOOTH'
layout.operator("object.modifier_add", text="Smooth Laplacian", icon='MOD_SMOOTH').type='LAPLACIANSMOOTH'
layout.operator("object.modifier_add", text="Surface Deform", icon='MOD_MESHDEFORM').type='SURFACE_DEFORM'
layout.operator(
"object.modifier_add",
text="Smooth Corrective",
icon='MOD_SMOOTH',
).type = 'CORRECTIVE_SMOOTH'
layout.operator("object.modifier_add", text="Smooth Laplacian", icon='MOD_SMOOTH').type = 'LAPLACIANSMOOTH'
layout.operator("object.modifier_add", text="Surface Deform", icon='MOD_MESHDEFORM').type = 'SURFACE_DEFORM'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
layout.operator("object.modifier_add", text="Warp", icon='MOD_WARP').type='WARP'
layout.operator("object.modifier_add", text="Wave", icon='MOD_WAVE').type='WAVE'
layout.operator("object.modifier_add", text="Warp", icon='MOD_WARP').type = 'WARP'
layout.operator("object.modifier_add", text="Wave", icon='MOD_WAVE').type = 'WAVE'
if ob_type == 'VOLUME':
layout.operator("object.modifier_add", text="Volume Displace", icon='VOLUME_DATA').type='VOLUME_DISPLACE'
layout.operator("object.modifier_add", text="Volume Displace", icon='VOLUME_DATA').type = 'VOLUME_DISPLACE'
layout.template_modifier_asset_menu_items(catalog_path=self.bl_label)
@ -155,16 +186,24 @@ class OBJECT_MT_modifier_add_physics(Menu):
layout = self.layout
ob_type = context.object.type
if ob_type == 'MESH':
layout.operator("object.modifier_add", text="Cloth", icon='MOD_CLOTH').type='CLOTH'
layout.operator("object.modifier_add", text="Collision", icon='MOD_PHYSICS').type='COLLISION'
layout.operator("object.modifier_add", text="Dynamic Paint", icon='MOD_DYNAMICPAINT').type='DYNAMIC_PAINT'
layout.operator("object.modifier_add", text="Explode", icon='MOD_EXPLODE').type='EXPLODE'
layout.operator("object.modifier_add", text="Fluid", icon='MOD_FLUIDSIM').type='FLUID'
layout.operator("object.modifier_add", text="Ocean", icon='MOD_OCEAN').type='OCEAN'
layout.operator("object.modifier_add", text="Particle Instance", icon='MOD_PARTICLE_INSTANCE').type='PARTICLE_INSTANCE'
layout.operator("object.modifier_add", text="Particle System", icon='MOD_PARTICLES').type='PARTICLE_SYSTEM'
layout.operator("object.modifier_add", text="Cloth", icon='MOD_CLOTH').type = 'CLOTH'
layout.operator("object.modifier_add", text="Collision", icon='MOD_PHYSICS').type = 'COLLISION'
layout.operator("object.modifier_add", text="Dynamic Paint", icon='MOD_DYNAMICPAINT').type = 'DYNAMIC_PAINT'
layout.operator("object.modifier_add", text="Explode", icon='MOD_EXPLODE').type = 'EXPLODE'
layout.operator("object.modifier_add", text="Fluid", icon='MOD_FLUIDSIM').type = 'FLUID'
layout.operator("object.modifier_add", text="Ocean", icon='MOD_OCEAN').type = 'OCEAN'
layout.operator(
"object.modifier_add",
text="Particle Instance",
icon='MOD_PARTICLE_INSTANCE',
).type = 'PARTICLE_INSTANCE'
layout.operator(
"object.modifier_add",
text="Particle System",
icon='MOD_PARTICLES',
).type = 'PARTICLE_SYSTEM'
if ob_type in {'MESH', 'CURVE', 'FONT', 'SURFACE', 'LATTICE'}:
layout.operator("object.modifier_add", text="Soft Body", icon='MOD_SOFT').type='SOFT_BODY'
layout.operator("object.modifier_add", text="Soft Body", icon='MOD_SOFT').type = 'SOFT_BODY'
layout.template_modifier_asset_menu_items(catalog_path=self.bl_label)
@ -189,7 +228,7 @@ class AddModifierMenu(Operator):
@classmethod
def poll(cls, context):
space = context.space_data
return space and space.context == "MODIFIER"
return space and space.type == 'PROPERTIES' and space.context == "MODIFIER"
def invoke(self, context, event):
return bpy.ops.wm.call_menu(name="OBJECT_MT_modifier_add")

View File

@ -25,8 +25,7 @@ class DATA_PT_context_pointcloud(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -109,8 +108,7 @@ class DATA_PT_pointcloud_attributes(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
pointcloud = context.pointcloud
@ -139,8 +137,7 @@ class DATA_PT_custom_props_pointcloud(DataButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.PointCloud if hasattr(bpy.types, "PointCloud") else None

View File

@ -25,8 +25,7 @@ class DATA_PT_context_speaker(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -47,8 +46,7 @@ class DATA_PT_speaker(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -74,8 +72,7 @@ class DATA_PT_distance(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -103,8 +100,7 @@ class DATA_PT_cone(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -130,8 +126,7 @@ class DATA_PT_custom_props_speaker(DataButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Speaker

View File

@ -25,8 +25,7 @@ class DATA_PT_context_volume(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -47,8 +46,7 @@ class DATA_PT_volume_file(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -97,8 +95,7 @@ class DATA_PT_volume_grids(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -115,8 +112,7 @@ class DATA_PT_volume_render(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -152,8 +148,7 @@ class DATA_PT_volume_viewport_display(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -181,8 +176,7 @@ class DATA_PT_volume_viewport_display_slicing(DataButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
layout = self.layout
@ -212,8 +206,7 @@ class DATA_PT_custom_props_volume(DataButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "object.data"
_property_type = bpy.types.Volume

View File

@ -24,7 +24,7 @@ class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
bl_label = "Freestyle"
bl_options = {'DEFAULT_CLOSED'}
bl_order = 10
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw_header(self, context):
rd = context.scene.render
@ -82,7 +82,7 @@ class ViewLayerFreestyleEditorButtonsPanel(ViewLayerFreestyleButtonsPanel):
class ViewLayerFreestyleLineStyle(ViewLayerFreestyleEditorButtonsPanel):
# Freestyle Linestyle Panels
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -126,7 +126,7 @@ class RENDER_MT_lineset_context_menu(Menu):
class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel):
bl_label = "Freestyle"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw_header(self, context):
view_layer = context.view_layer
@ -156,7 +156,7 @@ class VIEWLAYER_PT_freestyle(ViewLayerFreestyleButtonsPanel, Panel):
class VIEWLAYER_PT_freestyle_edge_detection(ViewLayerFreestyleButtonsPanel, Panel):
bl_label = "Edge Detection"
bl_parent_id = "VIEWLAYER_PT_freestyle"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -186,7 +186,7 @@ class VIEWLAYER_PT_freestyle_edge_detection(ViewLayerFreestyleButtonsPanel, Pane
class VIEWLAYER_PT_freestyle_style_modules(ViewLayerFreestyleButtonsPanel, Panel):
bl_label = "Style Modules"
bl_parent_id = "VIEWLAYER_PT_freestyle"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -222,7 +222,7 @@ class VIEWLAYER_PT_freestyle_style_modules(ViewLayerFreestyleButtonsPanel, Panel
class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel):
bl_label = "Freestyle Line Set"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw_edge_type_buttons(self, box, lineset, edge_type):
# property names
@ -285,7 +285,7 @@ class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel
class VIEWLAYER_PT_freestyle_lineset_visibilty(ViewLayerFreestyleLineStyle, Panel):
bl_label = "Visibility"
bl_parent_id = "VIEWLAYER_PT_freestyle_lineset"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw_header(self, context):
layout = self.layout
@ -319,7 +319,7 @@ class VIEWLAYER_PT_freestyle_lineset_visibilty(ViewLayerFreestyleLineStyle, Pane
class VIEWLAYER_PT_freestyle_lineset_edgetype(ViewLayerFreestyleLineStyle, Panel):
bl_label = "Edge Type"
bl_parent_id = "VIEWLAYER_PT_freestyle_lineset"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw_header(self, context):
layout = self.layout
@ -369,7 +369,7 @@ class VIEWLAYER_PT_freestyle_lineset_edgetype(ViewLayerFreestyleLineStyle, Panel
class VIEWLAYER_PT_freestyle_lineset_facemarks(ViewLayerFreestyleLineStyle, Panel):
bl_label = "Face Marks"
bl_parent_id = "VIEWLAYER_PT_freestyle_lineset"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
bl_options = {'DEFAULT_CLOSED'}
def draw_header(self, context):
@ -398,7 +398,7 @@ class VIEWLAYER_PT_freestyle_lineset_facemarks(ViewLayerFreestyleLineStyle, Pane
class VIEWLAYER_PT_freestyle_lineset_collection(ViewLayerFreestyleLineStyle, Panel):
bl_label = "Collection"
bl_parent_id = "VIEWLAYER_PT_freestyle_lineset"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
bl_options = {'DEFAULT_CLOSED'}
def draw_header(self, context):
@ -1239,7 +1239,7 @@ class MaterialFreestyleButtonsPanel:
class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel):
bl_label = "Freestyle Line"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout

View File

@ -68,8 +68,7 @@ class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "material"
_property_type = bpy.types.Material
@ -78,7 +77,7 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
bl_label = ""
bl_context = "material"
bl_options = {'HIDE_HEADER'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):

View File

@ -231,7 +231,7 @@ class MATERIAL_PT_gpencil_preview(GPMaterialButtonsPanel, Panel):
class MATERIAL_PT_gpencil_custom_props(GPMaterialButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
_context_path = "object.active_material"
_property_type = bpy.types.Material

View File

@ -370,7 +370,7 @@ class OBJECT_PT_motion_paths_display(MotionPathButtonsPanel_display, Panel):
class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
bl_label = "Visibility"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -399,7 +399,7 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
_context_path = "object"
_property_type = bpy.types.Object

View File

@ -49,8 +49,7 @@ class RENDER_PT_format(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_frame_rate_args_prev = None
_preset_class = None
@ -132,8 +131,7 @@ class RENDER_PT_frame_range(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -156,8 +154,7 @@ class RENDER_PT_time_stretching(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -178,8 +175,7 @@ class RENDER_PT_post_processing(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -201,8 +197,7 @@ class RENDER_PT_stamp(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -240,8 +235,7 @@ class RENDER_PT_stamp_note(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
rd = context.scene.render
@ -265,8 +259,7 @@ class RENDER_PT_stamp_burn(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
rd = context.scene.render
@ -294,8 +287,7 @@ class RENDER_PT_output(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -328,8 +320,7 @@ class RENDER_PT_output_views(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -353,8 +344,7 @@ class RENDER_PT_output_color_management(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
scene = context.scene
@ -393,8 +383,7 @@ class RENDER_PT_encoding(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header_preset(self, _context):
RENDER_PT_ffmpeg_presets.draw_panel_header(self.layout)
@ -423,8 +412,7 @@ class RENDER_PT_encoding_video(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -504,8 +492,7 @@ class RENDER_PT_encoding_audio(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -551,8 +538,7 @@ class RENDER_PT_stereoscopy(RenderOutputButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
bl_options = {'DEFAULT_CLOSED'}
def draw_header(self, context):

View File

@ -59,8 +59,7 @@ class PARTICLE_MT_context_menu(Menu):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -103,8 +102,7 @@ class PARTICLE_PT_hair_dynamics_presets(PresetPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
class ParticleButtonsPanel:
@ -162,8 +160,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -261,8 +258,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -318,8 +314,7 @@ class PARTICLE_PT_emission_source(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -360,8 +355,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -448,8 +442,7 @@ class PARTICLE_PT_hair_dynamics_collision(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -485,8 +478,7 @@ class PARTICLE_PT_hair_dynamics_structure(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -521,8 +513,7 @@ class PARTICLE_PT_hair_dynamics_volume(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -557,8 +548,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -595,8 +585,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -649,8 +638,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -709,8 +697,7 @@ class PARTICLE_PT_rotation_angular_velocity(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -739,8 +726,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -797,8 +783,7 @@ class PARTICLE_PT_physics_fluid_advanced(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -847,8 +832,7 @@ class PARTICLE_PT_physics_fluid_springs(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -876,8 +860,7 @@ class PARTICLE_PT_physics_fluid_springs_viscoelastic(ParticleButtonsPanel, Panel
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -917,8 +900,7 @@ class PARTICLE_PT_physics_fluid_springs_advanced(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -946,8 +928,7 @@ class PARTICLE_PT_physics_boids_movement(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1004,8 +985,7 @@ class PARTICLE_PT_physics_boids_battle(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1036,8 +1016,7 @@ class PARTICLE_PT_physics_boids_misc(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1066,8 +1045,7 @@ class PARTICLE_PT_physics_relations(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1126,8 +1104,7 @@ class PARTICLE_PT_physics_fluid_interaction(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1172,8 +1149,7 @@ class PARTICLE_PT_physics_deflection(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1203,8 +1179,7 @@ class PARTICLE_PT_physics_forces(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1235,8 +1210,7 @@ class PARTICLE_PT_physics_integration(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1274,8 +1248,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1377,8 +1350,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1429,8 +1401,7 @@ class PARTICLE_PT_render_extra(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1458,8 +1429,7 @@ class PARTICLE_PT_render_path(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1485,8 +1455,7 @@ class PARTICLE_PT_render_path_timing(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1518,8 +1487,7 @@ class PARTICLE_PT_render_object(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1548,8 +1516,7 @@ class PARTICLE_PT_render_collection(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1583,8 +1550,7 @@ class PARTICLE_PT_render_collection_use_count(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1636,8 +1602,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1700,8 +1665,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1758,8 +1722,7 @@ class PARTICLE_PT_children_parting(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1794,8 +1757,7 @@ class PARTICLE_PT_children_clumping(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1835,8 +1797,7 @@ class PARTICLE_PT_children_clumping_noise(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
@ -1864,8 +1825,7 @@ class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1910,8 +1870,7 @@ class PARTICLE_PT_children_kink(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1965,8 +1924,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1991,8 +1949,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -2012,8 +1969,7 @@ class PARTICLE_PT_force_fields_type1(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -2034,8 +1990,7 @@ class PARTICLE_PT_force_fields_type2(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -2057,8 +2012,7 @@ class PARTICLE_PT_force_fields_type1_falloff(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -2078,8 +2032,7 @@ class PARTICLE_PT_force_fields_type2_falloff(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -2098,8 +2051,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -2192,8 +2144,7 @@ class PARTICLE_PT_textures(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -2229,8 +2180,7 @@ class PARTICLE_PT_hair_shape(ParticleButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -2262,8 +2212,7 @@ class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "particle_system.settings"
_property_type = bpy.types.ParticleSettings

View File

@ -41,8 +41,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header_preset(self, _context):
CLOTH_PT_presets.draw_panel_header(self.layout)
@ -71,8 +70,7 @@ class PHYSICS_PT_cloth_physical_properties(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -100,8 +98,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -136,8 +133,7 @@ class PHYSICS_PT_cloth_damping(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -172,8 +168,7 @@ class PHYSICS_PT_cloth_internal_springs(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
cloth = context.cloth.settings
@ -219,8 +214,7 @@ class PHYSICS_PT_cloth_pressure(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
cloth = context.cloth.settings
@ -268,8 +262,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
md = context.cloth
@ -284,8 +277,7 @@ class PHYSICS_PT_cloth_shape(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -339,8 +331,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -364,8 +355,7 @@ class PHYSICS_PT_cloth_object_collision(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
cloth = context.cloth.collision_settings
@ -405,8 +395,7 @@ class PHYSICS_PT_cloth_self_collision(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
cloth = context.cloth.collision_settings
@ -447,8 +436,7 @@ class PHYSICS_PT_cloth_property_weights(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -506,8 +494,7 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
cloth = context.cloth.settings

View File

@ -57,8 +57,7 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout

View File

@ -89,8 +89,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -115,8 +114,7 @@ class PHYSICS_PT_dynamic_paint_settings(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -204,8 +202,7 @@ class PHYSICS_PT_dp_surface_canvas(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -272,8 +269,7 @@ class PHYSICS_PT_dp_surface_canvas_paint_dry(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -313,8 +309,7 @@ class PHYSICS_PT_dp_surface_canvas_paint_dissolve(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -355,8 +350,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -436,8 +430,7 @@ class PHYSICS_PT_dp_canvas_output_paintmaps(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -471,8 +464,7 @@ class PHYSICS_PT_dp_canvas_output_wetmaps(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -506,8 +498,7 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -551,8 +542,7 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -573,8 +563,7 @@ class PHYSICS_PT_dp_effects_spread(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -613,8 +602,7 @@ class PHYSICS_PT_dp_effects_drip(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -654,8 +642,7 @@ class PHYSICS_PT_dp_effects_drip_weights(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -683,8 +670,7 @@ class PHYSICS_PT_dp_effects_shrink(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -718,8 +704,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -743,8 +728,7 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -811,8 +795,7 @@ class PHYSICS_PT_dp_brush_source_color_ramp(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -843,8 +826,7 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -879,8 +861,7 @@ class PHYSICS_PT_dp_brush_velocity_color_ramp(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -905,8 +886,7 @@ class PHYSICS_PT_dp_brush_velocity_smudge(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -938,8 +918,7 @@ class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):

View File

@ -33,8 +33,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -60,8 +59,7 @@ class PHYSICS_PT_field_settings(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -152,8 +150,7 @@ class PHYSICS_PT_field_settings_kink(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -191,8 +188,7 @@ class PHYSICS_PT_field_settings_texture_select(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -218,8 +214,7 @@ class PHYSICS_PT_field_falloff(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -248,8 +243,7 @@ class PHYSICS_PT_field_falloff_angular(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -292,8 +286,7 @@ class PHYSICS_PT_field_falloff_radial(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -341,8 +334,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -377,8 +369,7 @@ class PHYSICS_PT_collision_particle(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -428,8 +419,7 @@ class PHYSICS_PT_collision_softbody(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):

View File

@ -102,8 +102,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -131,8 +130,7 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -299,8 +297,7 @@ class PHYSICS_PT_borders(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -337,8 +334,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -375,8 +371,7 @@ class PHYSICS_PT_smoke_dissolve(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -424,8 +419,7 @@ class PHYSICS_PT_fire(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -468,8 +462,7 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -536,8 +529,7 @@ class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -582,8 +574,7 @@ class PHYSICS_PT_flow_initial_velocity(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -629,8 +620,7 @@ class PHYSICS_PT_flow_texture(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -685,8 +675,7 @@ class PHYSICS_PT_adaptive_domain(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -742,8 +731,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -827,8 +815,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -927,8 +914,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1063,8 +1049,7 @@ class PHYSICS_PT_viscosity(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1108,8 +1093,7 @@ class PHYSICS_PT_diffusion(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1160,8 +1144,7 @@ class PHYSICS_PT_guide(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1231,8 +1214,7 @@ class PHYSICS_PT_collections(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1263,8 +1245,7 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1352,8 +1333,7 @@ class PHYSICS_PT_export(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1402,8 +1382,7 @@ class PHYSICS_PT_field_weights(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1596,8 +1575,7 @@ class PHYSICS_PT_fluid_domain_render(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):

View File

@ -25,8 +25,7 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -65,8 +64,7 @@ class PHYSICS_PT_rigid_body_settings(PHYSICS_PT_rigidbody_panel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -102,8 +100,7 @@ class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -157,8 +154,7 @@ class PHYSICS_PT_rigid_body_collisions_surface(PHYSICS_PT_rigidbody_panel, Panel
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -190,8 +186,7 @@ class PHYSICS_PT_rigid_body_collisions_sensitivity(PHYSICS_PT_rigidbody_panel, P
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -232,8 +227,7 @@ class PHYSICS_PT_rigid_body_collisions_collections(PHYSICS_PT_rigidbody_panel, P
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -259,8 +253,7 @@ class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -297,8 +290,7 @@ class PHYSICS_PT_rigid_body_dynamics_deactivation(PHYSICS_PT_rigidbody_panel, Pa
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):

View File

@ -19,8 +19,7 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -44,8 +43,7 @@ class PHYSICS_PT_rigid_body_constraint_settings(PHYSICS_PT_rigidbody_constraint_
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -80,8 +78,7 @@ class PHYSICS_PT_rigid_body_constraint_objects(PHYSICS_PT_rigidbody_constraint_p
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -106,8 +103,7 @@ class PHYSICS_PT_rigid_body_constraint_override_iterations(PHYSICS_PT_rigidbody_
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -137,8 +133,7 @@ class PHYSICS_PT_rigid_body_constraint_limits(PHYSICS_PT_rigidbody_constraint_pa
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -159,8 +154,7 @@ class PHYSICS_PT_rigid_body_constraint_limits_linear(PHYSICS_PT_rigidbody_constr
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -221,8 +215,7 @@ class PHYSICS_PT_rigid_body_constraint_limits_angular(PHYSICS_PT_rigidbody_const
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -292,8 +285,7 @@ class PHYSICS_PT_rigid_body_constraint_motor(PHYSICS_PT_rigidbody_constraint_pan
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -314,8 +306,7 @@ class PHYSICS_PT_rigid_body_constraint_motor_angular(PHYSICS_PT_rigidbody_constr
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -355,8 +346,7 @@ class PHYSICS_PT_rigid_body_constraint_motor_linear(PHYSICS_PT_rigidbody_constra
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -396,8 +386,7 @@ class PHYSICS_PT_rigid_body_constraint_springs(PHYSICS_PT_rigidbody_constraint_p
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -425,8 +414,7 @@ class PHYSICS_PT_rigid_body_constraint_springs_angular(PHYSICS_PT_rigidbody_cons
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -478,8 +466,7 @@ class PHYSICS_PT_rigid_body_constraint_springs_linear(PHYSICS_PT_rigidbody_const
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):

View File

@ -34,8 +34,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -55,8 +54,7 @@ class PHYSICS_PT_softbody_object(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -88,8 +86,7 @@ class PHYSICS_PT_softbody_simulation(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -111,8 +108,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
md = context.soft_body
@ -127,8 +123,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
softbody = context.soft_body.settings
@ -157,8 +152,7 @@ class PHYSICS_PT_softbody_goal_strengths(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -188,8 +182,7 @@ class PHYSICS_PT_softbody_goal_settings(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -216,8 +209,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
softbody = context.soft_body.settings
@ -272,8 +264,7 @@ class PHYSICS_PT_softbody_edge_aerodynamics(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -300,8 +291,7 @@ class PHYSICS_PT_softbody_edge_stiffness(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
softbody = context.soft_body.settings
@ -329,8 +319,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
softbody = context.soft_body.settings
@ -369,8 +358,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -399,8 +387,7 @@ class PHYSICS_PT_softbody_solver_diagnostics(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -423,8 +410,7 @@ class PHYSICS_PT_softbody_solver_helpers(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -451,8 +437,7 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
md = context.soft_body

View File

@ -54,8 +54,7 @@ class RENDER_PT_color_management(RenderButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
@ -93,8 +92,7 @@ class RENDER_PT_color_management_display_settings(RenderButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -124,8 +122,7 @@ class RENDER_PT_color_management_curves(RenderButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
@ -484,6 +481,26 @@ class RENDER_PT_eevee_next_volumetric_lighting(RenderButtonsPanel, Panel):
layout.active = props.use_volumetric_lights
layout.prop(props, "volumetric_light_clamp", text="Light Clamping")
class RENDER_PT_eevee_next_volumetric_shadows(RenderButtonsPanel, Panel):
bl_label = "Volumetric Shadows"
bl_parent_id = "RENDER_PT_eevee_next_volumetric"
COMPAT_ENGINES = {'BLENDER_EEVEE_NEXT'}
def draw_header(self, context):
scene = context.scene
props = scene.eevee
self.layout.prop(props, "use_volumetric_shadows", text="")
def draw(self, context):
layout = self.layout
layout.use_property_split = True
scene = context.scene
props = scene.eevee
layout.active = props.use_volumetric_shadows
layout.prop(props, "volumetric_shadow_samples", text="Samples")
class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel):
bl_label = "Subsurface Scattering"
@ -982,7 +999,7 @@ class RENDER_PT_eevee_hair(RenderButtonsPanel, Panel):
class RENDER_PT_eevee_performance(RenderButtonsPanel, Panel):
bl_label = "Performance"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1007,8 +1024,7 @@ class RENDER_PT_gpencil(RenderButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -1024,7 +1040,7 @@ class RENDER_PT_gpencil(RenderButtonsPanel, Panel):
class RENDER_PT_opengl_sampling(RenderButtonsPanel, Panel):
bl_label = "Sampling"
COMPAT_ENGINES = {'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1046,7 +1062,7 @@ class RENDER_PT_opengl_sampling(RenderButtonsPanel, Panel):
class RENDER_PT_opengl_film(RenderButtonsPanel, Panel):
bl_label = "Film"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -1059,7 +1075,7 @@ class RENDER_PT_opengl_film(RenderButtonsPanel, Panel):
class RENDER_PT_opengl_lighting(RenderButtonsPanel, Panel):
bl_label = "Lighting"
COMPAT_ENGINES = {'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1071,7 +1087,7 @@ class RENDER_PT_opengl_lighting(RenderButtonsPanel, Panel):
class RENDER_PT_opengl_color(RenderButtonsPanel, Panel):
bl_label = "Color"
COMPAT_ENGINES = {'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1083,7 +1099,7 @@ class RENDER_PT_opengl_color(RenderButtonsPanel, Panel):
class RENDER_PT_opengl_options(RenderButtonsPanel, Panel):
bl_label = "Options"
COMPAT_ENGINES = {'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -1100,8 +1116,7 @@ class RENDER_PT_simplify(RenderButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
rd = context.scene.render
@ -1118,8 +1133,7 @@ class RENDER_PT_simplify_viewport(RenderButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -1152,8 +1166,7 @@ class RENDER_PT_simplify_render(RenderButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -1185,7 +1198,7 @@ class RENDER_PT_simplify_greasepencil(RenderButtonsPanel, Panel, GreasePencilSim
'BLENDER_CLAY',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT',
'BLENDER_WORKBENCH',
}
bl_options = {'DEFAULT_CLOSED'}
@ -1235,6 +1248,7 @@ classes = (
RENDER_PT_eevee_volumetric_shadows,
RENDER_PT_eevee_next_volumetric,
RENDER_PT_eevee_next_volumetric_lighting,
RENDER_PT_eevee_next_volumetric_shadows,
RENDER_PT_eevee_performance,
RENDER_PT_eevee_hair,
RENDER_PT_eevee_shadows,

View File

@ -74,8 +74,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -108,8 +107,7 @@ class TEXTURE_PT_context(TextureButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -152,8 +150,7 @@ class TEXTURE_PT_node(TextureButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -186,8 +183,7 @@ class TEXTURE_PT_clouds(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -223,8 +219,7 @@ class TEXTURE_PT_wood(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -265,8 +260,7 @@ class TEXTURE_PT_marble(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -304,8 +298,7 @@ class TEXTURE_PT_magic(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -328,8 +321,7 @@ class TEXTURE_PT_blend(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -355,8 +347,7 @@ class TEXTURE_PT_stucci(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -391,8 +382,7 @@ class TEXTURE_PT_image(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, _context):
# TODO: maybe expose the template_ID from the template image here.
@ -408,8 +398,7 @@ class TEXTURE_PT_image_settings(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -568,8 +557,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -618,8 +606,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -656,8 +643,7 @@ class TEXTURE_PT_voronoi_feature_weights(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -682,8 +668,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -712,8 +697,7 @@ class TextureSlotPanel(TextureButtonsPanel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -729,8 +713,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -802,8 +785,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -889,8 +871,7 @@ class TEXTURE_PT_colors(TextureButtonsPanel, TextureColorsPoll, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -923,8 +904,7 @@ class TEXTURE_PT_colors_ramp(TextureButtonsPanel, TextureColorsPoll, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw_header(self, context):
tex = context.texture
@ -949,8 +929,7 @@ class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "texture"
_property_type = Texture

View File

@ -34,8 +34,7 @@ class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -53,7 +52,7 @@ class VIEWLAYER_PT_layer(ViewLayerButtonsPanel, Panel):
class VIEWLAYER_PT_layer_passes(ViewLayerButtonsPanel, Panel):
bl_label = "Passes"
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT'}
def draw(self, context):
pass
@ -79,11 +78,11 @@ class VIEWLAYER_PT_eevee_layer_passes_data(ViewLayerButtonsPanel, Panel):
col.prop(view_layer, "use_pass_normal")
class VIEWLAYER_PT_eevee_next_layer_passes_data(ViewLayerButtonsPanel, Panel):
class VIEWLAYER_PT_workbench_layer_passes_data(ViewLayerButtonsPanel, Panel):
bl_label = "Data"
bl_parent_id = "VIEWLAYER_PT_layer_passes"
COMPAT_ENGINES = {'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_WORKBENCH'}
def draw(self, context):
layout = self.layout
@ -268,7 +267,7 @@ classes = (
VIEWLAYER_MT_lightgroup_sync,
VIEWLAYER_PT_layer,
VIEWLAYER_PT_layer_passes,
VIEWLAYER_PT_eevee_next_layer_passes_data,
VIEWLAYER_PT_workbench_layer_passes_data,
VIEWLAYER_PT_eevee_layer_passes_data,
VIEWLAYER_PT_eevee_layer_passes_light,
VIEWLAYER_PT_eevee_layer_passes_effects,

View File

@ -27,8 +27,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):
@ -76,8 +75,7 @@ class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
'BLENDER_RENDER',
'BLENDER_EEVEE',
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
'BLENDER_WORKBENCH_NEXT'}
'BLENDER_WORKBENCH'}
_context_path = "world"
_property_type = bpy.types.World

View File

@ -225,6 +225,7 @@ class NODE_MT_add(bpy.types.Menu):
bl_space_type = 'NODE_EDITOR'
bl_label = "Add"
bl_translation_context = i18n_contexts.operator_default
bl_options = {'SEARCH_ON_KEY_PRESS'}
def draw(self, context):
import nodeitems_utils
@ -234,27 +235,16 @@ class NODE_MT_add(bpy.types.Menu):
snode = context.space_data
if snode.tree_type == 'GeometryNodeTree':
props = layout.operator("node.add_search", text="Search...", icon='VIEWZOOM')
layout.separator()
layout.menu_contents("NODE_MT_geometry_node_add_all")
elif snode.tree_type == 'CompositorNodeTree':
props = layout.operator("node.add_search", text="Search...", icon='VIEWZOOM')
layout.separator()
layout.menu_contents("NODE_MT_compositor_node_add_all")
elif snode.tree_type == 'ShaderNodeTree':
props = layout.operator("node.add_search", text="Search...", icon='VIEWZOOM')
layout.separator()
layout.menu_contents("NODE_MT_shader_node_add_all")
elif snode.tree_type == 'TextureNodeTree':
props = layout.operator("node.add_search", text="Search...", icon='VIEWZOOM')
layout.separator()
layout.menu_contents("NODE_MT_texture_node_add_all")
elif nodeitems_utils.has_node_categories(context):
props = layout.operator("node.add_search", text="Search...", icon='VIEWZOOM')
props.use_transform = True
layout.separator()
# Actual node sub-menus are defined by draw functions from node categories.
nodeitems_utils.draw_node_categories_menu(self, context)
@ -724,7 +714,7 @@ class NODE_PT_texture_mapping(Panel):
bl_category = "Node"
bl_label = "Texture Mapping"
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
@classmethod
def poll(cls, context):

View File

@ -2663,7 +2663,7 @@ class SEQUENCER_PT_annotation_onion(AnnotationOnionSkin, SequencerButtonsPanel_O
class SEQUENCER_PT_custom_props(SequencerButtonsPanel, PropertyPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH', 'BLENDER_WORKBENCH_NEXT'}
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
_context_path = "active_sequence_strip"
_property_type = (bpy.types.Sequence,)
bl_category = "Strip"

View File

@ -883,12 +883,51 @@ class VIEW3D_HT_header(Header):
text="",
icon='MOD_MASK',
)
elif object_mode == 'SCULPT':
# If the active tool supports it, show the canvas selector popover.
from bl_ui.space_toolsystem_common import ToolSelectPanelHelper
tool = ToolSelectPanelHelper.tool_active_from_context(context)
is_paint_tool = tool and tool.use_paint_canvas
shading = VIEW3D_PT_shading.get_shading(context)
color_type = shading.color_type
row = layout.row()
row.ui_units_x = 6
row.active = is_paint_tool and color_type == 'VERTEX'
if context.preferences.experimental.use_sculpt_texture_paint:
canvas_source = tool_settings.paint_mode.canvas_source
icon = 'GROUP_VCOL' if canvas_source == 'COLOR_ATTRIBUTE' else canvas_source
row.popover(panel="VIEW3D_PT_slots_paint_canvas", icon=icon)
else:
row.popover(panel="VIEW3D_PT_slots_color_attributes", icon="GROUP_VCOL")
layout.popover(
panel="VIEW3D_PT_sculpt_automasking",
text="",
icon='MOD_MASK',
)
elif object_mode == 'VERTEX_PAINT':
row = layout.row()
row.ui_units_x = 6
row.popover(panel="VIEW3D_PT_slots_color_attributes", icon="GROUP_VCOL")
elif object_mode == 'WEIGHT_PAINT':
row = layout.row()
row.ui_units_x = 6
row.popover(panel="VIEW3D_PT_slots_vertex_groups", icon="GROUP_VERTEX")
elif object_mode == 'TEXTURE_PAINT':
tool_mode = tool_settings.image_paint.mode
icon = 'MATERIAL' if tool_mode == 'MATERIAL' else 'IMAGE_DATA'
row = layout.row()
row.ui_units_x = 9
row.popover(panel="VIEW3D_PT_slots_projectpaint", icon=icon)
row.popover(panel="VIEW3D_PT_mask", icon="MOD_MASK", text="")
else:
# Transform settings depending on tool header visibility
VIEW3D_HT_header.draw_xform_template(layout, context)
@ -2409,6 +2448,7 @@ class VIEW3D_MT_grease_pencil_add(Menu):
class VIEW3D_MT_add(Menu):
bl_label = "Add"
bl_translation_context = i18n_contexts.operator_default
bl_options = {'SEARCH_ON_KEY_PRESS'}
def draw(self, context):
layout = self.layout

View File

@ -3,7 +3,11 @@
# SPDX-License-Identifier: GPL-2.0-or-later
from bpy.types import Menu, Panel, UIList, WindowManager
from bpy.app.translations import contexts as i18n_contexts
from bpy.app.translations import (
pgettext_iface as iface_,
contexts as i18n_contexts,
)
from bl_ui.properties_grease_pencil_common import (
GreasePencilSculptAdvancedPanel,
GreasePencilDisplayPanel,
@ -456,7 +460,8 @@ class VIEW3D_MT_tools_projectpaint_uvlayer(Menu):
class SelectPaintSlotHelper:
bl_category = "Tool"
bl_space_type = 'VIEW_3D'
bl_region_type = 'HEADER'
canvas_source_attr_name = "canvas_source"
canvas_image_attr_name = "canvas_image"
@ -550,8 +555,6 @@ class SelectPaintSlotHelper:
class VIEW3D_PT_slots_projectpaint(SelectPaintSlotHelper, View3DPanel, Panel):
bl_category = "Tool"
bl_context = ".imagepaint" # dot on purpose (access from topbar)
bl_label = "Texture Slots"
canvas_source_attr_name = "mode"
@ -568,10 +571,23 @@ class VIEW3D_PT_slots_projectpaint(SelectPaintSlotHelper, View3DPanel, Panel):
def draw_image_interpolation(self, layout, mode_settings):
layout.prop(mode_settings, "interpolation", text="")
def draw_header(self, context):
tool = context.tool_settings.image_paint
ob = context.object
mat = ob.active_material
label = iface_("Texture Slots")
if tool.mode == 'MATERIAL':
if mat and mat.texture_paint_images and mat.texture_paint_slots:
label = mat.texture_paint_slots[mat.paint_active_slot].name
elif tool.canvas:
label = tool.canvas.name
self.bl_label = label
class VIEW3D_PT_slots_paint_canvas(SelectPaintSlotHelper, View3DPanel, Panel):
bl_category = "Tool"
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
bl_label = "Canvas"
@classmethod
@ -591,6 +607,108 @@ class VIEW3D_PT_slots_paint_canvas(SelectPaintSlotHelper, View3DPanel, Panel):
def draw_image_interpolation(self, **kwargs):
pass
def draw_header(self, context):
paint = context.tool_settings.paint_mode
ob = context.object
me = context.object.data
mat = ob.active_material
label = iface_("Canvas")
if paint.canvas_source == 'MATERIAL':
if mat and mat.texture_paint_images and mat.texture_paint_slots:
label = mat.texture_paint_slots[mat.paint_active_slot].name
elif paint.canvas_source == 'COLOR_ATTRIBUTE':
label = (me.color_attributes.active_color.name if me.color_attributes.active_color
else iface_("Color Attribute"))
elif paint.canvas_image:
label = paint.canvas_image.name
self.bl_label = label
class VIEW3D_PT_slots_color_attributes(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'HEADER'
bl_label = "Color Attributes"
bl_ui_units_x = 12
def draw_header(self, context):
me = context.object.data
self.bl_label = (
iface_("%s") % (me.color_attributes.active_color.name) if me.color_attributes.active_color else
iface_("Color Attributes")
)
def draw(self, context):
mesh = context.object.data
layout = self.layout
row = layout.row()
col = row.column()
col.template_list(
"MESH_UL_color_attributes",
"color_attributes",
mesh,
"color_attributes",
mesh.color_attributes,
"active_color_index",
rows=3,
)
col = row.column(align=True)
col.operator("geometry.color_attribute_add", icon='ADD', text="")
col.operator("geometry.color_attribute_remove", icon='REMOVE', text="")
col.separator()
col.menu("MESH_MT_color_attribute_context_menu", icon='DOWNARROW_HLT', text="")
class VIEW3D_PT_slots_vertex_groups(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'HEADER'
bl_label = "Vertex Groups"
bl_ui_units_x = 12
def draw_header(self, context):
ob = context.object
self.bl_label = (
iface_("%s") % (ob.vertex_groups.active.name) if ob.vertex_groups else
iface_("Vertex Groups")
)
def draw(self, context):
layout = self.layout
row = layout.row()
col = row.column()
ob = context.object
group = ob.vertex_groups.active
rows = 3
if group:
rows = 5
row = layout.row()
row.template_list("MESH_UL_vgroups", "", ob, "vertex_groups", ob.vertex_groups, "active_index", rows=rows)
col = row.column(align=True)
col.operator("object.vertex_group_add", icon='ADD', text="")
props = col.operator("object.vertex_group_remove", icon='REMOVE', text="")
props.all_unlocked = props.all = False
col.separator()
col.menu("MESH_MT_vertex_group_context_menu", icon='DOWNARROW_HLT', text="")
if group:
col.separator()
col.operator("object.vertex_group_move", icon='TRIA_UP', text="").direction = 'UP'
col.operator("object.vertex_group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
class VIEW3D_PT_mask(View3DPanel, Panel):
bl_category = "Tool"
@ -2380,6 +2498,8 @@ classes = (
VIEW3D_PT_slots_projectpaint,
VIEW3D_PT_slots_paint_canvas,
VIEW3D_PT_slots_color_attributes,
VIEW3D_PT_slots_vertex_groups,
VIEW3D_PT_tools_brush_select,
VIEW3D_PT_tools_brush_settings,
VIEW3D_PT_tools_brush_color,

View File

@ -29,7 +29,7 @@ extern "C" {
/* Blender file format version. */
#define BLENDER_FILE_VERSION BLENDER_VERSION
#define BLENDER_FILE_SUBVERSION 22
#define BLENDER_FILE_SUBVERSION 23
/* 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

View File

@ -50,6 +50,21 @@ typedef struct CVKeyIndex {
bool switched;
} CVKeyIndex;
typedef enum eNurbHandleTest_Mode {
/** Read the selection from each handle. */
NURB_HANDLE_TEST_EACH = 1,
/**
* When the knot (center point) is selected treat the handles as selected too.
* Otherwise use the same behavior as #NURB_HANDLE_TEST_EACH.
*/
NURB_HANDLE_TEST_KNOT_OR_EACH = 2,
/**
* When the knot is selected, treat all handles as selected, otherwise none.
* \note Typically used when handles are hidden.
*/
NURB_HANDLE_TEST_KNOT_ONLY = 3,
} eNurbHandleTest_Mode;
#define KNOTSU(nu) \
((nu)->orderu + (nu)->pntsu + (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu - 1) : 0))
#define KNOTSV(nu) \
@ -197,7 +212,9 @@ void BKE_nurbList_duplicate(struct ListBase *lb1, const struct ListBase *lb2);
* - 5: Set align, like 3 but no toggle.
* - 6: Clear align (setting #HD_FREE), like 3 but no toggle.
*/
void BKE_nurbList_handles_set(struct ListBase *editnurb, char code);
void BKE_nurbList_handles_set(struct ListBase *editnurb,
eNurbHandleTest_Mode handle_mode,
char code);
void BKE_nurbList_handles_recalculate(struct ListBase *editnurb, bool calc_length, uint8_t flag);
void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag);
@ -340,6 +357,15 @@ void BKE_nurb_handle_smooth_fcurve(struct BezTriple *bezt, int total, bool cycli
void BKE_nurb_handles_calc(struct Nurb *nu);
void BKE_nurb_handles_autocalc(struct Nurb *nu, uint8_t flag);
/**
* Return a flag for the handles to treat as "selected":
* `1 << 0`, `1 << 1`, `1 << 2` map to handles 1 2 & 3.
*/
short BKE_nurb_bezt_handle_test_calc_flag(const BezTriple *bezt,
const eBezTriple_Flag__Alias sel_flag,
const eNurbHandleTest_Mode handle_mode);
/**
* Update selected handle types to ensure valid state, e.g. deduce "Auto" types to concrete ones.
* Thereby \a sel_flag defines what qualifies as selected.
@ -349,14 +375,15 @@ void BKE_nurb_handles_autocalc(struct Nurb *nu, uint8_t flag);
*
* \param sel_flag: The flag (bezt.f1/2/3) value to use to determine selection. Usually `SELECT`,
* but may want to use a different one at times (if caller does not operate on * selection).
* \param use_handle: Check selection state of individual handles, otherwise always update both
* handles if the key is selected.
* \param handle_mode: Interpret the selection base on modes in #eNurbHandleTest_Mode.
*/
void BKE_nurb_bezt_handle_test(struct BezTriple *bezt,
eBezTriple_Flag__Alias sel_flag,
bool use_handle,
const eNurbHandleTest_Mode handle_mode,
bool use_around_local);
void BKE_nurb_handles_test(struct Nurb *nu, bool use_handles, bool use_around_local);
void BKE_nurb_handles_test(struct Nurb *nu,
eNurbHandleTest_Mode handle_mode,
bool use_around_local);
/* **** Depsgraph evaluation **** */

View File

@ -1205,7 +1205,7 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, i
#define GEO_NODE_INPUT_RADIUS 1105
#define GEO_NODE_INPUT_CURVE_TILT 1106
#define GEO_NODE_INPUT_CURVE_HANDLES 1107
#define GEO_NODE_INPUT_SHADE_SMOOTH 1108
#define GEO_NODE_INPUT_FACE_SMOOTH 1108
#define GEO_NODE_INPUT_SPLINE_RESOLUTION 1109
#define GEO_NODE_INPUT_SPLINE_CYCLIC 1110
#define GEO_NODE_SET_CURVE_RADIUS 1111
@ -1312,6 +1312,7 @@ void BKE_nodetree_remove_layer_n(struct bNodeTree *ntree, struct Scene *scene, i
#define GEO_NODE_TOOL_FACE_SET 2112
#define GEO_NODE_TOOL_SET_FACE_SET 2113
#define GEO_NODE_POINTS_TO_CURVES 2114
#define GEO_NODE_INPUT_EDGE_SMOOTH 2115
/** \} */

View File

@ -792,7 +792,7 @@ inline bool bNodeSocket::is_panel_collapsed() const
inline bool bNodeSocket::is_visible() const
{
return !this->is_hidden() && this->is_available();
return !this->is_hidden() && this->is_available() && !this->is_panel_collapsed();
}
inline bNode &bNodeSocket::owner_node()

View File

@ -29,6 +29,9 @@ void BKE_previewimg_freefunc(void *link);
*/
void BKE_previewimg_free(PreviewImage **prv);
/** Must be called after reading a preview image from file. */
void BKE_previewimg_runtime_data_clear(PreviewImage *prv);
/**
* Clear the preview image or icon, but does not free it.
*/

View File

@ -399,6 +399,19 @@ typedef struct Header {
/* menu types */
enum class MenuTypeFlag {
/**
* Whether the menu depends on data retrieved via #CTX_data_pointer_get. If it is context
* dependent, menu search has to scan it in different contexts.
*/
ContextDependent = (1 << 0),
/**
* Automatically start searching in the menu when pressing a key.
*/
SearchOnKeyPress = (1 << 1),
};
ENUM_OPERATORS(MenuTypeFlag, MenuTypeFlag::ContextDependent)
typedef struct MenuType {
struct MenuType *next, *prev;
@ -414,11 +427,7 @@ typedef struct MenuType {
void (*draw)(const struct bContext *C, struct Menu *menu);
void (*listener)(const wmRegionListenerParams *params);
/**
* True if the menu depends on data retrieved via #CTX_data_pointer_get. If it is context
* dependent, menu search has to scan it in different contexts.
*/
bool context_dependent;
MenuTypeFlag flag;
/* RNA integration */
ExtensionRNA rna_ext;

View File

@ -1485,10 +1485,10 @@ eAction_TransformFlags BKE_action_get_item_transform_flags(bAction *act,
/* build PointerRNA from provided data to obtain the paths to use */
if (pchan) {
RNA_pointer_create((ID *)ob, &RNA_PoseBone, pchan, &ptr);
ptr = RNA_pointer_create((ID *)ob, &RNA_PoseBone, pchan);
}
else if (ob) {
RNA_id_pointer_create((ID *)ob, &ptr);
ptr = RNA_id_pointer_create((ID *)ob);
}
else {
return eAction_TransformFlags(0);
@ -1755,10 +1755,9 @@ void what_does_obaction(Object *ob,
* (though a bit more dangerous). */
if (agrp) {
/* specifically evaluate this group only */
PointerRNA id_ptr;
/* get RNA-pointer for the workob's ID */
RNA_id_pointer_create(&workob->id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(&workob->id);
/* execute action for this group only */
animsys_evaluate_action_group(&id_ptr, act, agrp, anim_eval_context);

View File

@ -698,11 +698,11 @@ void BKE_animdata_transfer_by_basepath(Main *bmain, ID *srcID, ID *dstID, ListBa
* and seeing if we can resolve it. */
static bool check_rna_path_is_valid(ID *owner_id, const char *path)
{
PointerRNA id_ptr, ptr;
PointerRNA ptr;
PropertyRNA *prop = nullptr;
/* make initial RNA pointer to start resolving from */
RNA_id_pointer_create(owner_id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(owner_id);
/* try to resolve */
return RNA_path_resolve_property(&id_ptr, path, &ptr, &prop);

View File

@ -912,10 +912,9 @@ static void nlastrip_evaluate_controls(NlaStrip *strip,
{
/* now strip's evaluate F-Curves for these settings (if applicable) */
if (strip->fcurves.first) {
PointerRNA strip_ptr;
/* create RNA-pointer needed to set values */
RNA_pointer_create(nullptr, &RNA_NlaStrip, strip, &strip_ptr);
PointerRNA strip_ptr = RNA_pointer_create(nullptr, &RNA_NlaStrip, strip);
/* execute these settings as per normal */
animsys_evaluate_fcurves(&strip_ptr, &strip->fcurves, anim_eval_context, flush_to_original);
@ -3793,8 +3792,7 @@ void BKE_animsys_nla_remap_keyframe_values(NlaKeyframingContext *context,
BLI_bitmap_copy_all(blended_necs->remap_domain.ptr, remap_domain, count);
/* Need to send id_ptr instead of prop_ptr so fcurve RNA paths resolve properly. */
PointerRNA id_ptr;
RNA_id_pointer_create(prop_ptr->owner_id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(prop_ptr->owner_id);
/* Per iteration, remove effect of upper strip which gives output of nla stack below it. */
LISTBASE_FOREACH_BACKWARD (NlaEvalStrip *, nes, &context->upper_estrips) {
@ -3896,7 +3894,6 @@ void BKE_animsys_evaluate_animdata(ID *id,
eAnimData_Recalc recalc,
const bool flush_to_original)
{
PointerRNA id_ptr;
/* sanity checks */
if (ELEM(nullptr, id, adt)) {
@ -3904,7 +3901,7 @@ void BKE_animsys_evaluate_animdata(ID *id,
}
/* get pointer to ID-block for RNA to use */
RNA_id_pointer_create(id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(id);
/* recalculate keyframe data:
* - NLA before Active Action, as Active Action behaves as 'tweaking track'
@ -4131,7 +4128,6 @@ void BKE_animsys_eval_driver(Depsgraph *depsgraph, ID *id, int driver_index, FCu
BLI_assert(fcu_orig != nullptr);
/* TODO(sergey): De-duplicate with BKE animsys. */
PointerRNA id_ptr;
bool ok = false;
/* Lookup driver, accelerated with driver array map. */
@ -4148,7 +4144,7 @@ void BKE_animsys_eval_driver(Depsgraph *depsgraph, ID *id, int driver_index, FCu
DEG_debug_print_eval_subdata_index(
depsgraph, __func__, id->name, id, "fcu", fcu->rna_path, fcu, fcu->array_index);
RNA_id_pointer_create(id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(id);
/* check if this driver's curve should be skipped */
if ((fcu->flag & (FCURVE_MUTED | FCURVE_DISABLED)) == 0) {

View File

@ -55,8 +55,7 @@ void BKE_pose_apply_action_all_bones(Object *ob,
bAction *action,
AnimationEvalContext *anim_eval_context)
{
PointerRNA pose_owner_ptr;
RNA_id_pointer_create(&ob->id, &pose_owner_ptr);
PointerRNA pose_owner_ptr = RNA_id_pointer_create(&ob->id);
animsys_evaluate_action(&pose_owner_ptr, action, anim_eval_context, false);
}
@ -96,8 +95,7 @@ void pose_apply(Object *ob,
}
/* Apply the Action. */
PointerRNA pose_owner_ptr;
RNA_id_pointer_create(&ob->id, &pose_owner_ptr);
PointerRNA pose_owner_ptr = RNA_id_pointer_create(&ob->id);
applier(&pose_owner_ptr, action, anim_eval_context);

View File

@ -44,8 +44,7 @@ void BKE_callback_exec_null(Main *bmain, eCbEvent evt)
void BKE_callback_exec_id(Main *bmain, ID *id, eCbEvent evt)
{
PointerRNA id_ptr;
RNA_id_pointer_create(id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(id);
PointerRNA *pointers[1] = {&id_ptr};
@ -54,11 +53,9 @@ void BKE_callback_exec_id(Main *bmain, ID *id, eCbEvent evt)
void BKE_callback_exec_id_depsgraph(Main *bmain, ID *id, Depsgraph *depsgraph, eCbEvent evt)
{
PointerRNA id_ptr;
RNA_id_pointer_create(id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(id);
PointerRNA depsgraph_ptr;
RNA_pointer_create(nullptr, &RNA_Depsgraph, depsgraph, &depsgraph_ptr);
PointerRNA depsgraph_ptr = RNA_pointer_create(nullptr, &RNA_Depsgraph, depsgraph);
PointerRNA *pointers[2] = {&id_ptr, &depsgraph_ptr};
@ -67,10 +64,9 @@ void BKE_callback_exec_id_depsgraph(Main *bmain, ID *id, Depsgraph *depsgraph, e
void BKE_callback_exec_string(Main *bmain, eCbEvent evt, const char *str)
{
PointerRNA str_ptr;
PrimitiveStringRNA data = {nullptr};
data.value = str;
RNA_pointer_create(nullptr, &RNA_PrimitiveString, &data, &str_ptr);
PointerRNA str_ptr = RNA_pointer_create(nullptr, &RNA_PrimitiveString, &data);
PointerRNA *pointers[1] = {&str_ptr};

View File

@ -554,8 +554,7 @@ ListBase CTX_data_dir_get_ex(const bContext *C,
int namelen;
PropertyRNA *iterprop;
PointerRNA ctx_ptr;
RNA_pointer_create(nullptr, &RNA_Context, (void *)C, &ctx_ptr);
PointerRNA ctx_ptr = RNA_pointer_create(nullptr, &RNA_Context, (void *)C);
iterprop = RNA_struct_iterator_property(ctx_ptr.type);
@ -627,12 +626,12 @@ bool CTX_data_dir(const char *member)
void CTX_data_id_pointer_set(bContextDataResult *result, ID *id)
{
RNA_id_pointer_create(id, &result->ptr);
result->ptr = RNA_id_pointer_create(id);
}
void CTX_data_pointer_set(bContextDataResult *result, ID *id, StructRNA *type, void *data)
{
RNA_pointer_create(id, type, data, &result->ptr);
result->ptr = RNA_pointer_create(id, type, data);
}
void CTX_data_pointer_set_ptr(bContextDataResult *result, const PointerRNA *ptr)
@ -643,7 +642,7 @@ void CTX_data_pointer_set_ptr(bContextDataResult *result, const PointerRNA *ptr)
void CTX_data_id_list_add(bContextDataResult *result, ID *id)
{
CollectionPointerLink *link = MEM_cnew<CollectionPointerLink>(__func__);
RNA_id_pointer_create(id, &link->ptr);
link->ptr = RNA_id_pointer_create(id);
BLI_addtail(&result->list, link);
}
@ -651,7 +650,7 @@ void CTX_data_id_list_add(bContextDataResult *result, ID *id)
void CTX_data_list_add(bContextDataResult *result, ID *id, StructRNA *type, void *data)
{
CollectionPointerLink *link = MEM_cnew<CollectionPointerLink>(__func__);
RNA_pointer_create(id, type, data, &link->ptr);
link->ptr = RNA_pointer_create(id, type, data);
BLI_addtail(&result->list, link);
}

View File

@ -4032,32 +4032,49 @@ void BKE_nurb_handle_calc_simple_auto(Nurb *nu, BezTriple *bezt)
}
}
void BKE_nurb_bezt_handle_test(BezTriple *bezt,
const eBezTriple_Flag__Alias sel_flag,
const bool use_handle,
const bool use_around_local)
{
short flag = 0;
#define SEL_F1 (1 << 0)
#define SEL_F2 (1 << 1)
#define SEL_F3 (1 << 2)
if (use_handle) {
if (bezt->f1 & sel_flag) {
flag |= SEL_F1;
}
if (bezt->f2 & sel_flag) {
flag |= SEL_F2;
}
if (bezt->f3 & sel_flag) {
flag |= SEL_F3;
}
}
else {
flag = (bezt->f2 & sel_flag) ? (SEL_F1 | SEL_F2 | SEL_F3) : 0;
}
short BKE_nurb_bezt_handle_test_calc_flag(const BezTriple *bezt,
const eBezTriple_Flag__Alias sel_flag,
const eNurbHandleTest_Mode handle_mode)
{
short flag = 0;
switch (handle_mode) {
case NURB_HANDLE_TEST_KNOT_ONLY: {
flag = (bezt->f2 & sel_flag) ? (SEL_F1 | SEL_F2 | SEL_F3) : 0;
break;
}
case NURB_HANDLE_TEST_KNOT_OR_EACH:
if (bezt->f2 & sel_flag) {
flag = (bezt->f2 & sel_flag) ? (SEL_F1 | SEL_F2 | SEL_F3) : 0;
break;
}
[[fallthrough]];
case NURB_HANDLE_TEST_EACH: {
if (bezt->f1 & sel_flag) {
flag |= SEL_F1;
}
if (bezt->f2 & sel_flag) {
flag |= SEL_F2;
}
if (bezt->f3 & sel_flag) {
flag |= SEL_F3;
}
break;
}
}
return flag;
}
void BKE_nurb_bezt_handle_test(BezTriple *bezt,
const eBezTriple_Flag__Alias sel_flag,
const eNurbHandleTest_Mode handle_mode,
const bool use_around_local)
{
short flag = BKE_nurb_bezt_handle_test_calc_flag(bezt, sel_flag, handle_mode);
if (use_around_local) {
flag &= ~SEL_F2;
}
@ -4082,13 +4099,15 @@ void BKE_nurb_bezt_handle_test(BezTriple *bezt,
}
}
}
}
#undef SEL_F1
#undef SEL_F2
#undef SEL_F3
}
void BKE_nurb_handles_test(Nurb *nu, const bool use_handle, const bool use_around_local)
void BKE_nurb_handles_test(Nurb *nu,
const eNurbHandleTest_Mode handle_mode,
const bool use_around_local)
{
BezTriple *bezt;
int a;
@ -4100,7 +4119,7 @@ void BKE_nurb_handles_test(Nurb *nu, const bool use_handle, const bool use_aroun
bezt = nu->bezt;
a = nu->pntsu;
while (a--) {
BKE_nurb_bezt_handle_test(bezt, SELECT, use_handle, use_around_local);
BKE_nurb_bezt_handle_test(bezt, SELECT, handle_mode, use_around_local);
bezt++;
}
@ -4195,7 +4214,9 @@ void BKE_nurbList_handles_autocalc(ListBase *editnurb, uint8_t flag)
}
}
void BKE_nurbList_handles_set(ListBase *editnurb, const char code)
void BKE_nurbList_handles_set(ListBase *editnurb,
eNurbHandleTest_Mode handle_mode,
const char code)
{
BezTriple *bezt;
int a;
@ -4206,11 +4227,12 @@ void BKE_nurbList_handles_set(ListBase *editnurb, const char code)
bezt = nu->bezt;
a = nu->pntsu;
while (a--) {
if ((bezt->f1 & SELECT) || (bezt->f3 & SELECT)) {
if (bezt->f1 & SELECT) {
const short flag = BKE_nurb_bezt_handle_test_calc_flag(bezt, SELECT, handle_mode);
if ((flag & (1 << 0)) || (flag & (1 << 2))) {
if (flag & (1 << 0)) {
bezt->h1 = code;
}
if (bezt->f3 & SELECT) {
if (flag & (1 << 2)) {
bezt->h2 = code;
}
if (bezt->h1 != bezt->h2) {
@ -4247,8 +4269,9 @@ void BKE_nurbList_handles_set(ListBase *editnurb, const char code)
bezt = nu->bezt;
a = nu->pntsu;
while (a--) {
if (((bezt->f1 & SELECT) && bezt->h1 != HD_FREE) ||
((bezt->f3 & SELECT) && bezt->h2 != HD_FREE)) {
const short flag = BKE_nurb_bezt_handle_test_calc_flag(bezt, SELECT, handle_mode);
if (((flag & (1 << 0)) && bezt->h1 != HD_FREE) ||
((flag & (1 << 2)) && bezt->h2 != HD_FREE)) {
h_new = HD_AUTO;
break;
}

View File

@ -220,7 +220,6 @@ FCurve *id_data_find_fcurve(
AnimData *adt = BKE_animdata_from_id(id);
/* Rna vars */
PointerRNA ptr;
PropertyRNA *prop;
if (r_driven) {
@ -232,7 +231,7 @@ FCurve *id_data_find_fcurve(
return nullptr;
}
RNA_pointer_create(id, type, data, &ptr);
PointerRNA ptr = RNA_pointer_create(id, type, data);
prop = RNA_struct_find_property(&ptr, prop_name);
if (prop == nullptr) {
return nullptr;
@ -1315,7 +1314,8 @@ void testhandles_fcurve(FCurve *fcu, eBezTriple_Flag sel_flag, const bool use_ha
BezTriple *bezt;
uint a;
for (a = 0, bezt = fcu->bezt; a < fcu->totvert; a++, bezt++) {
BKE_nurb_bezt_handle_test(bezt, sel_flag, use_handle, false);
BKE_nurb_bezt_handle_test(
bezt, sel_flag, use_handle ? NURB_HANDLE_TEST_EACH : NURB_HANDLE_TEST_KNOT_ONLY, false);
}
/* Recalculate handles. */

View File

@ -104,14 +104,12 @@ static bool driver_get_target_context_property(const DriverTargetContext *driver
{
switch (dtar->context_property) {
case DTAR_CONTEXT_PROPERTY_ACTIVE_SCENE:
RNA_id_pointer_create(&driver_target_context->scene->id, r_property_ptr);
*r_property_ptr = RNA_id_pointer_create(&driver_target_context->scene->id);
return true;
case DTAR_CONTEXT_PROPERTY_ACTIVE_VIEW_LAYER: {
RNA_pointer_create(&driver_target_context->scene->id,
&RNA_ViewLayer,
driver_target_context->view_layer,
r_property_ptr);
*r_property_ptr = RNA_pointer_create(
&driver_target_context->scene->id, &RNA_ViewLayer, driver_target_context->view_layer);
return true;
}
}
@ -142,7 +140,7 @@ bool driver_get_target_property(const DriverTargetContext *driver_target_context
return false;
}
RNA_id_pointer_create(dtar->id, r_prop);
*r_prop = RNA_id_pointer_create(dtar->id);
return true;
}

View File

@ -1954,7 +1954,6 @@ void BKE_keyblock_copy_settings(KeyBlock *kb_dst, const KeyBlock *kb_src)
char *BKE_keyblock_curval_rnapath_get(const Key *key, const KeyBlock *kb)
{
PointerRNA ptr;
PropertyRNA *prop;
/* sanity checks */
@ -1963,7 +1962,7 @@ char *BKE_keyblock_curval_rnapath_get(const Key *key, const KeyBlock *kb)
}
/* create the RNA pointer */
RNA_pointer_create((ID *)&key->id, &RNA_ShapeKey, (KeyBlock *)kb, &ptr);
PointerRNA ptr = RNA_pointer_create((ID *)&key->id, &RNA_ShapeKey, (KeyBlock *)kb);
/* get pointer to the property too */
prop = RNA_struct_find_property(&ptr, "value");

View File

@ -93,8 +93,7 @@ static void test_render_pass_conflict(Scene *scene,
const char *render_pass_name,
const char *rna_prop_name)
{
PointerRNA ptr;
RNA_pointer_create(&scene->id, &RNA_ViewLayer, view_layer, &ptr);
PointerRNA ptr = RNA_pointer_create(&scene->id, &RNA_ViewLayer, view_layer);
RNA_boolean_set(&ptr, rna_prop_name, false);
/* Rename to Conflicting name */

View File

@ -935,7 +935,6 @@ void BKE_lib_id_swap_full(
bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
{
ID *newid = nullptr;
PointerRNA idptr;
if (id && (ID_REAL_USERS(id) > 1)) {
/* If property isn't editable,
@ -950,7 +949,7 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
id_us_min(newid);
/* assign copy */
RNA_id_pointer_create(newid, &idptr);
PointerRNA idptr = RNA_id_pointer_create(newid);
RNA_property_pointer_set(ptr, prop, idptr, nullptr);
RNA_property_update(C, ptr, prop);

View File

@ -81,7 +81,7 @@ void BKE_libblock_free_datablock(ID *id, const int /*flag*/)
BLI_assert_msg(0, "IDType Missing IDTypeInfo");
}
void BKE_id_free_ex(Main *bmain, void *idv, int flag, const bool use_flag_from_idtag)
static int id_free(Main *bmain, void *idv, int flag, const bool use_flag_from_idtag)
{
ID *id = static_cast<ID *>(idv);
@ -129,7 +129,7 @@ void BKE_id_free_ex(Main *bmain, void *idv, int flag, const bool use_flag_from_i
}
if ((flag & LIB_ID_FREE_NO_MAIN) == 0 && key != nullptr) {
BKE_id_free_ex(bmain, &key->id, flag, use_flag_from_idtag);
id_free(bmain, &key->id, flag, use_flag_from_idtag);
}
BKE_libblock_free_datablock(id, flag);
@ -169,6 +169,23 @@ void BKE_id_free_ex(Main *bmain, void *idv, int flag, const bool use_flag_from_i
if ((flag & LIB_ID_FREE_NOT_ALLOCATED) == 0) {
MEM_freeN(id);
}
return flag;
}
void BKE_id_free_ex(Main *bmain, void *idv, int flag, const bool use_flag_from_idtag)
{
/* ViewLayer resync needs to be delayed during Scene freeing, since internal relationships
* between the Scene's master collection and its view_layers become invalid (due to remapping .
*/
BKE_layer_collection_resync_forbid();
flag = id_free(bmain, idv, flag, use_flag_from_idtag);
BKE_layer_collection_resync_allow();
if (bmain && (flag & LIB_ID_FREE_NO_MAIN) == 0) {
BKE_main_collection_sync_remap(bmain);
}
}
void BKE_id_free(Main *bmain, void *idv)
@ -256,6 +273,19 @@ static size_t id_delete(Main *bmain,
* code has some specific handling of 'no main' IDs that would be a problem in that
* case). */
id->tag |= tag;
/* Forcefully also delete shapekeys of the deleted ID if any, 'orphaned' shapekeys are
* not allowed in Blender and will cause lots of problem in modern code (liboverrides,
* warning on write & read, etc.). */
Key *shape_key = BKE_key_from_id(id);
if (shape_key && (shape_key->id.tag & tag) == 0) {
BLI_remlink(&bmain->shapekeys, &shape_key->id);
BKE_main_namemap_remove_name(bmain, &shape_key->id, shape_key->id.name + 2);
BLI_addtail(&tagged_deleted_ids, &shape_key->id);
BKE_id_remapper_add(id_remapper, &shape_key->id, nullptr);
shape_key->id.tag |= tag;
}
keep_looping = true;
}
}
@ -340,6 +370,11 @@ static size_t id_delete(Main *bmain,
BKE_main_unlock(bmain);
/* ViewLayer resync needs to be delayed during Scene freeing, since internal relationships
* between the Scene's master collection and its view_layers become invalid (due to remapping .
*/
BKE_layer_collection_resync_forbid();
/* In usual reversed order, such that all usage of a given ID, even 'never nullptr' ones,
* have been already cleared when we reach it
* (e.g. Objects being processed before meshes, they'll have already released their 'reference'
@ -363,12 +398,15 @@ static size_t id_delete(Main *bmain,
ID_REAL_USERS(id),
(id->tag & LIB_TAG_EXTRAUSER_SET) != 0 ? 1 : 0);
}
BKE_id_free_ex(bmain, id, free_flag, !do_tagged_deletion);
id_free(bmain, id, free_flag, !do_tagged_deletion);
++num_datablocks_deleted;
}
}
}
BKE_layer_collection_resync_allow();
BKE_main_collection_sync_remap(bmain);
bmain->is_memfile_undo_written = false;
return num_datablocks_deleted;
}

View File

@ -2294,9 +2294,8 @@ static bool lib_override_library_resync(Main *bmain,
/* Apply rules on new override ID using old one as 'source' data. */
/* Note that since we already remapped ID pointers in old override IDs to new ones, we
* can also apply ID pointer override rules safely here. */
PointerRNA rnaptr_src, rnaptr_dst;
RNA_id_pointer_create(id_override_old, &rnaptr_src);
RNA_id_pointer_create(id_override_new, &rnaptr_dst);
PointerRNA rnaptr_src = RNA_id_pointer_create(id_override_old);
PointerRNA rnaptr_dst = RNA_id_pointer_create(id_override_new);
/* In case the parent of the liboverride object matches hierarchy-wise the parent of its
* linked reference, also enforce clearing any override of the other related parenting
@ -4099,9 +4098,8 @@ bool BKE_lib_override_library_status_check_local(Main *bmain, ID *local)
/* Note that reference is assumed always valid, caller has to ensure that itself. */
PointerRNA rnaptr_local, rnaptr_reference;
RNA_id_pointer_create(local, &rnaptr_local);
RNA_id_pointer_create(reference, &rnaptr_reference);
PointerRNA rnaptr_local = RNA_id_pointer_create(local);
PointerRNA rnaptr_reference = RNA_id_pointer_create(reference);
if (!RNA_struct_override_matches(
bmain,
@ -4158,9 +4156,8 @@ bool BKE_lib_override_library_status_check_reference(Main *bmain, ID *local)
}
}
PointerRNA rnaptr_local, rnaptr_reference;
RNA_id_pointer_create(local, &rnaptr_local);
RNA_id_pointer_create(reference, &rnaptr_reference);
PointerRNA rnaptr_local = RNA_id_pointer_create(local);
PointerRNA rnaptr_reference = RNA_id_pointer_create(reference);
if (!RNA_struct_override_matches(bmain,
&rnaptr_local,
@ -4209,9 +4206,8 @@ static void lib_override_library_operations_create(Main *bmain,
}
}
PointerRNA rnaptr_local, rnaptr_reference;
RNA_id_pointer_create(local, &rnaptr_local);
RNA_id_pointer_create(local->override_library->reference, &rnaptr_reference);
PointerRNA rnaptr_local = RNA_id_pointer_create(local);
PointerRNA rnaptr_reference = RNA_id_pointer_create(local->override_library->reference);
eRNAOverrideMatchResult local_report_flags = RNA_OVERRIDE_MATCH_RESULT_INIT;
RNA_struct_override_matches(bmain,
@ -4261,9 +4257,8 @@ void BKE_lib_override_library_operations_restore(Main *bmain, ID *local, int *r_
return;
}
PointerRNA rnaptr_src, rnaptr_dst;
RNA_id_pointer_create(local, &rnaptr_dst);
RNA_id_pointer_create(local->override_library->reference, &rnaptr_src);
PointerRNA rnaptr_src = RNA_id_pointer_create(local);
PointerRNA rnaptr_dst = RNA_id_pointer_create(local->override_library->reference);
RNA_struct_override_apply(
bmain,
&rnaptr_dst,
@ -4445,14 +4440,12 @@ static bool lib_override_library_id_reset_do(Main *bmain,
bool do_op_delete = true;
const bool is_collection = op->rna_prop_type == PROP_COLLECTION;
if (is_collection || op->rna_prop_type == PROP_POINTER) {
PointerRNA ptr_root, ptr_root_lib, ptr, ptr_lib;
PointerRNA ptr, ptr_lib;
PropertyRNA *prop, *prop_lib;
RNA_pointer_create(id_root, &RNA_ID, id_root, &ptr_root);
RNA_pointer_create(id_root->override_library->reference,
&RNA_ID,
id_root->override_library->reference,
&ptr_root_lib);
PointerRNA ptr_root = RNA_pointer_create(id_root, &RNA_ID, id_root);
PointerRNA ptr_root_lib = RNA_pointer_create(
id_root->override_library->reference, &RNA_ID, id_root->override_library->reference);
bool prop_exists = RNA_path_resolve_property(&ptr_root, op->rna_path, &ptr, &prop);
if (prop_exists) {
@ -4746,12 +4739,12 @@ void BKE_lib_override_library_update(Main *bmain, ID *local)
STRNCPY(tmp_key->id.name, local_key->id.name);
}
PointerRNA rnaptr_src, rnaptr_dst, rnaptr_storage_stack, *rnaptr_storage = nullptr;
RNA_id_pointer_create(local, &rnaptr_src);
RNA_id_pointer_create(tmp_id, &rnaptr_dst);
PointerRNA rnaptr_src = RNA_id_pointer_create(local);
PointerRNA rnaptr_dst = RNA_id_pointer_create(tmp_id);
PointerRNA rnaptr_storage_stack, *rnaptr_storage = nullptr;
if (local->override_library->storage) {
rnaptr_storage_stack = RNA_id_pointer_create(local->override_library->storage);
rnaptr_storage = &rnaptr_storage_stack;
RNA_id_pointer_create(local->override_library->storage, rnaptr_storage);
}
RNA_struct_override_apply(bmain,
@ -4961,10 +4954,9 @@ ID *BKE_lib_override_library_operations_store_start(Main *bmain,
storage_id = BKE_id_copy(reinterpret_cast<Main *>(liboverride_storage), local);
if (storage_id != nullptr) {
PointerRNA rnaptr_reference, rnaptr_final, rnaptr_storage;
RNA_id_pointer_create(local->override_library->reference, &rnaptr_reference);
RNA_id_pointer_create(local, &rnaptr_final);
RNA_id_pointer_create(storage_id, &rnaptr_storage);
PointerRNA rnaptr_reference = RNA_id_pointer_create(local->override_library->reference);
PointerRNA rnaptr_final = RNA_id_pointer_create(local);
PointerRNA rnaptr_storage = RNA_id_pointer_create(storage_id);
if (!RNA_struct_override_store(
bmain, &rnaptr_final, &rnaptr_reference, &rnaptr_storage, local->override_library))

View File

@ -80,6 +80,7 @@ static void library_blend_read_data(BlendDataReader * /*reader*/, ID *id)
lib->runtime.name_map = nullptr;
/* This is runtime data. */
lib->parent = nullptr;
lib->tag = 0;
}
IDTypeInfo IDType_ID_LI = {

View File

@ -1794,10 +1794,10 @@ void BKE_mesh_remap_calc_loops_from_mesh(const int mode,
for (tindex = 0; tindex < num_trees; tindex++) {
float island_fac = 0.0f;
for (plidx_dst = 0; plidx_dst < faces_dst.size(); plidx_dst++) {
for (plidx_dst = 0; plidx_dst < face_dst.size(); plidx_dst++) {
island_fac += islands_res[tindex][plidx_dst].factor;
}
island_fac /= float(faces_dst.size());
island_fac /= float(face_dst.size());
if (island_fac > best_island_fac) {
best_island_fac = island_fac;

View File

@ -1090,10 +1090,8 @@ void BKE_nlameta_flush_transforms(NlaStrip *mstrip)
LISTBASE_FOREACH (NlaStrip *, strip, &mstrip->strips) {
/* only if scale changed, need to perform RNA updates */
if (scaleChanged) {
PointerRNA ptr;
/* use RNA updates to compute scale properly */
RNA_pointer_create(nullptr, &RNA_NlaStrip, strip, &ptr);
PointerRNA ptr = RNA_pointer_create(nullptr, &RNA_NlaStrip, strip);
RNA_float_set(&ptr, "frame_start", strip->start);
RNA_float_set(&ptr, "frame_end", strip->end);

View File

@ -1236,8 +1236,7 @@ static void node_init(const bContext *C, bNodeTree *ntree, bNode *node)
}
if (ntype->initfunc_api) {
PointerRNA ptr;
RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
PointerRNA ptr = RNA_pointer_create(&ntree->id, &RNA_Node, node);
/* XXX WARNING: context can be nullptr in case nodes are added in do_versions.
* Delayed init is not supported for nodes with context-based `initfunc_api` at the moment. */
@ -2522,8 +2521,7 @@ bNode *node_copy_with_mapping(bNodeTree *dst_tree,
/* Only call copy function when a copy is made for the main database, not
* for cases like the dependency graph and localization. */
if (node_dst->typeinfo->copyfunc_api && !(flag & LIB_ID_CREATE_NO_MAIN)) {
PointerRNA ptr;
RNA_pointer_create(reinterpret_cast<ID *>(dst_tree), &RNA_Node, node_dst, &ptr);
PointerRNA ptr = RNA_pointer_create(reinterpret_cast<ID *>(dst_tree), &RNA_Node, node_dst);
node_dst->typeinfo->copyfunc_api(&ptr, &node_src);
}
@ -3309,8 +3307,7 @@ void nodeRemoveNode(Main *bmain, bNodeTree *ntree, bNode *node, const bool do_id
if (do_id_user) {
/* Free callback for NodeCustomGroup. */
if (node->typeinfo->freefunc_api) {
PointerRNA ptr;
RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
PointerRNA ptr = RNA_pointer_create(&ntree->id, &RNA_Node, node);
node->typeinfo->freefunc_api(&ptr);
}

View File

@ -1935,8 +1935,7 @@ static bool find_rna_property_rgba(PointerRNA *id_ptr, const char *name, float r
static bool find_rna_property_rgba(ID *id, const char *name, float r_data[4])
{
PointerRNA ptr;
RNA_id_pointer_create(id, &ptr);
PointerRNA ptr = RNA_id_pointer_create(id);
return find_rna_property_rgba(&ptr, name, r_data);
}
@ -1984,8 +1983,7 @@ bool BKE_view_layer_find_rgba_attribute(Scene *scene,
float r_value[4])
{
if (layer) {
PointerRNA layer_ptr;
RNA_pointer_create(&scene->id, &RNA_ViewLayer, layer, &layer_ptr);
PointerRNA layer_ptr = RNA_pointer_create(&scene->id, &RNA_ViewLayer, layer);
if (find_rna_property_rgba(&layer_ptr, name, r_value)) {
return true;

View File

@ -148,6 +148,15 @@ static void BKE_previewimg_free(PreviewImageDeferred **prv)
*prv = nullptr;
}
void BKE_previewimg_runtime_data_clear(PreviewImage *prv)
{
prv->tag = 0;
prv->icon_id = 0;
for (int i = 0; i < NUM_ICON_SIZES; i++) {
prv->gputexture[i] = nullptr;
}
}
void BKE_previewimg_clear_single(PreviewImage *prv, enum eIconSizes size)
{
MEM_SAFE_FREE(prv->rect[size]);
@ -508,7 +517,6 @@ void BKE_previewimg_blend_read(BlendDataReader *reader, PreviewImage *prv)
if (prv->rect[i]) {
BLO_read_data_address(reader, &prv->rect[i]);
}
prv->gputexture[i] = nullptr;
/* PRV_RENDERING is a runtime only flag currently, but don't mess with it on undo! It gets
* special handling in #memfile_undosys_restart_unfinished_id_previews() then. */
@ -516,6 +524,5 @@ void BKE_previewimg_blend_read(BlendDataReader *reader, PreviewImage *prv)
prv->flag[i] &= ~PRV_RENDERING;
}
}
prv->icon_id = 0;
prv->tag = 0;
BKE_previewimg_runtime_data_clear(prv);
}

View File

@ -1628,7 +1628,6 @@ IDTypeInfo IDType_ID_SCE = get_type_info();
const char *RE_engine_id_BLENDER_EEVEE = "BLENDER_EEVEE";
const char *RE_engine_id_BLENDER_EEVEE_NEXT = "BLENDER_EEVEE_NEXT";
const char *RE_engine_id_BLENDER_WORKBENCH = "BLENDER_WORKBENCH";
const char *RE_engine_id_BLENDER_WORKBENCH_NEXT = "BLENDER_WORKBENCH_NEXT";
const char *RE_engine_id_CYCLES = "CYCLES";
void free_avicodecdata(AviCodecData *acd)
@ -2821,8 +2820,7 @@ bool BKE_scene_uses_blender_eevee(const Scene *scene)
bool BKE_scene_uses_blender_workbench(const Scene *scene)
{
return STREQ(scene->r.engine, RE_engine_id_BLENDER_WORKBENCH) ||
STREQ(scene->r.engine, RE_engine_id_BLENDER_WORKBENCH_NEXT);
return STREQ(scene->r.engine, RE_engine_id_BLENDER_WORKBENCH);
}
bool BKE_scene_uses_cycles(const Scene *scene)
@ -2844,8 +2842,7 @@ enum eCyclesFeatureSet {
bool BKE_scene_uses_cycles_experimental_features(Scene *scene)
{
BLI_assert(BKE_scene_uses_cycles(scene));
PointerRNA scene_ptr;
RNA_id_pointer_create(&scene->id, &scene_ptr);
PointerRNA scene_ptr = RNA_id_pointer_create(&scene->id);
PointerRNA cycles_ptr = RNA_pointer_get(&scene_ptr, "cycles");
if (RNA_pointer_is_null(&cycles_ptr)) {

View File

@ -75,7 +75,14 @@ void BLI_system_backtrace(FILE *fp)
char **strings;
int i;
/* include a backtrace for good measure */
/* Include a back-trace for good measure.
*
* NOTE: often values printed are addresses (no line numbers of function names),
* this information can be expanded using `addr2line`, a utility is included to
* conveniently run addr2line on the output generated here:
*
* `./tools/utils/addr2line_backtrace.py --exe=/path/to/blender trace.txt`
*/
nptrs = backtrace(buffer, SIZE);
strings = backtrace_symbols(buffer, nptrs);
for (i = 0; i < nptrs; i++) {

View File

@ -272,6 +272,7 @@ PreviewImage *BLO_blendhandle_get_preview_for_id(BlendHandle *bh,
if (preview_from_file == nullptr) {
break;
}
BKE_previewimg_runtime_data_clear(preview_from_file);
PreviewImage *result = static_cast<PreviewImage *>(MEM_dupallocN(preview_from_file));
bhead = blo_blendhandle_read_preview_rects(fd, bhead, result, preview_from_file);
@ -334,6 +335,8 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *r_
prv = static_cast<PreviewImage *>(BLO_library_read_struct(fd, bhead, "PreviewImage"));
if (prv) {
BKE_previewimg_runtime_data_clear(prv);
memcpy(new_prv, prv, sizeof(PreviewImage));
bhead = blo_blendhandle_read_preview_rects(fd, bhead, new_prv, prv);
MEM_freeN(prv);

View File

@ -34,6 +34,7 @@
#include "BLI_string_ref.hh"
#include "BKE_armature.h"
#include "BKE_attribute.h"
#include "BKE_effect.h"
#include "BKE_grease_pencil.hh"
#include "BKE_idprop.hh"
@ -87,6 +88,12 @@ static void version_bonegroup_migrate_color(Main *bmain)
bArmature *arm = reinterpret_cast<bArmature *>(ob->data);
BLI_assert_msg(GS(arm->id.name) == ID_AR,
"Expected ARMATURE object to have an Armature as data");
/* There is no guarantee that the current state of poses is in sync with the Armature data.
*
* NOTE: No need to handle user refcounting in readfile code. */
BKE_pose_ensure(bmain, ob, arm, false);
PoseSet &pose_set = armature_poses.lookup_or_add_default(arm);
pose_set.add(ob->pose);
}
@ -999,13 +1006,21 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
/* Legacy node tree sockets are created for forward compatibility,
* but have to be freed after loading and versioning. */
FOREACH_NODETREE_BEGIN (bmain, ntree, id) {
/* Clear legacy sockets after conversion.
* Internal data pointers have been moved or freed already. */
LISTBASE_FOREACH_MUTABLE (bNodeSocket *, legacy_socket, &ntree->inputs_legacy) {
MEM_SAFE_FREE(legacy_socket->default_attribute_name);
MEM_SAFE_FREE(legacy_socket->default_value);
if (legacy_socket->prop) {
IDP_FreeProperty(legacy_socket->prop);
}
MEM_delete(legacy_socket->runtime);
MEM_freeN(legacy_socket);
}
LISTBASE_FOREACH_MUTABLE (bNodeSocket *, legacy_socket, &ntree->outputs_legacy) {
MEM_SAFE_FREE(legacy_socket->default_attribute_name);
MEM_SAFE_FREE(legacy_socket->default_value);
if (legacy_socket->prop) {
IDP_FreeProperty(legacy_socket->prop);
}
MEM_delete(legacy_socket->runtime);
MEM_freeN(legacy_socket);
}
@ -1023,6 +1038,18 @@ void blo_do_versions_400(FileData *fd, Library * /*lib*/, Main *bmain)
FOREACH_NODETREE_END;
}
if (!MAIN_VERSION_FILE_ATLEAST(bmain, 400, 23)) {
LISTBASE_FOREACH (bNodeTree *, ntree, &bmain->nodetrees) {
if (ntree->type == NTREE_GEOMETRY) {
LISTBASE_FOREACH (bNode *, node, &ntree->nodes) {
if (node->type == GEO_NODE_SET_SHADE_SMOOTH) {
node->custom1 = ATTR_DOMAIN_FACE;
}
}
}
}
}
/**
* Versioning code until next subversion bump goes here.
*

View File

@ -135,22 +135,22 @@ void NodeInput::set_link(NodeOutput *link)
float NodeInput::get_editor_value_float() const
{
PointerRNA ptr;
RNA_pointer_create((ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket(), &ptr);
PointerRNA ptr = RNA_pointer_create(
(ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket());
return RNA_float_get(&ptr, "default_value");
}
void NodeInput::get_editor_value_color(float *value) const
{
PointerRNA ptr;
RNA_pointer_create((ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket(), &ptr);
PointerRNA ptr = RNA_pointer_create(
(ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket());
return RNA_float_get_array(&ptr, "default_value", value);
}
void NodeInput::get_editor_value_vector(float *value) const
{
PointerRNA ptr;
RNA_pointer_create((ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket(), &ptr);
PointerRNA ptr = RNA_pointer_create(
(ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket());
return RNA_float_get_array(&ptr, "default_value", value);
}
@ -165,22 +165,22 @@ NodeOutput::NodeOutput(Node *node, bNodeSocket *b_socket, DataType datatype)
float NodeOutput::get_editor_value_float()
{
PointerRNA ptr;
RNA_pointer_create((ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket(), &ptr);
PointerRNA ptr = RNA_pointer_create(
(ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket());
return RNA_float_get(&ptr, "default_value");
}
void NodeOutput::get_editor_value_color(float *value)
{
PointerRNA ptr;
RNA_pointer_create((ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket(), &ptr);
PointerRNA ptr = RNA_pointer_create(
(ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket());
return RNA_float_get_array(&ptr, "default_value", value);
}
void NodeOutput::get_editor_value_vector(float *value)
{
PointerRNA ptr;
RNA_pointer_create((ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket(), &ptr);
PointerRNA ptr = RNA_pointer_create(
(ID *)get_node()->get_bnodetree(), &RNA_NodeSocket, get_bnode_socket());
return RNA_float_get_array(&ptr, "default_value", value);
}

View File

@ -102,7 +102,7 @@ AnimatedPropertyStorage::AnimatedPropertyStorage() : is_fully_initialized(false)
void AnimatedPropertyStorage::initializeFromID(DepsgraphBuilderCache *builder_cache, const ID *id)
{
AnimatedPropertyCallbackData data;
RNA_id_pointer_create(const_cast<ID *>(id), &data.pointer_rna);
data.pointer_rna = RNA_id_pointer_create(const_cast<ID *>(id));
data.animated_property_storage = this;
data.builder_cache = builder_cache;
BKE_fcurves_id_cb(const_cast<ID *>(id), animated_property_cb, &data);

View File

@ -70,8 +70,7 @@ string OperationKey::identifier() const
RNAPathKey::RNAPathKey(ID *id, const char *path, RNAPointerSource source) : id(id), source(source)
{
/* Create ID pointer for root of path lookup. */
PointerRNA id_ptr;
RNA_id_pointer_create(id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(id);
/* Try to resolve path. */
int index;
if (!RNA_path_resolve_full(&id_ptr, path, &ptr, &prop, &index)) {

View File

@ -1276,8 +1276,7 @@ void DepsgraphNodeBuilder::build_driver(ID *id, FCurve *fcurve, int driver_index
void DepsgraphNodeBuilder::build_driver_variables(ID *id, FCurve *fcurve)
{
PointerRNA id_ptr;
RNA_id_pointer_create(id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(id);
build_driver_id_property(id_ptr, fcurve->rna_path);
@ -1321,8 +1320,7 @@ void DepsgraphNodeBuilder::build_driver_scene_camera_variable(Scene *scene,
/* This skips scene->camera, which was already handled by the caller. */
LISTBASE_FOREACH (TimeMarker *, marker, &scene->markers) {
if (!ELEM(marker->camera, nullptr, scene->camera)) {
PointerRNA camera_ptr;
RNA_id_pointer_create(&marker->camera->id, &camera_ptr);
PointerRNA camera_ptr = RNA_id_pointer_create(&marker->camera->id);
build_driver_id_property(camera_ptr, camera_path);
}
}

View File

@ -1576,8 +1576,7 @@ void DepsgraphRelationBuilder::build_animdata_curves_targets(ID *id,
ListBase *curves)
{
/* Iterate over all curves and build relations. */
PointerRNA id_ptr;
RNA_id_pointer_create(id, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(id);
LISTBASE_FOREACH (FCurve *, fcu, curves) {
PointerRNA ptr;
PropertyRNA *prop;
@ -1833,9 +1832,8 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
* data-block, which means driver execution should wait for that
* data-block to be copied. */
{
PointerRNA id_ptr;
PointerRNA id_ptr = RNA_id_pointer_create(id);
PointerRNA ptr;
RNA_id_pointer_create(id, &id_ptr);
if (RNA_path_resolve_full(&id_ptr, fcu->rna_path, &ptr, nullptr, nullptr)) {
if (id_ptr.owner_id != ptr.owner_id) {
ComponentKey cow_key(ptr.owner_id, NodeType::COPY_ON_WRITE);
@ -1977,8 +1975,7 @@ void DepsgraphRelationBuilder::build_driver_scene_camera_variable(const Operatio
LISTBASE_FOREACH (TimeMarker *, marker, &scene->markers) {
if (!ELEM(marker->camera, nullptr, scene->camera)) {
PointerRNA camera_ptr;
RNA_id_pointer_create(&marker->camera->id, &camera_ptr);
PointerRNA camera_ptr = RNA_id_pointer_create(&marker->camera->id);
build_driver_id_property(camera_ptr, rna_path);
build_driver_rna_path_variable(driver_key, self_key, &scene->id, camera_ptr, rna_path);
animated = true;

View File

@ -166,8 +166,7 @@ void DepsgraphRelationBuilder::build_driver_relations(IDNode *id_node)
/* Mapping from RNA prefix -> set of driver descriptors: */
Map<string, Vector<DriverDescriptor>> driver_groups;
PointerRNA id_ptr;
RNA_id_pointer_create(id_orig, &id_ptr);
PointerRNA id_ptr = RNA_id_pointer_create(id_orig);
LISTBASE_FOREACH (FCurve *, fcu, &adt->drivers) {
if (fcu->rna_path == nullptr) {

View File

@ -77,8 +77,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *object,
* one Init IK node per armature, this link has quite high risk of spurious dependency cycles.
*/
const bool is_itasc = (object->pose->iksolver == IKSOLVER_ITASC);
PointerRNA con_ptr;
RNA_pointer_create(&object->id, &RNA_Constraint, con, &con_ptr);
PointerRNA con_ptr = RNA_pointer_create(&object->id, &RNA_Constraint, con);
if (is_itasc || cache_->isAnyPropertyAnimated(&con_ptr)) {
add_relation(pchan_local_key, init_ik_key, "IK Constraint -> Init IK Tree");
}

View File

@ -256,8 +256,7 @@ void DEG_get_evaluated_rna_pointer(const Depsgraph *depsgraph,
* common types too above (e.g. modifiers) */
char *path = RNA_path_from_ID_to_struct(ptr);
if (path) {
PointerRNA cow_id_ptr;
RNA_id_pointer_create(cow_id, &cow_id_ptr);
PointerRNA cow_id_ptr = RNA_id_pointer_create(cow_id);
if (!RNA_path_resolve(&cow_id_ptr, path, r_ptr_eval, nullptr)) {
/* Couldn't find COW copy of data */
fprintf(stderr,

View File

@ -87,7 +87,7 @@ void AnimationBackup::init_from_id(ID *id)
AnimatedPropertyStoreCalbackData data;
data.backup = this;
data.id = id;
RNA_id_pointer_create(id, &data.id_pointer_rna);
data.id_pointer_rna = RNA_id_pointer_create(id);
BKE_fcurves_id_cb(id, animated_property_store_cb, &data);
}
@ -95,8 +95,7 @@ void AnimationBackup::restore_to_id(ID *id)
{
return;
PointerRNA id_pointer_rna;
RNA_id_pointer_create(id, &id_pointer_rna);
PointerRNA id_pointer_rna = RNA_id_pointer_create(id);
for (const AnimationValueBackup &value_backup : values_backup) {
/* Resolve path to the property.
*

View File

@ -166,31 +166,18 @@ set(SRC
engines/eevee_next/eevee_view.cc
engines/eevee_next/eevee_volume.cc
engines/eevee_next/eevee_world.cc
engines/workbench/workbench_data.cc
engines/workbench/workbench_effect_antialiasing.cc
engines/workbench/workbench_effect_antialiasing_c.cc
engines/workbench/workbench_effect_cavity.cc
engines/workbench/workbench_effect_cavity_c.cc
engines/workbench/workbench_effect_dof.cc
engines/workbench/workbench_effect_dof_c.cc
engines/workbench/workbench_effect_outline.cc
engines/workbench/workbench_effect_outline_c.cc
engines/workbench/workbench_engine.cc
engines/workbench/workbench_engine_c.cc
engines/workbench/workbench_materials.cc
engines/workbench/workbench_materials_next.cc
engines/workbench/workbench_mesh_passes.cc
engines/workbench/workbench_opaque.cc
engines/workbench/workbench_render.cc
engines/workbench/workbench_resources.cc
engines/workbench/workbench_shader.cc
engines/workbench/workbench_shader_cache.cc
engines/workbench/workbench_shadow.cc
engines/workbench/workbench_shadow_c.cc
engines/workbench/workbench_state.cc
engines/workbench/workbench_transparent.cc
engines/workbench/workbench_volume.cc
engines/workbench/workbench_volume_next.cc
engines/external/external_engine.cc
engines/gpencil/gpencil_antialiasing.cc
engines/gpencil/gpencil_cache_utils.cc
@ -354,7 +341,6 @@ set(SRC
engines/workbench/workbench_defines.hh
engines/workbench/workbench_engine.h
engines/workbench/workbench_enums.hh
engines/workbench/workbench_private.h
engines/workbench/workbench_private.hh
engines/workbench/workbench_shader_shared.h
)
@ -564,6 +550,7 @@ set(GLSL_SRC
engines/eevee_next/shaders/eevee_shadow_tag_usage_lib.glsl
engines/eevee_next/shaders/eevee_shadow_tag_usage_surfels_comp.glsl
engines/eevee_next/shaders/eevee_shadow_tag_usage_vert.glsl
engines/eevee_next/shaders/eevee_shadow_tag_usage_volume_comp.glsl
engines/eevee_next/shaders/eevee_shadow_test.glsl
engines/eevee_next/shaders/eevee_shadow_tilemap_bounds_comp.glsl
engines/eevee_next/shaders/eevee_shadow_tilemap_finalize_comp.glsl
@ -598,9 +585,7 @@ set(GLSL_SRC
engines/workbench/shaders/workbench_cavity_lib.glsl
engines/workbench/shaders/workbench_common_lib.glsl
engines/workbench/shaders/workbench_composite_frag.glsl
engines/workbench/shaders/workbench_next_composite_frag.glsl
engines/workbench/shaders/workbench_curvature_lib.glsl
engines/workbench/shaders/workbench_effect_cavity_frag.glsl
engines/workbench/shaders/workbench_effect_dof_frag.glsl
engines/workbench/shaders/workbench_effect_outline_frag.glsl
engines/workbench/shaders/workbench_effect_smaa_frag.glsl
@ -610,8 +595,7 @@ set(GLSL_SRC
engines/workbench/shaders/workbench_image_lib.glsl
engines/workbench/shaders/workbench_matcap_lib.glsl
engines/workbench/shaders/workbench_material_lib.glsl
engines/workbench/shaders/workbench_merge_infront_frag.glsl
engines/workbench/shaders/workbench_next_merge_depth_frag.glsl
engines/workbench/shaders/workbench_merge_depth_frag.glsl
engines/workbench/shaders/workbench_overlay_depth_frag.glsl
engines/workbench/shaders/workbench_prepass_frag.glsl
engines/workbench/shaders/workbench_prepass_hair_vert.glsl

View File

@ -109,6 +109,7 @@ void Instance::init_light_bake(Depsgraph *depsgraph, draw::Manager *manager)
/* Irradiance Cache needs reflection probes to be initialized. */
reflection_probes.init();
irradiance_cache.init();
volume.init();
}
void Instance::set_time(float time)

View File

@ -216,6 +216,8 @@ const char *ShaderModule::static_shader_create_info_name_get(eShaderType shader_
return "eevee_shadow_tag_usage_surfels";
case SHADOW_TILEMAP_TAG_USAGE_TRANSPARENT:
return "eevee_shadow_tag_usage_transparent";
case SHADOW_TILEMAP_TAG_USAGE_VOLUME:
return "eevee_shadow_tag_usage_volume";
case SUBSURFACE_EVAL:
return "eevee_subsurface_eval";
case SURFEL_CLUSTER_BUILD:

View File

@ -106,6 +106,7 @@ enum eShaderType {
SHADOW_TILEMAP_TAG_USAGE_OPAQUE,
SHADOW_TILEMAP_TAG_USAGE_SURFELS,
SHADOW_TILEMAP_TAG_USAGE_TRANSPARENT,
SHADOW_TILEMAP_TAG_USAGE_VOLUME,
SUBSURFACE_EVAL,

View File

@ -472,6 +472,8 @@ struct VolumesInfoData {
packed_int3 tex_size;
float light_clamp;
packed_float3 inv_tex_size;
int tile_size;
int tile_size_lod;
float shadow_steps;
bool1 use_lights;
bool1 use_soft_shadows;
@ -479,8 +481,6 @@ struct VolumesInfoData {
float depth_far;
float depth_distribution;
float _pad0;
float _pad1;
float _pad2;
};
BLI_STATIC_ASSERT_ALIGN(VolumesInfoData, 16)

View File

@ -928,7 +928,10 @@ void ShadowModule::end_sync()
sub.bind_ssbo("bounds_buf", &manager.bounds_buf.current());
sub.push_constant("resource_len", int(curr_casters_.size()));
inst_.lights.bind_resources(&sub);
sub.dispatch(int3(divide_ceil_u(curr_casters_.size(), SHADOW_BOUNDS_GROUP_SIZE), 1, 1));
sub.dispatch(int3(
divide_ceil_u(std::max(curr_casters_.size(), int64_t(1)), SHADOW_BOUNDS_GROUP_SIZE),
1,
1));
sub.barrier(GPU_BARRIER_SHADER_STORAGE);
}
{
@ -969,7 +972,23 @@ void ShadowModule::end_sync()
}
}
/* Usage tagging happens between these two steps. */
/* Non volume usage tagging happens between these two steps.
* (Setup at begin_sync) */
if (inst_.volume.needs_shadow_tagging() && !inst_.is_baking()) {
PassMain::Sub &sub = tilemap_usage_ps_.sub("World Volume");
sub.shader_set(inst_.shaders.static_shader_get(SHADOW_TILEMAP_TAG_USAGE_VOLUME));
sub.bind_ssbo("tilemaps_buf", &tilemap_pool.tilemaps_data);
sub.bind_ssbo("tiles_buf", &tilemap_pool.tiles_data);
sub.push_constant("tilemap_projection_ratio", &tilemap_projection_ratio_);
inst_.hiz_buffer.bind_resources(&sub);
inst_.sampling.bind_resources(&sub);
inst_.lights.bind_resources(&sub);
inst_.volume.bind_resources(sub);
inst_.volume.bind_properties_buffers(sub);
sub.barrier(GPU_BARRIER_SHADER_IMAGE_ACCESS);
sub.dispatch(math::divide_ceil(inst_.volume.grid_size(), int3(VOLUME_GROUP_SIZE)));
}
{
PassSimple &pass = tilemap_update_ps_;

Some files were not shown because too many files have changed in this diff Show More