Merge branch 'blender-v3.1-release'
This commit is contained in:
commit
19403fc852
|
@ -1485,7 +1485,8 @@ class CyclesPreferences(bpy.types.AddonPreferences):
|
|||
if sys.platform[:3] == "win":
|
||||
col.label(text="and AMD Radeon Pro 21.Q4 driver or newer", icon='BLANK1')
|
||||
elif device_type == 'METAL':
|
||||
col.label(text="Requires Apple Silicon and macOS 12.0 or newer", icon='BLANK1')
|
||||
col.label(text="Requires Apple Silicon with macOS 12.2 or newer", icon='BLANK1')
|
||||
col.label(text="or AMD with macOS 12.3 or newer", icon='BLANK1')
|
||||
return
|
||||
|
||||
for device in devices:
|
||||
|
|
|
@ -97,7 +97,10 @@ void Session::start()
|
|||
{
|
||||
/* Signal session thread to start rendering. */
|
||||
thread_scoped_lock session_thread_lock(session_thread_mutex_);
|
||||
assert(session_thread_state_ == SESSION_THREAD_WAIT);
|
||||
if (session_thread_state_ == SESSION_THREAD_RENDER) {
|
||||
/* Already rendering, nothing to do. */
|
||||
return;
|
||||
}
|
||||
session_thread_state_ = SESSION_THREAD_RENDER;
|
||||
}
|
||||
|
||||
|
|
|
@ -1037,7 +1037,12 @@ static Mesh *mesh_new_from_mesh(Object *object, Mesh *mesh)
|
|||
{
|
||||
/* While we could copy this into the new mesh,
|
||||
* add the data to 'mesh' so future calls to this function don't need to re-convert the data. */
|
||||
BKE_mesh_wrapper_ensure_mdata(mesh);
|
||||
if (mesh->runtime.wrapper_type == ME_WRAPPER_TYPE_BMESH) {
|
||||
BKE_mesh_wrapper_ensure_mdata(mesh);
|
||||
}
|
||||
else {
|
||||
BKE_mesh_wrapper_ensure_subdivision(object, mesh);
|
||||
}
|
||||
|
||||
Mesh *mesh_result = (Mesh *)BKE_id_copy_ex(
|
||||
nullptr, &mesh->id, nullptr, LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT);
|
||||
|
@ -1074,6 +1079,7 @@ static Mesh *mesh_new_from_mesh_object_with_layers(Depsgraph *depsgraph,
|
|||
mask.pmask |= CD_MASK_ORIGINDEX;
|
||||
}
|
||||
Mesh *result = mesh_create_eval_final(depsgraph, scene, &object_for_eval, &mask);
|
||||
BKE_mesh_wrapper_ensure_subdivision(object, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -6329,6 +6329,10 @@ void uiTemplateNodeSocket(uiLayout *layout, bContext *UNUSED(C), float color[4])
|
|||
|
||||
void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr)
|
||||
{
|
||||
if (RNA_pointer_is_null(fileptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */
|
||||
uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr);
|
||||
|
||||
|
@ -6338,6 +6342,10 @@ void uiTemplateCacheFileVelocity(uiLayout *layout, PointerRNA *fileptr)
|
|||
|
||||
void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerRNA *fileptr)
|
||||
{
|
||||
if (RNA_pointer_is_null(fileptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */
|
||||
uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr);
|
||||
|
||||
|
@ -6384,6 +6392,10 @@ void uiTemplateCacheFileProcedural(uiLayout *layout, const bContext *C, PointerR
|
|||
|
||||
void uiTemplateCacheFileTimeSettings(uiLayout *layout, PointerRNA *fileptr)
|
||||
{
|
||||
if (RNA_pointer_is_null(fileptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */
|
||||
uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr);
|
||||
|
||||
|
@ -6434,6 +6446,10 @@ uiListType *UI_UL_cache_file_layers()
|
|||
|
||||
void uiTemplateCacheFileLayers(uiLayout *layout, const bContext *C, PointerRNA *fileptr)
|
||||
{
|
||||
if (RNA_pointer_is_null(fileptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Ensure that the context has a CacheFile as this may not be set inside of modifiers panels. */
|
||||
uiLayoutSetContextPointer(layout, "edit_cachefile", fileptr);
|
||||
|
||||
|
|
|
@ -331,6 +331,7 @@ const EnumPropertyItem rna_enum_object_axis_items[] = {
|
|||
# include "BKE_key.h"
|
||||
# include "BKE_material.h"
|
||||
# include "BKE_mesh.h"
|
||||
# include "BKE_mesh_wrapper.h"
|
||||
# include "BKE_modifier.h"
|
||||
# include "BKE_object.h"
|
||||
# include "BKE_particle.h"
|
||||
|
@ -510,6 +511,17 @@ void rna_Object_data_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
|||
rna_Object_internal_update_data_dependency(bmain, scene, ptr);
|
||||
}
|
||||
|
||||
static PointerRNA rna_Object_data_get(PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->data;
|
||||
if (ob->type == OB_MESH) {
|
||||
Mesh *me = (Mesh *)ob->data;
|
||||
me = BKE_mesh_wrapper_ensure_subdivision(ob, me);
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_Mesh, me);
|
||||
}
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_ID, ob->data);
|
||||
}
|
||||
|
||||
static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value, struct ReportList *reports)
|
||||
{
|
||||
Object *ob = (Object *)ptr->data;
|
||||
|
@ -3041,8 +3053,11 @@ static void rna_def_object(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "data", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "ID");
|
||||
RNA_def_property_pointer_funcs(
|
||||
prop, NULL, "rna_Object_data_set", "rna_Object_data_typef", "rna_Object_data_poll");
|
||||
RNA_def_property_pointer_funcs(prop,
|
||||
"rna_Object_data_get",
|
||||
"rna_Object_data_set",
|
||||
"rna_Object_data_typef",
|
||||
"rna_Object_data_poll");
|
||||
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
|
||||
RNA_def_property_ui_text(prop, "Data", "Object data");
|
||||
RNA_def_property_update(prop, 0, "rna_Object_data_update");
|
||||
|
|
|
@ -329,10 +329,6 @@ static void velocity_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
|||
return;
|
||||
}
|
||||
|
||||
if (RNA_pointer_is_null(&fileptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
uiLayoutSetPropSep(layout, true);
|
||||
uiTemplateCacheFileVelocity(layout, &fileptr);
|
||||
uiItemR(layout, ptr, "velocity_scale", 0, NULL, ICON_NONE);
|
||||
|
@ -350,10 +346,6 @@ static void time_panel_draw(const bContext *UNUSED(C), Panel *panel)
|
|||
return;
|
||||
}
|
||||
|
||||
if (RNA_pointer_is_null(&fileptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
uiLayoutSetPropSep(layout, true);
|
||||
uiTemplateCacheFileTimeSettings(layout, &fileptr);
|
||||
}
|
||||
|
@ -370,10 +362,6 @@ static void render_procedural_panel_draw(const bContext *C, Panel *panel)
|
|||
return;
|
||||
}
|
||||
|
||||
if (RNA_pointer_is_null(&fileptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
uiLayoutSetPropSep(layout, true);
|
||||
uiTemplateCacheFileProcedural(layout, C, &fileptr);
|
||||
}
|
||||
|
@ -390,10 +378,6 @@ static void override_layers_panel_draw(const bContext *C, Panel *panel)
|
|||
return;
|
||||
}
|
||||
|
||||
if (RNA_pointer_is_null(&fileptr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
uiLayoutSetPropSep(layout, true);
|
||||
uiTemplateCacheFileLayers(layout, C, &fileptr);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue