@Swarnadeep Mandal (doublegamer26) Very good, that's great. (Forewarning--I am also a new developer. This was the first task I submitted a revision for, and I have not been too active since then. Also note that I never received feedback on what I submitted. So again, my guess is little better than yours.) Here are my suggested steps, depending where you are starting from:
- Make sure you can build Blender from source. (https://wiki.blender.org/index.php/Dev:Doc/Building_Blender). Also make sure you can efficiently search through the massive code base for names of functions that are not explained well in Blender's documentation.
- To test your code as you write, I would recommend making a simpler scene, such as a sphere-surface and a stick-person. However, for you to replicate my video, I'll attach the blend file I made for it.This blend file includes a configuration for the Align-to-Normal settings in the Shrinkwrap constraint, though of course that setting will not even appear in your Blender until you change Blender's code and rebuild.
- Look up the files that are modified in my revision, and make the corresponding modifications. The constraint.c file contains the workings of the constraint algorithms. The "DNA" and "RNA" have to do with defining Blender's data model and serialization. The .py script in bl_ui creates the settings in the UI panel. (I realize my inline comments are a bit cryptic. Let me know if sending a copy of my geometric analysis would be helpful.)
- (Alternative to 3. which may or may not work) You could try to apply my revision using patch/diff, which are standard Unix utilities. (https://wiki.blender.org/index.php/Dev:Doc/Tools/Patches). If you go to D2154: Shrink-Wrap Constraint: Align to Normal (Option) -- iteration 1, then look on the right hand side of the page, there is a link to "Download Raw Diff"; the .diff file should be compatible with the patch/diff method. However, due to version differences (at the very least, line numbers will have likely changed), I can't say whether this will work.
- Now, finally, what needs to be done: Figure out how to get the vertex normal when the user has forced us into case MOD_SHRINKWRAP_NEAREST_VERTEX. Notice my comment /* XXX target mesh normal is not available from nearest when bvh tree made from verts. */ Finding out what a BVH tree is, and what kind of information is given by bvhtree_from_mesh_verts() or bvhtree_from_mesh_looptri(), was a tedious task. It involved probing the depths of Blender. Unfortunately I remember only what I made notes of; see below.
- Plan how to extend the function to optionally interpolate over surface/vertex normals. Forward thinking here may change how you solve the above problem. For example, you may want to extract information about neighboring vertices/faces for interpolation. Conversely, the locations of neighboring vertices may help you manually calculate the current vertex normal as well. If you can knock out two birds with one stone, that's great.