41 "Import each FBX material as a unique Blender material"},
46 "If a material with the same name already exists, reference that instead of importing"},
47 {0,
nullptr, 0,
nullptr,
nullptr},
56 "Vertex colors in the file are in sRGB color space"},
61 "Vertex colors in the file are in linear color space"},
62 {0,
nullptr, 0,
nullptr,
nullptr}};
84 if (paths.is_empty()) {
88 for (
const auto &path : paths) {
118 subcol.
prop(
ptr,
"use_custom_props_enum_as_string",
UI_ITEM_NONE, std::nullopt, ICON_NONE);
153 ui_fbx_import_settings(
C, op->
layout, op->
ptr);
160 ot->name =
"Import FBX";
161 ot->description =
"Import FBX file into current scene";
162 ot->idname =
"WM_OT_fbx_import";
165 ot->exec = wm_fbx_import_exec;
167 ot->check = wm_fbx_import_check;
168 ot->ui = wm_fbx_import_draw;
180 RNA_def_float(
ot->srna,
"global_scale", 1.0f, 1e-6f, 1e6f,
"Scale",
"", 0.001f, 1000.0f);
184 "mtl_name_collision_mode",
185 rna_enum_fbx_mtl_name_collision_mode_items,
187 "Material Name Collision",
188 "Behavior when the name of an imported material conflicts with an existing material");
191 fbx_vertex_colors_mode,
194 "Import vertex color attributes");
197 "use_custom_normals",
200 "Import custom normals, if available (otherwise Blender will compute them)");
205 "Import user properties as custom properties");
207 "use_custom_props_enum_as_string",
210 "Store custom property enumeration values as strings");
212 "import_subdivision",
215 "Import FBX subdivision information as subdivision surface modifiers");
220 "Ignore the last bone at the end of each chain (used to mark the length of the "
227 "Ensure the data is valid "
228 "(when disabled, data may be imported which causes crashes displaying or editing)");
230 RNA_def_boolean(
ot->srna,
"use_anim",
true,
"Import Animation",
"Import FBX animation");
237 "Offset to apply to animation timestamps, in frames",
243 prop =
RNA_def_string(
ot->srna,
"filter_glob",
"*.fbx", 0,
"Extension Filter",
"");
250 auto fh = std::make_unique<blender::bke::FileHandlerType>();
Scene * CTX_data_scene(const bContext *C)
void BKE_report(ReportList *reports, eReportType type, const char *message)
char * STRNCPY(char(&dst)[N], const char *src)
#define STRNCPY_UTF8(dst, src)
void ED_outliner_select_sync_from_object_tag(bContext *C)
void FBX_import(bContext *C, const FBXImportParams ¶ms)
void WM_OT_fbx_import(wmOperatorType *ot)
void file_handler_add(std::unique_ptr< FileHandlerType > file_handler)
void fbx_file_handler_add()
bool poll_file_object_drop(const bContext *C, blender::bke::FileHandlerType *)
Vector< std::string > paths_from_operator_properties(PointerRNA *ptr)
wmOperatorStatus filesel_drop_import_invoke(bContext *C, wmOperator *op, const wmEvent *)
float RNA_float_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
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_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void use_property_decorate_set(bool is_sep)
PanelLayout panel(const bContext *C, blender::StringRef idname, bool default_closed)
void label(blender::StringRef name, int icon)
uiLayout & column(bool align)
void active_set(bool active)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
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)
bool WM_operator_winactive(bContext *C)