[Bf-blender-cvs] [0c1d2010269] usd-importer-T81257-merge: USD Import: code cleanup.
makowalski
noreply at git.blender.org
Wed Apr 14 21:23:00 CEST 2021
Commit: 0c1d2010269c59434ff85c6afb7bf1d7ba318de1
Author: makowalski
Date: Wed Apr 14 12:08:09 2021 -0400
Branches: usd-importer-T81257-merge
https://developer.blender.org/rB0c1d2010269c59434ff85c6afb7bf1d7ba318de1
USD Import: code cleanup.
Removed commented out code and code for unsupported
sequence and mesh validation options. Per review for
differential D10700.
===================================================================
M source/blender/editors/io/io_usd.c
===================================================================
diff --git a/source/blender/editors/io/io_usd.c b/source/blender/editors/io/io_usd.c
index e4945ca2983..fbc9137289a 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -280,12 +280,11 @@ static int wm_usd_import_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "filepath", filename);
const float scale = RNA_float_get(op->ptr, "scale");
- const bool is_sequence = RNA_boolean_get(op->ptr, "is_sequence");
+
const bool set_frame_range = RNA_boolean_get(op->ptr, "set_frame_range");
const bool validate_meshes = RNA_boolean_get(op->ptr, "validate_meshes");
const bool as_background_job = RNA_boolean_get(op->ptr, "as_background_job");
const char global_read_flag = RNA_enum_get(op->ptr, "global_read_flag");
-
const bool import_cameras = RNA_boolean_get(op->ptr, "import_cameras");
const bool import_curves = RNA_boolean_get(op->ptr, "import_curves");
const bool import_lights = RNA_boolean_get(op->ptr, "import_lights");
@@ -317,18 +316,11 @@ static int wm_usd_import_exec(bContext *C, wmOperator *op)
const float light_intensity_scale = RNA_float_get(op->ptr, "light_intensity_scale");
+ /* TODO(makowalski): Add support for sequences. */
+ const bool is_sequence = false;
int offset = 0;
int sequence_len = 1;
- if (is_sequence) {
- // @TODO: Not Implemented
- /*sequence_len = get_sequence_len(filename, &offset);
- if (sequence_len < 0) {
- BKE_report(op->reports, RPT_ERROR, "Unable to determine ABC sequence length");
- return OPERATOR_CANCELLED;
- }*/
- }
-
/* Switch out of edit mode to avoid being stuck in it (T54326). */
Object *obedit = CTX_data_edit_object(C);
if (obedit) {
@@ -399,13 +391,6 @@ static void wm_usd_import_draw(bContext *UNUSED(C), wmOperator *op)
row = uiLayoutRow(box, false);
uiItemR(row, ptr, "set_frame_range", 0, NULL, ICON_NONE);
- // TODO: Not supported
- // row = uiLayoutRow(box, false);
- // uiItemR(row, ptr, "is_sequence", 0, NULL, ICON_NONE);
-
- // row = uiLayoutRow(box, false);
- // uiItemR(row, ptr, "validate_meshes", 0, NULL, ICON_NONE);
-
row = uiLayoutRow(box, false);
uiItemR(row, ptr, "import_subdiv", 0, NULL, ICON_NONE);
@@ -492,18 +477,6 @@ void WM_OT_usd_import(struct wmOperatorType *ot)
"Set Frame Range",
"If checked, update scene's start and end frame to match those of the USD archive");
- RNA_def_boolean(ot->srna,
- "validate_meshes",
- 0,
- "Validate Meshes",
- "Check imported mesh objects for invalid data (slow)");
-
- RNA_def_boolean(ot->srna,
- "is_sequence",
- false,
- "Is Sequence",
- "Only set to true if the cache is split into separate files. (UNSUPPORTED)");
-
RNA_def_boolean(
ot->srna,
"as_background_job",
More information about the Bf-blender-cvs
mailing list