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:
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r--source/blender/editors/render/render_shading.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 8babd4d32d9..73659db8910 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -1575,6 +1575,9 @@ static void copy_mtex_copybuf(ID *id)
case ID_PA:
mtex = &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]);
break;
+ case ID_LS:
+ mtex = &(((FreestyleLineStyle *)id)->mtex[(int)((FreestyleLineStyle *)id)->texact]);
+ break;
}
if (mtex && *mtex) {
@@ -1608,6 +1611,9 @@ static void paste_mtex_copybuf(ID *id)
case ID_PA:
mtex = &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]);
break;
+ case ID_LS:
+ mtex = &(((FreestyleLineStyle *)id)->mtex[(int)((FreestyleLineStyle *)id)->texact]);
+ break;
default:
BLI_assert("invalid id type");
return;
@@ -1674,7 +1680,8 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))
Lamp *la = CTX_data_pointer_get_type(C, "lamp", &RNA_Lamp).data;
World *wo = CTX_data_pointer_get_type(C, "world", &RNA_World).data;
ParticleSystem *psys = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data;
-
+ FreestyleLineStyle *linestyle = CTX_data_pointer_get_type(C, "line_style", &RNA_FreestyleLineStyle).data;
+
if (ma)
id = &ma->id;
else if (la)
@@ -1683,6 +1690,8 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op))
id = &wo->id;
else if (psys)
id = &psys->part->id;
+ else if (linestyle)
+ id = &linestyle->id;
if (id == NULL)
return OPERATOR_CANCELLED;