Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_image.cpp
| Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | void BlenderSession::builtin_images_load() | ||||
| /* Force builtin images to be loaded along with Blender data sync. This | /* Force builtin images to be loaded along with Blender data sync. This | ||||
| * is needed because we may be reading from depsgraph evaluated data which | * is needed because we may be reading from depsgraph evaluated data which | ||||
| * can be freed by Blender before Cycles reads it. | * can be freed by Blender before Cycles reads it. | ||||
| * | * | ||||
| * TODO: the assumption that no further access to builtin image data will | * TODO: the assumption that no further access to builtin image data will | ||||
| * happen is really weak, and likely to break in the future. We should find | * happen is really weak, and likely to break in the future. We should find | ||||
| * a better solution to hand over the data directly to the image manager | * a better solution to hand over the data directly to the image manager | ||||
| * instead of through callbacks whose timing is difficult to control. */ | * instead of through callbacks whose timing is difficult to control. */ | ||||
| ImageManager *manager = session->scene->image_manager; | ImageManager *manager = session->get_scene()->get_image_manager(); | ||||
| Device *device = session->device; | Device *device = session->get_device(); | ||||
| manager->device_load_builtin(device, session->scene, session->progress); | manager->device_load_builtin(device, session->get_scene(), session->get_progress()); | ||||
| } | } | ||||
| string BlenderPointDensityLoader::name() const | string BlenderPointDensityLoader::name() const | ||||
| { | { | ||||
| return BL::ShaderNodeTexPointDensity(b_node).name(); | return BL::ShaderNodeTexPointDensity(b_node).name(); | ||||
| } | } | ||||
| bool BlenderPointDensityLoader::equals(const ImageLoader &other) const | bool BlenderPointDensityLoader::equals(const ImageLoader &other) const | ||||
| { | { | ||||
| const BlenderPointDensityLoader &other_loader = (const BlenderPointDensityLoader &)other; | const BlenderPointDensityLoader &other_loader = (const BlenderPointDensityLoader &)other; | ||||
| return b_node == other_loader.b_node && b_depsgraph == other_loader.b_depsgraph; | return b_node == other_loader.b_node && b_depsgraph == other_loader.b_depsgraph; | ||||
| } | } | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||