[Bf-blender-cvs] [cd5f9516db8] functions: Merge branch 'master' into functions

Jacques Lucke noreply at git.blender.org
Mon Mar 30 12:04:51 CEST 2020


Commit: cd5f9516db8e1a74b60038cf16be6a5a3b99b729
Author: Jacques Lucke
Date:   Mon Mar 30 12:04:42 2020 +0200
Branches: functions
https://developer.blender.org/rBcd5f9516db8e1a74b60038cf16be6a5a3b99b729

Merge branch 'master' into functions

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



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

diff --cc source/blender/editors/object/object_modifier.c
index a7936de78f9,0de2f114b94..90794104686
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@@ -2586,53 -2673,4 +2675,55 @@@ void OBJECT_OT_surfacedeform_bind(wmOpe
    edit_modifier_properties(ot);
  }
  
+ /** \} */
++
 +/************************ BParticles ***********************/
 +
 +static bool bparticles_clear_cache_poll(bContext *C)
 +{
 +  return edit_modifier_poll_generic(C, &RNA_BParticlesModifier, 0, true);
 +}
 +
 +static int bparticles_clear_cache_exec(bContext *C, wmOperator *op)
 +{
 +  Object *ob = ED_object_active_context(C);
 +  BParticlesModifierData *bpmd = (BParticlesModifierData *)edit_modifier_property_get(
 +      op, ob, eModifierType_BParticles);
 +
 +  if (bpmd == NULL) {
 +    return OPERATOR_CANCELLED;
 +  }
 +
 +  BParticles_modifier_free_cache(bpmd);
 +
 +  DEG_id_tag_update(&ob->id, ID_RECALC_ALL);
 +  WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
 +  return OPERATOR_FINISHED;
 +}
 +
 +static int bparticles_clear_cache_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
 +{
 +  if (edit_modifier_invoke_properties(C, op)) {
 +    return bparticles_clear_cache_exec(C, op);
 +  }
 +  else {
 +    return OPERATOR_CANCELLED;
 +  }
 +}
 +
 +void OBJECT_OT_bparticles_clear_cache(wmOperatorType *ot)
 +{
 +  /* identifiers */
 +  ot->name = "Clear BParticles Cache";
 +  ot->description = "Clear the cache for the modifier";
 +  ot->idname = "OBJECT_OT_bparticles_clear_cache";
 +
 +  /* api callbacks */
 +  ot->poll = bparticles_clear_cache_poll;
 +  ot->invoke = bparticles_clear_cache_invoke;
 +  ot->exec = bparticles_clear_cache_exec;
 +
 +  /* flags */
 +  ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 +  edit_modifier_properties(ot);
 +}
diff --cc source/blender/makesrna/intern/rna_modifier.c
index 28209ed437d,455fb1c50c9..8c4b6e3c76a
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@@ -288,11 -287,8 +289,10 @@@ const EnumPropertyItem rna_enum_object_
       ICON_MOD_PARTICLES,
       "Particle System",
       "Spawn particles from the shape"},
-     {eModifierType_Fluid, "FLUID", ICON_MOD_FLUIDSIM, "Fluid Simulation", ""},
      {eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
      {eModifierType_Surface, "SURFACE", ICON_MODIFIER, "Surface", ""},
 +    {eModifierType_BParticles, "BPARTICLES", ICON_NONE, "BParticles", ""},
 +    {eModifierType_BParticlesOutput, "BPARTICLES_OUTPUT", ICON_NONE, "BParticles Output", ""},
      {0, NULL, 0, NULL, NULL},
  };



More information about the Bf-blender-cvs mailing list