Merge branch 'blender-v4.3-release'

This commit is contained in:
Philipp Oeser
2024-10-16 18:30:05 +02:00
3 changed files with 37 additions and 6 deletions

View File

@@ -39,6 +39,8 @@ if not issue:
issue = "#100749"
elif version.startswith("3.6."):
issue = "#109399"
elif version.startswith("4.2."):
issue = "#124452"
else:
raise ValueError("Specify --issue or update script to include issue number for this version")

View File

@@ -1141,7 +1141,11 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
if (CU_IS_2D(cu)) {
BKE_nurb_project_2d(nu);
}
BKE_nurb_handles_test(nu, NURB_HANDLE_TEST_EACH, false); /* test for bezier too */
/* In the case of weight, tilt or radius (these dont don't change positions), dont change
* handle types. */
if ((nu->type == CU_BEZIER) && apply_vcos) {
BKE_nurb_handles_test(nu, NURB_HANDLE_TEST_EACH, false); /* test for bezier too */
}
}
}
else if ((ob->type == OB_LATTICE) && (apply_vcos || median_basis.lattice.weight)) {

View File

@@ -479,20 +479,45 @@ static void rna_ParticleSystem_co_hair(
}
static const EnumPropertyItem *rna_Particle_Material_itemf(bContext *C,
PointerRNA * /*ptr*/,
PointerRNA *ptr,
PropertyRNA * /*prop*/,
bool *r_free)
{
Object *ob = static_cast<Object *>(CTX_data_pointer_get(C, "object").data);
ParticleSettings *part = reinterpret_cast<ParticleSettings *>(ptr->owner_id);
/* The context object might not be what we want when doing this from python. */
Object *ob_found = nullptr;
Object *ob_context = static_cast<Object *>(CTX_data_pointer_get(C, "object").data);
LISTBASE_FOREACH (ParticleSystem *, psys, &ob_context->particlesystem) {
if (psys->part == part) {
ob_found = ob_context;
}
}
if (ob_found == nullptr) {
/* Iterating over all object is slow, but no better solution exists at the moment. */
for (Object *ob = static_cast<Object *>(CTX_data_main(C)->objects.first); ob;
ob = static_cast<Object *>(ob->id.next))
{
LISTBASE_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
if (psys->part == part) {
ob_found = ob;
}
}
}
}
Material *ma;
EnumPropertyItem *item = nullptr;
EnumPropertyItem tmp = {0, "", 0, "", ""};
int totitem = 0;
int i;
if (ob && ob->totcol > 0) {
for (i = 1; i <= ob->totcol; i++) {
ma = BKE_object_material_get(ob, i);
if (ob_found && ob_found->totcol > 0) {
for (i = 1; i <= ob_found->totcol; i++) {
ma = BKE_object_material_get(ob_found, i);
tmp.value = i;
tmp.icon = ICON_MATERIAL_DATA;
if (ma) {