[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18295] branches/blender2.5/blender/source /blender: 2.5: fix "repeat last", and display of operator properties
Brecht Van Lommel
brecht at blender.org
Sat Jan 3 21:03:41 CET 2009
Revision: 18295
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18295
Author: blendix
Date: 2009-01-03 21:03:39 +0100 (Sat, 03 Jan 2009)
Log Message:
-----------
2.5: fix "repeat last", and display of operator properties
in rna outliner.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c
branches/blender2.5/blender/source/blender/windowmanager/intern/wm.c
branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c
Modified: branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c 2009-01-03 19:39:39 UTC (rev 18294)
+++ branches/blender2.5/blender/source/blender/editors/space_outliner/outliner.c 2009-01-03 20:03:39 UTC (rev 18295)
@@ -4184,6 +4184,7 @@
if(nameprop) {
text= RNA_property_string_get_alloc(&pptr, nameprop, textbuf, sizeof(textbuf));
+ descr= (char*)RNA_property_ui_description(&pptr, prop);
but= uiDefIconTextBut(block, LABEL, 0, icon, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, descr);
if(text != textbuf)
MEM_freeN(text);
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c 2009-01-03 19:39:39 UTC (rev 18294)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_modifier.c 2009-01-03 20:03:39 UTC (rev 18295)
@@ -875,7 +875,6 @@
srna= RNA_def_struct(brna, "CastModifier", "Modifier");
RNA_def_struct_ui_text(srna, "Cast Modifier", "Cast Modifier.");
RNA_def_struct_sdna(srna, "CastModifierData");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
prop= RNA_def_property(srna, "cast_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
Modified: branches/blender2.5/blender/source/blender/windowmanager/intern/wm.c
===================================================================
--- branches/blender2.5/blender/source/blender/windowmanager/intern/wm.c 2009-01-03 19:39:39 UTC (rev 18294)
+++ branches/blender2.5/blender/source/blender/windowmanager/intern/wm.c 2009-01-03 20:03:39 UTC (rev 18295)
@@ -80,12 +80,6 @@
{
int tot;
- if(op->ptr) {
- op->properties= op->ptr->data;
- MEM_freeN(op->ptr);
- op->ptr= NULL;
- }
-
BLI_addtail(&wm->operators, op);
tot= BLI_countlist(&wm->operators);
Modified: branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c 2009-01-03 19:39:39 UTC (rev 18294)
+++ branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c 2009-01-03 20:03:39 UTC (rev 18295)
@@ -367,11 +367,18 @@
op->type= ot;
BLI_strncpy(op->idname, ot->idname, OP_MAX_TYPENAME);
+ /* initialize properties, either copy or create */
op->ptr= MEM_callocN(sizeof(PointerRNA), "wmOperatorPtrRNA");
- if(properties && properties->data)
- op->ptr->data= IDP_CopyProperty(properties->data);
- RNA_pointer_create(&RNA_WindowManager, &wm->id, ot->srna, op->ptr->data, op->ptr);
+ if(properties && properties->data) {
+ op->properties= IDP_CopyProperty(properties->data);
+ }
+ else {
+ IDPropertyTemplate val = {0};
+ op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties");
+ }
+ RNA_pointer_create(&RNA_WindowManager, &wm->id, ot->srna, op->properties, op->ptr);
+ /* initialize error reports */
if (reports) {
op->reports= reports; /* must be initialized alredy */
}
More information about the Bf-blender-cvs
mailing list