Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_util.h
| Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | |||||
| static inline string image_user_file_path(BL::ImageUser &iuser, | static inline string image_user_file_path(BL::ImageUser &iuser, | ||||
| BL::Image &ima, | BL::Image &ima, | ||||
| int cfra, | int cfra, | ||||
| bool load_tiled) | bool load_tiled) | ||||
| { | { | ||||
| char filepath[1024]; | char filepath[1024]; | ||||
| iuser.tile(0); | iuser.tile(0); | ||||
| BKE_image_user_frame_calc(NULL, iuser.ptr.data, cfra); | BKE_image_user_frame_calc(ima.ptr.data, iuser.ptr.data, cfra); | ||||
brecht: `ima.ptr.data` | |||||
| BKE_image_user_file_path(iuser.ptr.data, ima.ptr.data, filepath); | BKE_image_user_file_path(iuser.ptr.data, ima.ptr.data, filepath); | ||||
| string filepath_str = string(filepath); | string filepath_str = string(filepath); | ||||
| if (load_tiled && ima.source() == BL::Image::source_TILED) { | if (load_tiled && ima.source() == BL::Image::source_TILED) { | ||||
| string_replace(filepath_str, "1001", "<UDIM>"); | string_replace(filepath_str, "1001", "<UDIM>"); | ||||
| } | } | ||||
| return filepath_str; | return filepath_str; | ||||
| } | } | ||||
| static inline int image_user_frame_number(BL::ImageUser &iuser, int cfra) | static inline int image_user_frame_number(BL::ImageUser &iuser, BL::Image &ima, int cfra) | ||||
| { | { | ||||
| BKE_image_user_frame_calc(NULL, iuser.ptr.data, cfra); | BKE_image_user_frame_calc(ima.ptr.data, iuser.ptr.data, cfra); | ||||
Not Done Inline Actionsima.ptr.data brecht: `ima.ptr.data` | |||||
| return iuser.frame_current(); | return iuser.frame_current(); | ||||
| } | } | ||||
| static inline unsigned char *image_get_pixels_for_frame(BL::Image &image, int frame, int tile) | static inline unsigned char *image_get_pixels_for_frame(BL::Image &image, int frame, int tile) | ||||
| { | { | ||||
| return BKE_image_get_pixels_for_frame(image.ptr.data, frame, tile); | return BKE_image_get_pixels_for_frame(image.ptr.data, frame, tile); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines | |||||
ima.ptr.data