[Bf-blender-cvs] [44517c5f217] blender2.8: Merge commit '212a8d9e5ae7' into blender2.8
Dalai Felinto
noreply at git.blender.org
Wed Nov 15 10:43:39 CET 2017
Commit: 44517c5f2177d1f260ba691fb59fbacfef576915
Author: Dalai Felinto
Date: Wed Nov 15 07:11:01 2017 -0200
Branches: blender2.8
https://developer.blender.org/rB44517c5f2177d1f260ba691fb59fbacfef576915
Merge commit '212a8d9e5ae7' into blender2.8
Considerable non-trivial merge conflict fixes.
===================================================================
===================================================================
diff --cc intern/cycles/blender/blender_object.cpp
index a25ae278058,f02d5496112..ee153b8602d
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@@ -112,7 -112,7 +112,8 @@@ static uint object_ray_visibility(BL::O
void BlenderSync::sync_light(BL::Object& b_parent,
int persistent_id[OBJECT_PERSISTENT_ID_SIZE],
BL::Object& b_ob,
- BL::DupliObject& b_dupli_ob,
+ BL::Object& b_ob_instance,
++ int random_id,
Transform& tfm,
bool *use_portal)
{
@@@ -194,6 -194,13 +195,13 @@@
light->max_bounces = get_int(clamp, "max_bounces");
- if(b_dupli_ob) {
- light->random_id = b_dupli_ob.random_id();
++ if(b_ob != b_ob_instance) {
++ light->random_id = random_id;
+ }
+ else {
+ light->random_id = hash_int_2d(hash_string(b_ob.name().c_str()), 0);
+ }
+
if(light->type == LIGHT_AREA)
light->is_portal = get_boolean(clamp, "is_portal");
else
@@@ -280,16 -278,8 +288,17 @@@ Object *BlenderSync::sync_object(BL::De
/* light is handled separately */
if(object_is_light(b_ob)) {
/* don't use lamps for excluded layers used as mask layer */
- if(!motion && !((layer_flag & render_layer.holdout_layer) && (layer_flag & render_layer.exclude_layer)))
- sync_light(b_parent, persistent_id, b_ob, b_dupli_ob, tfm, use_portal);
+ if(!motion && !((layer_flag & render_layer.holdout_layer) &&
+ (layer_flag & render_layer.exclude_layer)))
+ {
+ sync_light(b_parent,
+ persistent_id,
+ b_ob,
+ b_ob_instance,
++ b_dupli_iter->random_id(),
+ tfm,
+ use_portal);
+ }
return NULL;
}
diff --cc intern/cycles/blender/blender_sync.h
index 544836f0979,e7b71ae9310..88f7ea7975c
--- a/intern/cycles/blender/blender_sync.h
+++ b/intern/cycles/blender/blender_sync.h
@@@ -133,7 -131,7 +133,8 @@@ private
void sync_light(BL::Object& b_parent,
int persistent_id[OBJECT_PERSISTENT_ID_SIZE],
BL::Object& b_ob,
- BL::DupliObject& b_dupli_ob,
+ BL::Object& b_ob_instance,
++ int random_id,
Transform& tfm,
bool *use_portal);
void sync_background_light(bool use_portal);
diff --cc source/blender/makesrna/intern/makesrna.c
index 720f7324bdb,2c558e56412..6c6407789a0
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@@ -3704,6 -3700,6 +3704,9 @@@ static const char *cpp_classes = "
" operator void*() { return ptr.data; }\n"
" operator bool() { return ptr.data != NULL; }\n"
"\n"
++" bool operator==(const Pointer &other) { return ptr.data == other.ptr.data; }\n"
++" bool operator!=(const Pointer &other) { return ptr.data != other.ptr.data; }\n"
++"\n"
" PointerRNA ptr;\n"
"};\n"
"\n"
More information about the Bf-blender-cvs
mailing list