33 {
VOLUME_GRID_MASK,
"MASK", 0,
"Mask",
"No data, boolean mask of active voxels"},
40 "Points (Unsupported)",
41 "Points grid, currently unsupported by volume objects"},
43 {0,
nullptr, 0,
nullptr,
nullptr},
52struct DummyVolumeGridData;
62static std::optional<std::string> rna_VolumeRender_path(
const PointerRNA * )
67static std::optional<std::string> rna_VolumeDisplay_path(
const PointerRNA * )
90 rna_Volume_update_filepath(bmain, scene,
ptr);
94static void rna_Volume_velocity_grid_set(
PointerRNA *
ptr,
const char *value)
105static void rna_VolumeGrid_name_get(
PointerRNA *
ptr,
char *value)
107 auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->
data);
113 auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->
data);
119 const auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->
data);
125 const auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->
data);
129static void rna_VolumeGrid_matrix_object_get(
PointerRNA *
ptr,
float *value)
131 auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->
data);
137 auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->
data);
141static bool rna_VolumeGrid_load(
ID * , DummyVolumeGridData *dummy_grid)
143 auto *grid =
reinterpret_cast<const blender::bke::VolumeGridData *
>(dummy_grid);
148static void rna_VolumeGrid_unload(
ID * , DummyVolumeGridData * )
191static void rna_VolumeGrids_active_index_range(
198 *max =
max_ii(0, num_grids - 1);
205 return clamp_i(volume->active_grid, 0,
max_ii(num_grids - 1, 0));
208static void rna_VolumeGrids_active_index_set(
PointerRNA *
ptr,
int value)
211 volume->active_grid = value;
224static void rna_VolumeGrids_error_message_get(
PointerRNA *
ptr,
char *value)
230static int rna_VolumeGrids_error_message_length(
PointerRNA *
ptr)
237static void rna_VolumeGrids_frame_filepath_get(
PointerRNA *
ptr,
char *value)
243static int rna_VolumeGrids_frame_filepath_length(
PointerRNA *
ptr)
249static bool rna_Volume_load(
Volume *volume,
Main *bmain)
254static bool rna_Volume_save(
Volume *volume,
Main *bmain,
ReportList *reports,
const char *filepath)
274 prop,
"rna_VolumeGrid_name_get",
"rna_VolumeGrid_name_length",
nullptr);
295 prop,
"Matrix Object",
"Transformation matrix from voxel index to object space");
308 parm =
RNA_def_boolean(func,
"success",
false,
"",
"True if grid tree was successfully loaded");
314 func,
"Unload grid tree and voxel data from memory, leaving only metadata");
329 "rna_VolumeGrids_active_index_get",
330 "rna_VolumeGrids_active_index_set",
331 "rna_VolumeGrids_active_index_range");
338 prop,
"rna_VolumeGrids_error_message_get",
"rna_VolumeGrids_error_message_length",
nullptr);
340 prop,
"Error Message",
"If loading grids failed, error message with details");
352 "Frame number that volume grids will be loaded at, based on scene time "
353 "and volume parameters");
358 "rna_VolumeGrids_frame_filepath_get",
359 "rna_VolumeGrids_frame_filepath_length",
364 "Volume file used for loading the volume at the current frame. Empty "
365 "if the volume has not be loaded or the frame only exists in memory.");
374 parm =
RNA_def_boolean(func,
"success",
false,
"",
"True if grid list was successfully loaded");
385 parm =
RNA_def_boolean(func,
"success",
false,
"",
"True if grid list was successfully loaded");
412 "Display single bounding box for the entire grid"},
417 "Display bounding boxes for nodes in the volume tree"},
422 "Display points for nodes in the volume tree"},
423 {0,
nullptr, 0,
nullptr,
nullptr},
431 "Display one box or point for each intermediate tree node"},
437 {0,
nullptr, 0,
nullptr,
nullptr},
446 "Smoothed high quality interpolation, but slower"},
448 {0,
nullptr, 0,
nullptr,
nullptr},
456 "Adjust slice direction according to the view direction"},
460 {0,
nullptr, 0,
nullptr,
nullptr},
476 prop,
"Interpolation",
"Interpolation method to use for volumes in solid mode");
510 {0,
nullptr, 0,
nullptr,
nullptr},
517 "Specify volume data precision. Lower values reduce memory consumption "
518 "at the cost of detail.");
526 "Keep volume opacity and detail the same regardless of object scale"},
531 "Specify volume step size and density in world space"},
532 {0,
nullptr, 0,
nullptr,
nullptr},
538 prop,
"Space",
"Specify volume density and step size in object or world space");
547 "Distance between volume samples. Lower values render more detail at "
548 "the cost of performance. If set to zero, the step size is "
549 "automatically determined based on voxel size.");
559 "Value under which voxels are considered empty space to optimize rendering");
586 prop,
"Sequence",
"Whether the cache is separated in a series of files");
593 prop,
"Start Frame",
"Global starting frame of the sequence, assuming first has a #1");
604 prop,
"Offset",
"Offset the number of the frame to use in the animation");
613 "Repeat the start frame before, and the end frame after the frame range"},
619 "Repeat the frames, reversing the playback direction every other cycle"},
620 {0,
nullptr, 0,
nullptr,
nullptr},
634 "rna_Volume_grids_begin",
635 "rna_Volume_grids_next",
636 "rna_Volume_grids_end",
637 "rna_Volume_grids_get",
638 "rna_Volume_grids_length",
658 "rna_IDMaterials_assign_int");
679 "Name of the velocity field, or the base name if the velocity is split into multiple grids");
687 "Define how the velocity vectors are interpreted with regard to time, 'frame' means "
688 "the delta time is 1 frame, 'second' means the delta time is 1 / FPS");
703 "Name of the grid for the X axis component of the velocity field if it "
704 "was split into multiple grids");
711 "Name of the grid for the Y axis component of the velocity field if it "
712 "was split into multiple grids");
719 "Name of the grid for the Z axis component of the velocity field if it "
720 "was split into multiple grids");
bool BKE_volume_is_loaded(const Volume *volume)
int BKE_volume_num_grids(const Volume *volume)
bool BKE_volume_save(const Volume *volume, const Main *bmain, ReportList *reports, const char *filepath)
bool BKE_volume_load(const Volume *volume, const Main *bmain)
const char * BKE_volume_grids_frame_filepath(const Volume *volume)
const blender::bke::VolumeGridData * BKE_volume_grid_get(const Volume *volume, int grid_index)
void BKE_volume_unload(Volume *volume)
bool BKE_volume_set_velocity_grid_by_name(Volume *volume, const char *base_name)
const char * BKE_volume_grids_error_msg(const Volume *volume)
@ VOLUME_GRID_VECTOR_FLOAT
@ VOLUME_GRID_VECTOR_DOUBLE
MINLINE int max_ii(int a, int b)
MINLINE int clamp_i(int value, int min, int max)
#define BLI_STR_UTF8_MULTIPLICATION_SIGN
#define BLT_I18NCONTEXT_ID_VOLUME
#define BLT_I18NCONTEXT_UNIT
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ VOLUME_WIREFRAME_POINTS
@ VOLUME_WIREFRAME_BOUNDS
@ VOLUME_DISPLAY_INTERP_CLOSEST
@ VOLUME_DISPLAY_INTERP_LINEAR
@ VOLUME_DISPLAY_INTERP_CUBIC
@ VOLUME_AXIS_SLICE_SINGLE
@ VOLUME_SEQUENCE_PING_PONG
@ VOLUME_PRECISION_VARIABLE
@ VOLUME_WIREFRAME_COARSE
float4x4 get_transform_matrix(const VolumeGridData &grid)
std::string get_name(const VolumeGridData &grid)
int get_channels_num(VolumeGridType type)
std::string error_message_from_load(const VolumeGridData &grid)
void load(const VolumeGridData &grid)
VolumeGridType get_type(const VolumeGridData &grid)
bool is_loaded(const VolumeGridData &grid)
PointerRNA rna_pointer_inherit_refine(const PointerRNA *ptr, StructRNA *type, void *data)
void rna_def_animdata_common(StructRNA *srna)
const EnumPropertyItem rna_enum_velocity_unit_items[]
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
const int rna_matrix_dimsize_4x4[]
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
static const EnumPropertyItem space_items[]
static void rna_def_volume_display(BlenderRNA *brna)
static void rna_def_volume(BlenderRNA *brna)
const EnumPropertyItem rna_enum_volume_grid_data_type_items[]
static void rna_def_volume_render(BlenderRNA *brna)
static void rna_def_volume_grids(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_volume_grid(BlenderRNA *brna)
void RNA_def_volume(BlenderRNA *brna)
union CollectionPropertyIterator::@1329 internal
void WM_main_add_notifier(uint type, void *reference)
void WM_reportf(eReportType type, const char *format,...)