Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-10 08:17:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-10 08:17:43 +0400
commit121ff4223dbd5c42ecc4919d09ce464d01faf4e7 (patch)
tree5102e8d4f18a142aaff07fc355d0fd0208ccf651 /source/blender
parenta96c3ce9e0a61bc29fef8212a742658795aabbed (diff)
parent77c51607914b7fe4744437f6d47fedab628b444d (diff)
svn merge -r41655:41715 ^/trunk/blender --- this is the real cycles merge, needs some edits to cycles its self before cycles will build
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/SConscript3
-rw-r--r--source/blender/blenfont/BLF_translation.h10
-rw-r--r--source/blender/blenfont/intern/blf_translation.c45
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/intern/tracking.c13
-rw-r--r--source/blender/blenloader/intern/readfile.c1
-rw-r--r--source/blender/editors/include/UI_interface.h11
-rw-r--r--source/blender/editors/interface/interface.c47
-rw-r--r--source/blender/editors/interface/interface_handlers.c32
-rw-r--r--source/blender/editors/interface/interface_intern.h5
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/interface/interface_panel.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c2
-rw-r--r--source/blender/editors/interface/resources.c47
-rw-r--r--source/blender/editors/screen/screen_context.c28
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c26
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c4
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c2
-rw-r--r--source/blender/editors/space_clip/clip_ops.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c18
-rw-r--r--source/blender/editors/space_node/node_templates.c2
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/makesrna/RNA_access.h2
-rw-r--r--source/blender/makesrna/RNA_types.h9
-rw-r--r--source/blender/makesrna/SConscript4
-rw-r--r--source/blender/makesrna/intern/rna_access.c5
-rw-r--r--source/blender/makesrna/intern/rna_define.c1
-rw-r--r--source/blender/makesrna/intern/rna_movieclip.c6
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c2
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_render.c4
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c39
-rw-r--r--source/blender/nodes/CMakeLists.txt1
-rw-r--r--source/blender/nodes/SConscript2
-rw-r--r--source/blender/nodes/composite/node_composite_tree.c22
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c20
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c20
-rw-r--r--source/blender/python/SConscript5
-rw-r--r--source/blender/python/intern/CMakeLists.txt5
-rw-r--r--source/blender/python/intern/bpy_interface.c5
-rw-r--r--source/blender/python/intern/bpy_rna.c2
41 files changed, 308 insertions, 158 deletions
diff --git a/source/blender/SConscript b/source/blender/SConscript
index e6cd6b09c20..c3a7089f425 100644
--- a/source/blender/SConscript
+++ b/source/blender/SConscript
@@ -12,7 +12,6 @@ SConscript(['avi/SConscript',
'editors/SConscript',
'imbuf/SConscript',
'makesdna/SConscript',
- 'makesrna/SConscript',
'render/SConscript',
'nodes/SConscript',
'modifiers/SConscript',
@@ -20,7 +19,7 @@ SConscript(['avi/SConscript',
'windowmanager/SConscript',
'blenfont/SConscript'])
-
+makesrna = SConscript('makesrna/SConscript')
if env['WITH_BF_PYTHON']:
SConscript(['python/SConscript'])
diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h
index 0d33180a817..ddbc9a6a760 100644
--- a/source/blender/blenfont/BLF_translation.h
+++ b/source/blender/blenfont/BLF_translation.h
@@ -58,8 +58,18 @@ void BLF_lang_encoding_name(const char *str);
void BLF_lang_encoding(const char *str);
+/* translation */
+int BLF_translate_iface(void);
+int BLF_translate_tooltips(void);
+const char *BLF_translate_do_iface(const char *msgid);
+const char *BLF_translate_do_tooltip(const char *msgid);
+
+
/*#define _(msgid) BLF_gettext(msgid)*/
/* The "translation-marker" macro. */
#define N_(msgid) msgid
+/* Those macros should be used everywhere in UI code. */
+#define IFACE_(msgid) BLF_translate_do_iface(msgid)
+#define TIP_(msgid) BLF_translate_do_tooltip(msgid)
#endif /* BLF_TRANSLATION_H */
diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
index 917d95cfc20..8688249732f 100644
--- a/source/blender/blenfont/intern/blf_translation.c
+++ b/source/blender/blenfont/intern/blf_translation.c
@@ -44,6 +44,8 @@
#include "BLF_translation.h"
+#include "DNA_userdef_types.h" /* For user settings. */
+
#ifdef WITH_INTERNATIONAL
const char unifont_filename[]="droidsans.ttf.gz";
static unsigned char *unifont_ttf= NULL;
@@ -88,3 +90,46 @@ const char* BLF_gettext(const char *msgid)
return msgid;
#endif
}
+
+int BLF_translate_iface(void)
+{
+#ifdef WITH_INTERNATIONAL
+ return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE);
+#else
+ return 0;
+#endif
+}
+
+int BLF_translate_tooltips(void)
+{
+#ifdef WITH_INTERNATIONAL
+ return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS);
+#else
+ return 0;
+#endif
+}
+
+const char *BLF_translate_do_iface(const char *msgid)
+{
+#ifdef WITH_INTERNATIONAL
+ if(BLF_translate_iface())
+ return BLF_gettext(msgid);
+ else
+ return msgid;
+#else
+ return msgid;
+#endif
+}
+
+const char *BLF_translate_do_tooltip(const char *msgid)
+{
+#ifdef WITH_INTERNATIONAL
+ if(BLF_translate_tooltips())
+ return BLF_gettext(msgid);
+ else
+ return msgid;
+#else
+ return msgid;
+#endif
+}
+
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 6f9bea39ecc..76bb587dcd6 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 260
-#define BLENDER_SUBVERSION 2
+#define BLENDER_SUBVERSION 3
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index a834628641a..38bb615896b 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -443,16 +443,17 @@ void BKE_tracking_clear_path(MovieTrackingTrack *track, int ref_frame, int actio
int BKE_tracking_test_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack *src_track)
{
- int i, a= 0, b= 0, tot= dst_track->markersnr+src_track->markersnr;
+ int a= 0, b= 0;
+ /* int tot= dst_track->markersnr+src_track->markersnr; */ /* UNUSED */
int count= 0;
- for(i= 0; i<tot; i++) {
- if(a>=src_track->markersnr) {
- b++;
+ while(a<src_track->markersnr || b<dst_track->markersnr) {
+ if(b>=dst_track->markersnr) {
+ a++;
count++;
}
- else if(b>=dst_track->markersnr) {
- a++;
+ else if(a>=src_track->markersnr) {
+ b++;
count++;
}
else if(src_track->markers[a].framenr<dst_track->markers[b].framenr) {
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a4e71293177..277c3d927a3 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5677,6 +5677,7 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
else if(sl->spacetype==SPACE_BUTS) {
SpaceButs *sbuts= (SpaceButs *)sl;
sbuts->path= NULL;
+ sbuts->texuser= NULL;
}
else if(sl->spacetype==SPACE_CONSOLE) {
SpaceConsole *sconsole= (SpaceConsole *)sl;
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 329f4599e01..cd5fee139ee 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -802,6 +802,7 @@ void UI_buttons_operatortypes(void);
uiBut *uiContextActiveButton(const struct bContext *C);
void uiContextActiveProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index);
void uiContextActivePropertyHandle(struct bContext *C);
+struct wmOperator *uiContextActiveOperator(const struct bContext *C);
void uiContextAnimUpdate(const struct bContext *C);
void uiFileBrowseContextProperty(const struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop);
void uiIDContextProperty(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop);
@@ -820,16 +821,6 @@ uiStyle* UI_GetStyle(void);
/* linker workaround ack! */
void UI_template_fix_linking(void);
-/* translation */
-int UI_translate_iface(void);
-int UI_translate_tooltips(void);
-const char *UI_translate_do_iface(const char *msgid);
-const char *UI_translate_do_tooltip(const char *msgid);
-
-/* Those macros should be used everywhere in UI code. */
-#define IFACE_(msgid) UI_translate_do_iface(msgid)
-#define TIP_(msgid) UI_translate_do_tooltip(msgid)
-
/* UI_OT_editsource helpers */
int UI_editsource_enable_check(void);
void UI_editsource_active_but_test(uiBut *but);
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index e5092c82304..fab983cee43 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -90,50 +90,6 @@
static void ui_free_but(const bContext *C, uiBut *but);
-/* ************* translation ************** */
-
-int UI_translate_iface(void)
-{
-#ifdef WITH_INTERNATIONAL
- return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE);
-#else
- return 0;
-#endif
-}
-
-int UI_translate_tooltips(void)
-{
-#ifdef WITH_INTERNATIONAL
- return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS);
-#else
- return 0;
-#endif
-}
-
-const char *UI_translate_do_iface(const char *msgid)
-{
-#ifdef WITH_INTERNATIONAL
- if(UI_translate_iface())
- return BLF_gettext(msgid);
- else
- return msgid;
-#else
- return msgid;
-#endif
-}
-
-const char *UI_translate_do_tooltip(const char *msgid)
-{
-#ifdef WITH_INTERNATIONAL
- if(UI_translate_tooltips())
- return BLF_gettext(msgid);
- else
- return msgid;
-#else
- return msgid;
-#endif
-}
-
/* ************* window matrix ************** */
void ui_block_to_window_fl(const ARegion *ar, uiBlock *block, float *x, float *y)
@@ -756,6 +712,9 @@ static int ui_but_is_rna_undo(uiBut *but)
return TRUE;
}
}
+ else if (but->rnapoin.type && !RNA_struct_undo_check(but->rnapoin.type)) {
+ return FALSE;
+ }
return TRUE;
}
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index c871c87983c..06a05740585 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -5471,6 +5471,38 @@ void uiContextActivePropertyHandle(bContext *C)
}
}
+wmOperator *uiContextActiveOperator(const struct bContext *C)
+{
+ ARegion *ar_ctx= CTX_wm_region(C);
+ uiBlock *block;
+
+ /* scan active regions ui */
+ for(block=ar_ctx->uiblocks.first; block; block=block->next) {
+ if (block->ui_operator) {
+ return block->ui_operator;
+ }
+ }
+
+ /* scan popups */
+ {
+ bScreen *sc= CTX_wm_screen(C);
+ ARegion *ar;
+
+ for (ar= sc->regionbase.first; ar; ar= ar->next) {
+ if (ar == ar_ctx) {
+ continue;
+ }
+ for(block=ar->uiblocks.first; block; block=block->next) {
+ if (block->ui_operator) {
+ return block->ui_operator;
+ }
+ }
+ }
+ }
+
+ return NULL;
+}
+
/* helper function for insert keyframe, reset to default, etc operators */
void uiContextAnimUpdate(const bContext *C)
{
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index aa4158ad4b7..16e0153b910 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -314,7 +314,10 @@ struct uiBlock {
ListBase saferct; // uiSafetyRct list
uiPopupBlockHandle *handle; // handle
-
+
+ struct wmOperator *ui_operator;// use so presets can find the operator,
+ // across menus and from nested popups which fail for operator context.
+
void *evil_C; // XXX hack for dynamic operator enums
struct UnitSettings *unit; // unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time.
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index add023c940b..32bcfe51afc 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2767,6 +2767,8 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
PointerRNA op_ptr;
uiLayout *row;
+ uiLayoutGetBlock(layout)->ui_operator= op;
+
row= uiLayoutRow(layout, TRUE);
uiItemM(row, (bContext *)C, "WM_MT_operator_presets", NULL, ICON_NONE);
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 9a253952e6d..aa80cb632ec 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -43,6 +43,8 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "DNA_userdef_types.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index a3d71674a03..6cd538112e6 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -40,6 +40,8 @@
#include "BLI_string.h"
#include "BLI_ghash.h"
+#include "BLF_translation.h"
+
#include "BKE_animsys.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 5f392daeec6..738531e3bad 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1611,41 +1611,33 @@ void init_userdef_do_versions(void)
}
}
- if (bmain->versionfile < 258 || (bmain->versionfile == 258 && bmain->subversionfile < 1)) {
- bTheme *btheme;
-
- /* if new keyframes handle default is stuff "auto", make it "auto-clamped" instead */
- if (U.keyhandles_new == HD_AUTO)
- U.keyhandles_new = HD_AUTO_ANIM;
-
- /* theme color additions */
- for (btheme= U.themes.first; btheme; btheme= btheme->next) {
- /* auto-clamped handles -> based on auto */
- SETCOL(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
- SETCOL(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
- }
- }
-
if (bmain->versionfile < 259 || (bmain->versionfile == 259 && bmain->subversionfile < 1)) {
bTheme *btheme;
-
+
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
btheme->tv3d.speaker[3] = 255;
}
}
- {
+ if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 3)) {
bTheme *btheme;
- for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+
+ /* if new keyframes handle default is stuff "auto", make it "auto-clamped" instead
+ * was changed in 260 as part of GSoC11, but version patch was wrong
+ */
+ if (U.keyhandles_new == HD_AUTO)
+ U.keyhandles_new = HD_AUTO_ANIM;
+
+ for(btheme= U.themes.first; btheme; btheme= btheme->next) {
if(btheme->tv3d.bundle_solid[3] == 0)
SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
-
+
if(btheme->tv3d.camera_path[3] == 0)
SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
-
+
if((btheme->tclip.back[3]) == 0) {
btheme->tclip= btheme->tv3d;
-
+
SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
@@ -1660,6 +1652,19 @@ void init_userdef_do_versions(void)
SETCOL(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff);
btheme->tclip.handle_vertex_size= 4;
}
+
+ /* auto-clamped handles -> based on auto */
+ if(btheme->tipo.handle_auto_clamped[3] == 0)
+ SETCOL(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255);
+ if(btheme->tipo.handle_sel_auto_clamped[3] == 0)
+ SETCOL(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255);
+ }
+
+ /* enable (Cycles) addon by default */
+ if(!BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module))) {
+ bAddon *baddon= MEM_callocN(sizeof(bAddon), "bAddon");
+ BLI_strncpy(baddon->module, "cycles", sizeof(baddon->module));
+ BLI_addtail(&U.addons, baddon);
}
}
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index cb42cd786ed..9e2a2f54e0b 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -35,6 +35,8 @@
#include "DNA_sequence_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
+#include "DNA_space_types.h"
+#include "DNA_windowmanager_types.h"
#include "BLI_utildefines.h"
@@ -50,6 +52,9 @@
#include "ED_object.h"
#include "ED_armature.h"
+#include "WM_api.h"
+#include "UI_interface.h"
+
#include "screen_intern.h"
const char *screen_context_dir[] = {
@@ -62,6 +67,7 @@ const char *screen_context_dir[] = {
"sculpt_object", "vertex_paint_object", "weight_paint_object",
"image_paint_object", "particle_edit_object",
"sequences", "selected_sequences", "selected_editable_sequences", /* sequencer */
+ "active_operator",
NULL};
int ed_screen_context(const bContext *C, const char *member, bContextDataResult *result)
@@ -387,6 +393,28 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
}
+ else if(CTX_data_equals(member, "active_operator")) {
+ wmOperator *op= NULL;
+
+ SpaceFile *sfile= CTX_wm_space_file(C);
+ if(sfile) {
+ op= sfile->op;
+ }
+ else if ((op= uiContextActiveOperator(C))) {
+ /* do nothign */
+ }
+ else {
+ /* note, this checks poll, could be a problem, but this also
+ * happens for the toolbar */
+ op= WM_operator_last_redo(C);
+ }
+ /* TODO, get the operator from popup's */
+
+ if (op && op->ptr) {
+ CTX_data_pointer_set(result, NULL, &RNA_Operator, op);
+ return 1;
+ }
+ }
else {
return 0; /* not found */
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 7599cf1117a..4d024113cf8 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -1421,16 +1421,16 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, int defbase_tot,
if(vgroup_validmap && total_changed < 0 && total_valid) {
totchange_allowed = total_valid;
}
+ /* the way you modify the unlocked+unchanged groups is different depending
+ * on whether or not you are painting the weight(s) up or down */
+ if(totchange < 0) {
+ totchange_allowed = total_valid - totchange_allowed;
+ }
+ else {
+ totchange_allowed *= -1;
+ }
/* there needs to be change allowed, or you should not bother */
if(totchange_allowed) {
- /* the way you modify the unlocked+unchanged groups is different depending
- * on whether or not you are painting the weight(s) up or down */
- if(totchange < 0) {
- totchange_allowed = total_valid - totchange_allowed;
- }
- else {
- totchange_allowed *= -1;
- }
left_over = 0;
if(fabsf(totchange_allowed) < fabsf(totchange)) {
/* this amount goes back onto the changed, unlocked weights */
@@ -1454,11 +1454,15 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, int defbase_tot,
odw = defvert_find_index(odv, designatedw);
storedw = ndw->weight;
for(i = 0; i < ndv->totweight; i++) {
- if(change_status[ndw->def_nr] == 2) {
+ if(ndv->dw[i].def_nr == designatedw) {
+ continue;
+ }
+ ndw2 = &ndv->dw[i];
+ if(change_status[ndw2->def_nr] == 2) {
odw2 = &odv->dw[i];
- ndw2 = &ndv->dw[i];
+
if(!designatedw_changed) {
- ndw->weight = (totchange_allowed + odw->weight + odw2->weight)/(1.0f + ndw2->weight/ndw->weight);
+ ndw->weight = (-left_over + odw->weight + odw2->weight)/(1.0f + ndw2->weight/ndw->weight);
designatedw_changed = TRUE;
}
ndw2->weight = ndw->weight * ndw2->weight / storedw;
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index dd9f3c57896..4446a2e848a 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -117,10 +117,10 @@ static void buttons_texture_users_find_nodetree(ListBase *users, ID *id,
for(node=ntree->nodes.first; node; node=node->next) {
if(node->typeinfo->nclass == NODE_CLASS_TEXTURE) {
PointerRNA ptr;
- PropertyRNA *prop;
+ /* PropertyRNA *prop; */ /* UNUSED */
RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
- prop = RNA_struct_find_property(&ptr, "texture");
+ /* prop = RNA_struct_find_property(&ptr, "texture"); */ /* UNUSED */
buttons_texture_user_node_add(users, id, ntree, node,
category, RNA_struct_ui_icon(ptr.type), node->name);
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index 831b225386a..56ca1632bae 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -280,7 +280,7 @@ void CLIP_OT_graph_select(wmOperatorType *ot)
/* properties */
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
- "Location", "Mouse location to select nearest entity closest to", -100.0f, 100.0f);
+ "Location", "Mouse location to select nearest entity", -100.0f, 100.0f);
RNA_def_boolean(ot->srna, "extend", 0,
"Extend", "Extend selection rather than clearing the existing selection");
}
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index c52346fd4b6..98abbad13dd 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -970,7 +970,7 @@ void CLIP_OT_mode_set(wmOperatorType *ot)
/* identifiers */
ot->name= "Set Clip Mode";
- ot->description = "Sets the clip interaction mode";
+ ot->description = "Set the clip interaction mode";
ot->idname= "CLIP_OT_mode_set";
/* api callbacks */
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 6f2289388f5..78bfb1498ac 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -1159,7 +1159,7 @@ void CLIP_OT_select_grouped(wmOperatorType *ot)
{2, "TRACKED", 0, "Tracked tracks", "Select all tracked tracks"},
{3, "LOCKED", 0, "Locked tracks", "Select all locked tracks"},
{4, "DISABLED", 0, "Disabled tracks", "Select all disabled tracks"},
- {5, "COLOR", 0, "Tracks with same color", "Select all tracks with same color as actiev track"},
+ {5, "COLOR", 0, "Tracks with same color", "Select all tracks with same color as active track"},
{6, "FAILED", 0, "Failed Tracks", "Select all tracks which failed to be reconstructed"},
{0, NULL, 0, NULL, NULL}
};
@@ -1662,7 +1662,7 @@ void CLIP_OT_clear_track_path(wmOperatorType *ot)
{
static EnumPropertyItem clear_path_actions[] = {
{TRACK_CLEAR_UPTO, "UPTO", 0, "Clear up-to", "Clear path up to current frame"},
- {TRACK_CLEAR_REMAINED, "REMAINED", 0, "Clear remained", "Clear path at remained frames (after current)"},
+ {TRACK_CLEAR_REMAINED, "REMAINED", 0, "Clear remained", "Clear path at remaining frames (after current)"},
{TRACK_CLEAR_ALL, "ALL", 0, "Clear all", "Clear the whole path"},
{0, NULL, 0, NULL, NULL}
};
@@ -1800,7 +1800,7 @@ void CLIP_OT_set_origin(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Origin";
- ot->description= "Set active marker as origin by moving camera (or it's parent if present) in 3d space";
+ ot->description= "Set active marker as origin by moving camera (or it's parent if present) in 3D space";
ot->idname= "CLIP_OT_set_origin";
/* api callbacks */
@@ -1952,7 +1952,7 @@ void CLIP_OT_set_floor(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Floor";
- ot->description= "Set floor based on 3 selected bundles by moving camera (or it's parent if present) in 3d space";
+ ot->description= "Set floor based on 3 selected bundles by moving camera (or it's parent if present) in 3D space";
ot->idname= "CLIP_OT_set_floor";
/* api callbacks */
@@ -2294,8 +2294,8 @@ void CLIP_OT_detect_features(wmOperatorType *ot)
{
static EnumPropertyItem placement_items[] = {
{0, "FRAME", 0, "Whole Frame", "Place markers across the whole frame"},
- {1, "INSIDE_GPENCIL", 0, "Inside grease pencil", "Place markers only inside areas oulined with grease pencil"},
- {2, "OUTSIDE_GPENCIL", 0, "Outside grease pencil", "Place markers only outside areas oulined with grease pencil"},
+ {1, "INSIDE_GPENCIL", 0, "Inside grease pencil", "Place markers only inside areas outlined with grease pencil"},
+ {2, "OUTSIDE_GPENCIL", 0, "Outside grease pencil", "Place markers only outside areas outlined with grease pencil"},
{0, NULL, 0, NULL, NULL}
};
@@ -2386,7 +2386,7 @@ void CLIP_OT_frame_jump(wmOperatorType *ot)
static EnumPropertyItem position_items[] = {
{0, "PATHSTART", 0, "Path Start", "Jump to start of current path"},
{1, "PATHEND", 0, "Path End", "Jump to end of current path"},
- {2, "FAILEDPREV", 0, "Previons Failed", "Jump to previous failed frame"},
+ {2, "FAILEDPREV", 0, "Previous Failed", "Jump to previous failed frame"},
{2, "FAILNEXT", 0, "Next Failed", "Jump to next failed frame"},
{0, NULL, 0, NULL, NULL}
};
@@ -2457,7 +2457,7 @@ void CLIP_OT_join_tracks(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Join Tracks";
- ot->description= "Joint Selected Tracks";
+ ot->description= "Join selected tracks";
ot->idname= "CLIP_OT_join_tracks";
/* api callbacks */
@@ -2737,7 +2737,7 @@ void CLIP_OT_stabilize_2d_set_rotation(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Rotation Track";
- ot->description= "Use active track to compensate rotaiton when doing 2D stabilization";
+ ot->description= "Use active track to compensate rotation when doing 2D stabilization";
ot->idname= "CLIP_OT_stabilize_2d_set_rotation";
/* api callbacks */
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index 5aa15cc68d6..fedb12f747c 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -40,6 +40,8 @@
#include "BLI_string.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_library.h"
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index b104c5bb513..5b2e83cbfbd 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -5533,7 +5533,7 @@ static void createTransTrackingData(bContext *C, TransInfo *t)
TransDataTracking *tdt;
int framenr = sc->user.framenr;
- if(clip && !BKE_movieclip_has_frame(clip, &sc->user)) {
+ if(!clip || !BKE_movieclip_has_frame(clip, &sc->user)) {
t->total = 0;
return;
}
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 665215b6592..e83fc143ef1 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -625,6 +625,8 @@ StructRNA *RNA_struct_base(StructRNA *type);
int RNA_struct_is_ID(StructRNA *type);
int RNA_struct_is_a(StructRNA *type, StructRNA *srna);
+int RNA_struct_undo_check(StructRNA *type);
+
StructRegisterFunc RNA_struct_register(StructRNA *type);
StructUnregisterFunc RNA_struct_unregister(StructRNA *type);
void **RNA_struct_instance(PointerRNA *ptr);
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 418a41c72ba..1655665efe3 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -326,12 +326,13 @@ typedef enum StructFlag {
/* indicates that this struct is an ID struct, and to use refcounting */
STRUCT_ID = 1,
STRUCT_ID_REFCOUNT = 2,
+ STRUCT_UNDO = 4, /* defaults on, clear for user preferences and similar */
/* internal flags */
- STRUCT_RUNTIME = 4,
- STRUCT_GENERATED = 8,
- STRUCT_FREE_POINTERS = 16,
- STRUCT_NO_IDPROPERTIES = 32 /* Menu's and Panels don't need properties */
+ STRUCT_RUNTIME = 8,
+ STRUCT_GENERATED = 16,
+ STRUCT_FREE_POINTERS = 32,
+ STRUCT_NO_IDPROPERTIES = 64 /* Menu's and Panels don't need properties */
} StructFlag;
typedef int (*StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function);
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index f0e841abdae..816f103cc9d 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -65,4 +65,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
if env['WITH_BF_INTERNATIONAL']:
defs.append('WITH_INTERNATIONAL')
-env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] )
+rnalib = env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] )
+
+Return ('rnalib')
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 793d0112af7..6f9c7a8f19b 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -549,6 +549,11 @@ int RNA_struct_is_ID(StructRNA *type)
return (type->flag & STRUCT_ID) != 0;
}
+int RNA_struct_undo_check(StructRNA *type)
+{
+ return (type->flag & STRUCT_UNDO) != 0;
+}
+
int RNA_struct_idprops_register_check(StructRNA *type)
{
return (type->flag & STRUCT_NO_IDPROPERTIES) == 0;
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index ff1bfce2d2f..d4756ecfefa 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -654,6 +654,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
srna->identifier= identifier;
srna->name= identifier; /* may be overwritten later RNA_def_struct_ui_text */
srna->description= "";
+ srna->flag |= STRUCT_UNDO;
if(!srnafrom)
srna->icon= ICON_DOT;
diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c
index ad53a96b817..91e082cdeae 100644
--- a/source/blender/makesrna/intern/rna_movieclip.c
+++ b/source/blender/makesrna/intern/rna_movieclip.c
@@ -75,9 +75,9 @@ static void rna_def_movieclip_proxy(BlenderRNA *brna)
static const EnumPropertyItem clip_tc_items[]= {
{IMB_TC_NONE, "NONE", 0, "No TC in use", ""},
- {IMB_TC_RECORD_RUN, "RECORD_RUN", 0, "Record Run", "use images in the order as they are recorded"},
- {IMB_TC_FREE_RUN, "FREE_RUN", 0, "Free Run", "use global timestamp written by recording device"},
- {IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN, "FREE_RUN_REC_DATE", 0, "Free Run (rec date)", "interpolate a global timestamp using the record date and time written by recording device"},
+ {IMB_TC_RECORD_RUN, "RECORD_RUN", 0, "Record Run", "Use images in the order they are recorded"},
+ {IMB_TC_FREE_RUN, "FREE_RUN", 0, "Free Run", "Use global timestamp written by recording device"},
+ {IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN, "FREE_RUN_REC_DATE", 0, "Free Run (rec date)", "Interpolate a global timestamp using the record date and time written by recording device"},
{0, NULL, 0, NULL, NULL}};
srna = RNA_def_struct(brna, "MovieClipProxy", NULL);
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 228edeefca4..55693f8e53f 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2958,7 +2958,7 @@ static void rna_def_node_socket_subtype(BlenderRNA *brna, int type, int subtype,
PropertyRNA *prop=NULL;
PropertySubType propsubtype= PROP_NONE;
- #define SUBTYPE(socktype, stypename, id, idname) { PROP_##id, #id, 0, #idname, ""},
+ #define SUBTYPE(socktype, stypename, id, idname) { PROP_##id, #socktype "_" #id, 0, #idname, ""},
static EnumPropertyItem subtype_items[] = {
NODE_DEFINE_SUBTYPES
{0, NULL, 0, NULL, NULL}
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 042cf748669..a9d0ed1a0bf 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -76,7 +76,7 @@
/* copied from Mesh_getFromObject and adapted to RNA interface */
/* settings: 0 - preview, 1 - render */
-static Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_modifiers, int settings)
+Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_modifiers, int settings)
{
Mesh *tmpmesh;
Curve *tmpcu = NULL;
@@ -284,7 +284,7 @@ static void dupli_render_particle_set(Scene *scene, Object *ob, int level, int e
dupli_render_particle_set(scene, go->ob, level+1, enable);
}
/* When no longer needed, duplilist should be freed with Object.free_duplilist */
-static void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *sce)
+void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *sce)
{
if (!(ob->transflag & OB_DUPLI)) {
BKE_report(reports, RPT_ERROR, "Object does not have duplis");
@@ -306,7 +306,7 @@ static void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *
/* ob->duplilist should now be freed with Object.free_duplilist */
}
-static void rna_Object_free_duplilist(Object *ob)
+void rna_Object_free_duplilist(Object *ob)
{
if (ob->duplilist) {
free_object_duplilist(ob->duplilist);
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 530d162b1fe..f00b97994d5 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -233,7 +233,7 @@ static void rna_RenderLayer_rect_get(PointerRNA *ptr, float *values)
memcpy(values, rl->rectf, sizeof(float)*rl->rectx*rl->recty*4);
}
-static void rna_RenderLayer_rect_set(PointerRNA *ptr, const float *values)
+void rna_RenderLayer_rect_set(PointerRNA *ptr, const float *values)
{
RenderLayer *rl= (RenderLayer*)ptr->data;
memcpy(rl->rectf, values, sizeof(float)*rl->rectx*rl->recty*4);
@@ -255,7 +255,7 @@ static void rna_RenderPass_rect_get(PointerRNA *ptr, float *values)
memcpy(values, rpass->rect, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
}
-static void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values)
+void rna_RenderPass_rect_set(PointerRNA *ptr, const float *values)
{
RenderPass *rpass= (RenderPass*)ptr->data;
memcpy(rpass->rect, values, sizeof(float)*rpass->rectx*rpass->recty*rpass->channels);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index e4e1c78ab3e..09b712fbfaf 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -316,6 +316,7 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeFontStyle", NULL);
RNA_def_struct_sdna(srna, "uiFontStyle");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font");
prop= RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
@@ -366,6 +367,7 @@ static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeStyle", NULL);
RNA_def_struct_sdna(srna, "uiStyle");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets");
/* (not used yet)
@@ -410,6 +412,7 @@ static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeWidgetColors", NULL);
RNA_def_struct_sdna(srna, "uiWidgetColors");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets");
prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA);
@@ -465,6 +468,7 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL);
RNA_def_struct_sdna(srna, "uiWidgetStateColors");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors");
prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA);
@@ -512,6 +516,7 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeUserInterface", NULL);
RNA_def_struct_sdna(srna, "ThemeUI");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for user interface elements");
prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
@@ -917,6 +922,7 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeView3D", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D View");
rna_def_userdef_theme_spaces_main(srna, SPACE_VIEW3D);
@@ -1054,6 +1060,7 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeGraphEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_IPO);
@@ -1138,6 +1145,7 @@ static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeFileBrowser", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser");
rna_def_userdef_theme_spaces_main(srna, SPACE_FILE);
@@ -1187,6 +1195,7 @@ static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeOutliner", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner");
rna_def_userdef_theme_spaces_main(srna, SPACE_OUTLINER);
@@ -1200,6 +1209,7 @@ static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeUserPreferences", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences");
rna_def_userdef_theme_spaces_main(srna, SPACE_USERPREF);
@@ -1214,6 +1224,7 @@ static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeConsole", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Console");
rna_def_userdef_theme_spaces_main(srna, SPACE_CONSOLE);
@@ -1257,6 +1268,7 @@ static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeInfo", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info");
rna_def_userdef_theme_spaces_main(srna, SPACE_INFO);
@@ -1272,6 +1284,7 @@ static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeTextEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_TEXT);
@@ -1340,6 +1353,7 @@ static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeNodeEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_NODE);
@@ -1409,6 +1423,7 @@ static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeLogicEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_LOGIC);
@@ -1429,6 +1444,7 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeProperties", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties");
rna_def_userdef_theme_spaces_main(srna, SPACE_BUTS);
@@ -1448,6 +1464,7 @@ static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeTimeline", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the Timeline");
rna_def_userdef_theme_spaces_main(srna, SPACE_TIME);
@@ -1473,6 +1490,7 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeImageEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for the Image Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE);
@@ -1500,6 +1518,7 @@ static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeSequenceEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE);
@@ -1591,6 +1610,7 @@ static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeDopeSheet", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme DopeSheet", "Theme settings for the DopeSheet");
rna_def_userdef_theme_spaces_main(srna, SPACE_ACTION);
@@ -1676,6 +1696,7 @@ static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeNLAEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the NLA Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_NLA);
@@ -1729,6 +1750,7 @@ static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeBoneColorSet", NULL);
RNA_def_struct_sdna(srna, "ThemeWireColor");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets");
prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
@@ -1763,6 +1785,7 @@ static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeClipEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for the Movie Clip Editor");
rna_def_userdef_theme_spaces_main(srna, SPACE_CLIP);
@@ -1871,6 +1894,7 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Theme", NULL);
RNA_def_struct_sdna(srna, "bTheme");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -2004,6 +2028,7 @@ static void rna_def_userdef_addon(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Addon", NULL);
RNA_def_struct_sdna(srna, "bAddon");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Addon", "Python addons to be loaded automatically");
prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
@@ -2047,6 +2072,7 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserSolidLight", NULL);
RNA_def_struct_sdna(srna, "SolidLight");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Solid Light", "Light used for OpenGL lighting in solid draw mode");
prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
@@ -2096,6 +2122,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferencesView", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data");
/* View */
@@ -2311,6 +2338,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data");
/* Edit Methods */
@@ -2589,12 +2617,13 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, "DEFAULT", 0, "Default (Default)", ""},
{1, "ENGLISH", 0, "English (English)", "en_US"},
{8, "FRENCH", 0, "French (Français)", "fr_FR"},
- {9, "SPANISH", 0, "Spanish (Español)", "es_ES"},
+ {4, "ITALIAN", 0, "Italian (Italiano)", "it_IT"},
+ {15, "RUSSIAN", 0, "Russian (Русский)", "ru_RU"},
{13, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese (简体中文)", "zh_CN"},
+ {9, "SPANISH", 0, "Spanish (Español)", "es_ES"},
{0, "", 0, "In progress", ""},
{2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"},
{3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"},
- {4, "ITALIAN", 0, "Italian (Italiano)", "it_IT"},
{5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
{6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
{7, "SWEDISH", 0, "Swedish (Svenska)", "sv_SE"},
@@ -2602,7 +2631,6 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{11, "CZECH", 0, "Czech (Český)", "cs_CZ"},
{12, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese (Português do Brasil)", "pt_BR"},
{14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", "zh_TW"},
- {15, "RUSSIAN", 0, "Russian (Русский)", "ru_RU"},
{16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"},
{17, "SERBIAN", 0, "Serbian (Српском језику)", "sr_RS"},
{18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"},
@@ -2622,6 +2650,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings");
/* Language */
@@ -2866,6 +2895,7 @@ static void rna_def_userdef_input(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferencesInput", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Input", "Settings for input devices");
prop= RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE);
@@ -3021,6 +3051,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferencesFilePaths", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files");
prop= RNA_def_property(srna, "show_hidden_files_datablocks", PROP_BOOLEAN, PROP_NONE);
@@ -3138,6 +3169,7 @@ void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_srna(cprop, "Addons");
srna= RNA_def_struct(brna, "Addons", NULL);
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "User Addons", "Collection of addons");
func= RNA_def_function(srna, "new", "rna_userdef_addon_new");
@@ -3174,6 +3206,7 @@ void RNA_def_userdef(BlenderRNA *brna)
srna= RNA_def_struct(brna, "UserPreferences", NULL);
RNA_def_struct_sdna(srna, "UserDef");
+ RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "User Preferences", "Global user preferences");
prop= RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index 557b00d66b8..368ab1db50c 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -25,6 +25,7 @@
set(INC
.
+ ../blenfont
../blenkernel
../blenlib
../blenloader
diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript
index 0cbc7b80933..d7dbed51282 100644
--- a/source/blender/nodes/SConscript
+++ b/source/blender/nodes/SConscript
@@ -11,7 +11,7 @@ incs += '#/intern/guardedalloc ../editors/include ../blenlib ../makesdna'
incs += ' ../render/extern/include ../makesrna '
incs += ' ../imbuf ../avi '
incs += ' ../blenloader'
-incs += ' ../blenkernel ../renderconverter '
+incs += ' ../blenfont ../blenkernel ../renderconverter '
incs += ' ../gpu #/extern/glew/include '
incs += ' ' + env['BF_OPENGL_INC']
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c
index 06f88002a70..10b062977b2 100644
--- a/source/blender/nodes/composite/node_composite_tree.c
+++ b/source/blender/nodes/composite/node_composite_tree.c
@@ -39,6 +39,8 @@
#include "BLI_listbase.h"
#include "BLI_threads.h"
+#include "BLF_translation.h"
+
#include "BKE_animsys.h"
#include "BKE_colortools.h"
#include "BKE_fcurve.h"
@@ -70,16 +72,16 @@ static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func)
static void foreach_nodeclass(Scene *UNUSED(scene), void *calldata, bNodeClassCallback func)
{
- func(calldata, NODE_CLASS_INPUT, "Input");
- func(calldata, NODE_CLASS_OUTPUT, "Output");
- func(calldata, NODE_CLASS_OP_COLOR, "Color");
- func(calldata, NODE_CLASS_OP_VECTOR, "Vector");
- func(calldata, NODE_CLASS_OP_FILTER, "Filter");
- func(calldata, NODE_CLASS_CONVERTOR, "Convertor");
- func(calldata, NODE_CLASS_MATTE, "Matte");
- func(calldata, NODE_CLASS_DISTORT, "Distort");
- func(calldata, NODE_CLASS_GROUP, "Group");
- func(calldata, NODE_CLASS_LAYOUT, "Layout");
+ func(calldata, NODE_CLASS_INPUT, IFACE_("Input"));
+ func(calldata, NODE_CLASS_OUTPUT, IFACE_("Output"));
+ func(calldata, NODE_CLASS_OP_COLOR, IFACE_("Color"));
+ func(calldata, NODE_CLASS_OP_VECTOR, IFACE_("Vector"));
+ func(calldata, NODE_CLASS_OP_FILTER, IFACE_("Filter"));
+ func(calldata, NODE_CLASS_CONVERTOR, IFACE_("Convertor"));
+ func(calldata, NODE_CLASS_MATTE, IFACE_("Matte"));
+ func(calldata, NODE_CLASS_DISTORT, IFACE_("Distort"));
+ func(calldata, NODE_CLASS_GROUP, IFACE_("Group"));
+ func(calldata, NODE_CLASS_LAYOUT, IFACE_("Layout"));
}
static void free_node_cache(bNodeTree *UNUSED(ntree), bNode *node)
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
index e116944e688..6c7667c6729 100644
--- a/source/blender/nodes/shader/node_shader_tree.c
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -43,6 +43,8 @@
#include "BLI_threads.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_node.h"
@@ -78,19 +80,19 @@ static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func)
static void foreach_nodeclass(Scene *scene, void *calldata, bNodeClassCallback func)
{
- func(calldata, NODE_CLASS_INPUT, "Input");
- func(calldata, NODE_CLASS_OUTPUT, "Output");
+ func(calldata, NODE_CLASS_INPUT, IFACE_("Input"));
+ func(calldata, NODE_CLASS_OUTPUT, IFACE_("Output"));
if(scene_use_new_shading_nodes(scene)) {
- func(calldata, NODE_CLASS_SHADER, "Shader");
- func(calldata, NODE_CLASS_TEXTURE, "Texture");
+ func(calldata, NODE_CLASS_SHADER, IFACE_("Shader"));
+ func(calldata, NODE_CLASS_TEXTURE, IFACE_("Texture"));
}
- func(calldata, NODE_CLASS_OP_COLOR, "Color");
- func(calldata, NODE_CLASS_OP_VECTOR, "Vector");
- func(calldata, NODE_CLASS_CONVERTOR, "Convertor");
- func(calldata, NODE_CLASS_GROUP, "Group");
- func(calldata, NODE_CLASS_LAYOUT, "Layout");
+ func(calldata, NODE_CLASS_OP_COLOR, IFACE_("Color"));
+ func(calldata, NODE_CLASS_OP_VECTOR, IFACE_("Vector"));
+ func(calldata, NODE_CLASS_CONVERTOR, IFACE_("Convertor"));
+ func(calldata, NODE_CLASS_GROUP, IFACE_("Group"));
+ func(calldata, NODE_CLASS_LAYOUT, IFACE_("Layout"));
}
static void local_sync(bNodeTree *localtree, bNodeTree *ntree)
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c
index 84bb53e2215..e863e9f6e0f 100644
--- a/source/blender/nodes/texture/node_texture_tree.c
+++ b/source/blender/nodes/texture/node_texture_tree.c
@@ -39,6 +39,8 @@
#include "BLI_threads.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_node.h"
@@ -64,15 +66,15 @@ static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func)
static void foreach_nodeclass(Scene *UNUSED(scene), void *calldata, bNodeClassCallback func)
{
- func(calldata, NODE_CLASS_INPUT, "Input");
- func(calldata, NODE_CLASS_OUTPUT, "Output");
- func(calldata, NODE_CLASS_OP_COLOR, "Color");
- func(calldata, NODE_CLASS_PATTERN, "Patterns");
- func(calldata, NODE_CLASS_TEXTURE, "Textures");
- func(calldata, NODE_CLASS_CONVERTOR, "Convertor");
- func(calldata, NODE_CLASS_DISTORT, "Distort");
- func(calldata, NODE_CLASS_GROUP, "Group");
- func(calldata, NODE_CLASS_LAYOUT, "Layout");
+ func(calldata, NODE_CLASS_INPUT, IFACE_("Input"));
+ func(calldata, NODE_CLASS_OUTPUT, IFACE_("Output"));
+ func(calldata, NODE_CLASS_OP_COLOR, IFACE_("Color"));
+ func(calldata, NODE_CLASS_PATTERN, IFACE_("Patterns"));
+ func(calldata, NODE_CLASS_TEXTURE, IFACE_("Textures"));
+ func(calldata, NODE_CLASS_CONVERTOR, IFACE_("Convertor"));
+ func(calldata, NODE_CLASS_DISTORT, IFACE_("Distort"));
+ func(calldata, NODE_CLASS_GROUP, IFACE_("Group"));
+ func(calldata, NODE_CLASS_LAYOUT, IFACE_("Layout"));
}
static void local_sync(bNodeTree *localtree, bNodeTree *ntree)
diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript
index 3f47038687a..7075b0592b8 100644
--- a/source/blender/python/SConscript
+++ b/source/blender/python/SConscript
@@ -4,7 +4,7 @@
Import ('env')
-incs = '. ../editors/include ../makesdna ../makesrna ../blenlib ../blenkernel ../nodes'
+incs = '. ../editors/include ../makesdna ../makesrna ../blenfont ../blenlib ../blenkernel ../nodes'
incs += ' ../imbuf ../blenloader ../gpu ../render/extern/include ../windowmanager'
incs += ' #intern/guardedalloc #intern/memutil #extern/glew/include'
incs += ' #intern/audaspace/intern ' + env['BF_PYTHON_INC']
@@ -43,5 +43,8 @@ if env['BF_BUILDINFO']:
if env['WITH_BF_INTERNATIONAL']:
defs.append('WITH_INTERNATIONAL')
+if env['WITH_BF_CYCLES']:
+ defs.append('WITH_CYCLES')
+
sources = env.Glob('intern/*.c')
env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [361])
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt
index 0d5b980acba..63ccdea3f0d 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -25,6 +25,7 @@
set(INC
..
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
@@ -95,6 +96,10 @@ if(WITH_AUDASPACE)
add_definitions(-DWITH_AUDASPACE)
endif()
+if(WITH_CYCLES)
+ add_definitions(-DWITH_CYCLES)
+endif()
+
if(WITH_INTERNATIONAL)
add_definitions(-DWITH_INTERNATIONAL)
endif()
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index ffa9e5cc27c..7dee2ce6fb4 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -174,6 +174,8 @@ void BPY_context_set(bContext *C)
/* defined in AUD_C-API.cpp */
extern PyObject *AUD_initPython(void);
+/* defined in cycles/blender */
+extern PyObject *CYCLES_initPython(void);
static struct _inittab bpy_internal_modules[]= {
{(char *)"noise", BPyInit_noise},
@@ -184,6 +186,9 @@ static struct _inittab bpy_internal_modules[]= {
#ifdef WITH_AUDASPACE
{(char *)"aud", AUD_initPython},
#endif
+#ifdef WITH_CYCLES
+ {(char *)"bcycles", CYCLES_initPython},
+#endif
{(char *)"gpu", GPU_initPython},
{NULL, NULL}
};
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 44e26a56db6..15a9ba44552 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -77,7 +77,7 @@
#include "../generic/py_capi_utils.h"
#ifdef WITH_INTERNATIONAL
-#include "UI_interface.h" /* bad level call into editors */
+#include "BLF_translation.h"
#endif
#define USE_PEDANTIC_WRITE