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:
authorAntony Riakiotakis <kalast@gmail.com>2013-09-05 18:02:59 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-09-05 18:02:59 +0400
commit4b1436b5252a6a006f0155e1bbb6c6b449b8f4e9 (patch)
treed544d077b8668520bac726677848fcf3a31131e3 /source/blender/windowmanager
parent4df6c73d25f9e772d52b083655157ee99eeb617f (diff)
Ctr-Alt-F radial control operator for texture painting, controls the
rotation of the brush mask texture. Unfortunately secondary path does not work here because we do not have a permanent switch to choose between primary-secondary brush texture. Use operator property instead.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 52d7b8bc58a..ad764cda853 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3391,6 +3391,7 @@ typedef struct {
int initial_mouse[2];
unsigned int gltex;
ListBase orig_paintcursors;
+ bool use_secondary_tex;
void *cursor;
} RadialControl;
@@ -3434,7 +3435,7 @@ static void radial_control_set_tex(RadialControl *rc)
switch (RNA_type_to_ID_code(rc->image_id_ptr.type)) {
case ID_BR:
- if ((ibuf = BKE_brush_gen_radial_control_imbuf(rc->image_id_ptr.data))) {
+ if ((ibuf = BKE_brush_gen_radial_control_imbuf(rc->image_id_ptr.data, rc->use_secondary_tex))) {
glGenTextures(1, &rc->gltex);
glBindTexture(GL_TEXTURE_2D, rc->gltex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, ibuf->x, ibuf->y, 0,
@@ -3707,6 +3708,8 @@ static int radial_control_get_properties(bContext *C, wmOperator *op)
}
}
+ rc->use_secondary_tex = RNA_boolean_get(op->ptr, "secondary_tex");
+
return 1;
}
@@ -3900,6 +3903,7 @@ static void WM_OT_radial_control(wmOperatorType *ot)
RNA_def_string(ot->srna, "fill_color_path", "", 0, "Fill Color Path", "Path of property used to set the fill color of the control");
RNA_def_string(ot->srna, "zoom_path", "", 0, "Zoom Path", "Path of property used to set the zoom level for the control");
RNA_def_string(ot->srna, "image_id", "", 0, "Image ID", "Path of ID that is used to generate an image for the control");
+ RNA_def_boolean(ot->srna, "secondary_tex", 0, "Secondary Texture", "Tweak brush secondary/mask texture");
}
/* ************************** timer for testing ***************** */