31 {
VOLUME_GRID_MASK,
"MASK", 0,
"Mask",
"No data, boolean mask of active voxels"},
38 "Points (Unsupported)",
39 "Points grid, currently unsupported by volume objects"},
41 {0,
nullptr, 0,
nullptr,
nullptr},
50struct DummyVolumeGridData;
64static std::optional<std::string> rna_VolumeRender_path(
const PointerRNA * )
69static std::optional<std::string> rna_VolumeDisplay_path(
const PointerRNA * )
92 rna_Volume_update_filepath(bmain, scene,
ptr);
96static void rna_Volume_velocity_grid_set(
PointerRNA *
ptr,
const char *value)
107static void rna_VolumeGrid_name_get(
PointerRNA *
ptr,
char *value)
109 auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->data);
115 auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->data);
121 const auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->data);
127 const auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->data);
131static void rna_VolumeGrid_matrix_object_get(
PointerRNA *
ptr,
float *value)
133 auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->data);
139 auto *grid =
static_cast<const blender::bke::VolumeGridData *
>(
ptr->data);
143static bool rna_VolumeGrid_load(
ID * , DummyVolumeGridData *dummy_grid)
145 auto *grid =
reinterpret_cast<const blender::bke::VolumeGridData *
>(dummy_grid);
150static void rna_VolumeGrid_unload(
ID * , DummyVolumeGridData * )
193static void rna_VolumeGrids_active_index_range(
207 return clamp_i(volume->active_grid, 0,
max_ii(num_grids - 1, 0));
210static void rna_VolumeGrids_active_index_set(
PointerRNA *
ptr,
int value)
213 volume->active_grid = value;
226static void rna_VolumeGrids_error_message_get(
PointerRNA *
ptr,
char *value)
232static int rna_VolumeGrids_error_message_length(
PointerRNA *
ptr)
239static void rna_VolumeGrids_frame_filepath_get(
PointerRNA *
ptr,
char *value)
245static int rna_VolumeGrids_frame_filepath_length(
PointerRNA *
ptr)
251static bool rna_Volume_load(
Volume *volume,
Main *bmain)
256static bool rna_Volume_save(
Volume *volume,
Main *bmain,
ReportList *reports,
const char *filepath)
276 prop,
"rna_VolumeGrid_name_get",
"rna_VolumeGrid_name_length",
nullptr);
297 prop,
"Matrix Object",
"Transformation matrix from voxel index to object space");
310 parm =
RNA_def_boolean(func,
"success",
false,
"",
"True if grid tree was successfully loaded");
316 func,
"Unload grid tree and voxel data from memory, leaving only metadata");
331 "rna_VolumeGrids_active_index_get",
332 "rna_VolumeGrids_active_index_set",
333 "rna_VolumeGrids_active_index_range");
340 prop,
"rna_VolumeGrids_error_message_get",
"rna_VolumeGrids_error_message_length",
nullptr);
342 prop,
"Error Message",
"If loading grids failed, error message with details");
354 "Frame number that volume grids will be loaded at, based on scene time "
355 "and volume parameters");
361 "rna_VolumeGrids_frame_filepath_get",
362 "rna_VolumeGrids_frame_filepath_length",
367 "Volume file used for loading the volume at the current frame. Empty "
368 "if the volume has not be loaded or the frame only exists in memory.");
377 parm =
RNA_def_boolean(func,
"success",
false,
"",
"True if grid list was successfully loaded");
388 parm =
RNA_def_boolean(func,
"success",
false,
"",
"True if grid list was successfully loaded");
415 "Display single bounding box for the entire grid"},
420 "Display bounding boxes for nodes in the volume tree"},
425 "Display points for nodes in the volume tree"},
426 {0,
nullptr, 0,
nullptr,
nullptr},
434 "Display one box or point for each intermediate tree node"},
440 {0,
nullptr, 0,
nullptr,
nullptr},
449 "Smoothed high quality interpolation, but slower"},
451 {0,
nullptr, 0,
nullptr,
nullptr},
459 "Adjust slice direction according to the view direction"},
463 {0,
nullptr, 0,
nullptr,
nullptr},
479 prop,
"Interpolation",
"Interpolation method to use for volumes in solid mode");
513 {0,
nullptr, 0,
nullptr,
nullptr},
520 "Specify volume data precision. Lower values reduce memory consumption "
521 "at the cost of detail.");
529 "Keep volume opacity and detail the same regardless of object scale"},
534 "Specify volume step size and density in world space"},
535 {0,
nullptr, 0,
nullptr,
nullptr},
541 prop,
"Space",
"Specify volume density and step size in object or world space");
550 "Distance between volume samples. Lower values render more detail at "
551 "the cost of performance. If set to zero, the step size is "
552 "automatically determined based on voxel size.");
562 "Value under which voxels are considered empty space to optimize rendering");
590 prop,
"Sequence",
"Whether the cache is separated in a series of files");
597 prop,
"Start Frame",
"Global starting frame of the sequence, assuming first has a #1");
608 prop,
"Offset",
"Offset the number of the frame to use in the animation");
617 "Repeat the start frame before, and the end frame after the frame range"},
623 "Repeat the frames, reversing the playback direction every other cycle"},
624 {0,
nullptr, 0,
nullptr,
nullptr},
639 "rna_Volume_grids_begin",
640 "rna_Volume_grids_next",
641 "rna_Volume_grids_end",
642 "rna_Volume_grids_get",
643 "rna_Volume_grids_length",
663 "rna_IDMaterials_assign_int");
684 "Name of the velocity field, or the base name if the velocity is split into multiple grids");
692 "Define how the velocity vectors are interpreted with regard to time, 'frame' means "
693 "the delta time is 1 frame, 'second' means the delta time is 1 / FPS");
708 "Name of the grid for the X axis component of the velocity field if it "
709 "was split into multiple grids");
716 "Name of the grid for the Y axis component of the velocity field if it "
717 "was split into multiple grids");
724 "Name of the grid for the Z axis component of the velocity field if it "
725 "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)
const char * BKE_volume_grids_error_msg(const Volume *volume)
bool BKE_volume_set_velocity_grid_by_name(Volume *volume, blender::StringRef base_name)
@ 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
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
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)
MatBase< float, 4, 4 > float4x4
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
void rna_def_animdata_common(StructRNA *srna)
const EnumPropertyItem rna_enum_velocity_unit_items[]
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
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_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_flag(PropertyRNA *prop, PropertyFlag flag)
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::@220100362304005352221007113371015217044252346141 internal
void WM_main_add_notifier(uint type, void *reference)
void WM_global_reportf(eReportType type, const char *format,...)