79 bool imported =
false;
90 STRNCPY(volume->filepath, range->filepath);
91 if (is_relative_path) {
98 "Volume \"%s\" failed to load: %s",
108 "Volume \"%s\" contains points, only voxel grids are supported",
117 volume->is_sequence = (range->length > 1);
118 volume->frame_duration = (volume->is_sequence) ? range->length : 0;
119 volume->frame_start = 1;
120 volume->frame_offset = (volume->is_sequence) ? range->offset - 1 : 0;
150 ot->
name =
"Import OpenVDB Volume";
152 ot->
idname =
"OBJECT_OT_volume_import";
173 "use_sequence_detection",
176 "Automatically detect animated sequences in selected volume files (based on file names)");
Main * CTX_data_main(const bContext *C)
void BKE_id_delete(Main *bmain, void *idv) ATTR_NONNULL()
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
bool BKE_volume_is_y_up(const Volume *volume)
bool BKE_volume_load(const Volume *volume, const Main *bmain)
bool BKE_volume_is_points_only(const Volume *volume)
void BKE_volume_unload(Volume *volume)
const char * BKE_volume_grids_error_msg(const Volume *volume)
#define LISTBASE_FOREACH(type, var, list)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
bool bool BLI_path_extension_strip(char *path) ATTR_NONNULL(1)
void void void BLI_path_split_file_part(const char *filepath, char *file, size_t file_maxncpy) ATTR_NONNULL(1
bool void BLI_path_rel(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1)
#define STRNCPY(dst, src)
Object is a sort of wrapper for general info.
ListBase ED_image_filesel_detect_sequences(blender::StringRefNull root_path, wmOperator *op, bool detect_udim)
bool ED_operator_objectmode(bContext *C)
Object * add_type(bContext *C, int type, const char *name, const float loc[3], const float rot[3], bool enter_editmode, unsigned short local_view_bits) ATTR_NONNULL(1) ATTR_RETURNS_NONNULL
static int volume_import_invoke(bContext *C, wmOperator *op, const wmEvent *)
static Object * object_volume_add(bContext *C, wmOperator *op, const char *name)
static int object_volume_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_volume_add(wmOperatorType *ot)
void OBJECT_OT_volume_import(wmOperatorType *ot)
static int volume_import_exec(bContext *C, wmOperator *op)
void add_generic_props(wmOperatorType *ot, bool do_editmode)
void add_generic_get_opts(bContext *C, wmOperator *op, char view_align_axis, float r_loc[3], float r_rot[3], float r_scale[3], bool *r_enter_editmode, unsigned short *r_local_view_bits, bool *r_is_view_aligned)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)