[Bf-blender-cvs] [64f109026b7] hair_guides: Merge branch 'blender2.8' into hair_guides

Lukas Tönne noreply at git.blender.org
Mon May 21 10:39:32 CEST 2018


Commit: 64f109026b77c45b825632a7e3d9a3c36ca97084
Author: Lukas Tönne
Date:   Mon May 21 09:39:27 2018 +0100
Branches: hair_guides
https://developer.blender.org/rB64f109026b77c45b825632a7e3d9a3c36ca97084

Merge branch 'blender2.8' into hair_guides

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



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

diff --cc source/blender/blenkernel/BKE_particle.h
index abbdeee2749,b6a87ae333e..db10fa87465
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@@ -423,9 -427,8 +427,9 @@@ void psys_get_texture(struct ParticleSi
  void psys_interpolate_face(struct MVert *mvert, struct MFace *mface, struct MTFace *tface,
                             float (*orcodata)[3], float w[4], float vec[3], float nor[3], float utan[3], float vtan[3],
                             float orco[3]);
- float psys_particle_value_from_verts(struct DerivedMesh *dm, short from, struct ParticleData *pa, float *values);
+ float psys_particle_value_from_verts(struct Mesh *mesh, short from, struct ParticleData *pa, float *values);
  void psys_get_from_key(struct ParticleKey *key, float loc[3], float vel[3], float rot[4], float *time);
 +int psys_get_index_on_dm(struct ParticleSystem *psys, struct DerivedMesh *dm, ParticleData *pa, int *mapindex, float mapfw[4]);
  
  /* BLI_bvhtree_ray_cast callback */
  void BKE_psys_collision_neartest_cb(void *userdata, int index, const struct BVHTreeRay *ray, struct BVHTreeRayHit *hit);
diff --cc source/blender/blenkernel/CMakeLists.txt
index 257aec55bf3,867b5884114..e6386d573ae
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@@ -114,10 -114,6 +114,9 @@@ set(SR
  	intern/font.c
  	intern/freestyle.c
  	intern/gpencil.c
 +	intern/groom.c
- 	intern/group.c
 +	intern/hair.c
 +	intern/hair_draw.c
  	intern/icons.c
  	intern/icons_rasterize.c
  	intern/idcode.c
@@@ -257,9 -252,6 +256,8 @@@
  	BKE_freestyle.h
  	BKE_global.h
  	BKE_gpencil.h
 +	BKE_groom.h
- 	BKE_group.h
 +	BKE_hair.h
  	BKE_icons.h
  	BKE_idcode.h
  	BKE_idprop.h
diff --cc source/blender/blenkernel/intern/idcode.c
index 2c1684557d4,4860f5a896d..005702f3ed3
--- a/source/blender/blenkernel/intern/idcode.c
+++ b/source/blender/blenkernel/intern/idcode.c
@@@ -61,10 -61,9 +61,10 @@@ static IDType idtypes[] = 
  	{ ID_BR,   "Brush",              "brushes",         BLT_I18NCONTEXT_ID_BRUSH,              IDTYPE_FLAGS_ISLINKABLE },
  	{ ID_CA,   "Camera",             "cameras",         BLT_I18NCONTEXT_ID_CAMERA,             IDTYPE_FLAGS_ISLINKABLE },
  	{ ID_CF,   "CacheFile",          "cache_files",     BLT_I18NCONTEXT_ID_CACHEFILE,          IDTYPE_FLAGS_ISLINKABLE },
+ 	{ ID_GR,   "Collection",         "collections",     BLT_I18NCONTEXT_ID_COLLECTION,         IDTYPE_FLAGS_ISLINKABLE },
  	{ ID_CU,   "Curve",              "curves",          BLT_I18NCONTEXT_ID_CURVE,              IDTYPE_FLAGS_ISLINKABLE },
  	{ ID_GD,   "GPencil",            "grease_pencil",   BLT_I18NCONTEXT_ID_GPENCIL,            IDTYPE_FLAGS_ISLINKABLE }, /* rename gpencil */
 +	{ ID_GM,   "Groom",              "grooms",          BLT_I18NCONTEXT_ID_GROOM,              IDTYPE_FLAGS_ISLINKABLE },
- 	{ ID_GR,   "Group",              "groups",          BLT_I18NCONTEXT_ID_GROUP,              IDTYPE_FLAGS_ISLINKABLE },
  	{ ID_IM,   "Image",              "images",          BLT_I18NCONTEXT_ID_IMAGE,              IDTYPE_FLAGS_ISLINKABLE },
  	{ ID_IP,   "Ipo",                "ipos",            "",                                    IDTYPE_FLAGS_ISLINKABLE }, /* deprecated */
  	{ ID_KE,   "Key",                "shape_keys",      BLT_I18NCONTEXT_ID_SHAPEKEY,           0                       },
diff --cc source/blender/blenkernel/intern/library.c
index 97803354c12,3926d2055f0..0b4ba2a386e
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@@ -96,9 -96,7 +97,8 @@@
  #include "BKE_curve.h"
  #include "BKE_font.h"
  #include "BKE_global.h"
- #include "BKE_group.h"
  #include "BKE_gpencil.h"
 +#include "BKE_groom.h"
  #include "BKE_idcode.h"
  #include "BKE_idprop.h"
  #include "BKE_image.h"
diff --cc source/blender/blenkernel/intern/library_remap.c
index 3ed015a1811,cf2a001daaa..7843a028aea
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@@ -78,9 -77,7 +78,8 @@@
  #include "BKE_curve.h"
  #include "BKE_fcurve.h"
  #include "BKE_font.h"
- #include "BKE_group.h"
  #include "BKE_gpencil.h"
 +#include "BKE_groom.h"
  #include "BKE_idprop.h"
  #include "BKE_image.h"
  #include "BKE_ipo.h"
diff --cc source/blender/blenkernel/intern/particle.c
index c8e96285923,26c822f5fef..db8fbe3ba18
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@@ -1412,13 -1458,8 +1458,13 @@@ static int psys_map_index_on_dm(Mesh *m
  	return 1;
  }
  
 +int psys_get_index_on_dm(ParticleSystem *psys, DerivedMesh *dm, ParticleData *pa, int *mapindex, float mapfw[4])
 +{
 +	return psys_map_index_on_dm(dm, psys->part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset, mapindex, mapfw);
 +}
 +
  /* interprets particle data to get a point on a mesh in object space */
- void psys_particle_on_dm(DerivedMesh *dm_final, int from, int index, int index_dmcache,
+ void psys_particle_on_dm(Mesh *mesh_final, int from, int index, int index_dmcache,
                           const float fw[4], float foffset, float vec[3], float nor[3], float utan[3], float vtan[3],
                           float orco[3])
  {
diff --cc source/blender/blenloader/intern/readfile.c
index 140e66a4572,35b699f29b8..aab14a07241
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -9286,23 -9274,21 +9353,26 @@@ static void expand_particlesettings(Fil
  	}
  }
  
 +static void expand_groom(FileData *fd, Main *mainvar, Groom *groom)
 +{
 +	expand_doit(fd, mainvar, groom->scalp_object);
 +}
 +
- static void expand_group(FileData *fd, Main *mainvar, Group *group)
+ static void expand_collection(FileData *fd, Main *mainvar, Collection *collection)
  {
- 	GroupObject *go;
- 	
- 	for (go = group->gobject.first; go; go = go->next) {
- 		expand_doit(fd, mainvar, go->ob);
+ 	for (CollectionObject *cob = collection->gobject.first; cob; cob = cob->next) {
+ 		expand_doit(fd, mainvar, cob->ob);
  	}
  
- 	if (group->collection != NULL) {
- 		expand_scene_collection(fd, mainvar, group->collection);
+ 	for (CollectionChild *child = collection->children.first; child; child = child->next) {
+ 		expand_doit(fd, mainvar, child->collection);
  	}
  
+ #ifdef USE_COLLECTION_COMPAT_28
+ 	if (collection->collection != NULL) {
+ 		expand_scene_collection(fd, mainvar, collection->collection);
+ 	}
+ #endif
  }
  
  static void expand_key(FileData *fd, Main *mainvar, Key *key)
@@@ -9916,11 -9912,8 +9996,11 @@@ void BLO_expand_main(void *fdhandle, Ma
  					case ID_AC:
  						expand_action(fd, mainvar, (bAction *)id); // XXX deprecated - old animation system
  						break;
 +					case ID_GM:
 +						expand_groom(fd, mainvar, (Groom *)id);
 +						break;
  					case ID_GR:
- 						expand_group(fd, mainvar, (Group *)id);
+ 						expand_collection(fd, mainvar, (Collection *)id);
  						break;
  					case ID_NT:
  						expand_nodetree(fd, mainvar, (bNodeTree *)id);
diff --cc source/blender/blenloader/intern/writefile.c
index d61f9996408,8ea1205be38..2732b5996cb
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@@ -3629,34 -3601,9 +3627,35 @@@ static void write_workspace(WriteData *
  	writelist(wd, DATA, WorkSpaceDataRelation, &workspace->hook_layout_relations);
  	writelist(wd, DATA, WorkSpaceDataRelation, &workspace->scene_viewlayer_relations);
  	writelist(wd, DATA, wmOwnerID, &workspace->owner_ids);
+ 	writelist(wd, DATA, bToolRef, &workspace->tools);
  }
  
 +static void write_groom(WriteData *wd, Groom *groom)
 +{
 +	writestruct(wd, ID_GM, Groom, 1, groom);
 +	write_iddata(wd, &groom->id);
 +	if (groom->adt) {
 +		write_animdata(wd, groom->adt);
 +	}
 +
 +	writelist(wd, DATA, GroomBundle, &groom->bundles);
 +	for (GroomBundle *bundle = groom->bundles.first; bundle; bundle = bundle->next)
 +	{
 +		writestruct(wd, DATA, GroomSection, bundle->totsections, bundle->sections);
 +		writestruct(wd, DATA, GroomSectionVertex, bundle->totverts, bundle->verts);
 +		writestruct(wd, DATA, MeshSample, bundle->numshapeverts + 1, bundle->scalp_region);
 +	}
 +	
 +	if (groom->hair_system) {
 +		writestruct(wd, DATA, HairSystem, 1, groom->hair_system);
 +		write_hair(wd, groom->hair_system);
 +	}
 +	if (groom->hair_draw_settings)
 +	{
 +		writestruct(wd, DATA, HairDrawSettings, 1, groom->hair_draw_settings);
 +	}
 +}
 +
  /* Keep it last of write_foodata functions. */
  static void write_libraries(WriteData *wd, Main *main)
  {
diff --cc source/blender/blentranslation/BLT_translation.h
index 870375936aa,ba4ae964842..cdd33309489
--- a/source/blender/blentranslation/BLT_translation.h
+++ b/source/blender/blentranslation/BLT_translation.h
@@@ -179,8 -179,6 +180,7 @@@ typedef struct 
  	BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_CURVE, "id_curve"),                                                       \
  	BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_FREESTYLELINESTYLE, "id_fs_linestyle"),                                   \
  	BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_GPENCIL, "id_gpencil"),                                                   \
 +	BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_GROOM, "id_groom"),                                                       \
- 	BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_GROUP, "id_group"),                                                       \
  	BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_ID, "id_id"),                                                             \
  	BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IMAGE, "id_image"),                                                       \
  	/*BLT_I18NCONTEXTS_ITEM(BLT_I18NCONTEXT_ID_IPO, "id_ipo"),*/                                                       \
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 8dbef4e44ab,98881ba3e57..70584151df1
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -77,8 -77,6 +78,7 @@@ extern "C" 
  #include "BKE_effect.h"
  #include "BKE_fcurve.h"
  #include "BKE_idcode.h"
 +#include "BKE_groom.h"
- #include "BKE_group.h"
  #include "BKE_key.h"
  #include "BKE_lattice.h"
  #include "BKE_libra

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list