[Bf-committers] Attempt on duplicating modifier

Edgard Damiani edamiani at gmail.com
Fri Oct 28 03:22:30 CEST 2016


Hi Aaron,

Thanks a lot for the info, now I can see the modifier displayed in the
Modifiers list, but still when I add the SKIN2 function inside
properties_data_modifier.py, the UI breaks down.

I implemented the mydeform example to understand what I might be doing
wrong -- the code compiles without issue and the modifier is shown in the
list, but when I add the MY_DEFORM function the UI stops working as well.

Any thoughts on it?


Best regards,
Edgard

On Wed, Oct 26, 2016 at 9:49 PM, Aaron Carlisle <carlisle.b3d at gmail.com>
wrote:

> Hi Edgard,
>
> You may want to look at
> https://github.com/ideasman42/blender_patch_templates/tree/master/patches
>
> Hope this helps,
>
> Aaron Carlisle
>
> On Wed, Oct 26, 2016 at 4:34 PM, Edgard Damiani <edamiani at gmail.com>
> wrote:
>
> > Hi everyone,
> >
> > It's in my plans using Blender as a prototyping platform for my master's
> > thesis, so I decided to start my tests by duplicating an existing
> modifier
> > and changing its code. I've chosen the Skin Modifier, since it's the
> > closest I could find to what I have in mind, and took these steps to
> > duplicate it:
> >
> > - Duplicated the MOD_skin.c file and renamed it to MOD_skin2.c;
> > - Inside MOD_skin2.c, I renamed modifierType_Skin to modifierType_Skin2,
> > and changed its first parameter accordingly ("Skin2");
> > - Added "eModifierType_Skin2 = 53" to the end of ModifierType in
> > DNA_modifier_types.h (53 being the first vacant number);
> > - Declared modifierType_Skin2 inside MOD_modifiertypes.h;
> > - Added INIT_TYPE(Skin2) inside MOD_util.c;
> >
> > With these steps, the code compiles without issues, but when I run
> Blender,
> > the recently-created modifier doesn't appear in the Modifiers list.
> Then, I
> > realized that I should somehow add it to the UI through Python, but the
> > only file I've found that had a connection with the modifiers was
> > properties_data_modifier.py, which lists the user interface code for each
> > modifier. I tried to create a SKIN2 function inside this file by
> > duplicating the SKIN function, but the whole Python interface breaks down
> > when I do it.
> >
> > Is there anything else I should do in order to correctly show this Skin2
> > modifier inside Blender's Modifiers list?
> >
> >
> > Thanks and best regards,
> > Edgard
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > https://lists.blender.org/mailman/listinfo/bf-committers
> >
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> https://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list