mauge123 / mechanical-blender

mechanical blender project
Other
70 stars 16 forks source link

creating per feature diffs #17

Closed mirlip closed 8 years ago

mirlip commented 8 years ago

Hi all,

Finally I may have again more time to help testing. It would be really great if you could make some diffs for the feature groups. At the moment the diff with common ancestor master...mechanical-blender has 20 000 lines. Congrats on the work you do, but it really would help other if you could separate it a bit to make it easier to understand and follow.

Regards

mauge123 commented 8 years ago

:+1:

Also I've been assigned to another issues on the company, but i expect to resume the activity soon.

Um.. 20.000 it seems a lot of lines although i think most are due in the way is done for tracking changes with blender master. I think the lines can also include some svg diff ¿?

Each part considered to be independent, so you can isolate them using the compiler defs and searching for the string in case of classes definitions. If anything is changed, the original code is placed usually in the way

if WITH_MECHANICAL_XXX

new_code

else

original_code

endif

Currently the tags are

define WITH_MECHANICAL (enables all)

define WITH_MECHANICAL_GRAB_W_BASE_POINT

define WITH_MECHANICAL_ROTATE_W_BASE_POINT

define WITH_MECHANICAL_RESIZE_W_BASE_POINT

define WITH_MECHANICAL_MESH_DIMENSIONS

define WITH_MECHANICAL_SNAP_TO_CURSOR

define WITH_MECHANICAL_TRANSFORM_MULTIPLE

define WITH_MECHANICAL_SELECT_TRANSFORM_CENTER

define WITH_MECHANICAL_EXIT_TRANSFORM_MODAL

define WITH_MECHANICAL_3D_VIEW_NUM_INPUT

define WITH_MECHANICAL_TRANSFORM_MATCH

define WITH_MECHANICAL_MESH_REFERENCE_OBJECTS

define WITH_MECHANICAL_SNAP_TO_PLANE

define WITH_MECHANICAL_BLENDER_D1669

define WITH_MECHANICAL_CREATE_OBJECT_W_CUSTOM_ORIENTATION

define WITH_MECHANICAL_CREATE_ON_REFERENCE_PLANE

define WITH_MECHANICAL_UNIT_FORCE

define WITH_MECHANICAL_GEOMETRY

although they are not tested individually, as is considered as a global project, it can help you to track changes and isolate them.

mirlip commented 8 years ago

That's really useful, will look into it then, thank you for the list :)

mauge123 commented 8 years ago

You can also check

http://www.mechanicalblender.org/static/features.html http://www.mechanicalblender.org/static/reference.html

mirlip commented 8 years ago

In source/blender/editors/transform/transform.c after line 2163, there is a

#ifdef WITH_MECHANICAL_EXIT_TRANSFORM_MODAL
        if (t->spacetype == SPACE_VIEW3D) {
            float p[3] = {0,0,0};
// WITH_MECHANICAL_CREATE_ON_REFERENCE_PLANE
...

How do I do to use it without reference plane addition? It doesn't compile without reference plane at the moment.

mirlip commented 8 years ago

I tried several time to isolate the no_modal_transform code but couldn't compile every time. Would it be possible that you create a diff just for this change?

mauge123 commented 8 years ago

The reference plane issue should be solved on last commit f0974443c91013802bb98dd9aeb370fbfbc3468b

It has been considered a global project: defines are mainly used to check changes against bf-master (which is really useful to get it up-to-date) and to find and know the changes. In the case you show, the addition for references is not under defined because it has previously changed by another previous change, so was just tagged to find up which part of additions is coming from as it does not matter the previous code.

Also the code on mechanical library, is not aware of any of these defines.

The best way to get a diff for one individual addition will be having a branch for it.

mirlip commented 8 years ago

Ok, I understand. Was the old way you did it (with branches for every feature) too much work? Anyway, I managed to make clean diffs by reverting to older commits before the reference plane was added. Thank you for your work and help :)

mauge123 commented 8 years ago

Branches are great for independent features. Things can be mesh up if they are related, so they were removed.

mirlip commented 8 years ago

Ok, I understand.