58 "Use Render settings for object visibility, modifier settings, etc"},
63 "Use Viewport settings for object visibility, modifier settings, etc"},
69 enum { AS_BACKGROUND_JOB = 1 };
70 typedef struct eUSDOperatorOptions {
71 bool as_background_job;
72 } eUSDOperatorOptions;
76 eUSDOperatorOptions *
options =
MEM_callocN(
sizeof(eUSDOperatorOptions),
"eUSDOperatorOptions");
77 options->as_background_job =
true;
85 if (main_blendfile_path[0] ==
'\0') {
86 BLI_strncpy(filepath,
"untitled",
sizeof(filepath));
89 BLI_strncpy(filepath, main_blendfile_path,
sizeof(filepath));
178 ot->
exec = wm_usd_export_exec;
180 ot->
ui = wm_usd_export_draw;
191 "selected_objects_only",
194 "Only selected objects are exported. Unselected parents of selected objects are "
195 "exported as empty transform");
198 "visible_objects_only",
201 "Only visible objects are exported. Invisible parents of exported objects are "
202 "exported as empty transform");
208 "When checked, the render frame range is exported. When false, only the current "
209 "frame is exported");
211 ot->
srna,
"export_hair",
false,
"Hair",
"When checked, hair is exported as USD curves");
216 "When checked, all UV maps of exported meshes are included in the export");
221 "When checked, normals of exported meshes are included in the export");
226 "When checked, the viewport settings of materials are exported as USD preview "
227 "materials, and material assignments are exported as geometry subsets");
233 "When checked, instanced objects are exported as references in USD. "
234 "When unchecked, instanced objects are exported as real objects");
238 rna_enum_usd_export_evaluation_mode_items,
241 "Determines visibility of objects, modifier settings, and other areas where there "
242 "are different settings for viewport and rendering");
struct Main * CTX_data_main(const bContext *C)
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
void BKE_report(ReportList *reports, ReportType type, const char *message)
bool BLI_path_extension_replace(char *path, size_t maxlen, const char *ext) ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Read Guarded memory(de)allocation.
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemL(uiLayout *layout, const char *name, int icon)
uiLayout * uiLayoutBox(uiLayout *layout)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
#define WM_FILESEL_SHOW_PROPS
#define WM_FILESEL_FILEPATH
CCL_NAMESPACE_BEGIN struct Options options
void WM_OT_usd_export(struct wmOperatorType *ot)
void *(* MEM_callocN)(size_t len, const char *str)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
enum eEvaluationMode evaluation_mode
bool selected_objects_only
bool visible_objects_only
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* ui)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
bool USD_export(bContext *C, const char *filepath, const USDExportParams *params, bool as_background_job)
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, short action, short flag, short display, short sort)
bool WM_operator_winactive(bContext *C)