[Bf-blender-cvs] [142338991b5] hair_guides_grooming: Merge branch 'hair_guides' into hair_guides_grooming
Lukas Tönne
noreply at git.blender.org
Sun May 27 09:43:20 CEST 2018
Commit: 142338991b5f04b0f279f9a7c70830f33b86b6f9
Author: Lukas Tönne
Date: Sun May 27 08:43:08 2018 +0100
Branches: hair_guides_grooming
https://developer.blender.org/rB142338991b5f04b0f279f9a7c70830f33b86b6f9
Merge branch 'hair_guides' into hair_guides_grooming
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_view3d.py
index 097ba2f73e7,e3d8a66ae8c..47a409f85ec
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@@ -3165,33 -3178,7 +3195,29 @@@ class VIEW3D_MT_edit_lattice(Menu)
layout.operator("object.vertex_parent_set")
- layout.separator()
-
- layout.menu("VIEW3D_MT_edit_proportional")
-
+class VIEW3D_MT_edit_groom(Menu):
+ bl_label = "Groom"
+
+ def draw(self, context):
+ layout = self.layout
+
+ edit_object = context.edit_object
+ groom = edit_object.data
+
+ layout.menu("VIEW3D_MT_undo_redo")
+
+ layout.separator()
+
+ layout.menu("VIEW3D_MT_transform")
+ layout.menu("VIEW3D_MT_mirror")
+ layout.menu("VIEW3D_MT_snap")
+
+ layout.separator()
+
+ layout.operator("groom.region_add")
+
+
class VIEW3D_MT_edit_armature(Menu):
bl_label = "Armature"
diff --cc source/blender/blenkernel/intern/library_query.c
index 0cd1ce2b6c7,37b5b62b06e..e447cf8ef53
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@@ -1087,9 -1082,8 +1090,10 @@@ bool BKE_library_id_can_use_idtype(ID *
return (ELEM(id_type_used, ID_TE, ID_OB));
case ID_LP:
return ELEM(id_type_used, ID_IM);
+ case ID_GM:
+ return true;
case ID_WS:
+ return ELEM(id_type_used, ID_SCR, ID_SCE);
case ID_IM:
case ID_VF:
case ID_TXT:
diff --cc source/blender/blenloader/intern/writefile.c
index 6a4c23e4dac,ada31915a85..b4b729bb357
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@@ -3625,39 -3627,16 +3628,44 @@@ static void write_workspace(WriteData *
writestruct(wd, ID_WS, WorkSpace, 1, workspace);
writelist(wd, DATA, WorkSpaceLayout, layouts);
writelist(wd, DATA, WorkSpaceDataRelation, &workspace->hook_layout_relations);
- writelist(wd, DATA, WorkSpaceDataRelation, &workspace->scene_viewlayer_relations);
+ writelist(wd, DATA, WorkSpaceSceneRelation, &workspace->scene_layer_relations);
writelist(wd, DATA, wmOwnerID, &workspace->owner_ids);
writelist(wd, DATA, bToolRef, &workspace->tools);
+ for (bToolRef *tref = workspace->tools.first; tref; tref = tref->next) {
+ if (tref->properties) {
+ IDP_WriteProperty(tref->properties, wd);
+ }
+ }
}
+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);
+ writestruct(wd, DATA, GroomHairGuide, bundle->totguides, bundle->guides);
+ writedata(wd, DATA, sizeof(float) * bundle->totguides * bundle->numshapeverts, bundle->guide_shape_weights);
+ }
+
+ 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/draw/intern/draw_cache.h
index 7f6bfb5c7c3,5068a2f2732..0fbc7297a0d
--- a/source/blender/draw/intern/draw_cache.h
+++ b/source/blender/draw/intern/draw_cache.h
@@@ -169,17 -171,17 +172,22 @@@ struct Gwn_Batch *DRW_cache_lattice_ver
struct Gwn_Batch *DRW_cache_lattice_wire_get(struct Object *ob, bool use_weight);
struct Gwn_Batch *DRW_cache_lattice_vert_overlay_get(struct Object *ob);
+/* Groom */
+struct Gwn_Batch *DRW_cache_groom_verts_get(struct Object *ob);
+struct Gwn_Batch *DRW_cache_groom_wire_get(struct Object *ob);
+struct Gwn_Batch *DRW_cache_groom_vert_overlay_get(struct Object *ob, int mode);
+
/* Particles */
- struct Gwn_Batch *DRW_cache_particles_get_hair(struct Object *object, struct ParticleSystem *psys, struct ModifierData *md);
- struct Gwn_Batch *DRW_cache_particles_get_dots(struct Object *object, struct ParticleSystem *psys);
- struct Gwn_Batch *DRW_cache_particles_get_edit_strands(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
- struct Gwn_Batch *DRW_cache_particles_get_edit_inner_points(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
- struct Gwn_Batch *DRW_cache_particles_get_edit_tip_points(struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
+ struct Gwn_Batch *DRW_cache_particles_get_hair(
+ struct Object *object, struct ParticleSystem *psys, struct ModifierData *md);
+ struct Gwn_Batch *DRW_cache_particles_get_dots(
+ struct Object *object, struct ParticleSystem *psys);
+ struct Gwn_Batch *DRW_cache_particles_get_edit_strands(
+ struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
+ struct Gwn_Batch *DRW_cache_particles_get_edit_inner_points(
+ struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
+ struct Gwn_Batch *DRW_cache_particles_get_edit_tip_points(
+ struct Object *object, struct ParticleSystem *psys, struct PTCacheEdit *edit);
struct Gwn_Batch *DRW_cache_particles_get_prim(int type);
/* Hair */
diff --cc source/blender/editors/space_view3d/view3d_iterators.c
index 99c67172dc5,145f57174fd..5161a50b417
--- a/source/blender/editors/space_view3d/view3d_iterators.c
+++ b/source/blender/editors/space_view3d/view3d_iterators.c
@@@ -35,17 -34,17 +35,19 @@@
#include "BLI_utildefines.h"
#include "BLI_rect.h"
+#include "BLI_math.h"
+ #include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_curve.h"
#include "BKE_DerivedMesh.h"
#include "BKE_displist.h"
#include "BKE_editmesh.h"
#include "BKE_context.h"
+#include "BKE_groom.h"
#include "DEG_depsgraph.h"
+ #include "DEG_depsgraph_query.h"
#include "bmesh.h"
More information about the Bf-blender-cvs
mailing list