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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-06-28 14:18:47 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-08-12 05:10:11 +0400
commitd459d102b5fb5e1021abb33bb03324ba6f784db4 (patch)
tree954489a6fa28ff36400304ee507c80c4e466fdd6 /source/blender/editors/render
parent1741df1e36162c670082a64c66eed0975692c956 (diff)
Added new operator "Create Freestyle Stroke Material" for testing.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_intern.h1
-rw-r--r--source/blender/editors/render/render_ops.c1
-rw-r--r--source/blender/editors/render/render_shading.c24
3 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_intern.h b/source/blender/editors/render/render_intern.h
index 8f8cc542821..f9377d576bf 100644
--- a/source/blender/editors/render/render_intern.h
+++ b/source/blender/editors/render/render_intern.h
@@ -72,6 +72,7 @@ void SCENE_OT_freestyle_geometry_modifier_add(struct wmOperatorType *ot);
void SCENE_OT_freestyle_modifier_remove(struct wmOperatorType *ot);
void SCENE_OT_freestyle_modifier_move(struct wmOperatorType *ot);
void SCENE_OT_freestyle_modifier_copy(struct wmOperatorType *ot);
+void SCENE_OT_freestyle_stroke_material_create(struct wmOperatorType *ot);
#endif
diff --git a/source/blender/editors/render/render_ops.c b/source/blender/editors/render/render_ops.c
index 3401577ee55..0d334082a2b 100644
--- a/source/blender/editors/render/render_ops.c
+++ b/source/blender/editors/render/render_ops.c
@@ -75,6 +75,7 @@ void ED_operatortypes_render(void)
WM_operatortype_append(SCENE_OT_freestyle_modifier_remove);
WM_operatortype_append(SCENE_OT_freestyle_modifier_move);
WM_operatortype_append(SCENE_OT_freestyle_modifier_copy);
+ WM_operatortype_append(SCENE_OT_freestyle_stroke_material_create);
#endif
WM_operatortype_append(TEXTURE_OT_slot_copy);
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index f833a952271..021e4aaf339 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -1250,6 +1250,30 @@ void SCENE_OT_freestyle_modifier_move(wmOperatorType *ot)
RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to move, UP or DOWN");
}
+static int freestyle_stroke_material_create_exec(bContext *C, wmOperator *op)
+{
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+
+ FRS_create_stroke_material(C, bmain, scene);
+
+ return OPERATOR_FINISHED;
+}
+
+void SCENE_OT_freestyle_stroke_material_create(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name = "Create Freestyle Stroke Material";
+ ot->idname = "freestyle_stroke_material_create_exec";
+ ot->description = "Create Freestyle stroke material for testing";
+
+ /* api callbacks */
+ ot->exec = freestyle_stroke_material_create_exec;
+
+ /* flags */
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+}
+
#endif /* WITH_FREESTYLE */
static int texture_slot_move_exec(bContext *C, wmOperator *op)