Freestyle changes:
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 26 Mar 2013 09:59:43 +0000 (09:59 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 26 Mar 2013 09:59:43 +0000 (09:59 +0000)
- Revert some stylistic changes made in branch
  They weren't directly related on freestyle project
  and better be handled in trunk. Helps reading patches
  ad prevents possible merge conflicts.

- Solved issue introduced with recent deprecation of
  RenderData.maximize,

release/bin/blender-softwaregl [changed mode: 0644->0755]
source/blender/blenloader/intern/readfile.c
source/blender/editors/interface/interface_templates.c
source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp
source/blender/makesdna/intern/CMakeLists.txt
source/blender/python/bmesh/bmesh_py_types.c
source/blender/render/intern/source/convertblender.c

old mode 100644 (file)
new mode 100755 (executable)
index 63e6d9a..970a787
@@ -1,25 +1,25 @@
-#!/bin/sh\r
-BF_DIST_BIN=`dirname "$0"`\r
-BF_PROGRAM="blender" # BF_PROGRAM=`basename "$0"`-bin\r
-exitcode=0\r
-\r
-LD_LIBRARY_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH}\r
-\r
-if [ -n "$LD_LIBRARYN32_PATH" ]; then\r
-    LD_LIBRARYN32_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN32_PATH}\r
-fi\r
-if [ -n "$LD_LIBRARYN64_PATH" ]; then\r
-    LD_LIBRARYN64_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN64_PATH}\r
-fi\r
-if [ -n "$LD_LIBRARY_PATH_64" ]; then\r
-    LD_LIBRARY_PATH_64=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH_64}\r
-fi\r
-\r
-# Workaround for half-transparent windows when compiz is enabled\r
-XLIB_SKIP_ARGB_VISUALS=1\r
-\r
-export LD_LIBRARY_PATH LD_LIBRARYN32_PATH LD_LIBRARYN64_PATH LD_LIBRARY_PATH_64 LD_PRELOAD XLIB_SKIP_ARGB_VISUALS\r
-\r
-"$BF_DIST_BIN/$BF_PROGRAM" ${1+"$@"}\r
-exitcode=$?\r
-exit $exitcode\r
+#!/bin/sh
+BF_DIST_BIN=`dirname "$0"`
+BF_PROGRAM="blender" # BF_PROGRAM=`basename "$0"`-bin
+exitcode=0
+
+LD_LIBRARY_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH}
+
+if [ -n "$LD_LIBRARYN32_PATH" ]; then
+    LD_LIBRARYN32_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN32_PATH}
+fi
+if [ -n "$LD_LIBRARYN64_PATH" ]; then
+    LD_LIBRARYN64_PATH=${BF_DIST_BIN}/lib:${LD_LIBRARYN64_PATH}
+fi
+if [ -n "$LD_LIBRARY_PATH_64" ]; then
+    LD_LIBRARY_PATH_64=${BF_DIST_BIN}/lib:${LD_LIBRARY_PATH_64}
+fi
+
+# Workaround for half-transparent windows when compiz is enabled
+XLIB_SKIP_ARGB_VISUALS=1
+
+export LD_LIBRARY_PATH LD_LIBRARYN32_PATH LD_LIBRARYN64_PATH LD_LIBRARY_PATH_64 LD_PRELOAD XLIB_SKIP_ARGB_VISUALS
+
+"$BF_DIST_BIN/$BF_PROGRAM" ${1+"$@"}
+exitcode=$?
+exit $exitcode
index ac8f52986dbcbc003d0255602ce88ae81cd7a409..a425928130d51c098bcf7a9db3e783ed5c848b02 100644 (file)
@@ -1069,10 +1069,10 @@ FileData *blo_openblendermemory(const void *mem, int memsize, ReportList *report
                        }
                }
                else
                        }
                }
                else
-               fd->read = fd_read_from_memory;
+                       fd->read = fd_read_from_memory;
                        
                fd->flags |= FD_FLAGS_NOT_MY_BUFFER;
                        
                fd->flags |= FD_FLAGS_NOT_MY_BUFFER;
-               
+
                return blo_decode_and_check(fd, reports);
        }
 }
                return blo_decode_and_check(fd, reports);
        }
 }
@@ -1202,19 +1202,19 @@ static void *newdataadr(FileData *fd, void *adr)                /* only direct databocks */
        return oldnewmap_lookup_and_inc(fd->datamap, adr);
 }
 
        return oldnewmap_lookup_and_inc(fd->datamap, adr);
 }
 
-static void *newglobadr(FileData *fd, void *adr)               /* direct datablocks with global linking */
+static void *newglobadr(FileData *fd, void *adr)           /* direct datablocks with global linking */
 {
        return oldnewmap_lookup_and_inc(fd->globmap, adr);
 }
 
 {
        return oldnewmap_lookup_and_inc(fd->globmap, adr);
 }
 
-static void *newimaadr(FileData *fd, void *adr)                /* used to restore image data after undo */
+static void *newimaadr(FileData *fd, void *adr)                    /* used to restore image data after undo */
 {
        if (fd->imamap && adr)
                return oldnewmap_lookup_and_inc(fd->imamap, adr);
        return NULL;
 }
 
 {
        if (fd->imamap && adr)
                return oldnewmap_lookup_and_inc(fd->imamap, adr);
        return NULL;
 }
 
-static void *newmclipadr(FileData *fd, void *adr)              /* used to restore movie clip data after undo */
+static void *newmclipadr(FileData *fd, void *adr)      /* used to restore movie clip data after undo */
 {
        if (fd->movieclipmap && adr)
                return oldnewmap_lookup_and_inc(fd->movieclipmap, adr);
 {
        if (fd->movieclipmap && adr)
                return oldnewmap_lookup_and_inc(fd->movieclipmap, adr);
@@ -1225,7 +1225,7 @@ static void *newpackedadr(FileData *fd, void *adr)      /* used to restore packe
 {
        if (fd->packedmap && adr)
                return oldnewmap_lookup_and_inc(fd->packedmap, adr);
 {
        if (fd->packedmap && adr)
                return oldnewmap_lookup_and_inc(fd->packedmap, adr);
-
+       
        return oldnewmap_lookup_and_inc(fd->datamap, adr);
 }
 
        return oldnewmap_lookup_and_inc(fd->datamap, adr);
 }
 
@@ -3423,7 +3423,7 @@ static void direct_link_texture(FileData *fd, Tex *tex)
        tex->env = newdataadr(fd, tex->env);
        if (tex->env) {
                tex->env->ima = NULL;
        tex->env = newdataadr(fd, tex->env);
        if (tex->env) {
                tex->env->ima = NULL;
-               memset(tex->env->cube, 0, 6*sizeof(void *));
+               memset(tex->env->cube, 0, 6 * sizeof(void *));
                tex->env->ok= 0;
        }
        tex->pd = newdataadr(fd, tex->pd);
                tex->env->ok= 0;
        }
        tex->pd = newdataadr(fd, tex->pd);
@@ -5249,7 +5249,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
                if (sce->toolsettings->vpaint) {
                        sce->toolsettings->vpaint->vpaint_prev = NULL;
                        sce->toolsettings->vpaint->tot = 0;
                if (sce->toolsettings->vpaint) {
                        sce->toolsettings->vpaint->vpaint_prev = NULL;
                        sce->toolsettings->vpaint->tot = 0;
-       }
+               }
                if (sce->toolsettings->wpaint) {
                        sce->toolsettings->wpaint->wpaint_prev = NULL;
                        sce->toolsettings->wpaint->tot = 0;
                if (sce->toolsettings->wpaint) {
                        sce->toolsettings->wpaint->wpaint_prev = NULL;
                        sce->toolsettings->wpaint->tot = 0;
@@ -6048,7 +6048,7 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
                pa->activedata = NULL;
                pa->type = NULL;
        }
                pa->activedata = NULL;
                pa->type = NULL;
        }
-       
+
        link_list(fd, &ar->ui_lists);
 
        for (ui_list = ar->ui_lists.first; ui_list; ui_list = ui_list->next) {
        link_list(fd, &ar->ui_lists);
 
        for (ui_list = ar->ui_lists.first; ui_list; ui_list = ui_list->next) {
@@ -6363,7 +6363,7 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
                                sclip->scopes.track_preview = NULL;
                                sclip->draw_context = NULL;
                                sclip->scopes.ok = 0;
                                sclip->scopes.track_preview = NULL;
                                sclip->draw_context = NULL;
                                sclip->scopes.ok = 0;
-               }
+                       }
                }
                
                sa->actionzones.first = sa->actionzones.last = NULL;
                }
                
                sa->actionzones.first = sa->actionzones.last = NULL;
@@ -7236,7 +7236,7 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree)
                        /* Convert degrees to radians. */
                        NodeDefocus *nqd = node->storage;
                        /* XXX DNA char to float conversion seems to map the char value into the [0.0f, 1.0f] range... */
                        /* Convert degrees to radians. */
                        NodeDefocus *nqd = node->storage;
                        /* XXX DNA char to float conversion seems to map the char value into the [0.0f, 1.0f] range... */
-                       nqd->rotation = DEG2RADF(nqd->rotation*255.0f);
+                       nqd->rotation = DEG2RADF(nqd->rotation * 255.0f);
                }
                else if (node->type == CMP_NODE_CHROMA_MATTE) {
                        /* Convert degrees to radians. */
                }
                else if (node->type == CMP_NODE_CHROMA_MATTE) {
                        /* Convert degrees to radians. */
@@ -7248,7 +7248,7 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree)
                        /* Convert degrees to radians. */
                        NodeGlare *ndg = node->storage;
                        /* XXX DNA char to float conversion seems to map the char value into the [0.0f, 1.0f] range... */
                        /* Convert degrees to radians. */
                        NodeGlare *ndg = node->storage;
                        /* XXX DNA char to float conversion seems to map the char value into the [0.0f, 1.0f] range... */
-                       ndg->angle_ofs = DEG2RADF(ndg->angle_ofs*255.0f);
+                       ndg->angle_ofs = DEG2RADF(ndg->angle_ofs * 255.0f);
                }
                /* XXX TexMapping struct is used by other nodes too (at least node_composite_mapValue),
                 *     but not the rot part...
                }
                /* XXX TexMapping struct is used by other nodes too (at least node_composite_mapValue),
                 *     but not the rot part...
@@ -9049,7 +9049,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
                        SEQ_END
 
                        if (scene->r.bake_samples == 0)
                        SEQ_END
 
                        if (scene->r.bake_samples == 0)
-                               scene->r.bake_samples = 256;
+                       scene->r.bake_samples = 256;
 
                        if (scene->world) {
                                World *world = blo_do_versions_newlibadr(fd, scene->id.lib, scene->world);
 
                        if (scene->world) {
                                World *world = blo_do_versions_newlibadr(fd, scene->id.lib, scene->world);
@@ -9396,8 +9396,8 @@ static void lib_link_all(FileData *fd, Main *main)
        
        /* No load UI for undo memfiles */
        if (fd->memfile == NULL) {
        
        /* No load UI for undo memfiles */
        if (fd->memfile == NULL) {
-       lib_link_windowmanager(fd, main);
-       lib_link_screen(fd, main);
+               lib_link_windowmanager(fd, main);
+               lib_link_screen(fd, main);
        }
        lib_link_scene(fd, main);
        lib_link_object(fd, main);
        }
        lib_link_scene(fd, main);
        lib_link_object(fd, main);
@@ -9488,7 +9488,7 @@ static BHead *read_userdef(BlendFileData *bfd, FileData *fd, BHead *bhead)
                for (kmi=keymap->items.first; kmi; kmi=kmi->next)
                        direct_link_keymapitem(fd, kmi);
        }
                for (kmi=keymap->items.first; kmi; kmi=kmi->next)
                        direct_link_keymapitem(fd, kmi);
        }
-       
+
        for (addon = user->addons.first; addon; addon = addon->next) {
                addon->prop = newdataadr(fd, addon->prop);
                if (addon->prop) {
        for (addon = user->addons.first; addon; addon = addon->next) {
                addon->prop = newdataadr(fd, addon->prop);
                if (addon->prop) {
@@ -9710,7 +9710,7 @@ static void expand_doit_library(void *fdhandle, Main *mainvar, void *old)
                                        return;
                                }
                                else
                                        return;
                                }
                                else
-                               id = is_yet_read(fd, ptr, bhead);
+                                       id = is_yet_read(fd, ptr, bhead);
                                
                                if (id == NULL) {
                                        read_libblock(fd, ptr, bhead, LIB_READ+LIB_INDIRECT, NULL);
                                
                                if (id == NULL) {
                                        read_libblock(fd, ptr, bhead, LIB_READ+LIB_INDIRECT, NULL);
index 30d360363c67e47ba70f6de71689e29c1c709ba9..4b70b6bd63b30ecadc3e442d1e0447052f235632 100644 (file)
@@ -2469,7 +2469,7 @@ static void uilist_draw_item_default(struct uiList *ui_list, struct bContext *UN
                uiItemL(layout, name, icon);
                break;
        }
                uiItemL(layout, name, icon);
                break;
        }
-               
+
        /* free name */
        if (namebuf) {
                MEM_freeN(namebuf);
        /* free name */
        if (namebuf) {
                MEM_freeN(namebuf);
@@ -2559,7 +2559,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
        if (ui_list_type == NULL) {
                RNA_warning("List type %s not found", listtype_name);
                return;
        if (ui_list_type == NULL) {
                RNA_warning("List type %s not found", listtype_name);
                return;
-                       }
+       }
 
        draw_item = ui_list_type->draw_item ? ui_list_type->draw_item : uilist_draw_item_default;
 
 
        draw_item = ui_list_type->draw_item ? ui_list_type->draw_item : uilist_draw_item_default;
 
@@ -2574,7 +2574,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
                ui_list = MEM_callocN(sizeof(uiList), __func__);
                BLI_strncpy(ui_list->list_id, ui_list_id, sizeof(ui_list->list_id));
                BLI_addtail(&ar->ui_lists, ui_list);
                ui_list = MEM_callocN(sizeof(uiList), __func__);
                BLI_strncpy(ui_list->list_id, ui_list_id, sizeof(ui_list->list_id));
                BLI_addtail(&ar->ui_lists, ui_list);
-                                       }
+       }
 
        /* Because we can't actually pass type across save&load... */
        ui_list->type = ui_list_type;
 
        /* Because we can't actually pass type across save&load... */
        ui_list->type = ui_list_type;
@@ -2669,10 +2669,10 @@ void uiTemplateList(uiLayout *layout, bContext *C, const char *listtype_name, co
                                        if (icon == ICON_DOT)
                                                icon = ICON_NONE;
                                        draw_item(ui_list, C, row, dataptr, &itemptr, icon, active_dataptr, active_propname, i);
                                        if (icon == ICON_DOT)
                                                icon = ICON_NONE;
                                        draw_item(ui_list, C, row, dataptr, &itemptr, icon, active_dataptr, active_propname, i);
-       }
+                               }
 
                                i++;
 
                                i++;
-}
+                       }
                        RNA_PROP_END;
                }
 
                        RNA_PROP_END;
                }
 
index cab6ebff4f2c5429221f91f65309746ca3e5ffaf..645e00837f3aefdf46232f479dec1fb0702d05bb 100644 (file)
@@ -93,7 +93,7 @@ BlenderStrokeRenderer::BlenderStrokeRenderer(Render *re, int render_count) : Str
        freestyle_scene->r.tilex = old_scene->r.tilex;
        freestyle_scene->r.tiley = old_scene->r.tiley;
        freestyle_scene->r.size = 100; // old_scene->r.size
        freestyle_scene->r.tilex = old_scene->r.tilex;
        freestyle_scene->r.tiley = old_scene->r.tiley;
        freestyle_scene->r.size = 100; // old_scene->r.size
-       freestyle_scene->r.maximsize = old_scene->r.maximsize;
+       //freestyle_scene->r.maximsize = old_scene->r.maximsize; /* DEPRECATED */
        freestyle_scene->r.ocres = old_scene->r.ocres;
        freestyle_scene->r.color_mgt_flag = 0; // old_scene->r.color_mgt_flag;
        freestyle_scene->r.scemode = old_scene->r.scemode & ~(R_SINGLE_LAYER);
        freestyle_scene->r.ocres = old_scene->r.ocres;
        freestyle_scene->r.color_mgt_flag = 0; // old_scene->r.color_mgt_flag;
        freestyle_scene->r.scemode = old_scene->r.scemode & ~(R_SINGLE_LAYER);
index 0ad52d9b3a3465186ab7f39d5782776f3bf042f9..1dd1d7e8f87f7dbf1048b48a744b870b68bbb4e9 100644 (file)
@@ -34,6 +34,7 @@ blender_include_dirs(
        ..
 )
 
        ..
 )
 
+
 # -----------------------------------------------------------------------------
 # Build makesdna executable
 set(SRC
 # -----------------------------------------------------------------------------
 # Build makesdna executable
 set(SRC
index 052496e3ed7a6fe470bdef08356f87055716fc8c..a591b41db98de1dad8f60d52ccf5d80edc615319 100644 (file)
@@ -79,11 +79,11 @@ PyC_FlagSet bpy_bm_htype_all_flags[] = {
 };
 
 PyC_FlagSet bpy_bm_hflag_all_flags[] = {
 };
 
 PyC_FlagSet bpy_bm_hflag_all_flags[] = {
-       {BM_ELEM_SELECT,     "SELECT"},
-       {BM_ELEM_HIDDEN,     "HIDE"},
-       {BM_ELEM_SEAM,       "SEAM"},
-       {BM_ELEM_SMOOTH,     "SMOOTH"},
-       {BM_ELEM_TAG,        "TAG"},
+       {BM_ELEM_SELECT,  "SELECT"},
+       {BM_ELEM_HIDDEN,  "HIDE"},
+       {BM_ELEM_SEAM,    "SEAM"},
+       {BM_ELEM_SMOOTH,  "SMOOTH"},
+       {BM_ELEM_TAG,     "TAG"},
        {0, NULL}
 };
 
        {0, NULL}
 };
 
@@ -103,6 +103,7 @@ PyDoc_STRVAR(bpy_bm_elem_tag_doc,     "Generic attribute scripts can use for own
 PyDoc_STRVAR(bpy_bm_elem_smooth_doc,  "Smooth state of this element.\n\n:type: boolean");
 PyDoc_STRVAR(bpy_bm_elem_seam_doc,    "Seam for UV unwrapping.\n\n:type: boolean");
 
 PyDoc_STRVAR(bpy_bm_elem_smooth_doc,  "Smooth state of this element.\n\n:type: boolean");
 PyDoc_STRVAR(bpy_bm_elem_seam_doc,    "Seam for UV unwrapping.\n\n:type: boolean");
 
+
 static PyObject *bpy_bm_elem_hflag_get(BPy_BMElem *self, void *flag)
 {
        const char hflag = (char)GET_INT_FROM_POINTER(flag);
 static PyObject *bpy_bm_elem_hflag_get(BPy_BMElem *self, void *flag)
 {
        const char hflag = (char)GET_INT_FROM_POINTER(flag);
index 0cbb00abed0fbc5794b552272738b47b2f6d61c3..4cbf430969780b22af560a4ac6c18a37d0808255 100644 (file)
@@ -2705,7 +2705,7 @@ static void init_render_dm(DerivedMesh *dm, Render *re, ObjectRen *obr,
                                        v2= mface->v2;
                                        v3= mface->v3;
                                        v4= mface->v4;
                                        v2= mface->v2;
                                        v3= mface->v3;
                                        v4= mface->v4;
-                                       flag = mface->flag & ME_SMOOTH;
+                                       flag= mface->flag & ME_SMOOTH;
 
                                        vlr= RE_findOrAddVlak(obr, obr->totvlak++);
                                        vlr->v1= RE_findOrAddVert(obr, vertofs+v1);
 
                                        vlr= RE_findOrAddVlak(obr, obr->totvlak++);
                                        vlr->v1= RE_findOrAddVert(obr, vertofs+v1);
@@ -3465,7 +3465,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
                                                        v2= mface->v2;
                                                        v3= reverse_verts==0 ? mface->v3 : mface->v1;
                                                        v4= mface->v4;
                                                        v2= mface->v2;
                                                        v3= reverse_verts==0 ? mface->v3 : mface->v1;
                                                        v4= mface->v4;
-                                                       flag = mface->flag & ME_SMOOTH;
+                                                       flag= mface->flag & ME_SMOOTH;
 
                                                        vlr= RE_findOrAddVlak(obr, obr->totvlak++);
                                                        vlr->v1= RE_findOrAddVert(obr, vertofs+v1);
 
                                                        vlr= RE_findOrAddVlak(obr, obr->totvlak++);
                                                        vlr->v1= RE_findOrAddVert(obr, vertofs+v1);