[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22417] branches/soc-2009-yukishiro/source /blender: add light paint bruch to toolbar
Jingyuan Huang
jingyuan.huang at gmail.com
Wed Aug 12 21:04:48 CEST 2009
Revision: 22417
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22417
Author: yukishiro
Date: 2009-08-12 21:04:48 +0200 (Wed, 12 Aug 2009)
Log Message:
-----------
add light paint bruch to toolbar
Modified Paths:
--------------
branches/soc-2009-yukishiro/source/blender/editors/screen/screen_context.c
branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_toolbar.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_scene.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_sculpt_paint.c
Modified: branches/soc-2009-yukishiro/source/blender/editors/screen/screen_context.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/editors/screen/screen_context.c 2009-08-12 18:12:33 UTC (rev 22416)
+++ branches/soc-2009-yukishiro/source/blender/editors/screen/screen_context.c 2009-08-12 19:04:48 UTC (rev 22417)
@@ -51,7 +51,8 @@
"selected_editable_objects", "selected_editable_bases"
"active_base", "active_object", "edit_object",
"sculpt_object", "vertex_paint_object", "weight_paint_object",
- "texture_paint_object", "brush", "particle_edit_object", NULL};
+ "texture_paint_object", "light_paint_object", "brush",
+ "particle_edit_object", NULL};
CTX_data_dir_set(result, dir);
return 1;
@@ -135,6 +136,12 @@
return 1;
}
+ else if(CTX_data_equals(member, "light_paint_object")) {
+ if(G.f & G_LIGHTPAINT && scene->basact)
+ CTX_data_id_pointer_set(result, &scene->basact->object->id);
+
+ return 1;
+ }
else if(CTX_data_equals(member, "particle_edit_object")) {
if(G.f & G_PARTICLEEDIT && scene->basact)
CTX_data_id_pointer_set(result, &scene->basact->object->id);
Modified: branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_toolbar.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_toolbar.c 2009-08-12 18:12:33 UTC (rev 22416)
+++ branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_toolbar.c 2009-08-12 19:04:48 UTC (rev 22417)
@@ -194,7 +194,8 @@
else if (G.f & G_WEIGHTPAINT) return "weight_paint";
else if (G.f & G_VERTEXPAINT) return "vertex_paint";
else if (G.f & G_TEXTUREPAINT) return "texture_paint";
- else if(G.f & G_PARTICLEEDIT) return "particle_mode";
+ else if (G.f & G_LIGHTPAINT) return "light_paint";
+ else if (G.f & G_PARTICLEEDIT) return "particle_mode";
}
return "objectmode";
Modified: branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_scene.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_scene.c 2009-08-12 18:12:33 UTC (rev 22416)
+++ branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_scene.c 2009-08-12 19:04:48 UTC (rev 22417)
@@ -374,6 +374,10 @@
RNA_def_property_pointer_sdna(prop, NULL, "imapaint");
RNA_def_property_ui_text(prop, "Image Paint", "");
+ prop= RNA_def_property(srna, "light_paint", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "lpaint");
+ RNA_def_property_ui_text(prop, "Light Paint", "");
+
prop= RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "particle");
RNA_def_property_ui_text(prop, "Particle Edit", "");
Modified: branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_sculpt_paint.c
===================================================================
--- branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_sculpt_paint.c 2009-08-12 18:12:33 UTC (rev 22416)
+++ branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_sculpt_paint.c 2009-08-12 19:04:48 UTC (rev 22417)
@@ -220,6 +220,21 @@
RNA_def_property_ui_text(prop, "Angle", "Paint most on faces pointing towards the view acording to this angle.");
}
+static void rna_def_light_paint(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "LightPaint", NULL);
+ RNA_def_struct_sdna(srna, "VPaint");
+ RNA_def_struct_ui_text(srna, "Light Paint", "Properties of light paint mode.");
+
+ prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Brush");
+ RNA_def_property_ui_text(prop, "Brush", "");
+
+}
+
static void rna_def_particle_edit(BlenderRNA *brna)
{
StructRNA *srna;
@@ -356,6 +371,7 @@
rna_def_sculpt(brna);
rna_def_vertex_paint(brna);
rna_def_image_paint(brna);
+ rna_def_light_paint(brna);
rna_def_particle_edit(brna);
}
More information about the Bf-blender-cvs
mailing list