|
Blender V5.3
|
Namespaces | |
| namespace | detail |
| namespace | usdtokens |
| namespace | utils |
Typedefs | |
| using | USDHookList = std::list<std::unique_ptr<USDHook>> |
| using | ImportedPrimMap = Map<pxr::SdfPath, Vector<PointerRNA>> |
| using | PathMap = std::map<pxr::SdfPath, pxr::SdfPath> |
| using | PathSet = Set<pxr::SdfPath> |
| using | ReferencesMap = Map<pxr::SdfPath, Vector<pxr::SdfPath>> |
| using | ShaderToNodeMap = Map<std::string, bNode *> |
| using | ProtoReaderMap = Map<pxr::SdfPath, Vector<USDPrimReader *>> |
| using | UsdPathSet = Set<pxr::SdfPath> |
| using | XformResult = std::tuple<pxr::GfMatrix4f, bool> |
| using | ObjExportMap = Map<const Object *, pxr::SdfPath> |
| using | InputSpecMap = Map<StringRef, InputSpec> |
| using | MaterialFaceGroups = Map<short, pxr::VtArray<int>> |
Enumerations | |
| enum | { USD_NO_ERROR = 0 , USD_ARCHIVE_FAIL } |
| enum class | MtlNameCollisionMode { MakeUnique = 0 , ReferenceExisting = 1 } |
| enum class | MtlPurpose { All = 0 , Preview = 1 , Full = 2 } |
| enum class | PropertyImportMode { None = 0 , User = 1 , All = 2 } |
| enum class | TexImportMode { None = 0 , Pack , Copy } |
| enum class | TexNameCollisionMode { UseExisting = 0 , Overwrite = 1 } |
| enum class | SubdivExportMode { Ignore = 0 , Tessellate = 1 , Match = 2 } |
| enum class | XformOpMode { TRS = 0 , TOS = 1 , MAT = 2 } |
| enum class | TextureDownscaleSize { Custom = -1 , Keep = 0 , Size256 = 256 , Size512 = 512 , Size1024 = 1024 , Size2048 = 2048 , Size4096 = 4096 } |
| enum class | TexExportMode { Keep = 0 , Preserve , NewPath } |
| enum class | SceneUnits { Custom = -1 , Meters = 0 , Kilometers = 1 , Centimeters = 2 , Millimeters = 3 , Inches = 4 , Feet = 5 , Yards = 6 } |
Functions | |
| FCurve * | create_fcurve (animrig::Channelbag &channelbag, const animrig::FCurveDescriptor &fcurve_descriptor, const int sample_count) |
| void | set_fcurve_sample (FCurve *fcu, int64_t sample_index, const float frame, const float value) |
| static void | visit_bones (const Bone *bone, FunctionRef< void(const Bone *)> visitor) |
| const ModifierData * | get_enabled_modifier (const Object &obj, ModifierType type, const Depsgraph *depsgraph) |
| static const ArmatureModifierData * | get_armature_modifier (const Object &obj, const Depsgraph *depsgraph) |
| void | visit_bones (const Object *ob_arm, FunctionRef< void(const Bone *)> visitor) |
| void | get_armature_bone_names (const Object *ob_arm, const bool use_deform, Vector< StringRef > &r_names) |
| pxr::TfToken | build_usd_joint_path (const Bone *bone, bool allow_unicode) |
| void | create_pose_joints (pxr::UsdSkelAnimation &skel_anim, const Object &obj, const Map< StringRef, const Bone * > *deform_map, bool allow_unicode) |
| const Object * | get_armature_modifier_obj (const Object &obj, const Depsgraph *depsgraph) |
| bool | is_armature_modifier_bone_name (const Object &obj, const StringRefNull name, const Depsgraph *depsgraph) |
| bool | can_export_skinned_mesh (const Object &obj, const Depsgraph *depsgraph) |
| void | init_deform_bones_map (const Object *obj, Map< StringRef, const Bone * > *deform_map) |
| const pxr::TfToken | BlenderBoneLengths ("blender:bone_lengths", pxr::TfToken::Immortal) |
| static std::pair< std::string, std::string > | split_udim_pattern (const std::string &path) |
| static std::string | get_asset_base_name (const std::string &src_path, ReportList *reports) |
| static std::string | copy_asset_to_directory (const std::string &src_path, const char *dest_dir_path, TexNameCollisionMode name_collision_mode, ReportList *reports) |
| static std::string | copy_udim_asset_to_directory (const std::string &src_path, const char *dest_dir_path, TexNameCollisionMode name_collision_mode, ReportList *reports) |
| bool | copy_asset (const std::string &src, const std::string &dst, TexNameCollisionMode name_collision_mode, ReportList *reports) |
| bool | asset_exists (const std::string &path) |
| std::string | import_asset (const std::string &src, const char *import_dir, TexNameCollisionMode name_collision_mode, ReportList *reports) |
| static bool | parent_dir_exists_on_file_system (const std::string &path) |
| bool | is_udim_path (const std::string &path) |
| std::string | get_export_textures_dir (const pxr::UsdStageRefPtr stage) |
| bool | should_import_asset (const std::string &path) |
| bool | paths_equal (const std::string &path1, const std::string &path2) |
| const char * | temp_textures_dir () |
| bool | write_to_path (const void *data, size_t size, const std::string &path, ReportList *reports) |
| void | ensure_usd_source_path_prop (const std::string &path, ID *id) |
| std::string | get_usd_source_path (ID *id) |
| std::string | get_relative_path (const std::string &path, const std::string &anchor) |
| void | USD_path_abs (char *path, const char *basepath, bool for_import) |
| std::optional< pxr::SdfValueTypeName > | convert_blender_type_to_usd (const bke::AttrType blender_type, bool use_color3f_type) |
| std::optional< bke::AttrType > | convert_usd_type_to_blender (const pxr::SdfValueTypeName usd_type) |
| void | copy_primvar_to_blender_attribute (const pxr::UsdGeomPrimvar &primvar, const pxr::UsdTimeCode time, const bke::AttrType data_type, const bke::AttrDomain domain, const OffsetIndices< int > face_indices, bke::MutableAttributeAccessor attributes) |
| void | copy_blender_attribute_to_primvar (const GVArray &attribute, const bke::AttrType data_type, const pxr::UsdTimeCode time, const pxr::UsdGeomPrimvar &primvar, pxr::UsdUtilsSparseValueWriter &value_writer) |
| template<typename USDT> | |
| void | set_attribute (const pxr::UsdAttribute &attr, const USDT value, pxr::UsdTimeCode time, pxr::UsdUtilsSparseValueWriter &value_writer) |
| template<typename USDT> | |
| void | set_attribute (const pxr::UsdAttribute &attr, pxr::VtArray< USDT > &value, pxr::UsdTimeCode time, pxr::UsdUtilsSparseValueWriter &value_writer) |
| template<typename BlenderT, typename USDT> | |
| void | copy_blender_buffer_to_primvar (const VArray< BlenderT > &buffer, const pxr::UsdTimeCode time, const pxr::UsdGeomPrimvar &primvar, pxr::UsdUtilsSparseValueWriter &value_writer) |
| template<typename T> | |
| pxr::VtArray< T > | get_primvar_array (const pxr::UsdGeomPrimvar &primvar, const pxr::UsdTimeCode time) |
| void | set_single_value (bke::MutableAttributeAccessor attributes, const StringRef attr_name, const bke::AttrDomain domain, const bke::AttrType data_type, const bke::AttributeInit &value) |
| template<typename USDT, typename BlenderT> | |
| void | copy_primvar_to_blender_buffer (const pxr::UsdGeomPrimvar &primvar, const pxr::UsdTimeCode time, const bke::AttrType data_type, const bke::AttrDomain domain, const OffsetIndices< int > faces, bke::MutableAttributeAccessor attributes) |
| pxr::TfToken | TempBlendShapeWeightsPrimvarName ("temp:weights", pxr::TfToken::Immortal) |
| void | ensure_blend_shape_skeleton (pxr::UsdStageRefPtr stage, pxr::UsdPrim &mesh_prim) |
| const Key * | get_mesh_shape_key (const Object *obj) |
| bool | is_mesh_with_shape_keys (const Object *obj) |
| void | create_blend_shapes (pxr::UsdStageRefPtr stage, const Object *obj, const pxr::UsdPrim &mesh_prim, bool allow_unicode) |
| pxr::VtFloatArray | get_blendshape_weights (const Key *key) |
| void | remap_blend_shape_anim (pxr::UsdStageRefPtr stage, const pxr::SdfPath &skel_path, const pxr::SdfPathSet &mesh_paths) |
| Mesh * | get_shape_key_basis_mesh (Object *obj) |
| static bool | prim_path_valid (const std::string &path) |
| static bool | export_params_valid (const USDExportParams ¶ms) |
| static void | ensure_root_prim (pxr::UsdStageRefPtr stage, const USDExportParams ¶ms) |
| static void | write_root_accessibility_information (pxr::UsdStageRefPtr stage, const USDExportParams ¶ms) |
| static void | report_job_duration (const ExportJobData *data) |
| static void | process_usdz_textures (const ExportJobData *data, const char *path) |
| static bool | perform_usdz_conversion (const ExportJobData *data) |
| std::string | image_cache_file_path () |
| std::string | get_image_cache_file (const std::string &file_name, bool mkdir) |
| std::string | cache_image_color (const float color[4]) |
| static void | collect_point_instancer_prototypes_and_set_extent (pxr::UsdGeomPointInstancer instancer, const pxr::UsdStageRefPtr &stage, const pxr::SdfPath &wrapper_path, std::vector< pxr::UsdPrim > &proto_list) |
| pxr::UsdStageRefPtr | export_to_stage (const USDExportParams ¶ms, Depsgraph *depsgraph, const char *filepath) |
| static void | export_startjob (void *customdata, wmJobWorkerStatus *worker_status) |
| static void | export_endjob_usdz_cleanup (const ExportJobData *data) |
| static void | export_endjob (void *customdata) |
| static void | create_temp_path_for_usdz_export (const char *filepath, io::usd::ExportJobData *job) |
| static void | set_job_filepath (io::usd::ExportJobData *job, const char *filepath) |
| bool | USD_export (const bContext *C, const char *filepath, const USDExportParams *params, bool as_background_job, ReportList *reports) |
| int | USD_get_version () |
| double | get_meters_per_unit (const USDExportParams ¶ms) |
| static CacheArchiveHandle * | handle_from_stage_reader (USDStageReader *reader) |
| static USDStageReader * | stage_reader_from_handle (CacheArchiveHandle *handle) |
| static bool | gather_objects_paths (const pxr::UsdPrim &object, ListBaseT< CacheObjectPath > *object_paths) |
| static void | report_job_duration (const ImportJobData *data) |
| static void | import_startjob (void *customdata, wmJobWorkerStatus *worker_status) |
| static void | import_endjob (void *customdata) |
| static void | import_freejob (void *user_data) |
| bool | USD_import (bContext *C, const char *filepath, const USDImportParams *params, bool as_background_job, ReportList *reports) |
| static USDPrimReader * | get_usd_reader (CacheReader *reader, const Object *, const char **r_err_str) |
| USDMeshReadParams | create_mesh_read_params (const double motion_sample_time, const int read_flags) |
| void | USD_read_geometry (CacheReader *reader, const Object *ob, bke::GeometrySet &geometry_set, const USDMeshReadParams params, const char **r_err_str) |
| bool | USD_mesh_topology_changed (CacheReader *reader, const Object *ob, const Mesh *existing_mesh, const double time, const char **r_err_str) |
| CacheReader * | CacheReader_open_usd_object (CacheArchiveHandle *handle, CacheReader *reader, Object *object, const char *object_path) |
| void | USD_CacheReader_free (CacheReader *reader) |
| CacheArchiveHandle * | USD_create_handle (Main *, const char *filepath, ListBaseT< CacheObjectPath > *object_paths) |
| void | USD_free_handle (CacheArchiveHandle *handle) |
| void | USD_get_transform (CacheReader *reader, float4x4 &r_mat_world, float time, float scale) |
| pxr::TfToken | colorspace_scene_linear_interop_id () |
| void | colorspace_apply_to_prim (const pxr::UsdPrim &prim) |
| static const ColorSpace * | colorspace_from_attr (const pxr::UsdAttribute &attr) |
| void | colorspace_attr_to_scene_linear (const pxr::UsdAttribute &attr, pxr::GfVec3f &color) |
| void | colorspace_attr_to_scene_linear (const pxr::UsdAttribute &attr, ColorGeometry4f &color) |
| void | colorspace_attr_to_scene_linear (const pxr::UsdAttribute &attr, MutableSpan< ColorGeometry4f > colors) |
| static pxr::TfToken | get_source_color_space (const pxr::UsdShadeShader &usd_shader) |
| void | colorspace_to_image_texture (const pxr::UsdShadeShader &usd_shader, const pxr::UsdShadeInput &file_input, const bool is_data, Image *image) |
| void | colorspace_from_image_texture (const Image *image, pxr::UsdShadeShader &shader) |
| static USDHookList & | hook_list () |
| void | USD_register_hook (std::unique_ptr< USDHook > hook) |
| void | USD_unregister_hook (const USDHook *hook) |
| USDHook * | USD_find_hook_name (const char idname[]) |
| void | register_hook_converters () |
| static void | handle_python_error (USDHook *hook, ReportList *reports) |
| void | call_export_hooks (Depsgraph *depsgraph, const USDHierarchyIterator *iter, ReportList *reports) |
| void | call_material_export_hooks (pxr::UsdStageRefPtr stage, const Material *material, const pxr::UsdShadeMaterial &usd_material, const USDExportParams &export_params, ReportList *reports) |
| void | call_import_hooks (USDStageReader *archive, ReportList *reports) |
| bool | have_material_import_hook (pxr::UsdStageRefPtr stage, const pxr::UsdShadeMaterial &usd_material, const USDImportParams &import_params, ReportList *reports) |
| bool | call_material_import_hooks (pxr::UsdStageRefPtr stage, Material *material, const pxr::UsdShadeMaterial &usd_material, const USDImportParams &import_params, ReportList *reports) |
| static void | convert_proto_to_instance (pxr::UsdStageRefPtr stage, const pxr::SdfPath &proto_path, const pxr::SdfPath &ref_path) |
| void | process_scene_graph_instances (const USDExportParams &export_params, pxr::UsdStageRefPtr stage) |
| static Image * | load_image (std::string tex_path, Main *bmain, const USDImportParams ¶ms) |
| static bNode * | append_node (bNode *dst_node, int new_node_type, const StringRef out_sock, const StringRef in_sock, bNodeTree *ntree, float offset) |
| void | world_material_to_dome_light (const USDExportParams ¶ms, const Scene *scene, pxr::UsdStageRefPtr stage) |
| void | dome_light_to_world_material (const USDImportParams ¶ms, Scene *scene, Main *bmain, const USDImportDomeLightData &dome_light_data, const pxr::UsdPrim &prim, const pxr::UsdTimeCode time) |
| static bool | node_search (bNode *fromnode, bNode *, void *userdata, bool) |
| void | world_material_to_dome_light (const Scene *scene, WorldToDomeLight &res) |
| template<typename USDT> | |
| static void | read_face_display_color (Mesh *mesh, const pxr::UsdGeomPrimvar &primvar, const pxr::TfToken &pv_name, const pxr::UsdTimeCode time) |
| static std::optional< bke::AttrDomain > | convert_usd_varying_to_blender (const pxr::TfToken usd_domain) |
| void | read_generic_mesh_primvar (Mesh *mesh, const pxr::UsdGeomPrimvar &primvar, const pxr::UsdTimeCode time, const bool is_left_handed) |
| static float3 | to_float3 (pxr::GfVec3f vec3f) |
| static int | bezier_point_count (int usd_count, bool is_cyclic) |
| static int | point_count (int usdCount, CurveType curve_type, bool is_cyclic) |
| static Array< int > | calc_curve_offsets (const pxr::VtIntArray &usdCounts, const CurveType curve_type, bool is_cyclic) |
| static void | add_bezier_control_point (int cp, int offset, MutableSpan< float3 > positions, MutableSpan< float3 > handles_left, MutableSpan< float3 > handles_right, const Span< pxr::GfVec3f > usdPoints) |
| static bool | curves_topology_changed (const bke::CurvesGeometry &curves, const Span< int > usd_offsets) |
| static CurveType | get_curve_type (pxr::TfToken type, pxr::TfToken basis) |
| static std::optional< bke::AttrDomain > | convert_usd_interp_to_blender (const pxr::TfToken usd_domain) |
| template<typename T> | |
| static bool | get_authored_value (const pxr::UsdAttribute &attr, const pxr::UsdTimeCode time, const pxr::UsdPrim &prim, const pxr::TfToken fallback_attr_name, T *r_value) |
| template<typename T> | |
| static float | get_intensity (const T &dome_light, const pxr::UsdTimeCode time) |
| template<typename T> | |
| static bool | get_tex_path (const T &dome_light, const pxr::UsdTimeCode time, pxr::SdfAssetPath *tex_path) |
| template<typename T> | |
| static bool | get_color (const T &dome_light, const pxr::UsdTimeCode time, pxr::GfVec3f *color) |
| static pxr::TfToken | get_pole_axis (const pxr::UsdLuxDomeLight_1 &dome_light, const pxr::UsdTimeCode time) |
| static IntermediateNode | add_normal_map (bNodeTree *ntree, int column, NodePlacementContext &ctx) |
| static IntermediateNode | add_scale_bias (const pxr::UsdShadeShader &usd_shader, bNodeTree *ntree, int column, bool feeds_normal_map, NodePlacementContext &ctx) |
| static IntermediateNode | add_scale_bias_adjust (bNodeTree *ntree, int column, NodePlacementContext &ctx) |
| static IntermediateNode | add_separate_color (const pxr::UsdShadeShader &usd_shader, const pxr::TfToken &usd_source_name, bNodeTree *ntree, int column, NodePlacementContext &ctx) |
| static IntermediateNode | add_lessthan (bNodeTree *ntree, float threshold, int column, NodePlacementContext &ctx) |
| static IntermediateNode | add_oneminus (bNodeTree *ntree, int column, NodePlacementContext &ctx) |
| static void | configure_displacement (const pxr::UsdShadeShader &usd_shader, bNode *displacement_node) |
| static pxr::UsdShadeShader | node_graph_output_source (const pxr::UsdShadeNodeGraph &node_graph, const pxr::TfToken &output_name) |
| void | build_material_map (const Main *bmain, Map< std::string, Material * > &r_mat_map) |
| Material * | find_existing_material (const pxr::SdfPath &usd_mat_path, const USDImportParams ¶ms, const Map< std::string, Material * > &mat_map, const Map< pxr::SdfPath, Material * > &usd_path_to_mat) |
| static KnotsMode | determine_knots_mode (const Span< double > usd_knots, const int order, const bool is_cyclic) |
| static CurveData | calc_curve_offsets (const Span< float3 > usd_points, const Span< int > usd_counts, const Span< int > usd_orders, const Span< double > usd_knots) |
| static bool | curves_topology_changed (const bke::CurvesGeometry &curves, const Span< int > usd_offsets) |
| static IndexRange | get_usd_points_range_de_dup (IndexRange blender_points_range, IndexRange usd_points_range) |
| static bNode * | add_input_named_attrib_node (bNodeTree *ntree, const char *name, int8_t prop_type) |
| static void | decref (USDPrimReader *reader) |
| static Collection * | create_collection (Main *bmain, Collection *parent, const char *name) |
| static void | set_instance_collection (USDInstanceReader *instance_reader, const Map< pxr::SdfPath, Collection * > &proto_collection_map) |
| static void | convert_to_z_up (pxr::UsdStageRefPtr stage, ImportSettings &settings) |
| static void | find_prefix_to_skip (pxr::UsdStageRefPtr stage, ImportSettings &settings) |
| static void | determine_blender_compat (pxr::UsdStageRefPtr stage, ImportSettings &settings) |
| static void | set_string_prop (IDProperty *idgroup, const StringRefNull prop_name, const StringRefNull str_val) |
| static void | set_int_prop (IDProperty *idgroup, const StringRefNull prop_name, const int ival) |
| static void | set_bool_prop (IDProperty *idgroup, const StringRefNull prop_name, const bool bval) |
| static void | set_float_prop (IDProperty *idgroup, const StringRefNull prop_name, const float fval) |
| static void | set_double_prop (IDProperty *idgroup, const StringRefNull prop_name, const double dval) |
| static void | set_accessibility_property (const pxr::UsdAttribute &attr, IDProperty *idgroup, const pxr::UsdTimeCode time_code) |
| void | set_id_props_from_prim (ID *id, const pxr::UsdPrim &prim, const PropertyImportMode property_import_mode, const pxr::UsdTimeCode time_code) |
| void | import_blendshapes (Main *bmain, Object *mesh_obj, const pxr::UsdPrim &prim, ReportList *reports, const bool import_anim) |
| static void | set_rest_pose (Main *bmain, Object *arm_obj, bArmature *arm, const pxr::VtArray< pxr::GfMatrix4d > &bind_xforms, const pxr::VtTokenArray &joint_order, const Map< pxr::TfToken, std::string > &joint_to_bone_map, const pxr::UsdSkelTopology &skel_topology, const pxr::UsdSkelSkeletonQuery &skel_query) |
| void | import_skeleton (Main *bmain, Object *arm_obj, const pxr::UsdSkelSkeleton &skel, ReportList *reports, const bool import_anim) |
| void | import_mesh_skel_bindings (Object *mesh_obj, const pxr::UsdPrim &prim, ReportList *reports) |
| void | skel_export_chaser (pxr::UsdStageRefPtr stage, const ObjExportMap &armature_export_map, const ObjExportMap &skinned_mesh_export_map, const ObjExportMap &shape_key_mesh_export_map, const Depsgraph *depsgraph) |
| void | skinned_mesh_export_chaser (pxr::UsdStageRefPtr stage, const ObjExportMap &armature_export_map, const ObjExportMap &skinned_mesh_export_map, pxr::UsdGeomXformCache &xf_cache, const Depsgraph *depsgraph) |
| void | shape_key_export_chaser (pxr::UsdStageRefPtr stage, const ObjExportMap &shape_key_mesh_export_map) |
| void | export_deform_verts (const Mesh *mesh, const pxr::UsdSkelBindingAPI &skel_api, const Span< StringRef > bone_names) |
| void | create_skel_roots (pxr::UsdStageRefPtr stage, const USDExportParams ¶ms) |
| static bool | is_safe_char (const pxr::TfUtf8CodePoint cp, bool is_first, bool allow_unicode) |
| static std::string | make_safe_identifier (const StringRef name, bool allow_unicode) |
| std::string | make_safe_name (const StringRef name, bool allow_unicode) |
| std::string | make_safe_primvar_name (const StringRef name, bool allow_unicode) |
| pxr::SdfPath | get_unique_path (pxr::UsdStageRefPtr stage, const std::string &path) |
| static void | create_vector_attrib (const pxr::UsdPrim &prim, const IDProperty *prop, const pxr::TfToken &prop_token, const pxr::UsdTimeCode &time) |
| static void | add_anim_sample (pxr::UsdSkelAnimation &skel_anim, const Object *obj, const pxr::UsdTimeCode time, const Map< StringRef, const Bone * > *deform_map, pxr::UsdUtilsSparseValueWriter &value_writer) |
| static void | camera_sensor_size_for_render (const Camera *camera, const RenderData *rd, float *r_sensor, float *r_sensor_x, float *r_sensor_y) |
| static void | populate_curve_widths (const bke::CurvesGeometry &curves, pxr::VtArray< float > &widths) |
| static pxr::TfToken | get_curve_width_interpolation (const pxr::VtArray< float > &widths, const pxr::VtArray< int > &segments, const pxr::VtIntArray &control_point_counts, const bool is_cyclic, ReportList *reports) |
| static void | populate_curve_verts (const bke::CurvesGeometry &curves, const Span< float3 > positions, pxr::VtArray< pxr::GfVec3f > &verts, pxr::VtIntArray &control_point_counts, pxr::VtArray< int > &segments, const bool is_cyclic, const bool is_cubic) |
| static void | populate_curve_props (const bke::CurvesGeometry &curves, pxr::VtArray< pxr::GfVec3f > &verts, pxr::VtIntArray &control_point_counts, pxr::VtArray< float > &widths, pxr::TfToken &interpolation, const bool is_cyclic, const bool is_cubic, ReportList *reports) |
| static void | populate_curve_verts_for_bezier (const bke::CurvesGeometry &curves, const Span< float3 > positions, const Span< float3 > handles_l, const Span< float3 > handles_r, pxr::VtArray< pxr::GfVec3f > &verts, pxr::VtIntArray &control_point_counts, pxr::VtArray< int > &segments, const bool is_cyclic) |
| static void | populate_curve_props_for_bezier (const bke::CurvesGeometry &curves, pxr::VtArray< pxr::GfVec3f > &verts, pxr::VtIntArray &control_point_counts, pxr::VtArray< float > &widths, pxr::TfToken &interpolation, const bool is_cyclic, ReportList *reports) |
| static void | populate_curve_props_for_nurbs (const bke::CurvesGeometry &curves, pxr::VtArray< pxr::GfVec3f > &verts, pxr::VtIntArray &control_point_counts, pxr::VtArray< float > &widths, pxr::VtArray< double > &knots, pxr::VtArray< double > &weights, pxr::VtArray< int > &orders, pxr::TfToken &interpolation, const bool is_cyclic) |
| static std::optional< pxr::TfToken > | convert_blender_domain_to_usd (const bke::AttrDomain blender_domain, bool is_bezier) |
| static bool | is_excluded_attr (StringRefNull name) |
| static pxr::UsdShadeShader | create_usd_preview_shader (const USDExporterContext &usd_export_context, const pxr::UsdShadeMaterial &material, const StringRef name, int type) |
| static pxr::UsdShadeShader | create_usd_preview_shader (const USDExporterContext &usd_export_context, const pxr::UsdShadeMaterial &material, const bNode *node) |
| static pxr::UsdShadeShader | create_primvar_reader_shader (const USDExporterContext &usd_export_context, const pxr::UsdShadeMaterial &material, const pxr::TfToken &primvar_type, const bNode *node) |
| static void | create_uv_input (const USDExporterContext &usd_export_context, const bNodeSocket *input_socket, pxr::UsdShadeMaterial &usd_material, pxr::UsdShadeInput &usd_input, const std::string &active_uvmap_name, ReportList *reports) |
| static void | export_texture (const USDExporterContext &usd_export_context, bNode *node) |
| static bNode * | find_bsdf_node (const Material *material) |
| static bNode * | find_displacement_node (const Material *material) |
| static void | get_absolute_path (const Image *ima, char *r_path) |
| static std::string | get_tex_image_asset_filepath (const USDExporterContext &usd_export_context, const bNode *node) |
| static const InputSpecMap & | preview_surface_input_map () |
| static const bNodeLink * | traverse_channel (const bNodeSocket *input, short target_type) |
| void | set_transmission_opacity_range (pxr::UsdShadeShader &usd_shader, const InputSpec &input_spec, const pxr::TfToken &source_name) |
| void | set_normal_texture_range (pxr::UsdShadeShader &usd_shader, const InputSpec &input_spec) |
| template<typename T> | |
| void | create_input (pxr::UsdShadeShader &shader, const InputSpec &spec, const T &value, float scale) |
| static void | set_scale_bias (pxr::UsdShadeShader &usd_shader, const pxr::GfVec4f scale, const pxr::GfVec4f bias) |
| static void | process_inputs (const USDExporterContext &usd_export_context, pxr::UsdShadeMaterial &usd_material, pxr::UsdShadeShader &shader, const bNode *node, const std::string &active_uvmap_name, ReportList *reports) |
| static void | create_usd_preview_surface_material (const USDExporterContext &usd_export_context, const Material *material, pxr::UsdShadeMaterial &usd_material, const std::string &active_uvmap_name, ReportList *reports) |
| void | create_usd_viewport_material (const USDExporterContext &usd_export_context, const Material *material, const pxr::UsdShadeMaterial &usd_material) |
| static void | create_uvmap_shader (const USDExporterContext &usd_export_context, const bNodeLink *uvmap_link, const pxr::UsdShadeMaterial &usd_material, const pxr::UsdShadeInput &usd_input, const std::string &active_uvmap_name, ReportList *reports) |
| static void | create_transform2d_shader (const USDExporterContext &usd_export_context, const bNodeLink *mapping_link, pxr::UsdShadeMaterial &usd_material, pxr::UsdShadeInput &usd_input, const std::string &uvmap_name, ReportList *reports) |
| static bool | has_generated_tiles (const Image *ima) |
| static bool | is_in_memory_texture (Image *ima) |
| static bool | is_packed_texture (const Image *ima) |
| static std::string | get_in_memory_texture_filename (Image *ima) |
| static void | export_in_memory_imbuf (ImBuf *imbuf, const std::string &export_dir, const char image_abs_path[FILE_MAX], const char file_name[FILE_MAX], const bool allow_overwrite, ReportList *reports) |
| static void | export_in_memory_texture (Image *ima, const std::string &export_dir, const bool allow_overwrite, ReportList *reports) |
| static void | export_packed_texture (const Image *ima, const std::string &export_dir, const bool allow_overwrite, ReportList *reports) |
| static pxr::TfToken | get_node_tex_image_wrap (const bNode *node) |
| static std::string | get_tex_image_asset_filepath (const Image *ima) |
| std::string | get_tex_image_asset_filepath (Image *ima, const pxr::UsdStageRefPtr stage, const USDExportParams &export_params) |
| std::string | get_tex_image_asset_filepath (const std::string &path, const std::string &stage_path, const USDExportParams &export_params) |
| std::string | get_tex_image_asset_filepath (const bNode *node, const pxr::UsdStageRefPtr stage, const USDExportParams &export_params) |
| static void | copy_tiled_textures (const Image *ima, const std::string &dest_dir, const bool allow_overwrite, ReportList *reports) |
| static void | copy_single_file (const Image *ima, const std::string &dest_dir, const bool allow_overwrite, ReportList *reports) |
| void | export_texture (Image *ima, const pxr::UsdStageRefPtr stage, const bool allow_overwrite, ReportList *reports) |
| void | export_texture (bNode *node, const pxr::UsdStageRefPtr stage, const bool allow_overwrite, ReportList *reports) |
| pxr::TfToken | token_for_input (const StringRef input_name) |
| pxr::UsdShadeMaterial | create_usd_material (const USDExporterContext &usd_export_context, pxr::SdfPath usd_path, const Material *material, const std::string &active_uvmap_name, ReportList *reports) |
| static const SubsurfModifierData * | get_last_subdiv_modifier (eEvaluationMode eval_mode, Object *obj) |
| static std::optional< pxr::TfToken > | convert_blender_domain_to_usd (const bke::AttrDomain blender_domain) |
| static void | get_positions (const Mesh *mesh, USDMeshData &usd_mesh_data) |
| static void | get_loops_polys (const Mesh *mesh, USDMeshData &usd_mesh_data) |
| static void | get_edge_creases (const Mesh *mesh, USDMeshData &usd_mesh_data) |
| static void | get_vert_creases (const Mesh *mesh, USDMeshData &usd_mesh_data) |
| template<typename T> | |
| static pxr::VtArray< T > | DuplicateArray (const pxr::VtArray< T > &original, size_t copies) |
| template<typename T, typename GetterFunc, typename CreatorFunc> | |
| static void | DuplicatePerInstanceAttribute (const GetterFunc &getter, const CreatorFunc &creator, size_t copies, const pxr::UsdTimeCode &time) |
| template<typename T, typename GetterFunc, typename CreatorFunc> | |
| static void | ExpandAttributePerInstance (const GetterFunc &getter, const CreatorFunc &creator, const Span< std::pair< int, int > > instance_object_map, const pxr::UsdTimeCode &time) |
| static std::optional< pxr::TfToken > | convert_blender_domain_to_usd (const bke::AttrDomain blender_domain) |
| static bool | has_varying_modifiers (const Object *ob) |
| static const bNode * | find_node_for_type_in_graph (const bNodeTree *nodetree, const UString type_idname) |
| TEST_F (UsdExportTest, usd_export_rain_mesh) | |
| TEST_F (UsdExportTest, usd_export_material) | |
| TEST (utilities, make_safe_name) | |
| TEST (utilities, make_safe_primvar_name) | |
| TEST_F (USDStageCreationTest, JSONFileLoadingTest) | |
Variables | |
| constexpr char | UDIM_PATTERN [] = "<UDIM>" |
| constexpr char | UDIM_PATTERN2 [] = "%3CUDIM%3E" |
| constexpr int | UDIM_START_TILE = 1001 |
| constexpr int | UDIM_END_TILE = 1100 |
| pxr::TfToken | TempBlendShapeWeightsPrimvarName |
| static CLG_LogRef | LOG = {"io.usd"} |
| const StringRefNull | simple_scene_filename = "usd/usd_simple_scene.blend" |
| const StringRefNull | materials_filename = "usd/usd_materials_export.blend" |
| const StringRefNull | output_filename = "output.usd" |
| using blender::io::usd::ImportedPrimMap = Map<pxr::SdfPath, Vector<PointerRNA>> |
Definition at line 51 of file usd_hook.cc.
| using blender::io::usd::InputSpecMap = Map<StringRef, InputSpec> |
Definition at line 119 of file usd_writer_material.cc.
| using blender::io::usd::MaterialFaceGroups = Map<short, pxr::VtArray<int>> |
Definition at line 25 of file usd_writer_mesh.hh.
| using blender::io::usd::ObjExportMap = Map<const Object *, pxr::SdfPath> |
Map an object to its USD prim export path.
Definition at line 85 of file usd_skel_convert.hh.
| using blender::io::usd::PathMap = std::map<pxr::SdfPath, pxr::SdfPath> |
Definition at line 30 of file usd_instancing_utils.cc.
| using blender::io::usd::PathSet = Set<pxr::SdfPath> |
Definition at line 31 of file usd_instancing_utils.cc.
| using blender::io::usd::ProtoReaderMap = Map<pxr::SdfPath, Vector<USDPrimReader *>> |
Map a USD prototype prim path to the list of readers that convert the prototype data.
Definition at line 30 of file usd_reader_stage.hh.
| using blender::io::usd::ReferencesMap = Map<pxr::SdfPath, Vector<pxr::SdfPath>> |
Definition at line 34 of file usd_instancing_utils.cc.
| using blender::io::usd::ShaderToNodeMap = Map<std::string, bNode *> |
Definition at line 27 of file usd_reader_material.hh.
| using blender::io::usd::USDHookList = std::list<std::unique_ptr<USDHook>> |
Definition at line 50 of file usd_hook.cc.
| using blender::io::usd::UsdPathSet = Set<pxr::SdfPath> |
Definition at line 32 of file usd_reader_stage.hh.
| using blender::io::usd::XformResult = std::tuple<pxr::GfMatrix4f, bool> |
A transformation matrix and a boolean indicating whether the matrix is constant over time.
Definition at line 26 of file usd_reader_xform.hh.
| anonymous enum |
| Enumerator | |
|---|---|
| USD_NO_ERROR | |
| USD_ARCHIVE_FAIL | |
Definition at line 91 of file usd_capi_import.cc.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
static |
Definition at line 128 of file usd_writer_armature.cc.
References add_anim_sample(), CLOG_WARN, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::LOG, blender::bPoseChannel::name, blender::parent_relative_pose_mat(), and set_attribute().
Referenced by add_anim_sample(), and blender::io::usd::USDArmatureWriter::do_write().
|
static |
Definition at line 61 of file usd_reader_curve.cc.
References add_bezier_control_point(), blender::Span< T >::last(), blender::Span< T >::size(), and to_float3().
Referenced by add_bezier_control_point(), and blender::io::usd::USDBasisCurvesReader::read_curve_sample().
|
static |
Create a node to read a geometry attribute of the given name and type.
Definition at line 30 of file usd_reader_pointinstancer.cc.
References add_input_named_attrib_node(), blender::BLI_strncpy(), blender::bNodeSocket::default_value, GEO_NODE_INPUT_NAMED_ATTRIBUTE, MAX_NAME, node, blender::bke::node_add_static_node(), blender::bke::node_find_socket(), blender::SOCK_IN, storage, and blender::bNodeSocketValueString::value.
Referenced by add_input_named_attrib_node(), and blender::io::usd::USDPointInstancerReader::read_object_data().
|
static |
Definition at line 890 of file usd_reader_material.cc.
References add_lessthan(), blender::add_node(), blender::io::usd::NodePlacementContext::compute_node_loc(), blender::bNode::custom1, blender::io::usd::IntermediateNode::node, blender::bke::node_find_socket(), blender::NODE_MATH_LESS_THAN, SH_NODE_MATH, blender::SOCK_IN, blender::io::usd::IntermediateNode::sock_input_name, and blender::io::usd::IntermediateNode::sock_output_name.
Referenced by add_lessthan(), and blender::io::usd::USDMaterialReader::follow_connection().
|
static |
Definition at line 757 of file usd_reader_material.cc.
References blender::add_node(), add_normal_map(), blender::io::usd::NodePlacementContext::compute_node_loc(), blender::io::usd::IntermediateNode::node, SH_NODE_NORMAL_MAP, blender::io::usd::IntermediateNode::sock_input_name, and blender::io::usd::IntermediateNode::sock_output_name.
Referenced by add_normal_map(), and blender::io::usd::USDMaterialReader::follow_connection().
|
static |
Definition at line 909 of file usd_reader_material.cc.
References blender::add_node(), add_oneminus(), blender::io::usd::NodePlacementContext::compute_node_loc(), blender::bNode::custom1, blender::io::usd::IntermediateNode::node, blender::bke::node_find_socket(), blender::NODE_MATH_SUBTRACT, SH_NODE_MATH, blender::SOCK_IN, blender::io::usd::IntermediateNode::sock_input_name, and blender::io::usd::IntermediateNode::sock_output_name.
Referenced by add_oneminus(), and blender::io::usd::USDMaterialReader::follow_connection().
|
static |
Definition at line 771 of file usd_reader_material.cc.
References blender::add_node(), add_scale_bias(), blender::usdtokens::bias(), blender::io::usd::NodePlacementContext::cache_node(), blender::io::usd::NodePlacementContext::compute_node_loc(), blender::copy_v3_v3(), blender::bNode::custom1, blender::io::usd::NodePlacementContext::get_cached_node(), blender::io::usd::IntermediateNode::node, node, blender::bke::node_find_socket(), blender::NODE_VECTOR_MATH_MULTIPLY_ADD, blender::usdtokens::scale(), scale(), SH_NODE_VECTOR_MATH, blender::SOCK_IN, blender::io::usd::IntermediateNode::sock_input_name, blender::io::usd::IntermediateNode::sock_output_name, and blender::bNodeSocketValueVector::value.
Referenced by add_scale_bias(), and blender::io::usd::USDMaterialReader::follow_connection().
|
static |
Definition at line 832 of file usd_reader_material.cc.
References blender::add_node(), add_scale_bias_adjust(), blender::io::usd::NodePlacementContext::compute_node_loc(), blender::copy_v3_fl3(), blender::bNode::custom1, blender::io::usd::IntermediateNode::node, blender::bke::node_find_socket(), blender::NODE_VECTOR_MATH_MULTIPLY_ADD, SH_NODE_VECTOR_MATH, blender::SOCK_IN, blender::io::usd::IntermediateNode::sock_input_name, blender::io::usd::IntermediateNode::sock_output_name, and blender::bNodeSocketValueVector::value.
Referenced by add_scale_bias_adjust(), and blender::io::usd::USDMaterialReader::follow_connection().
|
static |
Definition at line 852 of file usd_reader_material.cc.
References blender::add_node(), add_separate_color(), blender::usdtokens::b(), blender::io::usd::NodePlacementContext::cache_node(), blender::io::usd::NodePlacementContext::compute_node_loc(), blender::usdtokens::g(), blender::io::usd::NodePlacementContext::get_cached_node(), blender::io::usd::IntermediateNode::node, node, blender::usdtokens::r(), SH_NODE_SEPARATE_COLOR, blender::io::usd::IntermediateNode::sock_input_name, and blender::io::usd::IntermediateNode::sock_output_name.
Referenced by add_separate_color(), and blender::io::usd::USDMaterialReader::follow_connection().
|
static |
Definition at line 124 of file usd_light_convert.cc.
References append_node(), blender::bNode::location, blender::bke::node_add_link(), blender::bke::node_add_static_node(), blender::bke::node_find_socket(), blender::SOCK_IN, blender::SOCK_OUT, and blender::UString::UString().
Referenced by append_node(), and dome_light_to_world_material().
| bool blender::io::usd::asset_exists | ( | const std::string & | path | ) |
Invoke the USD asset resolver to determine if the asset with the given path exists.
| path | the path to resolve |
Definition at line 272 of file usd_asset_utils.cc.
References asset_exists().
Referenced by asset_exists(), copy_udim_asset_to_directory(), export_packed_texture(), and should_import_asset().
|
inlinestatic |
Definition at line 34 of file usd_reader_curve.cc.
References bezier_point_count().
Referenced by bezier_point_count(), point_count(), and blender::io::usd::USDBasisCurvesReader::read_curve_sample().
|
inline |
References BlenderBoneLengths(), build_usd_joint_path(), can_export_skinned_mesh(), create_fcurve(), create_pose_joints(), get_armature_bone_names(), get_armature_modifier_obj(), get_enabled_modifier(), init_deform_bones_map(), is_armature_modifier_bone_name(), set_fcurve_sample(), and visit_bones().
Referenced by BlenderBoneLengths(), import_skeleton(), and blender::initialize().
| void blender::io::usd::build_material_map | ( | const Main * | bmain, |
| Map< std::string, Material * > & | r_mat_map ) |
Returns a map containing all the Blender materials which allows a fast lookup of the material by name. Note that the material name key might be modified to be a valid USD identifier, to match material names in the imported USD.
Definition at line 1546 of file usd_reader_material.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), BLI_assert_msg, build_material_map(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), and blender::Main::materials.
Referenced by build_material_map(), and blender::io::usd::USDStageReader::import_all_materials().
| pxr::TfToken blender::io::usd::build_usd_joint_path | ( | const Bone * | bone, |
| bool | allow_unicode ) |
Return the USD joint path corresponding to the given bone. For example, for the bone "Hand", this function might return the full path "Shoulder/Elbow/Hand" of the joint in the hierarchy.
| bone | The bone whose path will be queried. |
| allow_unicode | Whether to allow unicode bone names to be used |
Definition at line 131 of file usd_armature_utils.cc.
References build_usd_joint_path(), make_safe_name(), blender::Bone::name, and blender::Bone::parent.
Referenced by BlenderBoneLengths(), build_usd_joint_path(), create_pose_joints(), and blender::initialize().
| std::string blender::io::usd::cache_image_color | ( | const float | color[4] | ) |
Definition at line 397 of file usd_capi_export.cc.
References blender::BLI_exists(), cache_image_color(), CLOG_ERROR, CLOG_INFO, blender::ImbFormatOptions::flag, blender::FloatData, blender::ImBuf::foptions, blender::ImBuf::ftype, get_image_cache_file(), blender::IMB_allocImBuf(), blender::IMB_freeImBuf(), blender::IMB_FTYPE_OPENEXR, blender::IMB_rectfill(), blender::IMB_save_image(), blender::LOG, and blender::R_IMF_EXR_CODEC_RLE.
Referenced by blender::io::hydra::build_world_data_source(), cache_image_color(), and world_material_to_dome_light().
| CacheReader * blender::io::usd::CacheReader_open_usd_object | ( | CacheArchiveHandle * | handle, |
| CacheReader * | reader, | ||
| Object * | object, | ||
| const char * | object_path ) |
Definition at line 560 of file usd_capi_import.cc.
References CacheReader_open_usd_object(), blender::io::usd::USDStageReader::create_reader(), blender::io::usd::USDPrimReader::incref(), blender::io::usd::USDPrimReader::object(), blender::io::usd::USDStageReader::stage(), stage_reader_from_handle(), USD_CacheReader_free(), blender::io::usd::USDPrimReader::valid(), and blender::io::usd::USDStageReader::valid().
Referenced by blender::BKE_cachefile_reader_open(), and CacheReader_open_usd_object().
|
static |
Definition at line 47 of file usd_reader_curve.cc.
References calc_curve_offsets(), blender::IndexRange::IndexRange(), and blender::threading::parallel_for().
Referenced by calc_curve_offsets(), calc_curve_offsets(), and blender::io::usd::USDBasisCurvesReader::read_curve_sample().
|
static |
Definition at line 187 of file usd_reader_nurbs.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), calc_curve_offsets(), blender::data, blender::Span< T >::drop_front(), blender::Span< T >::index_range(), blender::Span< T >::size(), blender::Span< T >::take_back(), and blender::Span< T >::take_front().
Referenced by blender::io::usd::USDNurbsReader::read_curve_sample().
| void blender::io::usd::call_export_hooks | ( | Depsgraph * | depsgraph, |
| const USDHierarchyIterator * | iter, | ||
| ReportList * | reports ) |
Call the 'on_export' chaser function defined in the registered USDHook classes.
Definition at line 594 of file usd_hook.cc.
References blender::io::usd::USDHookInvoker::call(), call_export_hooks(), and hook_list().
Referenced by call_export_hooks(), and export_to_stage().
| void blender::io::usd::call_import_hooks | ( | USDStageReader * | archive, |
| ReportList * | reports ) |
Call the 'on_import' chaser function defined in the registered USDHook classes.
Definition at line 619 of file usd_hook.cc.
References blender::io::usd::USDHookInvoker::call(), call_import_hooks(), blender::Object::data, hook_list(), blender::Object::id, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), blender::io::usd::USDStageReader::readers(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), blender::RNA_id_pointer_create(), blender::io::usd::USDStageReader::settings(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::io::usd::USDStageReader::stage(), and blender::io::usd::ImportSettings::usd_path_to_mat.
Referenced by call_import_hooks(), and import_endjob().
| void blender::io::usd::call_material_export_hooks | ( | pxr::UsdStageRefPtr | stage, |
| const Material * | material, | ||
| const pxr::UsdShadeMaterial & | usd_material, | ||
| const USDExportParams & | export_params, | ||
| ReportList * | reports ) |
Call the 'on_material_export' hook functions defined in the registered USDHook classes.
Definition at line 604 of file usd_hook.cc.
References blender::io::usd::USDHookInvoker::call(), call_material_export_hooks(), and hook_list().
Referenced by call_material_export_hooks(), and create_usd_material().
| bool blender::io::usd::call_material_import_hooks | ( | pxr::UsdStageRefPtr | stage, |
| Material * | material, | ||
| const pxr::UsdShadeMaterial & | usd_material, | ||
| const USDImportParams & | import_params, | ||
| ReportList * | reports ) |
Call the 'on_material_import' hook functions defined in the registered USDHook classes. Returns true if any of the hooks were successful, false otherwise.
Definition at line 667 of file usd_hook.cc.
References blender::io::usd::USDHookInvoker::call(), call_material_import_hooks(), hook_list(), and blender::io::usd::OnMaterialImportInvoker::result().
Referenced by call_material_import_hooks(), and blender::io::usd::USDStageReader::call_material_import_hooks().
|
static |
Definition at line 29 of file usd_writer_camera.cc.
References blender::BKE_camera_sensor_fit(), blender::BKE_camera_sensor_size(), BLI_assert_msg, camera(), blender::CAMERA_SENSOR_FIT_AUTO, blender::CAMERA_SENSOR_FIT_HOR, blender::CAMERA_SENSOR_FIT_VERT, camera_sensor_size_for_render(), blender::RenderData::xasp, blender::RenderData::xsch, blender::RenderData::yasp, and blender::RenderData::ysch.
Referenced by camera_sensor_size_for_render(), and blender::io::usd::USDCameraWriter::do_write().
| bool blender::io::usd::can_export_skinned_mesh | ( | const Object & | obj, |
| const Depsgraph * | depsgraph ) |
Query whether exporting a skinned mesh is supported for the given object. Currently, the object can be exported as a skinned mesh if it has an enabled armature modifier and no other enabled modifiers.
| obj | Object to query |
| depsgraph | The dependency graph where the object was evaluated |
Definition at line 194 of file usd_armature_utils.cc.
References can_export_skinned_mesh(), blender::eModifierType_Armature, and get_enabled_modifier().
Referenced by BlenderBoneLengths(), can_export_skinned_mesh(), and blender::io::usd::USDMeshWriter::set_skel_export_flags().
|
static |
Definition at line 425 of file usd_capi_export.cc.
References CLOG_WARN, collect_point_instancer_prototypes_and_set_extent(), and blender::LOG.
Referenced by collect_point_instancer_prototypes_and_set_extent(), and export_startjob().
| void blender::io::usd::colorspace_apply_to_prim | ( | const pxr::UsdPrim & | prim | ) |
Tag a prim with the scene linear color space.
Definition at line 36 of file usd_colorspace_utils.cc.
References colorspace_apply_to_prim(), and colorspace_scene_linear_interop_id().
Referenced by colorspace_apply_to_prim(), copy_blender_attribute_to_primvar(), blender::io::usd::USDLightWriter::do_write(), ensure_root_prim(), blender::io::usd::USDAbstractWriter::ensure_usd_material_created(), and world_material_to_dome_light().
| void blender::io::usd::colorspace_attr_to_scene_linear | ( | const pxr::UsdAttribute & | attr, |
| ColorGeometry4f & | color ) |
Definition at line 71 of file usd_colorspace_utils.cc.
References colorspace_attr_to_scene_linear(), colorspace_from_attr(), and blender::IMB_colormanagement_colorspace_to_scene_linear_v4().
| void blender::io::usd::colorspace_attr_to_scene_linear | ( | const pxr::UsdAttribute & | attr, |
| MutableSpan< ColorGeometry4f > | colors ) |
Convert imported USD color array to scene linear.
Definition at line 79 of file usd_colorspace_utils.cc.
References colorspace_attr_to_scene_linear(), colorspace_from_attr(), blender::IMB_colormanagement_colorspace_to_scene_linear(), blender::MutableSpan< T >::is_empty(), and blender::MutableSpan< T >::size().
| void blender::io::usd::colorspace_attr_to_scene_linear | ( | const pxr::UsdAttribute & | attr, |
| pxr::GfVec3f & | color ) |
Convert an imported USD color to scene linear.
Definition at line 63 of file usd_colorspace_utils.cc.
References colorspace_attr_to_scene_linear(), colorspace_from_attr(), and blender::IMB_colormanagement_colorspace_to_scene_linear_v3().
Referenced by colorspace_attr_to_scene_linear(), colorspace_attr_to_scene_linear(), colorspace_attr_to_scene_linear(), copy_primvar_to_blender_buffer(), get_color(), read_face_display_color(), blender::io::usd::USDLightReader::read_object_data(), blender::io::usd::USDMaterialReader::set_node_input(), and blender::set_viewport_material_props().
|
static |
Definition at line 46 of file usd_colorspace_utils.cc.
References colorspace_from_attr(), blender::IMB_colormanagement_space_get_named(), blender::IMB_colormanagement_space_is_data(), and blender::IMB_colormanagement_space_is_scene_linear().
Referenced by colorspace_attr_to_scene_linear(), colorspace_attr_to_scene_linear(), colorspace_attr_to_scene_linear(), and colorspace_from_attr().
| void blender::io::usd::colorspace_from_image_texture | ( | const Image * | image, |
| pxr::UsdShadeShader & | shader ) |
Set the colorspace on an exported USD texture shader from a Blender image.
Definition at line 162 of file usd_colorspace_utils.cc.
References colorspace_from_image_texture(), blender::IMB_colormanagement_space_get_interop_id(), blender::IMB_colormanagement_space_get_named(), blender::IMB_colormanagement_space_name_is_data(), blender::IMB_colormanagement_space_name_is_srgb(), blender::blender::StringRefBase::is_empty(), blender::io::usd::usdtokens::raw(), blender::io::usd::usdtokens::sourceColorSpace(), and blender::io::usd::usdtokens::sRGB().
Referenced by colorspace_from_image_texture(), and create_usd_preview_shader().
| pxr::TfToken blender::io::usd::colorspace_scene_linear_interop_id | ( | ) |
Get the interop ID for tagging exported USD stages.
Definition at line 27 of file usd_colorspace_utils.cc.
References blender::COLOR_ROLE_SCENE_LINEAR, colorspace_scene_linear_interop_id(), blender::IMB_colormanagement_role_colorspace_name_get(), blender::IMB_colormanagement_space_get_interop_id(), blender::IMB_colormanagement_space_get_named(), and blender::blender::StringRefBase::is_empty().
Referenced by colorspace_apply_to_prim(), and colorspace_scene_linear_interop_id().
| void blender::io::usd::colorspace_to_image_texture | ( | const pxr::UsdShadeShader & | usd_shader, |
| const pxr::UsdShadeInput & | file_input, | ||
| bool | is_data, | ||
| Image * | image ) |
Set the Blender image colorspace from an imported USD texture shader.
Definition at line 108 of file usd_colorspace_utils.cc.
References blender::io::usd::usdtokens::auto_(), blender::COLOR_ROLE_DATA, blender::COLOR_ROLE_DEFAULT_BYTE, colorspace_to_image_texture(), blender::io::usd::usdtokens::data(), ELEM, get_source_color_space(), blender::IMB_colormanagement_colorspace_get_name(), blender::IMB_colormanagement_colorspace_settings_set(), blender::IMB_colormanagement_role_colorspace_name_get(), blender::IMB_colormanagement_space_get_named(), blender::IMB_colormanagement_srgb_colorspace_name_get(), blender::io::usd::usdtokens::RAW(), blender::io::usd::usdtokens::raw(), and blender::io::usd::usdtokens::sRGB().
Referenced by colorspace_to_image_texture(), and blender::io::usd::USDMaterialReader::load_tex_image().
|
static |
Definition at line 926 of file usd_reader_material.cc.
References blender::usdtokens::bias(), configure_displacement(), blender::bke::node_find_socket(), blender::usdtokens::scale(), scale(), and blender::SOCK_IN.
Referenced by configure_displacement(), and blender::io::usd::USDMaterialReader::follow_connection().
|
static |
Definition at line 209 of file usd_writer_mesh.cc.
References convert_blender_domain_to_usd(), blender::bke::Corner, blender::bke::Face, and blender::bke::Point.
|
static |
Definition at line 64 of file usd_writer_points.cc.
References convert_blender_domain_to_usd(), and blender::bke::Point.
|
static |
Definition at line 407 of file usd_writer_curves.cc.
References convert_blender_domain_to_usd(), blender::bke::Curve, and blender::bke::Point.
Referenced by convert_blender_domain_to_usd(), and convert_blender_domain_to_usd().
| std::optional< pxr::SdfValueTypeName > blender::io::usd::convert_blender_type_to_usd | ( | const bke::AttrType | blender_type, |
| bool | use_color3f_type ) |
Definition at line 20 of file usd_attribute_utils.cc.
References blender::bke::Bool, blender::bke::ColorByte, blender::bke::ColorFloat, convert_blender_type_to_usd(), blender::bke::Float, blender::bke::Float2, blender::bke::Float3, blender::bke::Float4x4, blender::bke::Int32, blender::bke::Int8, blender::bke::Quaternion, and blender::bke::String.
Referenced by convert_blender_type_to_usd().
|
static |
Definition at line 38 of file usd_instancing_utils.cc.
References CLOG_ERROR, convert_proto_to_instance(), and blender::LOG.
Referenced by convert_proto_to_instance(), and process_scene_graph_instances().
|
static |
Definition at line 128 of file usd_reader_stage.cc.
References blender::io::usd::ImportSettings::conversion_mat, convert_to_z_up(), blender::io::usd::ImportSettings::do_convert_mat, blender::math::from_rotation(), M_PI_2, and z().
Referenced by convert_to_z_up(), and blender::io::usd::USDStageReader::USDStageReader().
|
static |
Definition at line 112 of file usd_reader_curve.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), convert_usd_interp_to_blender(), blender::bke::Curve, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::bke::Point, uniform, and vertex.
Referenced by convert_usd_interp_to_blender(), and blender::io::usd::USDCurvesReader::read_custom_data().
| std::optional< bke::AttrType > blender::io::usd::convert_usd_type_to_blender | ( | const pxr::SdfValueTypeName | usd_type | ) |
Definition at line 51 of file usd_attribute_utils.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::bke::Bool, blender::bke::ColorFloat, convert_usd_type_to_blender(), blender::bke::Float, blender::bke::Float2, blender::bke::Float3, blender::bke::Float4x4, blender::bke::Int32, blender::bke::Int8, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), and blender::bke::Quaternion.
Referenced by convert_usd_type_to_blender(), blender::io::usd::USDCurvesReader::read_custom_data(), blender::io::usd::USDPointsReader::read_custom_data(), and read_generic_mesh_primvar().
|
static |
Definition at line 73 of file usd_mesh_utils.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), convert_usd_varying_to_blender(), blender::bke::Corner, blender::bke::Face, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::bke::Point, uniform, and vertex.
Referenced by convert_usd_varying_to_blender(), and read_generic_mesh_primvar().
| bool blender::io::usd::copy_asset | ( | const std::string & | src, |
| const std::string & | dst, | ||
| TexNameCollisionMode | name_collision_mode, | ||
| ReportList * | reports ) |
Invoke the USD asset resolver to copy an asset.
| src | source path of the asset to copy |
| dst | destination path of the copy |
| name_collision_mode | behavior when dst already exists |
| reports | the storage for potential warning or error reports (generated using BKE_report API). |
Definition at line 156 of file usd_asset_utils.cc.
References blender::BKE_reportf(), copy_asset(), Overwrite, blender::RPT_ERROR, blender::RPT_INFO, and blender::RPT_WARNING.
Referenced by copy_asset(), and copy_asset_to_directory().
|
static |
Definition at line 85 of file usd_asset_utils.cc.
References blender::BKE_reportf(), blender::BLI_is_file(), BLI_path_join, blender::BLI_path_normalize(), copy_asset(), copy_asset_to_directory(), FILE_MAX, get_asset_base_name(), blender::RPT_WARNING, and UseExisting.
Referenced by copy_asset_to_directory(), copy_udim_asset_to_directory(), and import_asset().
| void blender::io::usd::copy_blender_attribute_to_primvar | ( | const GVArray & | attribute, |
| const bke::AttrType | data_type, | ||
| const pxr::UsdTimeCode | time, | ||
| const pxr::UsdGeomPrimvar & | primvar, | ||
| pxr::UsdUtilsSparseValueWriter & | value_writer ) |
Definition at line 159 of file usd_attribute_utils.cc.
References attribute, BLI_assert_unreachable, blender::bke::Bool, blender::bke::ColorByte, blender::bke::ColorFloat, colorspace_apply_to_prim(), copy_blender_attribute_to_primvar(), copy_blender_buffer_to_primvar(), blender::bke::Float, blender::bke::Float2, blender::bke::Float3, blender::bke::Float4x4, blender::bke::Int32, blender::bke::Int8, and blender::bke::Quaternion.
Referenced by copy_blender_attribute_to_primvar().
| void blender::io::usd::copy_blender_buffer_to_primvar | ( | const VArray< BlenderT > & | buffer, |
| const pxr::UsdTimeCode | time, | ||
| const pxr::UsdGeomPrimvar & | primvar, | ||
| pxr::UsdUtilsSparseValueWriter & | value_writer ) |
Definition at line 200 of file usd_attribute_utils.hh.
References cast(), blender::io::usd::detail::convert_value(), copy_blender_buffer_to_primvar(), blender::data, blender::VArrayCommon< T >::get_if_single(), set_attribute(), and blender::VArrayCommon< T >::size().
Referenced by copy_blender_attribute_to_primvar(), and copy_blender_buffer_to_primvar().
| void blender::io::usd::copy_primvar_to_blender_attribute | ( | const pxr::UsdGeomPrimvar & | primvar, |
| const pxr::UsdTimeCode | time, | ||
| const bke::AttrType | data_type, | ||
| const bke::AttrDomain | domain, | ||
| const OffsetIndices< int > | face_indices, | ||
| bke::MutableAttributeAccessor | attributes ) |
Definition at line 98 of file usd_attribute_utils.cc.
References BLI_assert_unreachable, blender::bke::Bool, blender::bke::ColorFloat, copy_primvar_to_blender_attribute(), copy_primvar_to_blender_buffer(), ELEM, blender::bke::Float, blender::bke::Float2, blender::bke::Float3, blender::bke::Float4x4, blender::bke::Int32, blender::bke::Int8, and blender::bke::Quaternion.
Referenced by copy_primvar_to_blender_attribute(), blender::io::usd::USDCurvesReader::read_custom_data(), blender::io::usd::USDPointsReader::read_custom_data(), and read_generic_mesh_primvar().
| void blender::io::usd::copy_primvar_to_blender_buffer | ( | const pxr::UsdGeomPrimvar & | primvar, |
| const pxr::UsdTimeCode | time, | ||
| const bke::AttrType | data_type, | ||
| const bke::AttrDomain | domain, | ||
| const OffsetIndices< int > | faces, | ||
| bke::MutableAttributeAccessor | attributes ) |
Definition at line 264 of file usd_attribute_utils.hh.
References attribute, cast(), colorspace_attr_to_scene_linear(), blender::io::usd::detail::convert_value(), copy_primvar_to_blender_buffer(), blender::bke::SpanAttributeWriter< T >::finish(), get_primvar_array(), blender::io::validate::index_in_range(), blender::IndexRange::index_range(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::offset_indices::OffsetIndices< T >::is_empty(), blender::IndexRange::last(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), set_single_value(), blender::bke::SpanAttributeWriter< T >::span, and blender::IndexRange::start().
Referenced by copy_primvar_to_blender_attribute(), and copy_primvar_to_blender_buffer().
|
static |
Definition at line 1378 of file usd_writer_material.cc.
References blender::BKE_reportf(), blender::BLI_copy(), blender::BLI_exists(), blender::BLI_path_cmp_normalized(), BLI_path_join, blender::BLI_path_split_file_part(), CLOG_DEBUG, copy_single_file(), FILE_MAX, get_absolute_path(), blender::LOG, and blender::RPT_WARNING.
Referenced by copy_single_file(), and export_texture().
|
static |
Definition at line 1324 of file usd_writer_material.cc.
References blender::BKE_image_get_tile_strformat(), blender::BKE_image_set_filepath_from_tile_number(), blender::BKE_reportf(), blender::BLI_copy(), blender::BLI_exists(), blender::BLI_path_cmp_normalized(), BLI_path_join, blender::BLI_path_split_file_part(), CLOG_DEBUG, CLOG_WARN, copy_tiled_textures(), FILE_MAX, FILE_MAXFILE, get_absolute_path(), blender::LOG, blender::RPT_WARNING, tile, and blender::UDIM_TILE_FORMAT_UDIM.
Referenced by copy_tiled_textures(), and export_texture().
|
static |
Definition at line 113 of file usd_asset_utils.cc.
References asset_exists(), blender::BKE_reportf(), BLI_path_join, copy_asset_to_directory(), copy_udim_asset_to_directory(), FILE_MAX, get_asset_base_name(), blender::RPT_ERROR, split_udim_pattern(), UDIM_END_TILE, UDIM_PATTERN, and UDIM_START_TILE.
Referenced by copy_udim_asset_to_directory(), and import_asset().
| void blender::io::usd::create_blend_shapes | ( | pxr::UsdStageRefPtr | stage, |
| const Object * | obj, | ||
| const pxr::UsdPrim & | mesh_prim, | ||
| bool | allow_unicode ) |
Convert shape keys on the given object to USD blend shapes. The blend-shapes will be added to the stage as children of the given USD mesh prim. The blend-shape names and targets will also be set as properties on the primitive.
| stage | The stage |
| obj | The mesh object whose shape keys will be converted to blend shapes |
| mesh_prim | The USD mesh that will be assigned the blend shape targets |
| allow_unicode | Whether to allow unicode encoded characters in the blend shape name |
Definition at line 195 of file usd_blend_shape_utils.cc.
References blender::Key::block, CLOG_WARN, create_blend_shapes(), blender::data, blender::KeyBlock::data, float, get_mesh_shape_key(), blender::LOG, make_safe_name(), blender::KeyBlock::name, blender::sub_v3_v3v3(), and blender::KeyBlock::totelem.
Referenced by create_blend_shapes(), and blender::io::usd::USDMeshWriter::init_blend_shapes().
|
static |
Create a collection with the given parent and name.
Definition at line 92 of file usd_reader_stage.cc.
References blender::BKE_collection_add(), and create_collection().
Referenced by create_collection(), and blender::io::usd::USDStageReader::create_proto_collections().
| FCurve * blender::io::usd::create_fcurve | ( | animrig::Channelbag & | channelbag, |
| const animrig::FCurveDescriptor & | fcurve_descriptor, | ||
| const int | sample_count ) |
Definition at line 27 of file usd_armature_utils.cc.
References blender::BKE_fcurve_bezt_resize(), BLI_assert_msg, create_fcurve(), and blender::animrig::Channelbag::fcurve_create_unique().
Referenced by BlenderBoneLengths(), create_fcurve(), import_blendshapes(), and blender::io::usd::USDCameraReader::read_object_data().
| void blender::io::usd::create_input | ( | pxr::UsdShadeShader & | shader, |
| const InputSpec & | spec, | ||
| const T & | value, | ||
| float | scale ) |
Definition at line 159 of file usd_writer_material.cc.
References create_input(), blender::io::usd::InputSpec::input_name, blender::io::usd::InputSpec::input_type, scale(), and T.
Referenced by create_input(), and process_inputs().
| USDMeshReadParams blender::io::usd::create_mesh_read_params | ( | const double | motion_sample_time, |
| const int | read_flags ) |
Definition at line 522 of file usd_capi_import.cc.
References create_mesh_read_params(), blender::io::usd::USDMeshReadParams::motion_sample_time, and blender::io::usd::USDMeshReadParams::read_flags.
Referenced by create_mesh_read_params(), blender::modify_geometry_set(), blender::io::usd::USDMeshReader::read_object_data(), blender::io::usd::USDParticleFieldReader::read_object_data(), blender::io::usd::USDPointInstancerReader::read_object_data(), blender::io::usd::USDPointsReader::read_object_data(), and blender::io::usd::USDShapeReader::read_object_data().
| void blender::io::usd::create_pose_joints | ( | pxr::UsdSkelAnimation & | skel_anim, |
| const Object & | obj, | ||
| const Map< StringRef, const Bone * > * | deform_map, | ||
| bool | allow_unicode ) |
Sets the USD joint paths as an attribute on the given USD animation, where the paths correspond to the bones of the given armature.
| skel_anim | The animation whose joints attribute will be set |
| obj | The armature object |
| deform_map | A pointer to a map associating bone names with deform bones and their parents. If the pointer is not null, assume only deform bones are to be exported and bones not found in this map will be skipped |
| allow_unicode | Whether to allow unicode bone names to be used |
Definition at line 144 of file usd_armature_utils.cc.
References blender::BKE_pose_ensure_bone_indices(), blender::BLI_assert(), build_usd_joint_path(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), create_pose_joints(), and blender::bPoseChannel::name.
Referenced by BlenderBoneLengths(), create_pose_joints(), and blender::initialize().
|
static |
Definition at line 1199 of file usd_writer_material.cc.
References blender::io::usd::USDExportParams::allow_unicode, create_primvar_reader_shader(), blender::io::usd::USDExporterContext::export_params, make_safe_name(), node, and blender::io::usd::USDExporterContext::stage.
Referenced by create_primvar_reader_shader(), and process_inputs().
| void blender::io::usd::create_skel_roots | ( | pxr::UsdStageRefPtr | stage, |
| const USDExportParams & | params ) |
We must structure the scene graph to encapsulate skinned prim under a UsdSkelRoot prim. Per the USD documentation, a SkelRoot is a:
"Boundable prim type used to identify a scope beneath which skeletally-posed primitives are defined. A SkelRoot must be defined at or above a skinned primitive for any skinning behaviors in UsdSkel."
See: https://openusd.org/23.05/api/class_usd_skel_root.html#details
This function attempts to ensure that skinned primitives and skeletons are encapsulated under SkelRoots, converting existing Xform primitives to SkelRoots to achieve this, if possible. In the case where no common ancestor which can be converted to a SkelRoot is found, this function issues a warning. One way to address such a case is by setting a root prim in the export options, so that this root prim can be converted to a SkelRoot for the entire scene.
| stage | The stage |
| params | The export parameters |
Definition at line 55 of file usd_skel_root_utils.cc.
References blender::BKE_reportf(), CLOG_DEBUG, CLOG_WARN, create_skel_roots(), blender::io::usd::USDExportParams::export_armatures, blender::io::usd::USDExportParams::export_shapekeys, blender::get_xform_ancestor(), blender::LOG, blender::wmJobWorkerStatus::reports, blender::RPT_WARNING, and blender::io::usd::USDExportParams::worker_status.
Referenced by create_skel_roots(), and blender::io::usd::USDHierarchyIterator::process_usd_skel().
|
static |
To create a USDZ file, we must first create a .usd/a/c file and then covert it to .usdz. The temporary files will be created in Blender's temporary session storage. The .usdz file will then be moved to job->usdz_filepath.
Definition at line 786 of file usd_capi_export.cc.
References blender::BKE_tempdir_session(), blender::BLI_path_basename(), blender::BLI_path_extension_check(), blender::BLI_path_extension_replace(), BLI_path_join, create_temp_path_for_usdz_export(), FILE_MAX, blender::STRNCPY(), blender::io::usd::ExportJobData::unarchived_filepath, and blender::io::usd::ExportJobData::usdz_filepath.
Referenced by create_temp_path_for_usdz_export(), and set_job_filepath().
|
static |
Definition at line 682 of file usd_writer_material.cc.
References blender::BKE_reportf(), blender::BLI_assert(), blender::copy_v3_v3(), create_transform2d_shader(), create_usd_preview_shader(), create_uv_input(), blender::bNode::custom1, blender::bNodeLink::fromnode, blender::usdtokens::in(), M_PI, blender::bke::node_find_socket(), blender::usdtokens::result(), rot, blender::usdtokens::rotation(), blender::RPT_WARNING, blender::usdtokens::scale(), scale(), SH_NODE_MAPPING, blender::SOCK_IN, blender::TEXMAP_TYPE_POINT, blender::usdtokens::translation(), blender::bNode::type_legacy, and blender::bNodeSocketValueVector::value.
Referenced by create_transform2d_shader(), and create_uv_input().
| pxr::UsdShadeMaterial blender::io::usd::create_usd_material | ( | const USDExporterContext & | usd_export_context, |
| pxr::SdfPath | usd_path, | ||
| const Material * | material, | ||
| const std::string & | active_uvmap_name, | ||
| ReportList * | reports ) |
Create USDMaterial from Blender material.
| active_uvmap_name | used as the default UV set name sampled by the primvar reader shaders generated for image texture nodes that don't have an attached UVMap node. |
Definition at line 1736 of file usd_writer_material.cc.
References call_material_export_hooks(), create_usd_material(), create_usd_preview_surface_material(), create_usd_viewport_material(), blender::io::usd::USDExporterContext::export_params, blender::io::usd::USDExportParams::generate_materialx_network, blender::io::usd::USDExportParams::generate_preview_surface, and blender::io::usd::USDExporterContext::stage.
Referenced by blender::io::hydra::build_emitted_material(), create_usd_material(), and blender::io::usd::USDAbstractWriter::ensure_usd_material_created().
|
static |
Definition at line 1170 of file usd_writer_material.cc.
References colorspace_from_image_texture(), create_usd_preview_shader(), blender::usdtokens::file(), get_node_tex_image_wrap(), get_tex_image_asset_filepath(), node, SH_NODE_TEX_IMAGE, blender::gpu::wrap(), blender::usdtokens::wrapS(), and blender::usdtokens::wrapT().
|
static |
Definition at line 1124 of file usd_writer_material.cc.
References blender::io::usd::USDExportParams::allow_unicode, create_usd_preview_shader(), blender::io::usd::USDExporterContext::export_params, make_safe_name(), blender::usdtokens::preview_surface(), blender::usdtokens::primvar_float2(), SH_NODE_BSDF_DIFFUSE, SH_NODE_BSDF_PRINCIPLED, SH_NODE_MAPPING, SH_NODE_TEX_COORD, SH_NODE_TEX_IMAGE, SH_NODE_UVMAP, blender::io::usd::USDExporterContext::stage, blender::usdtokens::surface(), blender::usdtokens::UsdTransform2d(), and blender::usdtokens::uv_texture().
Referenced by create_transform2d_shader(), create_usd_preview_shader(), create_usd_preview_shader(), create_usd_preview_surface_material(), create_uvmap_shader(), and process_inputs().
|
static |
Definition at line 443 of file usd_writer_material.cc.
References CLOG_WARN, create_usd_preview_shader(), create_usd_preview_surface_material(), blender::usdtokens::displacement(), find_bsdf_node(), find_displacement_node(), blender::io::usd::InputSpec::input_name, blender::io::usd::InputSpec::input_type, blender::bNodeSocket::link, blender::LOG, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup(), blender::bke::node_find_socket(), preview_surface_input_map(), process_inputs(), blender::SHD_SPACE_OBJECT, and blender::SOCK_IN.
Referenced by create_usd_material(), and create_usd_preview_surface_material().
| void blender::io::usd::create_usd_viewport_material | ( | const USDExporterContext & | usd_export_context, |
| const Material * | material, | ||
| const pxr::UsdShadeMaterial & | usd_material ) |
Create a viewport UsdPreviewSurface material from a Blender material.
Definition at line 595 of file usd_writer_material.cc.
References create_usd_viewport_material(), blender::usdtokens::diffuse_color(), Float, blender::usdtokens::metallic(), blender::usdtokens::preview_shader(), blender::usdtokens::preview_surface(), blender::usdtokens::roughness(), blender::io::usd::USDExporterContext::stage, and blender::usdtokens::surface().
Referenced by blender::io::hydra::build_emitted_material(), create_usd_material(), and create_usd_viewport_material().
|
static |
Definition at line 776 of file usd_writer_material.cc.
References create_transform2d_shader(), create_uv_input(), create_uvmap_shader(), blender::io::usd::USDExporterContext::export_params, blender::io::usd::USDExportParams::rename_uvmaps, SH_NODE_MAPPING, SH_NODE_UVMAP, blender::usdtokens::st(), and traverse_channel().
Referenced by create_transform2d_shader(), create_uv_input(), and process_inputs().
|
static |
Definition at line 645 of file usd_writer_material.cc.
References blender::io::usd::USDExportParams::allow_unicode, blender::BKE_reportf(), blender::BLI_assert(), create_usd_preview_shader(), create_uvmap_shader(), blender::io::usd::USDExporterContext::export_params, blender::bNodeLink::fromnode, make_safe_primvar_name(), blender::bNode::name, blender::io::usd::USDExportParams::rename_uvmaps, blender::usdtokens::result(), blender::RPT_WARNING, SH_NODE_UVMAP, blender::usdtokens::st(), blender::bNode::storage, lexit::String, blender::bNode::type_legacy, blender::NodeShaderUVMap::uv_map, and blender::usdtokens::varname().
Referenced by create_uv_input(), and create_uvmap_shader().
|
static |
Definition at line 142 of file usd_writer_abstract.cc.
References CLOG_WARN, create_vector_attrib(), blender::IDP_ARRAY, blender::IDP_DOUBLE, blender::IDP_FLOAT, blender::IDP_INT, blender::IDProperty::len, blender::LOG, blender::IDProperty::name, blender::set_vec_attrib(), blender::IDProperty::subtype, and blender::IDProperty::type.
Referenced by create_vector_attrib(), and blender::io::usd::USDAbstractWriter::write_user_properties().
|
static |
Returns true if the number of curves or the number of curve points in each curve differ.
Definition at line 86 of file usd_reader_curve.cc.
References curves_topology_changed().
Referenced by curves_topology_changed(), and blender::io::usd::USDBasisCurvesReader::read_curve_sample().
|
static |
Returns true if the number of curves or the number of curve points in each curve differ.
Definition at line 239 of file usd_reader_nurbs.cc.
References curves_topology_changed().
Referenced by blender::io::usd::USDNurbsReader::read_curve_sample().
|
static |
Definition at line 80 of file usd_reader_stage.cc.
References blender::io::usd::USDPrimReader::decref(), and blender::io::usd::USDPrimReader::refcount().
Referenced by blender::io::usd::USDStageReader::clear_readers().
|
static |
Set compatibility flags if the Stage was written by Blender.
Definition at line 188 of file usd_reader_stage.cc.
References blender::io::usd::ImportSettings::blender_stage_version_prior_44, and determine_blender_compat().
Referenced by determine_blender_compat(), and blender::io::usd::USDStageReader::USDStageReader().
|
static |
Definition at line 129 of file usd_reader_nurbs.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), blender::Span< T >::begin(), blender::bke::curves::nurbs::calculate_multiplicity_sequence(), determine_knots_mode(), blender::Span< T >::end(), blender::Vector< T, InlineBufferCapacity, Allocator >::first(), float, blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::NURBS_KNOT_MODE_BEZIER, blender::NURBS_KNOT_MODE_CUSTOM, blender::NURBS_KNOT_MODE_ENDPOINT, blender::NURBS_KNOT_MODE_ENDPOINT_BEZIER, blender::NURBS_KNOT_MODE_NORMAL, blender::Span< T >::size(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by determine_knots_mode(), and blender::io::usd::USDNurbsReader::read_curve_sample().
| void blender::io::usd::dome_light_to_world_material | ( | const USDImportParams & | params, |
| Scene * | scene, | ||
| Main * | bmain, | ||
| const USDImportDomeLightData & | dome_light_data, | ||
| const pxr::UsdPrim & | prim, | ||
| const pxr::UsdTimeCode | time ) |
Definition at line 225 of file usd_light_convert.cc.
References append_node(), blender::BKE_ntree_update_after_single_tree_change(), blender::BLI_assert(), CLOG_WARN, blender::io::usd::USDImportDomeLightData::color, blender::copy_v3_v3(), blender::DEG_id_tag_update(), dome_light_to_world_material(), ELEM, blender::io::usd::USDImportDomeLightData::has_color, blender::io::usd::USDImportDomeLightData::has_tex, blender::bNode::id, blender::bNodeTree::id, blender::ID_RECALC_NTREE_OUTPUT, blender::io::usd::USDImportDomeLightData::intensity, blender::io::usd::USDImportParams::light_intensity_scale, blender::bNodeSocket::link, load_image(), blender::LOG, M_PI, mult(), blender::bNodeSocket::next, node, blender::bke::node_add_static_node(), blender::bke::node_find_socket(), blender::bke::node_remove_link(), blender::bke::node_set_active(), blender::NODE_VECTOR_MATH_MULTIPLY, output, blender::io::usd::USDImportDomeLightData::pole_axis, SH_NODE_BACKGROUND, SH_NODE_MAPPING, SH_NODE_OUTPUT_WORLD, SH_NODE_TEX_COORD, SH_NODE_TEX_ENVIRONMENT, SH_NODE_VECTOR_MATH, blender::SOCK_IN, blender::io::usd::USDImportDomeLightData::tex_path, blender::bNodeSocketValueRGBA::value, blender::bNodeSocketValueVector::value, blender::Scene::world, and y.
Referenced by blender::io::usd::USDDomeLightReader::create_object(), and dome_light_to_world_material().
|
static |
Definition at line 384 of file usd_writer_pointinstancer.cc.
References DuplicateArray().
Referenced by DuplicateArray(), and DuplicatePerInstanceAttribute().
|
static |
Definition at line 396 of file usd_writer_pointinstancer.cc.
References DuplicateArray(), and DuplicatePerInstanceAttribute().
Referenced by DuplicatePerInstanceAttribute().
| void blender::io::usd::ensure_blend_shape_skeleton | ( | pxr::UsdStageRefPtr | stage, |
| pxr::UsdPrim & | mesh_prim ) |
USD implementations expect that a mesh with blend shape targets be bound to a skeleton with an animation that provides the blend shape weights. If the given mesh is not already bound to a skeleton this function will create a dummy skeleton with a single joint and will bind it to the mesh. This is typically required if the source Blender mesh has shape keys but not an armature deformer.
This function will also create a skel animation prim as a child of the skeleton and will copy the weight time samples from a temporary primvar on the mesh to the animation prim.
| stage | The stage |
| mesh_prim | The USD mesh to which the skeleton will be bound |
Definition at line 83 of file usd_blend_shape_utils.cc.
References blender::usdtokens::Anim(), CLOG_WARN, ensure_blend_shape_skeleton(), blender::usdtokens::joint1(), blender::LOG, blender::usdtokens::Skel(), and TempBlendShapeWeightsPrimvarName.
Referenced by ensure_blend_shape_skeleton(), and shape_key_export_chaser().
|
static |
Create the root Xform primitive, if the Root Prim path has been set in the export options. In the future, this function can be extended to author transforms and additional schema data (e.g., model Kind) on the root prim.
Definition at line 163 of file usd_capi_export.cc.
References colorspace_apply_to_prim(), blender::io::usd::USDExportParams::convert_orientation, blender::io::usd::USDExportParams::convert_scene_units, blender::math::AngleRadianBase< T >::degree(), ensure_root_prim(), blender::io::usd::USDExportParams::forward_axis, get_meters_per_unit(), blender::IO_AXIS_Y, blender::IO_AXIS_Z, blender::mat3_from_axis_conversion(), Meters, blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::io::usd::USDExportParams::root_prim_path, blender::math::to_euler(), blender::math::transpose(), blender::io::usd::USDExportParams::up_axis, blender::math::EulerBase< T >::x(), blender::math::EulerBase< T >::y(), and blender::math::EulerBase< T >::z().
Referenced by ensure_root_prim(), and export_to_stage().
| void blender::io::usd::ensure_usd_source_path_prop | ( | const std::string & | path, |
| ID * | id ) |
Add the given path as a custom property "usd_source_path" on the given id. If the path is a package-relative path (i.e., is relative to a USDZ archive) it will not be added a a property. If custom property "usd_source_path" already exists, this function does nothing.
| path | path to record as a custom property |
| id | id for which to create the custom property |
Definition at line 483 of file usd_asset_utils.cc.
References ensure_usd_source_path_prop(), blender::IDP_AddToGroup(), blender::IDP_EnsureProperties(), blender::IDP_GetPropertyFromGroup(), blender::IDP_New(), blender::IDP_STRING, blender::IDP_STRING_SUB_UTF8, and blender::IDPropertyTemplate::string.
Referenced by ensure_usd_source_path_prop(), load_image(), and blender::io::usd::USDMaterialReader::load_tex_image().
|
static |
Definition at line 409 of file usd_writer_pointinstancer.cc.
References ExpandAttributePerInstance(), and instance_index.
Referenced by ExpandAttributePerInstance().
| void blender::io::usd::export_deform_verts | ( | const Mesh * | mesh, |
| const pxr::UsdSkelBindingAPI & | skel_api, | ||
| Span< StringRef > | bone_names ) |
Convert deform groups on the given mesh to USD joint index and weight attributes.
| mesh | The source mesh with deform groups to export |
| skel_api | API for setting the attributes on the USD prim |
| bone_names | List of armature bone names corresponding to the deform groups |
Definition at line 1330 of file usd_skel_convert.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BLI_assert(), BLI_assert_unreachable, export_deform_verts(), blender::Span< T >::index_range(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bDeformGroup::name, blender::Span< T >::size(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by export_deform_verts(), and blender::io::usd::USDMeshWriter::init_skinned_mesh().
|
static |
Definition at line 750 of file usd_capi_export.cc.
References blender::BLI_delete(), blender::BLI_exists(), blender::data, blender::DEG_graph_free(), export_endjob(), export_endjob_usdz_cleanup(), blender::G, perform_usdz_conversion(), report_job_duration(), and blender::WM_locked_interface_set().
Referenced by export_endjob(), and USD_export().
|
static |
Definition at line 732 of file usd_capi_export.cc.
References blender::BKE_tempdir_session(), BLI_assert_msg, blender::BLI_delete(), blender::BLI_exists(), BLI_path_join, blender::BLI_path_split_dir_part(), blender::BLI_strcasecmp(), blender::data, export_endjob_usdz_cleanup(), FILE_MAX, and SEP_STR.
Referenced by export_endjob(), and export_endjob_usdz_cleanup().
|
static |
Definition at line 872 of file usd_writer_material.cc.
References blender::BKE_image_format_from_imbuf(), blender::BKE_imbuf_write_as(), blender::BKE_reportf(), blender::BLI_exists(), blender::BLI_path_cmp_normalized(), BLI_path_join, CLOG_DEBUG, export_in_memory_imbuf(), FILE_MAX, blender::LOG, and blender::RPT_WARNING.
Referenced by export_in_memory_imbuf(), and export_in_memory_texture().
|
static |
Definition at line 902 of file usd_writer_material.cc.
References blender::BKE_image_acquire_ibuf(), blender::BKE_image_get_tile_strformat(), blender::BKE_image_release_ibuf(), blender::BKE_image_set_filepath_from_tile_number(), blender::BLI_path_split_file_part(), export_in_memory_imbuf(), export_in_memory_texture(), FILE_MAX, get_absolute_path(), get_in_memory_texture_filename(), blender::IMA_SRC_TILED, blender::STRNCPY(), blender::ImageUser::tile, tile, and blender::UDIM_TILE_FORMAT_NONE.
Referenced by export_in_memory_texture(), and export_texture().
|
static |
Definition at line 961 of file usd_writer_material.cc.
References asset_exists(), blender::BKE_ftype_to_imtype(), blender::BKE_image_path_ext_from_imtype_ensure(), BLI_path_join, blender::BLI_path_split_file_part(), blender::BLI_string_replace_char(), blender::BLI_strncpy(), CLOG_DEBUG, blender::PackedFile::data, export_packed_texture(), FILE_MAX, blender::ImagePackedFile::filepath, ID_BLEND_PATH_FROM_GLOBAL, blender::IMA_SRC_TILED, blender::IMB_FTYPE_NONE, blender::IMB_test_image_type_from_memory(), len(), blender::LOG, blender::ImagePackedFile::packedfile, paths_equal(), pf, blender::PackedFile::size, SNPRINTF, blender::STRNCPY(), STRNCPY_RLEN, blender::ImagePackedFile::tile_number, USD_path_abs(), and write_to_path().
Referenced by export_packed_texture(), and export_texture().
|
static |
Perform validation of export parameter settings.
Definition at line 146 of file usd_capi_export.cc.
References export_params_valid(), prim_path_valid(), and blender::io::usd::USDExportParams::root_prim_path.
Referenced by export_params_valid(), and USD_export().
|
static |
Definition at line 660 of file usd_capi_export.cc.
References blender::BKE_reportf(), blender::BKE_scene_graph_update_tagged(), collect_point_instancer_prototypes_and_set_extent(), blender::data, blender::wmJobWorkerStatus::do_update, export_startjob(), export_to_stage(), blender::G, blender::wmJobWorkerStatus::progress, blender::wmJobWorkerStatus::reports, blender::RPT_ERROR, and blender::WM_locked_interface_set().
Referenced by export_startjob(), and USD_export().
| void blender::io::usd::export_texture | ( | bNode * | node, |
| const pxr::UsdStageRefPtr | stage, | ||
| const bool | allow_overwrite, | ||
| ReportList * | reports ) |
Definition at line 1458 of file usd_writer_material.cc.
References ELEM, export_texture(), node, SH_NODE_TEX_ENVIRONMENT, and SH_NODE_TEX_IMAGE.
|
static |
Definition at line 1440 of file usd_writer_material.cc.
References blender::io::usd::USDExporterContext::export_params, export_texture(), node, blender::io::usd::USDExportParams::overwrite_textures, blender::wmJobWorkerStatus::reports, blender::io::usd::USDExporterContext::stage, and blender::io::usd::USDExportParams::worker_status.
| void blender::io::usd::export_texture | ( | Image * | ima, |
| const pxr::UsdStageRefPtr | stage, | ||
| const bool | allow_overwrite, | ||
| ReportList * | reports ) |
Definition at line 1413 of file usd_writer_material.cc.
References CLOG_ERROR, copy_single_file(), copy_tiled_textures(), export_in_memory_texture(), export_packed_texture(), export_texture(), get_export_textures_dir(), blender::IMA_SRC_TILED, is_in_memory_texture(), is_packed_texture(), and blender::LOG.
Referenced by export_texture(), export_texture(), export_texture(), blender::io::usd::USDMaterialExportContext::export_texture(), process_inputs(), and world_material_to_dome_light().
| pxr::UsdStageRefPtr blender::io::usd::export_to_stage | ( | const USDExportParams & | params, |
| Depsgraph * | depsgraph, | ||
| const char * | filepath ) |
Definition at line 509 of file usd_capi_export.cc.
References blender::BKE_blender_version_string(), blender::BKE_scene_graph_update_for_newframe(), blender::BKE_scene_graph_update_tagged(), call_export_hooks(), blender::RenderData::cfra, blender::io::usd::USDExportParams::convert_orientation, blender::io::usd::USDExportParams::convert_world_material, blender::DEG_get_bmain(), blender::DEG_get_input_scene(), blender::io::SubdivModifierDisabler::disable_modifiers(), blender::wmJobWorkerStatus::do_update, blender::RenderData::efra, ELEM, ensure_root_prim(), blender::io::usd::USDExportParams::export_animation, blender::io::usd::USDExportParams::export_armatures, blender::io::usd::USDExportParams::export_shapekeys, blender::io::usd::USDExportParams::export_subdiv, export_to_stage(), blender::G, get_meters_per_unit(), Ignore, blender::io::usd::USDExportParams::incremental_frames, blender::IO_AXIS_X, blender::IO_AXIS_Y, blender::io::AbstractHierarchyIterator::iterate_and_write(), Match, process_scene_graph_instances(), blender::io::usd::USDHierarchyIterator::process_usd_skel(), blender::wmJobWorkerStatus::progress, blender::Scene::r, register_hook_converters(), blender::io::AbstractHierarchyIterator::release_writers(), blender::wmJobWorkerStatus::reports, blender::UnitSettings::scale_length, blender::io::usd::USDHierarchyIterator::set_export_frame(), blender::RenderData::sfra, blender::wmJobWorkerStatus::stop, blender::RenderData::subframe, blender::Scene::unit, blender::io::usd::USDExportParams::up_axis, blender::io::usd::USDExportParams::use_instancing, blender::io::usd::USDExportParams::worker_status, world_material_to_dome_light(), write_root_accessibility_information(), blender::x, y, and z().
Referenced by export_startjob(), export_to_stage(), and blender::io::hydra::USDSceneIndex::populate().
Definition at line 1096 of file usd_writer_material.cc.
References ELEM, find_bsdf_node(), node, SH_NODE_BSDF_DIFFUSE, and SH_NODE_BSDF_PRINCIPLED.
Referenced by create_usd_preview_surface_material(), and find_bsdf_node().
Returns the first occurrence of a scalar Displacement node found in the given material's node tree. Vector Displacement is not supported in the #UsdPreviewSurface. Returns null if no instance of either type was found.
Definition at line 1112 of file usd_writer_material.cc.
References find_displacement_node(), node, and SH_NODE_DISPLACEMENT.
Referenced by create_usd_preview_surface_material(), and find_displacement_node().
| Material * blender::io::usd::find_existing_material | ( | const pxr::SdfPath & | usd_mat_path, |
| const USDImportParams & | params, | ||
| const Map< std::string, Material * > & | mat_map, | ||
| const Map< pxr::SdfPath, Material * > & | usd_path_to_mat ) |
Returns an existing Blender material that corresponds to the USD material with the given path. Returns null if no such material exists.
| mat_map | Map a material name to a Blender material. Note that the name key might be the Blender material name modified to be a valid USD identifier, to match the material names in the imported USD. |
| usd_path_to_mat | Map a USD material path to the imported Blender material. |
The usd_path_to_mat is needed to determine the name of the Blender material imported from a USD path in the case when a unique name was generated for the material due to a name collision.
Definition at line 1555 of file usd_reader_material.cc.
References find_existing_material(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), MakeUnique, and blender::io::usd::USDImportParams::mtl_name_collision_mode.
Referenced by blender::io::usd::utils::assign_materials(), find_existing_material(), and blender::io::usd::USDStageReader::import_all_materials().
|
static |
Definition at line 255 of file usd_export_test.cc.
References find_node_for_type_in_graph().
Referenced by find_node_for_type_in_graph(), and TEST_F().
|
static |
Find the lowest level of Blender generated roots so that round tripping an export can be more invisible
Definition at line 144 of file usd_reader_stage.cc.
References find_prefix_to_skip(), and blender::io::usd::ImportSettings::skip_prefix.
Referenced by find_prefix_to_skip(), and blender::io::usd::USDStageReader::USDStageReader().
|
static |
Definition at line 72 of file usd_capi_import.cc.
References blender::BLI_addtail(), gather_objects_paths(), blender::CacheObjectPath::path, and blender::STRNCPY().
Referenced by gather_objects_paths(), and USD_create_handle().
|
static |
Definition at line 1029 of file usd_writer_material.cc.
References blender::BLI_path_abs(), blender::BLI_path_normalize(), blender::BLI_strncpy(), FILE_MAX, get_absolute_path(), and ID_BLEND_PATH_FROM_GLOBAL.
Referenced by copy_single_file(), copy_tiled_textures(), export_in_memory_texture(), get_absolute_path(), and get_tex_image_asset_filepath().
| void blender::io::usd::get_armature_bone_names | ( | const Object * | ob_arm, |
| bool | use_deform, | ||
| Vector< StringRef > & | r_names ) |
Return in 'r_names' the names of the given armature object's bones.
| ob_arm | The armature object |
| use_deform | If true, use only deform bone names, including their parents, to match armature export joint indices |
| r_names | The returned list of bone names |
Definition at line 110 of file usd_armature_utils.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), get_armature_bone_names(), init_deform_bones_map(), blender::Bone::name, and visit_bones().
Referenced by BlenderBoneLengths(), get_armature_bone_names(), and blender::io::usd::USDMeshWriter::init_skinned_mesh().
|
static |
Definition at line 90 of file usd_armature_utils.cc.
References blender::eModifierType_Armature, get_armature_modifier(), get_enabled_modifier(), and mod.
Referenced by get_armature_modifier(), get_armature_modifier_obj(), and is_armature_modifier_bone_name().
| const Object * blender::io::usd::get_armature_modifier_obj | ( | const Object & | obj, |
| const Depsgraph * | depsgraph ) |
If the given object has an enabled armature modifier, return the armature object bound to the modifier.
| Object to check for the modifier | |
| depsgraph | The dependency graph where the object was evaluated |
Definition at line 173 of file usd_armature_utils.cc.
References get_armature_modifier(), get_armature_modifier_obj(), and mod.
Referenced by BlenderBoneLengths(), get_armature_modifier_obj(), blender::io::usd::USDMeshWriter::init_skinned_mesh(), and skinned_mesh_export_chaser().
|
static |
Definition at line 61 of file usd_asset_utils.cc.
References blender::BKE_reportf(), blender::BLI_path_split_file_part(), FILE_MAXFILE, get_asset_base_name(), blender::RPT_WARNING, and blender::io::alembic::split().
Referenced by copy_asset_to_directory(), copy_udim_asset_to_directory(), and get_asset_base_name().
|
static |
If the given attribute has an authored value, return its value in the r_value out parameter.
We wish to support older UsdLux APIs in older versions of USD. For example, in previous versions of the API, shader input attributes did not have the "inputs:" prefix. One can provide the older input attribute name in the 'fallback_attr_name' argument, and that attribute will be queried if 'attr' doesn't exist or doesn't have an authored value.
Definition at line 36 of file usd_reader_domelight.cc.
References get_authored_value(), and T.
Referenced by get_authored_value(), get_color(), get_intensity(), get_pole_axis(), and get_tex_path().
| pxr::VtFloatArray blender::io::usd::get_blendshape_weights | ( | const Key * | key | ) |
Return the current weight values of the given key.
| key | The key whose values will be queried |
Definition at line 285 of file usd_blend_shape_utils.cc.
References blender::BLI_assert(), blender::Key::block, blender::KeyBlock::curval, and get_blendshape_weights().
Referenced by blender::io::usd::USDMeshWriter::add_shape_key_weights_sample(), and get_blendshape_weights().
|
static |
Definition at line 80 of file usd_reader_domelight.cc.
References blender::usdtokens::color(), colorspace_attr_to_scene_linear(), get_authored_value(), get_color(), and T.
Referenced by blender::io::usd::USDDomeLightReader::create_object(), and get_color().
|
static |
Definition at line 95 of file usd_reader_curve.cc.
References blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_NURBS, blender::CURVE_TYPE_POLY, and get_curve_type().
Referenced by get_curve_type(), and blender::io::usd::USDBasisCurvesReader::read_curve_sample().
|
static |
Definition at line 90 of file usd_writer_curves.cc.
References blender::BKE_report(), get_curve_width_interpolation(), and blender::RPT_WARNING.
Referenced by get_curve_width_interpolation(), populate_curve_props(), and populate_curve_props_for_bezier().
|
static |
Definition at line 581 of file usd_writer_mesh.cc.
References attribute, blender::io::usd::USDMeshData::crease_lengths, blender::io::usd::USDMeshData::crease_sharpnesses, blender::bke::subdiv::crease_to_sharpness(), blender::io::usd::USDMeshData::crease_vertex_indices, blender::bke::Edge, get_edge_creases(), blender::Span< T >::index_range(), and blender::bke::AttributeAccessor::lookup().
Referenced by get_edge_creases().
| const ModifierData * blender::io::usd::get_enabled_modifier | ( | const Object & | obj, |
| ModifierType | type, | ||
| const Depsgraph * | depsgraph ) |
Return the modifier of the given type enabled for the given dependency graph's evaluation mode (viewport or render).
| obj | Object to query for the modifier |
| depsgraph | The dependency graph where the object was evaluated |
Definition at line 65 of file usd_armature_utils.cc.
References blender::BKE_modifier_is_enabled(), blender::BLI_assert(), blender::DEG_get_input_scene(), blender::DEG_get_mode(), get_enabled_modifier(), and blender::ModifierData::type.
Referenced by BlenderBoneLengths(), can_export_skinned_mesh(), get_armature_modifier(), and get_enabled_modifier().
| std::string blender::io::usd::get_export_textures_dir | ( | const pxr::UsdStageRefPtr | stage | ) |
Invoke the USD asset resolver to return an identifier for a 'textures' directory which is a sibling of the given stage. The resulting path is created by resolving the './textures' relative path with the stage's root layer path as the anchor. If the parent of the stage root layer path resolves to a file system path, the textures directory will be created, if it doesn't exist.
| stage | The stage whose root layer is a sibling of the 'textures' directory |
Definition at line 352 of file usd_asset_utils.cc.
References blender::BLI_dir_create_recursive(), get_export_textures_dir(), layer, parent_dir_exists_on_file_system(), blender::RPT_WARNING, and blender::WM_global_reportf().
Referenced by export_texture(), and get_export_textures_dir().
| std::string blender::io::usd::get_image_cache_file | ( | const std::string & | file_name, |
| bool | mkdir ) |
Definition at line 385 of file usd_capi_export.cc.
References blender::BLI_dir_create_recursive(), BLI_path_join, FILE_MAX, get_image_cache_file(), and image_cache_file_path().
Referenced by cache_image_color(), blender::io::hydra::cache_image_file(), and get_image_cache_file().
|
static |
Definition at line 827 of file usd_writer_material.cc.
References blender::BKE_image_acquire_ibuf(), blender::BKE_image_format_from_imbuf(), blender::BKE_image_has_packedfile(), blender::BKE_image_is_dirty(), blender::BKE_image_is_filename_tokenized(), blender::BKE_image_path_ext_from_imformat_ensure(), blender::BKE_image_release_ibuf(), blender::BLI_path_split_file_part(), blender::BLI_string_split_suffix(), FILE_MAX, get_in_memory_texture_filename(), has_generated_tiles(), blender::IMA_SRC_TILED, SNPRINTF, and blender::STRNCPY().
Referenced by export_in_memory_texture(), get_in_memory_texture_filename(), and get_tex_image_asset_filepath().
|
static |
Definition at line 58 of file usd_reader_domelight.cc.
References get_authored_value(), get_intensity(), blender::usdtokens::intensity(), and T.
Referenced by blender::io::usd::USDDomeLightReader::create_object(), and get_intensity().
|
static |
Definition at line 64 of file usd_writer_mesh.cc.
References blender::BLI_assert(), blender::DAG_EVAL_RENDER, blender::eModifierMode_Realtime, blender::eModifierMode_Render, blender::eModifierType_Subsurf, get_last_subdiv_modifier(), blender::ModifierData::mode, and blender::ModifierData::type.
Referenced by blender::io::usd::USDGenericMeshWriter::do_write(), and get_last_subdiv_modifier().
|
static |
Definition at line 556 of file usd_writer_mesh.cc.
References blender::Span< T >::begin(), blender::offset_indices::copy_group_sizes(), blender::Span< T >::end(), blender::bke::Face, blender::io::usd::USDMeshData::face_groups, blender::io::usd::USDMeshData::face_indices, blender::io::usd::USDMeshData::face_vertex_counts, get_loops_polys(), blender::blender::Span< T >::index_range(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::VArrayCommon< T >::is_single(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), and blender::bke::AttributeAccessor::lookup_or_default().
Referenced by get_loops_polys().
Return the shape key on the given mesh object.
| obj | The mesh object |
Definition at line 176 of file usd_blend_shape_utils.cc.
References blender::BLI_assert(), get_mesh_shape_key(), and blender::OB_MESH.
Referenced by blender::io::usd::USDMeshWriter::add_shape_key_weights_sample(), create_blend_shapes(), get_mesh_shape_key(), and is_mesh_with_shape_keys().
| double blender::io::usd::get_meters_per_unit | ( | const USDExportParams & | params | ) |
Definition at line 906 of file usd_capi_export.cc.
References Centimeters, blender::io::usd::USDExportParams::convert_scene_units, Custom, blender::io::usd::USDExportParams::custom_meters_per_unit, Feet, get_meters_per_unit(), Inches, Kilometers, Millimeters, blender::result, and Yards.
Referenced by blender::io::usd::USDCameraWriter::do_write(), blender::io::usd::USDTransformWriter::do_write(), ensure_root_prim(), export_to_stage(), and get_meters_per_unit().
|
static |
Definition at line 1037 of file usd_writer_material.cc.
References blender::usdtokens::black(), blender::usdtokens::clamp(), blender::NodeTexImage::extension, get_node_tex_image_wrap(), blender::usdtokens::mirror(), node, blender::usdtokens::repeat(), SH_NODE_TEX_IMAGE, blender::SHD_IMAGE_EXTENSION_CLIP, blender::SHD_IMAGE_EXTENSION_EXTEND, blender::SHD_IMAGE_EXTENSION_MIRROR, blender::SHD_IMAGE_EXTENSION_REPEAT, and blender::gpu::wrap().
Referenced by create_usd_preview_shader(), and get_node_tex_image_wrap().
|
static |
Definition at line 90 of file usd_reader_domelight.cc.
References get_authored_value(), and get_pole_axis().
Referenced by blender::io::usd::USDDomeLightReader::create_object(), and get_pole_axis().
|
static |
Definition at line 550 of file usd_writer_mesh.cc.
References blender::Span< T >::begin(), blender::Span< T >::end(), get_positions(), and blender::io::usd::USDMeshData::points.
Referenced by get_positions().
| pxr::VtArray< T > blender::io::usd::get_primvar_array | ( | const pxr::UsdGeomPrimvar & | primvar, |
| const pxr::UsdTimeCode | time ) |
Definition at line 235 of file usd_attribute_utils.hh.
References get_primvar_array().
Referenced by copy_primvar_to_blender_buffer(), get_primvar_array(), and read_face_display_color().
| std::string blender::io::usd::get_relative_path | ( | const std::string & | path, |
| const std::string & | anchor ) |
Return the given path as a relative path with respect to the given anchor path.
| path | path to make relative with respect to the anchor path |
| anchor | the anchor path |
Definition at line 538 of file usd_asset_utils.cc.
References blender::BLI_is_file(), blender::BLI_path_is_rel(), blender::BLI_path_relative_to(), blender::BLI_path_slash_forward_from_native(), blender::BLI_path_split_dir_part(), FILE_MAX, and get_relative_path().
Referenced by get_relative_path(), and get_tex_image_asset_filepath().
If the given object is a mesh with shape keys, return a copy of the object's pre-modified mesh with its verts in the shape key basis positions. The returned mesh must be freed by the caller.
| obj | The mesh object with shape keys |
Definition at line 436 of file usd_blend_shape_utils.cc.
References blender::BKE_keyblock_convert_to_mesh(), blender::BKE_mesh_copy_for_eval(), blender::BKE_object_get_pre_modified_mesh(), CLOG_WARN, get_shape_key_basis_mesh(), blender::LOG, blender::OB_MESH, and blender::KeyBlock::totelem.
Referenced by blender::io::usd::USDMeshWriter::get_export_mesh(), and get_shape_key_basis_mesh().
|
static |
Definition at line 88 of file usd_colorspace_utils.cc.
References get_source_color_space(), and blender::io::usd::usdtokens::sourceColorSpace().
Referenced by colorspace_to_image_texture(), and get_source_color_space().
| std::string blender::io::usd::get_tex_image_asset_filepath | ( | const bNode * | node, |
| const pxr::UsdStageRefPtr | stage, | ||
| const USDExportParams & | export_params ) |
Gets an asset path for the given texture image / node. The resulting path may be absolute, relative to the USD file, or in a 'textures' directory in the same directory as the USD file, depending on the export parameters. The filename is typically the image filepath but might also be automatically generated based on the image name for in-memory textures when exporting textures. This function may return an empty string if the image does not have a filepath assigned and no asset path could be determined.
Definition at line 1314 of file usd_writer_material.cc.
References get_tex_image_asset_filepath(), and node.
|
static |
Definition at line 1213 of file usd_writer_material.cc.
References FILE_MAX, get_absolute_path(), and get_tex_image_asset_filepath().
| std::string blender::io::usd::get_tex_image_asset_filepath | ( | const std::string & | asset_path, |
| const std::string & | stage_path, | ||
| const USDExportParams & | export_params ) |
Return a USD asset path referencing the given texture file. The resulting path may be absolute, relative to the USD file, or in a 'textures' directory in the same directory as the USD file, depending on the export parameters.
Definition at line 1265 of file usd_writer_material.cc.
References BLI_path_join, blender::BLI_path_split_dir_part(), blender::BLI_path_split_file_part(), blender::BLI_string_replace_char(), blender::io::usd::USDExportParams::export_textures, FILE_MAX, get_relative_path(), get_tex_image_asset_filepath(), and blender::io::usd::USDExportParams::relative_paths.
|
static |
Definition at line 1221 of file usd_writer_material.cc.
References blender::io::usd::USDExporterContext::export_params, get_tex_image_asset_filepath(), node, and blender::io::usd::USDExporterContext::stage.
| std::string blender::io::usd::get_tex_image_asset_filepath | ( | Image * | ima, |
| const pxr::UsdStageRefPtr | stage, | ||
| const USDExportParams & | export_params ) |
Definition at line 1228 of file usd_writer_material.cc.
References BLI_path_join, blender::io::usd::USDExportParams::export_textures, FILE_MAX, get_in_memory_texture_filename(), get_tex_image_asset_filepath(), get_usd_source_path(), is_in_memory_texture(), is_packed_texture(), and blender::io::usd::USDExportParams::use_original_paths.
Referenced by create_usd_preview_shader(), blender::io::usd::USDMaterialExportContext::export_texture(), get_tex_image_asset_filepath(), get_tex_image_asset_filepath(), get_tex_image_asset_filepath(), get_tex_image_asset_filepath(), get_tex_image_asset_filepath(), and world_material_to_dome_light().
|
static |
Definition at line 67 of file usd_reader_domelight.cc.
References get_authored_value(), get_tex_path(), T, and blender::usdtokens::texture_file().
Referenced by blender::io::usd::USDDomeLightReader::create_object(), and get_tex_path().
| pxr::SdfPath blender::io::usd::get_unique_path | ( | pxr::UsdStageRefPtr | stage, |
| const std::string & | path ) |
Return a unique USD SdfPath. If the given path already exists on the given stage, return the path with a numerical suffix appended to the name that ensures the path is unique. If the path does not exist on the stage, it will be returned unchanged.
| stage | The stage |
| path | The original path |
Definition at line 109 of file usd_utils.cc.
References get_unique_path().
Referenced by get_unique_path(), process_scene_graph_instances(), and world_material_to_dome_light().
|
static |
Definition at line 248 of file usd_reader_nurbs.cc.
References get_usd_points_range_de_dup(), blender::IndexRange::size(), and blender::IndexRange::take_front().
Referenced by get_usd_points_range_de_dup(), and blender::io::usd::USDNurbsReader::read_curve_sample().
|
static |
Definition at line 507 of file usd_capi_import.cc.
References get_usd_reader(), blender::io::usd::USDPrimReader::prim(), and RPT_.
Referenced by get_usd_reader(), USD_mesh_topology_changed(), and USD_read_geometry().
| std::string blender::io::usd::get_usd_source_path | ( | ID * | id | ) |
Return the value of the "usd_source_path" custom property on the given id. Return an empty string if the property does not exist.
Definition at line 518 of file usd_asset_utils.cc.
References blender::IDProperty::data, get_usd_source_path(), blender::IDP_EnsureProperties(), blender::IDP_GetPropertyFromGroup(), and blender::IDPropertyData::pointer.
Referenced by get_tex_image_asset_filepath(), and get_usd_source_path().
|
static |
Definition at line 603 of file usd_writer_mesh.cc.
References attribute, blender::io::usd::USDMeshData::corner_indices, blender::io::usd::USDMeshData::corner_sharpnesses, blender::bke::subdiv::crease_to_sharpness(), get_vert_creases(), blender::blender::Span< T >::index_range(), blender::bke::AttributeAccessor::lookup(), and blender::bke::Point.
Referenced by get_vert_creases().
|
static |
Definition at line 62 of file usd_capi_import.cc.
References handle_from_stage_reader().
Referenced by handle_from_stage_reader(), and USD_create_handle().
|
static |
Definition at line 347 of file usd_hook.cc.
References blender::BKE_reportf(), handle_python_error(), blender::io::usd::USDHook::name, and blender::RPT_ERROR.
Referenced by blender::io::usd::USDHookInvoker::call(), and handle_python_error().
|
static |
Definition at line 803 of file usd_writer_material.cc.
References has_generated_tiles(), blender::IMA_GEN_TILE, and tile.
Referenced by get_in_memory_texture_filename(), has_generated_tiles(), and is_in_memory_texture().
|
static |
Definition at line 30 of file usd_writer_volume.cc.
References ELEM, blender::eModifierType_MeshToVolume, blender::eModifierType_Nodes, blender::eModifierType_VolumeDisplace, has_varying_modifiers(), blender::Object::modifiers, blender::ModifierData::next, and blender::ModifierData::type.
Referenced by blender::io::usd::USDVolumeWriter::check_is_animated(), blender::io::usd::USDVolumeWriter::do_write(), and has_varying_modifiers().
| bool blender::io::usd::have_material_import_hook | ( | pxr::UsdStageRefPtr | stage, |
| const pxr::UsdShadeMaterial & | usd_material, | ||
| const USDImportParams & | import_params, | ||
| ReportList * | reports ) |
Returns true if there is a registered USDHook class that can convert the given material.
Definition at line 652 of file usd_hook.cc.
References blender::io::usd::USDHookInvoker::call(), have_material_import_hook(), hook_list(), and blender::io::usd::MaterialImportPollInvoker::result().
Referenced by blender::io::usd::USDStageReader::find_material_import_hook_sources(), and have_material_import_hook().
|
static |
Definition at line 54 of file usd_hook.cc.
References hook_list().
Referenced by blender::io::usd::USDHookInvoker::call(), call_export_hooks(), call_import_hooks(), call_material_export_hooks(), call_material_import_hooks(), have_material_import_hook(), hook_list(), register_hook_converters(), USD_find_hook_name(), USD_register_hook(), and USD_unregister_hook().
| std::string blender::io::usd::image_cache_file_path | ( | ) |
Definition at line 378 of file usd_capi_export.cc.
References blender::BKE_tempdir_session(), BLI_path_join, FILE_MAX, and image_cache_file_path().
Referenced by blender::io::hydra::build_emitted_material(), blender::io::hydra::cache_or_get_image_file(), get_image_cache_file(), and image_cache_file_path().
| std::string blender::io::usd::import_asset | ( | const std::string & | src, |
| const char * | import_dir, | ||
| TexNameCollisionMode | name_collision_mode, | ||
| ReportList * | reports ) |
Invoke the USD asset resolver to copy an asset to a destination directory and return the path to the copied file. This function may be used to copy textures from a USDZ archive to a directory on disk. The destination directory will be created if it doesn't already exist. If the copy was unsuccessful, this function will log an error and return the original source file path unmodified.
| src | source path of the asset to import |
| import_dir | path to the destination directory |
| name_collision_mode | behavior when a file of the same name already exists |
| reports | the storage for potential warning or error reports (generated using BKE_report API). |
Definition at line 277 of file usd_asset_utils.cc.
References blender::BKE_main_blendfile_path_from_global(), blender::BKE_reportf(), blender::BLI_dir_create_recursive(), blender::BLI_path_abs(), blender::BLI_path_is_rel(), blender::BLI_path_normalize(), copy_asset_to_directory(), copy_udim_asset_to_directory(), FILE_MAX, FILE_MAXDIR, import_asset(), is_udim_path(), blender::RPT_ERROR, and blender::STRNCPY().
Referenced by import_asset(), blender::io::usd::USDMaterialImportContext::import_texture(), load_image(), and blender::io::usd::USDMaterialReader::load_tex_image().
| void blender::io::usd::import_blendshapes | ( | Main * | bmain, |
| Object * | mesh_obj, | ||
| const pxr::UsdPrim & | prim, | ||
| ReportList * | reports, | ||
| bool | import_anim = true ) |
This file contains utilities for converting between UsdSkel data and Blender armatures and shape keys. The following is a reference on the UsdSkel API:
https://openusd.org/23.05/api/usd_skel_page_front.html Import USD blend shapes from a USD primitive as shape keys on a mesh object. Optionally, if the blend shapes have animating weights, the time-sampled weights will be imported as shape key animation curves. If the USD primitive does not have blend shape targets defined, this function is a no-op.
| bmain | Main pointer |
| mesh_obj | Mesh object to which imported shape keys will be added |
| prim | The USD primitive from which blend-shapes will be imported |
| reports | the storage for potential warning or error reports (generated using BKE_report API). |
| import_anim | Whether to import time-sampled weights as shape key animation curves |
Definition at line 361 of file usd_skel_convert.cc.
References blender::animrig::action_channelbag_ensure(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::add_v3_v3(), blender::BKE_fcurve_handles_recalc(), blender::BKE_key_add(), blender::BKE_keyblock_add(), blender::BKE_keyblock_convert_from_mesh(), blender::BKE_reportf(), blender::BLI_str_escape(), CLOG_WARN, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), create_fcurve(), blender::data, blender::KeyBlock::data, blender::Object::data, blender::Key::id, blender::animrig::id_action_ensure(), import_blendshapes(), blender::KEY_RELATIVE, blender::LOG, blender::OB_MESH, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), blender::RPT_WARNING, set_fcurve_sample(), blender::Span< T >::size(), blender::Span< T >::Span(), blender::KeyBlock::totelem, blender::Key::type, and blender::Object::type.
Referenced by import_blendshapes(), and blender::io::usd::USDMeshReader::read_object_data().
|
static |
Definition at line 295 of file usd_capi_import.cc.
References blender::ViewLayer::active_collection, blender::BKE_collection_add(), blender::BKE_collection_object_add(), blender::BKE_id_free_us(), blender::BKE_layer_collection_first_from_scene_collection(), blender::BKE_layer_collection_get_active_editable(), blender::BKE_report(), blender::BKE_view_layer_base_deselect_all(), blender::BKE_view_layer_base_find(), blender::BKE_view_layer_base_select_and_set_active(), blender::BKE_view_layer_synced_ensure(), blender::BLI_path_basename(), blender::BLI_path_to_display_name(), call_import_hooks(), CLOG_ERROR, blender::LayerCollection::collection, blender::CTX_data_view_layer(), blender::data, blender::DEG_id_tag_update(), blender::DEG_id_tag_update_ex(), blender::DEG_relations_tag_update(), blender::ED_undo_push(), blender::Collection::id, blender::Object::id, ID_IS_EDITABLE, blender::ID_RECALC_ANIMATION, blender::ID_RECALC_BASE_FLAGS, blender::ID_RECALC_GEOMETRY, blender::ID_RECALC_SYNC_TO_EVAL, blender::ID_RECALC_TRANSFORM, import_endjob(), blender::LOG, MAX_ID_NAME, NA_ADDED, NC_ID, report_job_duration(), blender::RPT_ERROR, blender::RPT_WARNING, USD_ARCHIVE_FAIL, USD_NO_ERROR, blender::WM_locked_interface_set(), and blender::WM_main_add_notifier().
Referenced by import_endjob(), and USD_import().
|
static |
Definition at line 440 of file usd_capi_import.cc.
References blender::data, and import_freejob().
Referenced by import_freejob(), and USD_import().
| void blender::io::usd::import_mesh_skel_bindings | ( | Object * | mesh_obj, |
| const pxr::UsdPrim & | prim, | ||
| ReportList * | reports ) |
Import skinning data from a source USD prim as deform groups and an armature modifier on the given mesh object. If the USD prim does not have a skeleton binding defined, this function is a no-op.
| mesh_obj | Mesh object to which an armature modifier will be added |
| prim | The USD primitive from which skinning data will be imported |
| reports | the storage for potential warning or error reports (generated using BKE_report API). |
Definition at line 1017 of file usd_skel_convert.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Vector< T, InlineBufferCapacity, Allocator >::begin(), blender::BKE_modifier_new(), blender::BKE_modifiers_findby_type(), blender::BKE_modifiers_persistent_uid_init(), blender::BKE_object_defgroup_add_name(), blender::BKE_object_defgroup_data_create(), blender::BKE_object_defgroup_find_name(), blender::BKE_reportf(), blender::BLI_addtail(), CLOG_ERROR, blender::Object::data, ELEM, blender::eModifierType_Armature, blender::Vector< T, InlineBufferCapacity, Allocator >::end(), blender::Object::id, import_mesh_skel_bindings(), interp(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::LOG, blender::Object::modifiers, blender::ID::name, blender::OB_MESH, blender::RPT_WARNING, blender::Object::type, vertex, blender::ed::object::vgroup_vert_add(), w(), and WEIGHT_REPLACE.
Referenced by import_mesh_skel_bindings(), and blender::io::usd::USDMeshReader::read_object_data().
| void blender::io::usd::import_skeleton | ( | Main * | bmain, |
| Object * | arm_obj, | ||
| const pxr::UsdSkelSkeleton & | skel, | ||
| ReportList * | reports, | ||
| bool | import_anim = true ) |
Import the given USD skeleton as an armature object. Optionally, if the skeleton has an animation defined, the time sampled joint transforms will be imported as bone animation curves.
| bmain | Main pointer |
| arm_obj | Armature object to which the bone hierarchy will be added |
| skel | The USD skeleton from which bones and animation will be imported |
| reports | the storage for potential warning or error reports (generated using BKE_report API). |
| import_anim | Whether to import time-sampled joint transforms as bone animation curves |
Definition at line 730 of file usd_skel_convert.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::BKE_reportf(), BlenderBoneLengths(), CLOG_WARN, blender::copy_v3_v3(), blender::Object::data, blender::ED_armature_ebone_add(), blender::ED_armature_ebone_from_mat4(), blender::ED_armature_edit_free(), blender::ED_armature_from_edit(), blender::ED_armature_to_edit(), blender::EditBone::head, import_skeleton(), blender::LOG, blender::EditBone::name, blender::OB_ARMATURE, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), blender::RPT_WARNING, set_rest_pose(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::Span< T >::Span(), blender::EditBone::tail, and blender::Object::type.
Referenced by import_skeleton(), and blender::io::usd::USDSkeletonReader::read_object_data().
|
static |
Definition at line 124 of file usd_capi_import.cc.
References blender::BKE_cachefile_add(), blender::BKE_main_blendfile_path_from_global(), blender::BKE_reportf(), blender::BLI_path_abs(), blender::BLI_path_basename(), blender::BLI_path_is_rel(), blender::BLI_path_rel(), blender::io::usd::USDStageReader::collect_readers(), blender::io::usd::USDDomeLightReader::create_object(), blender::data, blender::wmJobWorkerStatus::do_update, blender::io::usd::USDStageReader::dome_light_readers(), blender::io::usd::USDStageReader::find_material_import_hook_sources(), float, blender::G, blender::id_us_min(), blender::io::usd::USDStageReader::import_all_materials(), import_startjob(), blender::io::usd::USDPrimReader::object(), blender::io::usd::USDPrimReader::parent(), blender::Object::parent, blender::io::usd::USDStageReader::process_armature_modifiers(), blender::wmJobWorkerStatus::progress, blender::io::usd::USDStageReader::readers(), register_hook_converters(), blender::wmJobWorkerStatus::reports, blender::RPT_ERROR, blender::io::usd::USDStageReader::sort_readers(), blender::STRNCPY(), USD_ARCHIVE_FAIL, blender::io::usd::USDStageReader::USDStageReader(), and blender::WM_locked_interface_set().
Referenced by import_startjob(), and USD_import().
| void blender::io::usd::init_deform_bones_map | ( | const Object * | obj, |
| Map< StringRef, const Bone * > * | deform_map ) |
Initialize the deform bones map:
| obj | Object to query |
| deform_map | A pointer to the deform_map to fill with deform bones and their parents found on the object |
Definition at line 199 of file usd_armature_utils.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::BLI_assert(), blender::BONE_NO_DEFORM, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), blender::Bone::flag, init_deform_bones_map(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::Bone::name, blender::Bone::parent, and visit_bones().
Referenced by BlenderBoneLengths(), blender::io::usd::USDArmatureWriter::do_write(), get_armature_bone_names(), and init_deform_bones_map().
| bool blender::io::usd::is_armature_modifier_bone_name | ( | const Object & | obj, |
| StringRefNull | name, | ||
| const Depsgraph * | depsgraph ) |
If the given object has an armature modifier, query whether the given name matches the name of a bone on the armature referenced by the modifier.
| obj | Object to query for the modifier |
| name | Name to check |
| depsgraph | The dependency graph where the object was evaluated |
Definition at line 179 of file usd_armature_utils.cc.
References blender::BKE_armature_find_bone_name(), blender::StringRefNull::c_str(), blender::Object::data, get_armature_modifier(), is_armature_modifier_bone_name(), and blender::ArmatureModifierData::object.
Referenced by BlenderBoneLengths(), and is_armature_modifier_bone_name().
|
static |
Definition at line 423 of file usd_writer_curves.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), and is_excluded_attr().
Referenced by is_excluded_attr().
|
static |
Definition at line 815 of file usd_writer_material.cc.
References blender::BKE_image_is_dirty(), has_generated_tiles(), and is_in_memory_texture().
Referenced by export_texture(), get_tex_image_asset_filepath(), and is_in_memory_texture().
| bool blender::io::usd::is_mesh_with_shape_keys | ( | const Object * | obj | ) |
Query whether the given object is a mesh with relative shape keys.
| obj | The mesh object |
Definition at line 189 of file usd_blend_shape_utils.cc.
References get_mesh_shape_key(), is_mesh_with_shape_keys(), blender::KEY_RELATIVE, blender::Key::totkey, and blender::Key::type.
Referenced by is_mesh_with_shape_keys(), and blender::io::usd::USDMeshWriter::set_skel_export_flags().
|
static |
Definition at line 820 of file usd_writer_material.cc.
References blender::BKE_image_has_packedfile(), and is_packed_texture().
Referenced by export_texture(), get_tex_image_asset_filepath(), and is_packed_texture().
|
static |
Definition at line 18 of file usd_utils.cc.
References is_safe_char().
Referenced by is_safe_char(), and make_safe_identifier().
| bool blender::io::usd::is_udim_path | ( | const std::string & | path | ) |
Check if the given path contains a UDIM token.
| path | the path to check |
Definition at line 346 of file usd_asset_utils.cc.
References is_udim_path(), UDIM_PATTERN, and UDIM_PATTERN2.
Referenced by import_asset(), is_udim_path(), blender::io::usd::USDMaterialReader::load_tex_image(), and should_import_asset().
|
static |
Load the image at the given path. Handle packing and copying based in the import options. Return the opened image on success or a nullptr on failure.
Definition at line 78 of file usd_light_convert.cc.
References blender::BKE_image_has_packedfile(), blender::BKE_image_load_exists(), blender::BKE_image_packfiles(), blender::BLI_delete(), blender::BLI_is_dir(), ensure_usd_source_path_prop(), ID_BLEND_PATH, import_asset(), blender::io::usd::USDImportParams::import_textures_dir, blender::io::usd::USDImportParams::import_textures_mode, load_image(), None, Overwrite, Pack, should_import_asset(), temp_textures_dir(), and blender::io::usd::USDImportParams::tex_name_collision_mode.
Referenced by dome_light_to_world_material(), and load_image().
|
static |
Definition at line 43 of file usd_utils.cc.
References blender::BLI_str_utf8_from_unicode(), blender::MutableSpan< T >::data(), blender::blender::StringRefBase::is_empty(), is_safe_char(), make_safe_identifier(), blender::blender::StringRefBase::size(), blender::MutableSpan< T >::size(), and storage.
Referenced by make_safe_identifier(), make_safe_name(), and make_safe_primvar_name().
| std::string blender::io::usd::make_safe_name | ( | StringRef | name, |
| bool | allow_unicode ) |
Return a valid USD identifier based on the passed in string.
| name | Incoming name to sanitize |
| allow_unicode | Whether to allow unicode encoded characters in the USD identifier |
Definition at line 83 of file usd_utils.cc.
References make_safe_identifier(), and make_safe_name().
Referenced by build_usd_joint_path(), create_blend_shapes(), create_primvar_reader_shader(), create_usd_preview_shader(), blender::io::usd::USDArmatureWriter::do_write(), blender::io::usd::USDVolumeWriter::do_write(), blender::io::usd::USDAbstractWriter::ensure_usd_material_created(), make_safe_name(), blender::io::usd::USDHierarchyIterator::make_valid_name(), blender::parse_accessibility_property_name(), TEST(), and blender::io::usd::USDAbstractWriter::write_user_properties().
| std::string blender::io::usd::make_safe_primvar_name | ( | StringRef | name, |
| bool | allow_unicode ) |
Return a valid USD primvar name based on the passed in string. The name is permitted to contain namespaces separated by colons. E.g. "ns1:ns2:primvar_name".
| name | Incoming name to sanitize |
| allow_unicode | Whether to allow unicode encoded characters in the USD primvar name |
Definition at line 88 of file usd_utils.cc.
References make_safe_identifier(), and make_safe_primvar_name().
Referenced by create_uvmap_shader(), make_safe_primvar_name(), process_inputs(), and TEST().
|
static |
Definition at line 952 of file usd_reader_material.cc.
References node_graph_output_source(), and output.
Referenced by blender::io::usd::USDMaterialReader::follow_connection(), and node_graph_output_source().
Definition at line 408 of file usd_light_convert.cc.
References blender::io::usd::WorldToDomeLight::color, blender::io::usd::WorldToDomeLight::color_found, blender::io::usd::WorldToDomeLight::color_mult, blender::copy_v3_v3(), blender::bNode::custom1, blender::bNode::id, blender::io::usd::WorldToDomeLight::image, blender::io::usd::WorldToDomeLight::intensity, blender::io::usd::WorldToDomeLight::iuser, blender::NodeTexImage::iuser, M_PI, blender::io::usd::WorldToDomeLight::mult_found, blender::bNodeSocket::next, blender::bke::node_find_socket(), node_search(), blender::NODE_VECTOR_MATH_MULTIPLY, rot, SH_NODE_BACKGROUND, SH_NODE_MAPPING, SH_NODE_TEX_ENVIRONMENT, SH_NODE_VECTOR_MATH, blender::SOCK_IN, blender::bNode::storage, blender::io::usd::WorldToDomeLight::transform, blender::bNode::type_legacy, blender::bNodeSocketValueRGBA::value, and blender::bNodeSocketValueVector::value.
Referenced by node_search(), and world_material_to_dome_light().
|
static |
Returns true if the parent directory of the given path exists on the file system.
| path | input file path |
Definition at line 339 of file usd_asset_utils.cc.
References blender::BLI_is_dir(), blender::BLI_path_split_dir_part(), FILE_MAX, and parent_dir_exists_on_file_system().
Referenced by get_export_textures_dir(), parent_dir_exists_on_file_system(), and should_import_asset().
| bool blender::io::usd::paths_equal | ( | const std::string & | path1, |
| const std::string & | path2 ) |
Invokes the USD asset resolver to resolve the given paths and returns true if the resolved paths are equal.
| path1 | first path to compare |
| path2 | second path to compare |
Definition at line 405 of file usd_asset_utils.cc.
References BLI_assert_msg, blender::BLI_path_is_rel(), and paths_equal().
Referenced by export_packed_texture(), and paths_equal().
|
static |
For usdz export, we must first create a usd/a/c file and then covert it to usdz. In Blender's case, we first create a usdc file in Blender's temporary working directory, and store the path to the usdc file in unarchived_filepath. This function then does the conversion of that usdc file into usdz.
Definition at line 325 of file usd_capi_export.cc.
References blender::BKE_reportf(), blender::BLI_assert(), blender::BLI_change_working_dir(), blender::BLI_current_working_dir(), blender::BLI_delete(), blender::BLI_exists(), BLI_path_join, blender::BLI_path_move(), blender::BLI_path_split_dir_file(), blender::BLI_path_split_file_part(), blender::data, FILE_MAX, perform_usdz_conversion(), process_usdz_textures(), blender::result, and blender::RPT_ERROR.
Referenced by export_endjob(), and perform_usdz_conversion().
|
static |
Definition at line 39 of file usd_reader_curve.cc.
References bezier_point_count(), blender::CURVE_TYPE_BEZIER, and point_count().
Referenced by point_count(), and blender::io::usd::USDBasisCurvesReader::read_curve_sample().
|
static |
Definition at line 161 of file usd_writer_curves.cc.
References get_curve_width_interpolation(), populate_curve_props(), populate_curve_verts(), and populate_curve_widths().
Referenced by blender::io::usd::USDCurvesWriter::do_write(), and populate_curve_props().
|
static |
Definition at line 246 of file usd_writer_curves.cc.
References get_curve_width_interpolation(), populate_curve_props_for_bezier(), populate_curve_verts_for_bezier(), and populate_curve_widths().
Referenced by blender::io::usd::USDCurvesWriter::do_write(), and populate_curve_props_for_bezier().
|
static |
Definition at line 276 of file usd_writer_curves.cc.
References blender::bke::curves::nurbs::knots_num(), blender::bke::curves::nurbs::load_curve_knots(), populate_curve_props_for_nurbs(), blender::IndexRange::size(), blender::offset_indices::OffsetIndices< T >::size(), and blender::IndexRange::take_front().
Referenced by blender::io::usd::USDCurvesWriter::do_write(), and populate_curve_props_for_nurbs().
|
static |
Definition at line 123 of file usd_writer_curves.cc.
References populate_curve_verts(), and blender::IndexRange::size().
Referenced by populate_curve_props(), and populate_curve_verts().
|
static |
Definition at line 183 of file usd_writer_curves.cc.
References populate_curve_verts_for_bezier(), and blender::IndexRange::size().
Referenced by populate_curve_props_for_bezier(), and populate_curve_verts_for_bezier().
|
static |
Definition at line 80 of file usd_writer_curves.cc.
References blender::VArrayCommon< T >::index_range(), populate_curve_widths(), and blender::VArrayCommon< T >::size().
Referenced by populate_curve_props(), populate_curve_props_for_bezier(), and populate_curve_widths().
|
static |
Definition at line 614 of file usd_writer_material.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::usdtokens::clearcoat(), blender::usdtokens::clearcoatRoughness(), blender::usdtokens::diffuse_color(), blender::usdtokens::displacement(), blender::usdtokens::emissive_color(), blender::usdtokens::ior(), blender::usdtokens::metallic(), blender::usdtokens::normal(), blender::usdtokens::opacity(), preview_surface_input_map(), blender::usdtokens::roughness(), and blender::usdtokens::specular().
Referenced by create_usd_preview_surface_material(), preview_surface_input_map(), process_inputs(), and token_for_input().
|
static |
Definition at line 107 of file usd_capi_export.cc.
References prim_path_valid(), blender::RPT_ERROR, and blender::WM_global_reportf().
Referenced by export_params_valid(), and prim_path_valid().
|
static |
Definition at line 181 of file usd_writer_material.cc.
References blender::usdtokens::a(), blender::io::usd::USDExportParams::allow_unicode, blender::usdtokens::b(), create_input(), create_primvar_reader_shader(), create_usd_preview_shader(), create_uv_input(), blender::bNode::custom1, blender::usdtokens::displacement(), blender::usdtokens::emissive_color(), blender::io::usd::USDExporterContext::export_params, export_texture(), blender::io::usd::USDExportParams::export_textures, Float, blender::bke::Float3, blender::bNodeLink::fromnode, blender::bNodeLink::fromsock, blender::usdtokens::g(), blender::bNodeSocket::identifier, blender::io::usd::InputSpec::input_name, blender::io::usd::InputSpec::input_type, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), make_safe_primvar_name(), blender::bNodeSocket::name, node, blender::bke::node_find_socket(), blender::NODE_MATH_LESS_THAN, blender::NODE_MATH_ROUND, blender::NODE_MATH_SUBTRACT, blender::NODE_VECTOR_MATH_MULTIPLY_ADD, blender::usdtokens::opacity(), blender::usdtokens::opacityThreshold(), preview_surface_input_map(), blender::usdtokens::primvar_float(), blender::usdtokens::primvar_float3(), blender::usdtokens::primvar_vector(), process_inputs(), blender::usdtokens::r(), blender::usdtokens::result(), blender::usdtokens::rgb(), scale(), blender::io::usd::InputSpec::set_default_value, set_normal_texture_range(), set_scale_bias(), set_transmission_opacity_range(), SH_NODE_ATTRIBUTE, SH_NODE_MATH, SH_NODE_SEPARATE_COLOR, SH_NODE_TEX_IMAGE, SH_NODE_VECTOR_MATH, blender::SHD_ATTRIBUTE_GEOMETRY, blender::SOCK_FLOAT, blender::SOCK_IN, blender::SOCK_RGBA, blender::SOCK_VECTOR, blender::usdtokens::st(), blender::bNode::storage, storage, STREQ, lexit::String, traverse_channel(), blender::bNodeSocket::type, blender::bNodeSocketValueFloat::value, and blender::usdtokens::varname().
Referenced by create_usd_preview_surface_material(), and process_inputs().
| void blender::io::usd::process_scene_graph_instances | ( | const USDExportParams & | export_params, |
| pxr::UsdStageRefPtr | stage ) |
This function processes the USD stage generated by the USD hierarchy iterator to change scene graph instancing prototypes from defined USD prims to abstract prims.
In the following example, instance /root/proto/Plane_0 references prototype prim /root/proto_001/Plane_0:
def Xform "root" { def Xform "proto_001" { def Xform "Plane_0" { def Mesh "Plane" { } } }
def Xform "proto" { def Xform "Plane_0" ( instanceable = true prepend references = </root/proto_001/Plane_0> ) { } } }
The function will copy prototype /root/proto_001/Plane_0 under a new class prim named /root/prototypes and convert prim /root/proto_001/Plane_0 to be an instance referencing the copied abstract prim /root/prototypes/Plane_0.
def Xform "root" { def Xform "proto" { def Xform "Plane_0" ( instanceable = true prepend references = </root/prototypes/Plane_0> ) { } }
def Xform "proto_001" { def Xform "Plane_0" ( instanceable = true references = </root/prototypes/Plane_0> ) { } }
class "prototypes" { def Xform "Plane_0" { def Mesh "Plane" { } } } }
| export_params | The export parameters |
| stage | Pointer to the stage to process |
Definition at line 66 of file usd_instancing_utils.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CLOG_ERROR, CLOG_WARN, convert_proto_to_instance(), get_unique_path(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::LOG, process_scene_graph_instances(), and blender::io::usd::USDExportParams::root_prim_path.
Referenced by export_to_stage(), and process_scene_graph_instances().
|
static |
Definition at line 244 of file usd_capi_export.cc.
References blender::BKE_id_free(), blender::BKE_image_get_size(), blender::BKE_image_load(), blender::BKE_image_save(), blender::BKE_image_save_options_free(), blender::BKE_image_save_options_init(), blender::BKE_image_scale(), blender::BLI_filelist_dir_contents(), blender::BLI_filelist_free(), blender::BLI_is_dir(), blender::BLI_path_append(), blender::BLI_path_slash_ensure(), CLOG_DEBUG, CLOG_ERROR, CLOG_WARN, Custom, blender::data, FILE_MAX, float, Keep, blender::LOG, blender::direntry::path, process_usdz_textures(), blender::result, scale(), and blender::STRNCPY().
Referenced by perform_usdz_conversion(), and process_usdz_textures().
|
static |
Definition at line 22 of file usd_mesh_utils.cc.
References CLOG_WARN, blender::bke::ColorFloat, colorspace_attr_to_scene_linear(), blender::io::usd::detail::convert_value(), blender::bke::Corner, blender::bke::SpanAttributeWriter< T >::finish(), get_primvar_array(), blender::IndexRange::index_range(), blender::offset_indices::OffsetIndices< T >::index_range(), blender::LOG, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), read_face_display_color(), set_single_value(), blender::bke::SpanAttributeWriter< T >::span, and blender::IndexRange::start().
Referenced by read_face_display_color(), and read_generic_mesh_primvar().
| void blender::io::usd::read_generic_mesh_primvar | ( | Mesh * | mesh, |
| const pxr::UsdGeomPrimvar & | primvar, | ||
| const pxr::UsdTimeCode | time, | ||
| const bool | is_left_handed ) |
Definition at line 98 of file usd_mesh_utils.cc.
References CLOG_WARN, convert_usd_type_to_blender(), convert_usd_varying_to_blender(), copy_primvar_to_blender_attribute(), blender::usdtokens::displayColor(), ELEM, blender::LOG, read_face_display_color(), read_generic_mesh_primvar(), and uniform.
Referenced by read_generic_mesh_primvar().
| void blender::io::usd::register_hook_converters | ( | ) |
Ensure classes and type converters necessary for invoking import and export hooks are registered.
Definition at line 299 of file usd_hook.cc.
References blender::io::usd::USDMaterialExportContext::export_texture(), blender::io::usd::USDSceneExportContext::get_depsgraph(), blender::io::usd::USDSceneExportContext::get_prim_map(), blender::io::usd::USDSceneImportContext::get_prim_map(), blender::io::usd::USDMaterialExportContext::get_stage(), blender::io::usd::USDMaterialImportContext::get_stage(), blender::io::usd::USDSceneExportContext::get_stage(), blender::io::usd::USDSceneImportContext::get_stage(), hook_list(), blender::io::usd::USDMaterialImportContext::import_texture(), and register_hook_converters().
Referenced by export_to_stage(), import_startjob(), and register_hook_converters().
| void blender::io::usd::remap_blend_shape_anim | ( | pxr::UsdStageRefPtr | stage, |
| const pxr::SdfPath & | skel_path, | ||
| const pxr::SdfPathSet & | mesh_paths ) |
When multiple meshes with blend shape animations are bound to one skeleton, USD implementations typically expect these animations to be combined in a single animation on the skeleton. This function creates an animation prim as a child of the skeleton and merges the blend shape time samples from multiple meshes in a single attribute on the animation. Merging the weight samples requires handling blend shape name collisions by generating unique names for the combined result.
| stage | The stage |
| skel_path | Path to the skeleton |
| mesh_paths | Paths to one or more mesh primitives bound to the skeleton |
Definition at line 302 of file usd_blend_shape_utils.cc.
References blender::usdtokens::Anim(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CLOG_WARN, blender::Vector< T, InlineBufferCapacity, Allocator >::first(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::LOG, remap_blend_shape_anim(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Set(), and TempBlendShapeWeightsPrimvarName.
Referenced by remap_blend_shape_anim(), and shape_key_export_chaser().
|
static |
Definition at line 235 of file usd_capi_export.cc.
References blender::data, blender::timeit::print_duration(), and report_job_duration().
Referenced by export_endjob(), import_endjob(), report_job_duration(), and report_job_duration().
|
static |
Definition at line 116 of file usd_capi_import.cc.
References blender::data, blender::timeit::print_duration(), and report_job_duration().
|
static |
Definition at line 162 of file usd_reader_utils.cc.
References blender::IDP_GetPropertyFromGroup(), set_accessibility_property(), set_string_prop(), and lexit::String.
Referenced by set_accessibility_property(), and set_id_props_from_prim().
| void blender::io::usd::set_attribute | ( | const pxr::UsdAttribute & | attr, |
| const USDT | value, | ||
| pxr::UsdTimeCode | time, | ||
| pxr::UsdUtilsSparseValueWriter & | value_writer ) |
Set the USD attribute to the provided value at the given time. The value will be written sparsely.
Definition at line 162 of file usd_attribute_utils.hh.
References set_attribute().
Referenced by add_anim_sample(), blender::io::usd::USDAbstractWriter::author_extent(), blender::io::usd::USDAbstractWriter::author_extent(), copy_blender_buffer_to_primvar(), blender::io::usd::USDCameraWriter::do_write(), blender::io::usd::USDLightWriter::do_write(), blender::io::usd::USDPointInstancerWriter::do_write(), set_attribute(), and set_attribute().
| void blender::io::usd::set_attribute | ( | const pxr::UsdAttribute & | attr, |
| pxr::VtArray< USDT > & | value, | ||
| pxr::UsdTimeCode | time, | ||
| pxr::UsdUtilsSparseValueWriter & | value_writer ) |
Set the USD attribute to the provided array value at the given time. The value will be written sparsely. For efficiency, this function swaps out the given value, leaving it empty, so it can leverage the USD API where no additional copy of the data is required.
Definition at line 185 of file usd_attribute_utils.hh.
References set_attribute().
|
static |
Definition at line 123 of file usd_reader_utils.cc.
References blender::IDPropertyTemplate::i, blender::IDP_AddToGroup(), blender::IDP_BOOLEAN, blender::IDP_New(), and set_bool_prop().
Referenced by set_bool_prop(), and set_id_props_from_prim().
|
static |
Definition at line 149 of file usd_reader_utils.cc.
References blender::IDPropertyTemplate::d, blender::IDP_AddToGroup(), blender::IDP_DOUBLE, blender::IDP_New(), and set_double_prop().
Referenced by set_double_prop(), and set_id_props_from_prim().
| void blender::io::usd::set_fcurve_sample | ( | FCurve * | fcu, |
| int64_t | sample_index, | ||
| const float | frame, | ||
| const float | value ) |
Definition at line 40 of file usd_armature_utils.cc.
References blender::FCurve::bezt, blender::BEZT_FLAG_SELECT, blender::BEZT_IPO_LIN, blender::BLI_assert(), blender::BezTriple::f1, blender::BezTriple::f2, blender::BezTriple::f3, blender::BezTriple::h1, blender::BezTriple::h2, blender::HD_AUTO, blender::BezTriple::ipo, set_fcurve_sample(), and blender::BezTriple::vec.
Referenced by BlenderBoneLengths(), import_blendshapes(), blender::io::usd::USDCameraReader::read_object_data(), and set_fcurve_sample().
|
static |
Definition at line 136 of file usd_reader_utils.cc.
References blender::IDPropertyTemplate::f, blender::IDP_AddToGroup(), blender::IDP_FLOAT, blender::IDP_New(), and set_float_prop().
Referenced by set_float_prop(), and set_id_props_from_prim().
| void blender::io::usd::set_id_props_from_prim | ( | ID * | id, |
| const pxr::UsdPrim & | prim, | ||
| const PropertyImportMode | property_import_mode, | ||
| const pxr::UsdTimeCode | time_code ) |
Definition at line 193 of file usd_reader_utils.cc.
References All, blender::bke::Bool, Float, blender::bke::Float2, blender::bke::Float3, blender::bke::Float4, blender::IDP_EnsureProperties(), set_accessibility_property(), set_bool_prop(), set_double_prop(), set_float_prop(), set_id_props_from_prim(), set_int_prop(), set_string_prop(), blender::blender::StringRefBase::size(), lexit::String, and blender::blender::StringRefBase::substr().
Referenced by blender::io::usd::USDMaterialReader::add_material(), set_id_props_from_prim(), and blender::io::usd::USDPrimReader::set_props().
|
static |
Set the instance collection on the given instance reader. The collection is assigned from the given map based on the prototype prim path.
Definition at line 106 of file usd_reader_stage.cc.
References CLOG_WARN, blender::LOG, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), blender::io::usd::USDPrimReader::prim_path(), blender::io::usd::USDInstanceReader::proto_path(), and blender::io::usd::USDInstanceReader::set_instance_collection().
Referenced by blender::io::usd::USDStageReader::create_proto_collections().
|
static |
Definition at line 110 of file usd_reader_utils.cc.
References blender::IDPropertyTemplate::i, blender::IDP_AddToGroup(), blender::IDP_INT, blender::IDP_New(), and set_int_prop().
Referenced by set_id_props_from_prim(), and set_int_prop().
|
static |
Definition at line 802 of file usd_capi_export.cc.
References blender::BLI_path_extension_check_n(), create_temp_path_for_usdz_export(), set_job_filepath(), blender::STRNCPY(), blender::io::usd::ExportJobData::unarchived_filepath, and blender::io::usd::ExportJobData::usdz_filepath.
Referenced by set_job_filepath(), and USD_export().
| void blender::io::usd::set_normal_texture_range | ( | pxr::UsdShadeShader & | usd_shader, |
| const InputSpec & | input_spec ) |
Definition at line 556 of file usd_writer_material.cc.
References blender::usdtokens::bias(), blender::bke::Float4, blender::io::usd::InputSpec::input_name, blender::usdtokens::normal(), blender::io::usd::usdtokens::raw(), blender::usdtokens::scale(), set_normal_texture_range(), blender::io::usd::usdtokens::sourceColorSpace(), and blender::usdtokens::uv_texture().
Referenced by process_inputs(), and set_normal_texture_range().
|
static |
Definition at line 685 of file usd_skel_convert.cc.
References blender::BKE_pchan_apply_mat4(), blender::BKE_pose_channel_find_name(), blender::BKE_pose_ensure(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::Object::pose, and set_rest_pose().
Referenced by import_skeleton(), and set_rest_pose().
|
static |
Definition at line 164 of file usd_writer_material.cc.
References blender::usdtokens::bias(), blender::bke::Float4, blender::usdtokens::scale(), scale(), and set_scale_bias().
Referenced by process_inputs(), and set_scale_bias().
|
inline |
Definition at line 249 of file usd_attribute_utils.hh.
References blender::bke::MutableAttributeAccessor::add(), blender::bke::MutableAttributeAccessor::assign_data(), blender::bke::AttributeAccessor::contains(), and set_single_value().
Referenced by copy_primvar_to_blender_buffer(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), read_face_display_color(), blender::io::usd::USDPointsReader::read_geometry(), and set_single_value().
|
static |
Definition at line 91 of file usd_reader_utils.cc.
References blender::blender::StringRefBase::data(), blender::IDP_AddToGroup(), blender::IDP_New(), blender::IDP_STRING, blender::IDP_STRING_SUB_UTF8, set_string_prop(), blender::blender::StringRefBase::size(), and blender::IDPropertyTemplate::string.
Referenced by set_accessibility_property(), set_id_props_from_prim(), and set_string_prop().
| void blender::io::usd::set_transmission_opacity_range | ( | pxr::UsdShadeShader & | usd_shader, |
| const InputSpec & | input_spec, | ||
| const pxr::TfToken & | source_name ) |
Definition at line 510 of file usd_writer_material.cc.
References blender::usdtokens::b(), blender::usdtokens::bias(), blender::bke::Float4, blender::usdtokens::g(), blender::io::usd::InputSpec::input_name, blender::usdtokens::opacity(), blender::usdtokens::r(), blender::usdtokens::scale(), set_transmission_opacity_range(), and blender::usdtokens::uv_texture().
Referenced by process_inputs(), and set_transmission_opacity_range().
| void blender::io::usd::shape_key_export_chaser | ( | pxr::UsdStageRefPtr | stage, |
| const ObjExportMap & | shape_key_mesh_export_map ) |
Complete the export process for shape keys.
| stage | The stage |
| shape_key_mesh_export_map | Map mesh objects with shape-key to USD meshes with blend shape targets |
Definition at line 1262 of file usd_skel_convert.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), CLOG_WARN, ensure_blend_shape_skeleton(), blender::Object::id, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::LOG, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::ID::name, remap_blend_shape_anim(), shape_key_export_chaser(), and TempBlendShapeWeightsPrimvarName.
Referenced by shape_key_export_chaser(), and skel_export_chaser().
| bool blender::io::usd::should_import_asset | ( | const std::string & | path | ) |
Return true if the asset at the given path is a candidate for importing with the USD asset resolver. The following heuristics are currently applied for this test:
TODO(makowalski): the test currently requires a file-system stat. Consider possible ways around this, e.g., by determining if the path is a supported URI.
| path | input file path |
Definition at line 384 of file usd_asset_utils.cc.
References asset_exists(), blender::BLI_is_file(), blender::BLI_path_is_rel(), is_udim_path(), parent_dir_exists_on_file_system(), and should_import_asset().
Referenced by blender::io::usd::USDMaterialImportContext::import_texture(), load_image(), and should_import_asset().
| void blender::io::usd::skel_export_chaser | ( | pxr::UsdStageRefPtr | stage, |
| const ObjExportMap & | armature_export_map, | ||
| const ObjExportMap & | skinned_mesh_export_map, | ||
| const ObjExportMap & | shape_key_mesh_export_map, | ||
| const Depsgraph * | depsgraph ) |
This function is called after the USD writers are invoked, to complete the UsdSkel export process, for example, to bind skinned meshes to skeletons or to set blend shape animation data.
| stage | The stage |
| armature_export_map | Map armature objects to USD skeletons |
| skinned_mesh_export_map | Map mesh objects to USD skinned meshes |
| shape_key_mesh_export_map | Map mesh objects with shape-key to USD meshes with blend shape targets |
| depsgraph | The dependency graph in which objects were evaluated |
Definition at line 1202 of file usd_skel_convert.cc.
References shape_key_export_chaser(), skel_export_chaser(), and skinned_mesh_export_chaser().
Referenced by blender::io::usd::USDHierarchyIterator::process_usd_skel(), and skel_export_chaser().
| void blender::io::usd::skinned_mesh_export_chaser | ( | pxr::UsdStageRefPtr | stage, |
| const ObjExportMap & | armature_export_map, | ||
| const ObjExportMap & | skinned_mesh_export_map, | ||
| pxr::UsdGeomXformCache & | xf_cache, | ||
| const Depsgraph * | depsgraph ) |
Complete the export process for skinned meshes.
| stage | The stage |
| armature_export_map | Map armature objects to USD skeleton paths |
| skinned_mesh_export_map | Map mesh objects to USD skinned meshes |
| xf_cache | Cache to speed up USD prim transform computations |
| depsgraph | The dependency graph in which objects were evaluated |
Definition at line 1217 of file usd_skel_convert.cc.
References CLOG_WARN, get_armature_modifier_obj(), blender::Object::id, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::LOG, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::ID::name, and skinned_mesh_export_chaser().
Referenced by skel_export_chaser(), and skinned_mesh_export_chaser().
|
static |
The following is copied from _SplitUdimPattern() in USD library source file materialParamsUtils.cpp. Split a UDIM file path such as /someDir/myFile.<UDIM>.exr into a prefix /someDir/myFile. and suffix .exr.
Definition at line 46 of file usd_asset_utils.cc.
References split_udim_pattern(), UDIM_PATTERN, and UDIM_PATTERN2.
Referenced by copy_udim_asset_to_directory(), and split_udim_pattern().
|
static |
Definition at line 67 of file usd_capi_import.cc.
References stage_reader_from_handle().
Referenced by CacheReader_open_usd_object(), stage_reader_from_handle(), and USD_free_handle().
| const char * blender::io::usd::temp_textures_dir | ( | ) |
Returns path to temporary folder for saving imported textures prior to packing. CAUTION: this directory is recursively deleted after material import.
Definition at line 414 of file usd_asset_utils.cc.
References blender::BKE_tempdir_session(), BLI_path_join, FILE_MAXDIR, SEP_STR, and temp_textures_dir().
Referenced by blender::io::usd::USDMaterialImportContext::import_texture(), load_image(), blender::io::usd::USDMaterialReader::load_tex_image(), and temp_textures_dir().
| pxr::TfToken blender::io::usd::TempBlendShapeWeightsPrimvarName | ( | "temp:weights" | , |
| pxr::TfToken::Immortal | ) |
References TempBlendShapeWeightsPrimvarName.
| blender::io::usd::TEST | ( | utilities | , |
| make_safe_name | ) |
Definition at line 331 of file usd_export_test.cc.
References make_safe_name(), and TEST().
| blender::io::usd::TEST | ( | utilities | , |
| make_safe_primvar_name | ) |
Definition at line 368 of file usd_export_test.cc.
References make_safe_primvar_name(), and TEST().
| blender::io::usd::TEST_F | ( | UsdExportTest | , |
| usd_export_material | ) |
Definition at line 272 of file usd_export_test.cc.
References blender::BKE_libblock_find_name(), blender::StringRefNull::c_str(), blender::io::usd::USDExportParams::convert_world_material, blender::EXPECT_EQ(), EXPECT_TRUE, blender::io::usd::USDExportParams::export_materials, blender::io::usd::USDExportParams::export_normals, blender::io::usd::USDExportParams::export_textures, blender::io::usd::USDExportParams::export_uvmaps, find_node_for_type_in_graph(), blender::io::usd::USDExportParams::generate_materialx_network, blender::io::usd::USDExportParams::generate_preview_surface, blender::ID_MA, materials_filename, blender::bNode::name, output_filename, blender::io::usd::USDExportParams::relative_paths, blender::result, blender::bNode::storage, TEST_F(), and USD_export().
| blender::io::usd::TEST_F | ( | UsdExportTest | , |
| usd_export_rain_mesh | ) |
Definition at line 216 of file usd_export_test.cc.
References blender::StringRefNull::c_str(), blender::data, blender::EXPECT_EQ(), EXPECT_TRUE, blender::io::usd::USDExportParams::export_materials, blender::io::usd::USDExportParams::export_normals, blender::io::usd::USDExportParams::export_uvmaps, output_filename, blender::result, simple_scene_filename, TEST_F(), and USD_export().
| blender::io::usd::TEST_F | ( | USDStageCreationTest | , |
| JSONFileLoadingTest | ) |
Definition at line 15 of file usd_stage_creation_test.cc.
References blender::gpu::shader::parser::filename(), and TEST_F().
|
inlinestatic |
Definition at line 29 of file usd_reader_curve.cc.
References to_float3().
Referenced by add_bezier_control_point(), and to_float3().
| pxr::TfToken blender::io::usd::token_for_input | ( | const StringRef | input_name | ) |
Returns a USDPreviewSurface token name for a given Blender shader Socket name, or an empty TfToken if the input name is not found in the map.
Definition at line 1475 of file usd_writer_material.cc.
References blender::io::usd::InputSpec::input_name, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), preview_surface_input_map(), and token_for_input().
Referenced by blender::io::usd::UsdExportTest::compare_blender_node_to_usd_prim(), and token_for_input().
|
static |
Definition at line 1072 of file usd_writer_material.cc.
References blender::bNodeLink::fromnode, blender::bNodeLink::fromsock, blender::bNode::inputs, blender::bNodeSocket::link, traverse_channel(), and blender::bNode::type_legacy.
Referenced by create_uv_input(), process_inputs(), and traverse_channel().
| void blender::io::usd::USD_CacheReader_free | ( | CacheReader * | reader | ) |
Definition at line 602 of file usd_capi_import.cc.
References blender::io::usd::USDPrimReader::decref(), blender::io::usd::USDPrimReader::refcount(), and USD_CacheReader_free().
Referenced by blender::BKE_cachefile_reader_free(), blender::cachefile_handle_free(), CacheReader_open_usd_object(), and USD_CacheReader_free().
| CacheArchiveHandle * blender::io::usd::USD_create_handle | ( | Main * | , |
| const char * | filepath, | ||
| ListBaseT< CacheObjectPath > * | object_paths ) |
Definition at line 612 of file usd_capi_import.cc.
References gather_objects_paths(), handle_from_stage_reader(), USD_create_handle(), and blender::io::usd::USDStageReader::USDStageReader().
Referenced by blender::BKE_cachefile_eval(), and USD_create_handle().
| bool blender::io::usd::USD_export | ( | const bContext * | C, |
| const char * | filepath, | ||
| const USDExportParams * | params, | ||
| bool | as_background_job, | ||
| ReportList * | reports ) |
The USD_export takes a as_background_job parameter, and returns a boolean.
When as_background_job=true, returns false immediately after scheduling a background job.
When as_background_job=false, performs the export synchronously, and returns true when the export was ok, and false if there were any errors.
Definition at line 813 of file usd_capi_export.cc.
References blender::BKE_libblock_find_name(), blender::BKE_reportf(), blender::io::usd::ExportJobData::bmain, C, blender::io::usd::USDExportParams::collection, blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_data_view_layer(), blender::CTX_wm_manager(), blender::CTX_wm_window(), blender::DEG_graph_build_from_collection(), blender::DEG_graph_build_from_view_layer(), blender::DEG_graph_new(), blender::io::usd::ExportJobData::depsgraph, blender::ED_editors_flush_edits(), blender::io::usd::USDExportParams::evaluation_mode, export_endjob(), blender::io::usd::ExportJobData::export_ok, export_params_valid(), export_startjob(), blender::ID_GR, NC_SCENE, ND_FRAME, blender::io::usd::ExportJobData::params, blender::wmJobWorkerStatus::reports, blender::RPT_ERROR, blender::io::usd::ExportJobData::scene, set_job_filepath(), USD_export(), blender::io::usd::ExportJobData::wm, blender::WM_JOB_PROGRESS, blender::WM_JOB_TYPE_USD_EXPORT, blender::WM_jobs_callbacks(), blender::WM_jobs_customdata_set(), blender::WM_jobs_get(), blender::WM_jobs_start(), and blender::WM_jobs_timer().
Referenced by TEST_F(), TEST_F(), and USD_export().
| USDHook * blender::io::usd::USD_find_hook_name | ( | const char | idname[] | ) |
Definition at line 77 of file usd_hook.cc.
References blender::begin(), hook_list(), blender::nullptr, STREQ, and USD_find_hook_name().
Referenced by USD_find_hook_name(), and USD_register_hook().
| void blender::io::usd::USD_free_handle | ( | CacheArchiveHandle * | handle | ) |
Definition at line 633 of file usd_capi_import.cc.
References stage_reader_from_handle(), and USD_free_handle().
Referenced by blender::cachefile_handle_free(), and USD_free_handle().
| void blender::io::usd::USD_get_transform | ( | CacheReader * | reader, |
| float4x4 & | r_mat_world, | ||
| float | time, | ||
| float | scale ) |
Definition at line 639 of file usd_capi_import.cc.
References blender::BKE_object_get_parent_matrix(), blender::io::usd::USDPrimReader::object(), blender::MatBase< T, NumCol, NumRow, Alignment >::ptr(), blender::io::usd::USDXformReader::read_matrix(), scale(), and USD_get_transform().
Referenced by blender::transformcache_evaluate(), and USD_get_transform().
| int blender::io::usd::USD_get_version | ( | ) |
Definition at line 892 of file usd_capi_export.cc.
References USD_get_version().
Referenced by blender::make_usd_info(), and USD_get_version().
| bool blender::io::usd::USD_import | ( | bContext * | C, |
| const char * | filepath, | ||
| const USDImportParams * | params, | ||
| bool | as_background_job, | ||
| ReportList * | reports ) |
Definition at line 448 of file usd_capi_import.cc.
References blender::io::usd::ImportJobData::archive, blender::io::usd::ImportJobData::bmain, blender::io::usd::ImportJobData::C, C, blender::CTX_data_main(), blender::CTX_data_scene(), blender::CTX_wm_manager(), blender::CTX_wm_window(), blender::io::usd::ImportJobData::error_code, blender::io::usd::ImportJobData::filepath, blender::G, import_endjob(), import_freejob(), blender::io::usd::ImportJobData::import_ok, import_startjob(), blender::io::usd::ImportJobData::is_background_job, NC_SCENE, blender::io::usd::ImportJobData::params, blender::wmJobWorkerStatus::reports, blender::io::usd::ImportJobData::scene, blender::STRNCPY(), USD_import(), USD_NO_ERROR, blender::io::usd::ImportJobData::was_canceled, blender::io::usd::ImportJobData::wm, blender::WM_JOB_PROGRESS, blender::WM_JOB_TYPE_USD_IMPORT, blender::WM_jobs_callbacks(), blender::WM_jobs_customdata_set(), blender::WM_jobs_get(), blender::WM_jobs_start(), and blender::WM_jobs_timer().
Referenced by USD_import().
| bool blender::io::usd::USD_mesh_topology_changed | ( | CacheReader * | reader, |
| const Object * | ob, | ||
| const Mesh * | existing_mesh, | ||
| const double | time, | ||
| const char ** | r_err_str ) |
Definition at line 545 of file usd_capi_import.cc.
References get_usd_reader(), blender::io::usd::USDGeomReader::topology_changed(), and USD_mesh_topology_changed().
Referenced by USD_mesh_topology_changed().
| void blender::io::usd::USD_path_abs | ( | char * | path, |
| const char * | basepath, | ||
| bool | for_import ) |
Definition at line 629 of file usd_asset_utils.cc.
References blender::BLI_path_abs(), blender::BLI_path_is_rel(), blender::BLI_strncpy(), FILE_MAX, blender::RPT_ERROR, USD_path_abs(), and blender::WM_global_reportf().
Referenced by export_packed_texture(), and USD_path_abs().
| void blender::io::usd::USD_read_geometry | ( | CacheReader * | reader, |
| const Object * | ob, | ||
| bke::GeometrySet & | geometry_set, | ||
| USDMeshReadParams | params, | ||
| const char ** | r_err_str ) |
Either modifies current_mesh in-place or constructs a new mesh.
Definition at line 530 of file usd_capi_import.cc.
References get_usd_reader(), blender::io::usd::USDGeomReader::read_geometry(), and USD_read_geometry().
Referenced by blender::modify_geometry_set(), and USD_read_geometry().
| void blender::io::usd::USD_register_hook | ( | std::unique_ptr< USDHook > | hook | ) |
Definition at line 60 of file usd_hook.cc.
References hook_list(), USD_find_hook_name(), and USD_register_hook().
Referenced by USD_register_hook().
| void blender::io::usd::USD_unregister_hook | ( | const USDHook * | hook | ) |
Remove the given entry from the list of registered hooks and free the allocated memory for the hook instance.
Definition at line 71 of file usd_hook.cc.
References hook_list(), and USD_unregister_hook().
Referenced by USD_unregister_hook().
|
static |
Definition at line 52 of file usd_armature_utils.cc.
References blender::Bone::childbase, and visit_bones().
Referenced by BlenderBoneLengths(), get_armature_bone_names(), init_deform_bones_map(), visit_bones(), and visit_bones().
| void blender::io::usd::visit_bones | ( | const Object * | ob_arm, |
| FunctionRef< void(const Bone *)> | visitor ) |
Recursively invoke the given function on the given armature object's bones. This function is a no-op if the object isn't an armature.
| ob_arm | The armature object |
| visitor | The function to invoke on each bone |
Definition at line 98 of file usd_armature_utils.cc.
References blender::bArmature::bonebase, blender::Object::data, blender::OB_ARMATURE, blender::Object::type, and visit_bones().
Referenced by blender::initialize().
| void blender::io::usd::world_material_to_dome_light | ( | const Scene * | scene, |
| WorldToDomeLight & | res ) |
Definition at line 473 of file usd_light_convert.cc.
References node, blender::bke::node_chain_iterator(), blender::NODE_DO_OUTPUT, node_search(), blender::Scene::world, and world_material_to_dome_light().
| void blender::io::usd::world_material_to_dome_light | ( | const USDExportParams & | params, |
| const Scene * | scene, | ||
| pxr::UsdStageRefPtr | stage ) |
If the Blender scene has an environment texture, export it as a USD dome light.
Definition at line 144 of file usd_light_convert.cc.
References blender::BLI_copy(), blender::BLI_dir_create_recursive(), blender::BLI_path_append(), blender::BLI_path_append_dir(), BLI_path_join, blender::BLI_path_split_dir_part(), blender::BLI_path_split_file_part(), blender::BLI_string_replace_char(), cache_image_color(), CLOG_WARN, blender::io::usd::WorldToDomeLight::color, blender::io::usd::WorldToDomeLight::color_found, blender::io::usd::WorldToDomeLight::color_mult, colorspace_apply_to_prim(), export_texture(), blender::io::usd::USDExportParams::export_textures, FILE_MAX, get_tex_image_asset_filepath(), get_unique_path(), blender::io::usd::WorldToDomeLight::image, blender::io::usd::WorldToDomeLight::intensity, blender::LOG, blender::io::usd::WorldToDomeLight::mult_found, blender::io::usd::USDExportParams::overwrite_textures, blender::io::usd::USDExportParams::root_prim_path, blender::io::usd::WorldToDomeLight::transform, blender::Scene::world, and world_material_to_dome_light().
Referenced by blender::io::hydra::build_world_data_source(), export_to_stage(), world_material_to_dome_light(), and world_material_to_dome_light().
|
static |
If the user has provided an accessibility label and description for the export, write that information to the exported stage's default prim. This information will be written with the UsdUIAccessibilityAPI under the default namespace. Note: The information will only be added if the label is non-empty.
Definition at line 212 of file usd_capi_export.cc.
References blender::io::usd::USDExportParams::accessibility_description, blender::io::usd::USDExportParams::accessibility_label, and write_root_accessibility_information().
Referenced by export_to_stage(), and write_root_accessibility_information().
| bool blender::io::usd::write_to_path | ( | const void * | data, |
| size_t | size, | ||
| const std::string & | path, | ||
| ReportList * | reports ) |
Invokes the USD asset resolver to write data to the given path.
| data | pointer to data to write |
| size | number of bytes to write |
| path | path of asset to be written |
| reports | the storage for potential warning or error reports (generated using BKE_report API). |
Definition at line 428 of file usd_asset_utils.cc.
References blender::BKE_reportf(), blender::BLI_assert(), blender::data, blender::RPT_ERROR, and write_to_path().
Referenced by export_packed_texture(), and write_to_path().
|
static |
Definition at line 25 of file usd_reader_particlefield.cc.
Referenced by blender::io::usd::USDParticleFieldReader::read_geometry().
| const StringRefNull blender::io::usd::materials_filename = "usd/usd_materials_export.blend" |
Definition at line 45 of file usd_export_test.cc.
Referenced by TEST_F().
| const StringRefNull blender::io::usd::output_filename = "output.usd" |
Definition at line 46 of file usd_export_test.cc.
Referenced by blender::DEG_debug_stats_gnuplot(), blender::io::usd::UsdExportTest::TearDown(), TEST_F(), and TEST_F().
| const StringRefNull blender::io::usd::simple_scene_filename = "usd/usd_simple_scene.blend" |
Definition at line 44 of file usd_export_test.cc.
Referenced by TEST_F().
|
extern |
|
constexpr |
Definition at line 38 of file usd_asset_utils.cc.
Referenced by copy_udim_asset_to_directory().
|
constexpr |
Definition at line 30 of file usd_asset_utils.cc.
Referenced by copy_udim_asset_to_directory(), is_udim_path(), and split_udim_pattern().
|
constexpr |
Definition at line 31 of file usd_asset_utils.cc.
Referenced by is_udim_path(), and split_udim_pattern().
|
constexpr |
Definition at line 37 of file usd_asset_utils.cc.
Referenced by copy_udim_asset_to_directory().