[Bf-blender-cvs] [124bc03] object_nodes: Merge branch 'master' into object_nodes

Lukas Tönne noreply at git.blender.org
Tue Nov 24 09:45:05 CET 2015


Commit: 124bc030351e15a97d03a6848c56cdbb7bd6b1c0
Author: Lukas Tönne
Date:   Tue Nov 24 09:30:07 2015 +0100
Branches: object_nodes
https://developer.blender.org/rB124bc030351e15a97d03a6848c56cdbb7bd6b1c0

Merge branch 'master' into object_nodes

Conflicts:
	source/blender/blenkernel/intern/softbody.c

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



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

diff --cc source/blender/blenkernel/intern/softbody.c
index de376cb,86ffb54..c85912f
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@@ -2579,77 -2473,7 +2473,7 @@@ static void softbody_calc_forces(Scene 
  
  		/* finally add forces caused by face collision */
  		if (ob->softflag & OB_SB_FACECOLL) scan_for_ext_face_forces(ob, timenow);
- 
- 		/* finish matrix and solve */
- #if (0) // remove onl linking for now .. still i am not sure .. the jacobian can be useful .. so keep that BM
- 		if (nl_flags & NLF_SOLVE) {
- 			//double sct, sst=PIL_check_seconds_timer();
- 			for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- 				int iv =3*(sb->totpoint-a);
- 				int ip =3*(2*sb->totpoint-a);
- 				int n;
- 				for (n=0;n<3;n++) {nlRightHandSideSet(0, iv+n, bp->force[0+n]);}
- 				for (n=0;n<3;n++) {nlRightHandSideSet(0, ip+n, bp->vec[0+n]);}
- 			}
- 			nlEnd(NL_MATRIX);
- 			nlEnd(NL_SYSTEM);
- 
- 			if ((G.debug_value == 32) && (nl_flags & NLF_BUILD)) {
- 				printf("####MEE#####\n");
- 				nlPrintMatrix();
- 			}
- 
- 			success= nlSolveAdvanced(NULL, 1);
- 
- 			// nlPrintMatrix(); /* for debug purpose .. anyhow cropping B vector looks like working */
- 			if (success) {
- 				float f;
- 				int index =0;
- 				/* for debug purpose .. anyhow cropping B vector looks like working */
- 				if (G.debug_value ==32)
- 					for (a=2*sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- 						f=nlGetVariable(0, index);
- 						printf("(%f ", f);index++;
- 						f=nlGetVariable(0, index);
- 						printf("%f ", f);index++;
- 						f=nlGetVariable(0, index);
- 						printf("%f)", f);index++;
- 					}
- 
- 					index =0;
- 					for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- 						f=nlGetVariable(0, index);
- 						bp->impdv[0] = f; index++;
- 						f=nlGetVariable(0, index);
- 						bp->impdv[1] = f; index++;
- 						f=nlGetVariable(0, index);
- 						bp->impdv[2] = f; index++;
- 					}
- 					/*
- 					for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- 					f=nlGetVariable(0, index);
- 					bp->impdx[0] = f; index++;
- 					f=nlGetVariable(0, index);
- 					bp->impdx[1] = f; index++;
- 					f=nlGetVariable(0, index);
- 					bp->impdx[2] = f; index++;
- 					}
- 					*/
- 			}
- 			else {
- 				printf("Matrix inversion failed\n");
- 				for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) {
- 					copy_v3_v3(bp->impdv, bp->force);
- 				}
- 
- 			}
- 
- 			//sct=PIL_check_seconds_timer();
- 			//if (sct-sst > 0.01f) printf(" implicit solver time %f %s \r", sct-sst, ob->id.name);
- 		}
- 		/* cleanup */
- #endif
 -		pdEndEffectors(&do_effector);
 +		pdEndEffectors(do_effector);
  	}
  }
  
diff --cc source/blender/makesrna/intern/rna_nodetree.c
index 6edd3cf,2d412bf..c0ea700
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@@ -6743,43 -6689,6 +6743,43 @@@ static void rna_def_texture_node(Blende
  	RNA_def_struct_register_funcs(srna, "rna_TextureNode_register", "rna_Node_unregister", NULL);
  }
  
 +static void rna_def_object_node(BlenderRNA *brna)
 +{
 +	StructRNA *srna;
 +	PropertyRNA *prop;
 +	FunctionRNA *func;
 +	PropertyRNA *parm;
 +	
 +	srna = RNA_def_struct(brna, "ObjectNode", "NodeInternal");
 +	RNA_def_struct_ui_text(srna, "Object Node", "Object component node");
 +	RNA_def_struct_sdna(srna, "bNode");
 +	RNA_def_struct_register_funcs(srna, "rna_ObjectNode_register", "rna_Node_unregister", NULL);
 +
 +	prop = RNA_def_property(srna, "bl_id_property_type", PROP_ENUM, PROP_NONE);
 +	RNA_def_property_enum_sdna(prop, NULL, "typeinfo->id_property_type");
- 	RNA_def_property_enum_items(prop, id_type_items);
++	RNA_def_property_enum_items(prop, rna_enum_id_type_items);
 +	RNA_def_property_enum_default(prop, ID_OB);
 +	RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL);
 +	RNA_def_property_ui_text(prop, "ID Property Type", "Type of ID-block that is used as the id property");
 +
 +	/* poll */
 +	func = RNA_def_function(srna, "bl_id_property_poll", NULL);
 +	RNA_def_function_ui_description(func, "If non-null output is returned, the id pointer can be used in the node");
 +	RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_REGISTER_OPTIONAL);
 +	RNA_def_function_return(func, RNA_def_boolean(func, "result", false, "", ""));
 +	parm = RNA_def_pointer(func, "id", "ID", "ID", "");
 +	RNA_def_property_flag(parm, PROP_REQUIRED);
 +
 +	/* ID */
 +	prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
 +	RNA_def_property_struct_type(prop, "ID");
 +	RNA_def_property_flag(prop, PROP_EDITABLE);
 +	RNA_def_property_editable_func(prop, "rna_ObjectNode_id_editable");
 +	RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_ObjectNode_id_typef", "rna_ObjectNode_id_poll");
 +	RNA_def_property_ui_text(prop, "ID", "");
 +	RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
 +}
 +
  /* -------------------------------------------------------------------------- */
  
  static void rna_def_node_socket(BlenderRNA *brna)




More information about the Bf-blender-cvs mailing list