[Bf-blender-cvs] [6fc3b39] alembic_basic_io: Remove Alembic properties from ID-blocks, as well as the associated routines.

Kévin Dietrich noreply at git.blender.org
Tue Mar 29 06:30:05 CEST 2016


Commit: 6fc3b39f527e98c38100c89aa09d516c26f0f376
Author: Kévin Dietrich
Date:   Tue Mar 29 04:46:58 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB6fc3b39f527e98c38100c89aa09d516c26f0f376

Remove Alembic properties from ID-blocks, as well as the associated
routines.

===================================================================

M	release/scripts/startup/bl_ui/properties_data_camera.py
M	release/scripts/startup/bl_ui/properties_object.py
M	source/blender/alembic/intern/alembic_capi.cc
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/blenkernel/intern/object.c
M	source/blender/makesdna/DNA_camera_types.h
M	source/blender/makesdna/DNA_object_types.h
M	source/blender/makesrna/intern/rna_camera.c
M	source/blender/makesrna/intern/rna_object.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index 456fc40..58a4820 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -283,20 +283,6 @@ class DATA_PT_camera_safe_areas(CameraButtonsPanel, Panel):
 
         draw_display_safe_settings(layout, safe_data, camera)
 
-class DATA_PT_camera_alembic_stuffs(CameraButtonsPanel, Panel):
-    bl_label = "Alembic stuffs"
-    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-        
-    def draw(self, context):
-        layout = self.layout
-
-        cam = context.camera
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(cam, "abc_filename", text="File")
-        col.prop(cam, "abc_subobject", text="SubObject")
 
 class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 5cb2200..3ff7a24 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -67,11 +67,6 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
         row.column().prop(ob, "scale")
 
         layout.prop(ob, "rotation_mode")
-        if bpy.app.build_options.alembic:
-            row = layout.row()
-            layout.prop(ob, "abc_file", text="Alembic file")
-            layout.prop(ob, "abc_subobject", text="Alembic subobject")
-            layout.prop(ob, "use_abc_xform", text="Use Alembic tranforms")
 
 
 class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
diff --git a/source/blender/alembic/intern/alembic_capi.cc b/source/blender/alembic/intern/alembic_capi.cc
index a123217..9c1731b 100644
--- a/source/blender/alembic/intern/alembic_capi.cc
+++ b/source/blender/alembic/intern/alembic_capi.cc
@@ -1268,31 +1268,31 @@ static void getProperties(Object *bobj, IXformSchema object, ICompoundProperty c
 	}
 }
 
-void ABC_set_custom_properties(Object *bobj)
+void ABC_set_custom_properties(Object */*bobj*/)
 {
-	bool found;
+//	bool found;
 
-	const char *filename 		= bobj->abc_file;
-	const char *abc_subobject 	= bobj->abc_subobject;
+//	const char *filename 		= bobj->abc_file;
+//	const char *abc_subobject 	= bobj->abc_subobject;
 
-	IDProperty *idgroup= IDP_GetProperties(&bobj->id, true);
-	if (!idgroup) {
-		std::cerr << "No idgroup to add" << std::endl;
-		return;
-	}
+//	IDProperty *idgroup= IDP_GetProperties(&bobj->id, true);
+//	if (!idgroup) {
+//		std::cerr << "No idgroup to add" << std::endl;
+//		return;
+//	}
 
-	IXformSchema object = abc_manager->getXFormSchema(filename, abc_subobject, found);
+//	IXformSchema object = abc_manager->getXFormSchema(filename, abc_subobject, found);
 
-	if (!found || !object.valid())
-		return;
+//	if (!found || !object.valid())
+//		return;
 
-	ICompoundProperty customProps = object.getUserProperties();
-	if (customProps.valid())
-		getProperties(bobj, object, customProps, idgroup);
+//	ICompoundProperty customProps = object.getUserProperties();
+//	if (customProps.valid())
+//		getProperties(bobj, object, customProps, idgroup);
 
-	customProps = object.getArbGeomParams();
-	if (customProps.valid())
-		getProperties(bobj, object, customProps, idgroup);
+//	customProps = object.getArbGeomParams();
+//	if (customProps.valid())
+//		getProperties(bobj, object, customProps, idgroup);
 
 }
 
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 0c70b4c..808d33c 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -2189,18 +2189,6 @@ static void dag_object_time_update_flags(Main *bmain, Scene *scene, Object *ob)
 		ob->recalc |= OB_RECALC_OB;
 		ob->adt->recalc |= ADT_RECALC_ANIM;
 	}
-		
-#ifdef WITH_ALEMBIC
-	if (ob->abc_file[0] != '\0') {
-		ob->recalc |= OB_RECALC_OB;
-	}
-	if (ob->type == OB_CAMERA){
-		Camera* bcam = ob->data;
-		float time = BKE_scene_frame_get(scene) / (float)scene->r.frs_sec;
-		if (bcam->abc_filename[0] != '\0' && bcam->abc_subobject[0] != '\0')
-		ABC_set_camera(bcam->abc_filename, bcam->abc_subobject, time, bcam);
-	}
-#endif
 
 	if ((ob->adt) && (ob->type == OB_ARMATURE)) ob->recalc |= OB_RECALC_DATA;
 	
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 2b2d179..1831ea7 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3103,56 +3103,6 @@ bool BKE_object_parent_loop_check(const Object *par, const Object *ob)
 	return BKE_object_parent_loop_check(par->parent, ob);
 }
 
-// recompute transform matrix of object in new coordinate system (from Y-Up to Z-Up)
-static void createTransformMatrix(Object *obj)
-{
-    float rot_mat[3][3], rot[3][3], scale_mat[4][4], invmat[4][4], transform_mat[4][4];
-    float rot_x_mat[3][3], rot_y_mat[3][3], rot_z_mat[3][3];
-    float loc[3], scale[3], euler[3];
-
-    zero_v3(loc);
-    zero_v3(scale);
-    zero_v3(euler);
-    unit_m3(rot);
-    unit_m3(rot_mat);
-    unit_m4(scale_mat);
-    unit_m4(transform_mat);
-    unit_m4(invmat);
-
-    // compute rotation matrix
-    // extract location, rotation, and scale from matrix
-    mat4_to_loc_rot_size(loc, rot, scale, obj->obmat);
-
-    // get euler angles from rotation matrix
-    mat3_to_eulO(euler, ROT_MODE_XYZ, rot);
-
-    // create X, Y, Z rotation matrices from euler angles
-    rotate_m3_yup_zup(rot_x_mat, rot_y_mat, rot_z_mat, euler);
-
-    // concatenate rotation matrices
-    mul_m3_m3m3(rot_mat, rot_mat, rot_y_mat);
-    mul_m3_m3m3(rot_mat, rot_mat, rot_z_mat);
-    mul_m3_m3m3(rot_mat, rot_mat, rot_x_mat);
-
-    // add rotation matrix to transformation matrix
-    copy_m4_m3(transform_mat, rot_mat);
-
-    // add translation to transformation matrix
-    transform_mat[3][0] = loc[0];
-    transform_mat[3][1] = -loc[2];
-    transform_mat[3][2] = loc[1];
-
-    // create scale matrix
-    scale_mat[0][0] = scale[0];
-    scale_mat[1][1] = scale[2];
-    scale_mat[2][2] = scale[1];
-
-    // add scale to transformation matrix
-    mul_m4_m4m4(transform_mat, transform_mat, scale_mat);
-
-    copy_m4_m4(obj->obmat, transform_mat);
-}
-
 /* proxy rule: lib_object->proxy_from == the one we borrow from, only set temporal and cleared here */
 /*           local_object->proxy      == pointer to library object, saved in files and read */
 
@@ -3167,34 +3117,6 @@ void BKE_object_handle_update_ex(EvaluationContext *eval_ctx,
                                  const bool do_proxy_update)
 {
 	if (ob->recalc & OB_RECALC_ALL) {
-		bool abc_xform = false;
-#ifdef  WITH_ALEMBIC
-		float rot[3][3], cam_to_yup[4][4];
-
-		if (((ob->abc_flag & 1) == 1) && ob->abc_file[0] != '\0' && ob->abc_subobject[0] != '\0'){
-			float time = BKE_scene_frame_get(scene) / (float)scene->r.frs_sec;
-			ABC_mutex_lock();
-			ABC_get_transform(ob->abc_file, ob->abc_subobject, time, ob->obmat, ob->parent == NULL);
-			ABC_mutex_unlock();
-
-            if (ob->type == OB_CAMERA){
-				unit_m4(cam_to_yup);
-                rotate_m4(cam_to_yup, 'X', M_PI_2);
-				mul_m4_m4m4(ob->obmat, ob->obmat, cam_to_yup);
-            }
-
-            createTransformMatrix(ob);
-
-			mat4_to_loc_rot_size(ob->loc, rot, ob->size, ob->obmat);
-			BKE_object_mat3_to_rot(ob, rot, false);
-			if (ob->parent){
-				mul_m4_m4m4(ob->obmat, ob->parent->obmat, ob->obmat);
-			}
-
-			invert_m4_m4(ob->imat, ob->obmat);
-			abc_xform = true;
-		}
-#endif
 		/* speed optimization for animation lookups */
 		if (ob->pose) {
 			BKE_pose_channels_hash_make(ob->pose);
@@ -3237,7 +3159,7 @@ void BKE_object_handle_update_ex(EvaluationContext *eval_ctx,
 				else
 					copy_m4_m4(ob->obmat, ob->proxy_from->obmat);
 			}
-			else if (!abc_xform)
+			else
 				BKE_object_where_is_calc_ex(scene, rbw, ob, NULL);
 		}
 		
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h
index a89e681..7f2e1aa 100644
--- a/source/blender/makesdna/DNA_camera_types.h
+++ b/source/blender/makesdna/DNA_camera_types.h
@@ -83,7 +83,6 @@ typedef struct Camera {
 
 	 /* Stereo settings */
 	 struct CameraStereoSettings stereo;
-	 char   abc_filename[1024], abc_subobject[1024];
 } Camera;
 
 /* **************** CAMERA ********************* */
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index af7e1f2..d53c836 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -299,11 +299,6 @@ typedef struct Object {
 	LodLevel *currentlod;
 
 	struct PreviewImage *preview;
-
-	char abc_file[1024];
-	char abc_subobject[1024];
-	char abc_flag;
-	char padding[7];
 } Object;
 
 /* Warning, this is not used anymore because hooks are now modifiers */
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 42ab9bf..d5044ec 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -368,14 +368,6 @@ void RNA_def_camera(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "GPU Depth Of Field", "");
 	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
 
-#ifdef WITH_ALEMBIC
-	prop = RNA_def_property(srna, "abc_filename", PROP_STRING, PROP_FILEPATH);
-	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
-
-	prop = RNA_def_property(srna, "abc_subobject", PROP_STRING, PROP_NONE);
-	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
-#endif
-
 	rna_def_animdata_common(srna);
 
 	/* Nested Data  */
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 907a7b5..7274940 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1578,26 +1578,6 @@ static void rna_Object_set_alembic_props(
 	UNUSED_VARS(reports);
 }
 
-static void rna_Object_apply_abc(Object *bob, ReportList *reports)
-{
-	float abc_mat[4][4];
-	float rot[3][3];
-	ABC_get

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list