svn merge -r40166:40279 ^/trunk/blender
[blender.git] / source / blender / makesrna / intern / rna_scene.c
index 197ddd2ba06bab4c30492e23010a1632e265d09f..c50519479ebec2adf7bfb71076bbf110c0f0270b 100644 (file)
@@ -41,6 +41,8 @@
 #include "DNA_userdef_types.h"
 #include "BLI_math.h"
 
+#include "BKE_tessmesh.h"
+
 /* Include for Bake Options */
 #include "RE_pipeline.h"
 
@@ -737,7 +739,7 @@ static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
        RenderEngineType *type= BLI_findlink(&R_engines, value);
 
        if(type)
-               BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
+               BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine));
 }
 
 static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
@@ -810,7 +812,7 @@ static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
        Scene *scene= (Scene*)ptr->id.data;
        SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
 
-       BLI_strncpy(rl->name, value, sizeof(rl->name));
+       BLI_strncpy_utf8(rl->name, value, sizeof(rl->name));
 
        if(scene->nodetree) {
                bNode *node;
@@ -885,9 +887,9 @@ static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value
 
                if(scene->basact) {
                        Mesh *me= get_mesh(scene->basact->object);
-                       if(me && me->edit_mesh && me->edit_mesh->selectmode != flag) {
-                               me->edit_mesh->selectmode= flag;
-                               EM_selectmode_set(me->edit_mesh);
+                       if(me && me->edit_btmesh && me->edit_btmesh->selectmode != flag) {
+                               me->edit_btmesh->selectmode= flag;
+                               EDBM_selectmode_set(me->edit_btmesh);
                        }
                }
        }
@@ -899,7 +901,7 @@ static void rna_Scene_editmesh_select_mode_update(Main *UNUSED(bmain), Scene *sc
 
        if(scene->basact) {
                me= get_mesh(scene->basact->object);
-               if(me && me->edit_mesh==NULL)
+               if(me && me->edit_btmesh==NULL)
                        me= NULL;
        }
 
@@ -1011,7 +1013,7 @@ static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[])
        TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
        marker->flag= SELECT;
        marker->frame= 1;
-       BLI_strncpy(marker->name, name, sizeof(marker->name));
+       BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
        BLI_addtail(&scene->markers, marker);
        return marker;
 }