Merge remote-tracking branch 'origin/blender-v2.82-release'
This commit is contained in:
commit
52c96b60a0
|
@ -1091,6 +1091,18 @@ static void do_version_curvemapping_walker(Main *bmain, void (*callback)(CurveMa
|
|||
}
|
||||
}
|
||||
|
||||
static void do_version_fcurve_hide_viewport_fix(struct ID *UNUSED(id),
|
||||
struct FCurve *fcu,
|
||||
void *UNUSED(user_data))
|
||||
{
|
||||
if (strcmp(fcu->rna_path, "hide")) {
|
||||
return;
|
||||
}
|
||||
|
||||
MEM_freeN(fcu->rna_path);
|
||||
fcu->rna_path = BLI_strdupn("hide_viewport", 13);
|
||||
}
|
||||
|
||||
void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
|
||||
{
|
||||
bool use_collection_compat_28 = true;
|
||||
|
@ -1524,6 +1536,25 @@ void do_versions_after_linking_280(Main *bmain, ReportList *UNUSED(reports))
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Versioning code until next subversion bump goes here.
|
||||
*
|
||||
* \note Be sure to check when bumping the version:
|
||||
* - "versioning_userdef.c", #BLO_version_defaults_userpref_blend
|
||||
* - "versioning_userdef.c", #do_versions_theme
|
||||
*
|
||||
* \note Keep this message at the bottom of the function.
|
||||
*/
|
||||
{
|
||||
/* Keep this block, even when empty. */
|
||||
|
||||
/* During development of Blender 2.80 the "Object.hide" property was
|
||||
* removed, and reintroduced in 5e968a996a53 as "Object.hide_viewport". */
|
||||
LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
|
||||
BKE_fcurves_id_cb(&ob->id, do_version_fcurve_hide_viewport_fix, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* NOTE: This version patch is intended for versions < 2.52.2,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
flat in int objectId;
|
||||
flat in uint objectId;
|
||||
|
||||
/* using uint because 16bit uint can contain more ids than int. */
|
||||
out uint outId;
|
||||
|
||||
void main()
|
||||
{
|
||||
outId = uint(objectId);
|
||||
outId = objectId;
|
||||
}
|
||||
|
|
|
@ -3,9 +3,9 @@ layout(lines_adjacency) in;
|
|||
layout(line_strip, max_vertices = 2) out;
|
||||
|
||||
in vec3 vPos[];
|
||||
in int objectId_g[];
|
||||
in uint objectId_g[];
|
||||
|
||||
flat out int objectId;
|
||||
flat out uint objectId;
|
||||
|
||||
void vert_from_gl_in(int v)
|
||||
{
|
||||
|
|
|
@ -5,14 +5,14 @@ in vec3 pos;
|
|||
|
||||
#ifdef USE_GEOM
|
||||
out vec3 vPos;
|
||||
out int objectId_g;
|
||||
out uint objectId_g;
|
||||
# define objectId objectId_g
|
||||
#else
|
||||
|
||||
flat out int objectId;
|
||||
flat out uint objectId;
|
||||
#endif
|
||||
|
||||
int outline_colorid_get(void)
|
||||
uint outline_colorid_get(void)
|
||||
{
|
||||
int flag = int(abs(ObjectInfo.w));
|
||||
bool is_from_dupli = (flag & DRW_BASE_FROM_DUPLI) != 0;
|
||||
|
@ -20,24 +20,24 @@ int outline_colorid_get(void)
|
|||
|
||||
if (is_from_dupli) {
|
||||
if (isTransform) {
|
||||
return 0; /* colorTransform */
|
||||
return 0u; /* colorTransform */
|
||||
}
|
||||
else {
|
||||
return 2; /* colorDupliSelect */
|
||||
return 2u; /* colorDupliSelect */
|
||||
}
|
||||
}
|
||||
|
||||
if (isTransform) {
|
||||
return 0; /* colorTransform */
|
||||
return 0u; /* colorTransform */
|
||||
}
|
||||
else if (is_active) {
|
||||
return 3; /* colorActive */
|
||||
return 3u; /* colorActive */
|
||||
}
|
||||
else {
|
||||
return 1; /* colorSelect */
|
||||
return 1u; /* colorSelect */
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0u;
|
||||
}
|
||||
|
||||
/* Replace top 2 bits (of the 16bit output) by outlineId.
|
||||
|
@ -56,13 +56,13 @@ void main()
|
|||
gl_Position.z -= 1e-3;
|
||||
|
||||
/* ID 0 is nothing (background) */
|
||||
objectId = resource_handle + 1;
|
||||
objectId = uint(resource_handle + 1);
|
||||
|
||||
/* Should be 2 bits only [0..3]. */
|
||||
int outline_id = outline_colorid_get();
|
||||
uint outline_id = outline_colorid_get();
|
||||
|
||||
/* Combine for 16bit uint target. */
|
||||
objectId = (outline_id << 14) | ((objectId << SHIFT) >> SHIFT);
|
||||
objectId = (outline_id << 14u) | ((objectId << SHIFT) >> SHIFT);
|
||||
|
||||
#ifdef USE_WORLD_CLIP_PLANES
|
||||
world_clip_planes_calc_clip_distance(world_pos);
|
||||
|
|
Loading…
Reference in New Issue