forked from bartvdbraak/blender
Fix #33135: cycles object info random number not working anymore.
This commit is contained in:
parent
5ebe7d6a13
commit
5ddc5fbfb3
@ -267,10 +267,15 @@ Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_P
|
|||||||
object->motion.post = tfm;
|
object->motion.post = tfm;
|
||||||
object->use_motion = false;
|
object->use_motion = false;
|
||||||
|
|
||||||
|
/* random number */
|
||||||
object->random_id = hash_string(object->name.c_str());
|
object->random_id = hash_string(object->name.c_str());
|
||||||
if(persistent_id)
|
|
||||||
|
if(persistent_id) {
|
||||||
for(int i = 0; i < OBJECT_PERSISTENT_ID_SIZE; i++)
|
for(int i = 0; i < OBJECT_PERSISTENT_ID_SIZE; i++)
|
||||||
object->random_id = hash_int_2d(object->random_id, persistent_id[i]);
|
object->random_id = hash_int_2d(object->random_id, persistent_id[i]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
object->random_id = hash_int_2d(object->random_id, 0);
|
||||||
|
|
||||||
/* visibility flags for both parent */
|
/* visibility flags for both parent */
|
||||||
object->visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL;
|
object->visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL;
|
||||||
|
@ -422,7 +422,7 @@ class USERPREF_PT_system(Panel):
|
|||||||
col.separator()
|
col.separator()
|
||||||
col.separator()
|
col.separator()
|
||||||
|
|
||||||
if hasattr(system, "compute_device"):
|
if hasattr(system, "compute_device_type"):
|
||||||
col.label(text="Compute Device:")
|
col.label(text="Compute Device:")
|
||||||
col.row().prop(system, "compute_device_type", expand=True)
|
col.row().prop(system, "compute_device_type", expand=True)
|
||||||
sub = col.row()
|
sub = col.row()
|
||||||
|
Loading…
Reference in New Issue
Block a user