diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2016-08-04 00:31:48 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-08-04 00:39:36 +0300 |
commit | eaea4ea51f665945e44ff2ffa534a594e9fb1938 (patch) | |
tree | 0791ec0d78a4506eebf3bcf3800a5b1423143494 /release | |
parent | 9d4ea8427770e8ca68149fc7f7760fe2273e5ce3 (diff) |
Grease Pencil v2 Branch
Improve current Grease Pencil in order to get a better 2D animation tool.
More info in WIKI pages: https://wiki.blender.org/index.php/User:Antoniov
Reviewed By: Severin, aligorith, campbellbarton
Patch by @antoniov, with edits by @Severin.
Differential Revision: https://developer.blender.org/D2115
Diffstat (limited to 'release')
-rw-r--r-- | release/datafiles/blender_icons.svg | 489 | ||||
-rw-r--r-- | release/datafiles/blender_icons16/icon16_restrict_color_off.dat | bin | 0 -> 1048 bytes | |||
-rw-r--r-- | release/datafiles/blender_icons16/icon16_restrict_color_on.dat | bin | 0 -> 1048 bytes | |||
-rw-r--r-- | release/datafiles/blender_icons32/icon32_restrict_color_off.dat | bin | 0 -> 4120 bytes | |||
-rw-r--r-- | release/datafiles/blender_icons32/icon32_restrict_color_on.dat | bin | 0 -> 4120 bytes | |||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 478 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_clip.py | 25 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 21 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 28 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 14 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 16 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 13 |
12 files changed, 1001 insertions, 83 deletions
diff --git a/release/datafiles/blender_icons.svg b/release/datafiles/blender_icons.svg index 40b974661fa..030953cf614 100644 --- a/release/datafiles/blender_icons.svg +++ b/release/datafiles/blender_icons.svg @@ -30957,6 +30957,93 @@ y1="-16" x2="-93.75" y2="-16.264704" /> + <filter + inkscape:label="Opacity" + style="color-interpolation-filters:sRGB" + id="filter17385"> + <feColorMatrix + values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 5 -1 " + result="colormatrix" + id="feColorMatrix17387" /> + <feComposite + k4="0" + k3="0" + k1="0" + in2="colormatrix" + operator="arithmetic" + k2="0.24" + result="composite" + id="feComposite17389" /> + </filter> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient18134" + id="radialGradient37501-3-6-2" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.08933014,-0.7764284,0.7350832,-0.08334857,57.410559,233.30156)" + cx="135.83771" + cy="117.97826" + fx="135.83771" + fy="117.97826" + r="8" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient18134" + id="radialGradient37501-3-6" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.08933014,-0.7764284,0.7350832,-0.08334857,57.410559,233.30156)" + cx="135.83771" + cy="117.97826" + fx="135.83771" + fy="117.97826" + r="8" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient18134" + id="linearGradient17463" + gradientUnits="userSpaceOnUse" + x1="121.19734" + y1="105.94044" + x2="148.06364" + y2="137.6748" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient16595" + id="linearGradient17281" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(144,188)" + x1="209" + y1="238" + x2="226.625" + y2="251.71078" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient18134" + id="linearGradient31399" + gradientUnits="userSpaceOnUse" + x1="62.793919" + y1="133.73566" + x2="64.109718" + y2="135.18265" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient319" + id="linearGradient31452" + gradientUnits="userSpaceOnUse" + x1="121.19734" + y1="105.94044" + x2="148.06364" + y2="137.6748" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient1610-36-6-5" + id="linearGradient31454" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(144,188)" + x1="209" + y1="238" + x2="226.625" + y2="251.71078" /> </defs> <sodipodi:namedview id="base" @@ -30968,16 +31055,16 @@ objecttolerance="10000" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="40.768576" - inkscape:cx="236.56738" - inkscape:cy="163.14077" + inkscape:zoom="10.192144" + inkscape:cx="406.73801" + inkscape:cy="204.25086" inkscape:document-units="px" inkscape:current-layer="g24024-1" showgrid="true" - inkscape:window-width="1920" - inkscape:window-height="982" - inkscape:window-x="0" - inkscape:window-y="28" + inkscape:window-width="1680" + inkscape:window-height="987" + inkscape:window-x="-8" + inkscape:window-y="-8" inkscape:snap-nodes="false" inkscape:snap-bbox="true" showguides="true" @@ -91590,8 +91677,7 @@ cx="304.0946" cy="242.89087" rx="0.59120387" - ry="0.61330098" - d="m 304.68581,242.89087 c 0,0.33872 -0.26469,0.6133 -0.59121,0.6133 -0.32651,0 -0.5912,-0.27458 -0.5912,-0.6133 0,-0.33872 0.26469,-0.6133 0.5912,-0.6133 0.32652,0 0.59121,0.27458 0.59121,0.6133 z" /> + ry="0.61330098" /> <ellipse sodipodi:ry="0.61330098" sodipodi:rx="0.59120387" @@ -91602,8 +91688,7 @@ cx="315.98523" cy="242.95337" rx="0.59120387" - ry="0.61330098" - d="m 316.57643,242.95337 c 0,0.33872 -0.26469,0.6133 -0.5912,0.6133 -0.32651,0 -0.5912,-0.27458 -0.5912,-0.6133 0,-0.33872 0.26469,-0.6133 0.5912,-0.6133 0.32651,0 0.5912,0.27458 0.5912,0.6133 z" /> + ry="0.61330098" /> </g> <g clip-path="url(#clipPath15455-9)" @@ -91819,8 +91904,7 @@ cy="242.89087" cx="304.0946" id="ellipse15366" - style="opacity:0.51799999;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" - d="m 304.68581,242.89087 c 0,0.33872 -0.26469,0.6133 -0.59121,0.6133 -0.32651,0 -0.5912,-0.27458 -0.5912,-0.6133 0,-0.33872 0.26469,-0.6133 0.5912,-0.6133 0.32652,0 0.59121,0.27458 0.59121,0.6133 z" /> + style="opacity:0.51799999;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> <ellipse sodipodi:ry="0.61330098" sodipodi:rx="0.59120387" @@ -91831,8 +91915,7 @@ cy="242.95337" cx="315.98523" id="ellipse15368" - style="opacity:0.51799999;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" - d="m 316.57643,242.95337 c 0,0.33872 -0.26469,0.6133 -0.5912,0.6133 -0.32651,0 -0.5912,-0.27458 -0.5912,-0.6133 0,-0.33872 0.26469,-0.6133 0.5912,-0.6133 0.32651,0 0.5912,0.27458 0.5912,0.6133 z" /> + style="opacity:0.51799999;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> </g> <g transform="translate(189.00803,-79.37555)" @@ -91942,6 +92025,382 @@ style="color:#000000;fill:url(#radialGradient14216);fill-opacity:1;stroke:none;stroke-width:1.20000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" /> </g> </g> + <g + style="display:inline;enable-background:new" + id="g17465" + transform="translate(62.844714,-106.93345)"> + <g + transform="matrix(0.7,0,0,0.7,146.7,264.8)" + id="ICON_COLOR-1-9" + style="display:inline;enable-background:new"> + <rect + y="238" + x="341" + height="16" + width="16" + id="rect36341-2-0" + style="display:inline;overflow:visible;visibility:visible;opacity:0;fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;enable-background:accumulate" /> + <g + id="g36343-7-5" + transform="translate(0,-12)"> + <g + transform="matrix(1.1658027,0,0,1.1657997,198.71028,-2.0560643)" + id="g36345-0-4"> + <path + transform="matrix(0.6969448,0,0,0.6969467,36.918512,140.83126)" + sodipodi:type="arc" + style="fill:#ff6600;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path36349-4-2" + sodipodi:cx="132" + sodipodi:cy="118" + sodipodi:rx="8" + sodipodi:ry="8" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:start="4.712389" + sodipodi:end="5.7595865" + inkscape:transform-center-x="-2.8145849" + inkscape:transform-center-y="-3.2499984" /> + <path + inkscape:transform-center-y="1.6729808e-005" + inkscape:transform-center-x="-3.2630798" + sodipodi:end="5.7595865" + sodipodi:start="4.712389" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + sodipodi:ry="8" + sodipodi:rx="8" + sodipodi:cy="118" + sodipodi:cx="132" + id="path36351-3-6" + style="fill:#ad2f94;fill-opacity:1;fill-rule:nonzero;stroke:none" + sodipodi:type="arc" + transform="matrix(0.3484724,0.6035735,-0.603572,0.3484734,154.13836,102.27942)" /> + <path + transform="matrix(-0.3484724,0.6035735,-0.603572,-0.3484733,246.13507,184.51913)" + sodipodi:type="arc" + style="fill:#0060f0;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path36353-9-8" + sodipodi:cx="132" + sodipodi:cy="118" + sodipodi:rx="8" + sodipodi:ry="8" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:start="4.712389" + sodipodi:end="5.7595865" + inkscape:transform-center-x="-2.8145756" + inkscape:transform-center-y="3.2500173" /> + <path + inkscape:transform-center-y="3.249994" + inkscape:transform-center-x="2.8145978" + sodipodi:end="5.7595865" + sodipodi:start="4.712389" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + sodipodi:ry="8" + sodipodi:rx="8" + sodipodi:cy="118" + sodipodi:cx="132" + id="path36355-6-4" + style="fill:#00d4aa;fill-opacity:1;fill-rule:nonzero;stroke:none" + sodipodi:type="arc" + transform="matrix(-0.6969448,2.2484149e-8,-4.6257528e-8,-0.6969467,220.91956,305.31067)" /> + <path + transform="matrix(-0.3484724,-0.6035734,0.603572,-0.3484734,103.69972,343.86251)" + sodipodi:type="arc" + style="fill:#ccff00;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path36357-5-2" + sodipodi:cx="132" + sodipodi:cy="118" + sodipodi:rx="8" + sodipodi:ry="8" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:start="4.712389" + sodipodi:end="5.7595865" + inkscape:transform-center-x="3.2630773" /> + <path + inkscape:transform-center-x="2.8145777" + sodipodi:end="5.7595865" + sodipodi:start="4.712389" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + sodipodi:ry="8" + sodipodi:rx="8" + sodipodi:cy="118" + sodipodi:cx="132" + id="path36359-0-5" + style="fill:#ffbf0e;fill-opacity:1;fill-rule:nonzero;stroke:none" + sodipodi:type="arc" + transform="matrix(0.3484724,-0.6035734,0.603572,0.3484733,11.703006,261.6228)" + inkscape:transform-center-y="-3.2500006" /> + </g> + <circle + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + id="path36361-8-8" + style="fill:none;stroke:#000000;stroke-width:0.98948926;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + transform="matrix(0.8124999,0,0,0.8045157,241.75,163.13011)" + cx="132" + cy="118" + r="8" /> + <circle + style="display:inline;opacity:0.3;fill:url(#radialGradient37501-3-6);fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path36363-2-9" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + transform="matrix(-0.7451143,-0.08386971,0.08492794,-0.7396793,437.33358,356.39712)" + cx="132" + cy="118" + r="8" /> + <circle + transform="matrix(0.6860851,0,0,0.6874876,258.44808,176.87656)" + style="fill:none;stroke:url(#linearGradient17463);stroke-width:1.45605874;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path36365-2-9" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + cx="132" + cy="118" + r="8" /> + </g> + </g> + <g + inkscape:transform-center-y="0.19622957" + inkscape:transform-center-x="-1.373607" + id="ICON_RESTRICT_SELECT_OFF-9" + style="display:inline;enable-background:new" + transform="matrix(0.45975513,-0.19653299,0.19653299,0.45975513,138.04837,311.70175)"> + <path + style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient17281);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;enable-background:accumulate" + d="m 367.75,440.75 1.75,-1.5 2.5,5.25 1.75,-1 -2.25,-5 2.5,0 -6.25,-6.25 z" + id="path45378-1-5-6-6" + sodipodi:nodetypes="cccccccc" + inkscape:connector-curvature="0" /> + <rect + style="display:inline;overflow:visible;visibility:visible;opacity:0;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;enable-background:accumulate" + id="rect45374-0-5-6-1" + width="16" + height="16" + x="362" + y="430" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 367.5,431.5 7,7.25 -3,0 2.5,4.75 -1.75,1 -2.5,-5 -2.25,2.25 z" + id="path17835-7-5" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccc" /> + <path + style="fill:none;stroke:#ffffff;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 368.34375,433.75 0,5.75" + id="path17845-9-6" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + </g> + </g> + <g + style="display:inline;filter:url(#filter17385);enable-background:new" + id="g17465-0" + transform="translate(41.727744,-106.93345)"> + <g + transform="matrix(0.7,0,0,0.7,146.7,264.8)" + id="ICON_COLOR-1-9-4" + style="display:inline;enable-background:new"> + <rect + y="238" + x="341" + height="16" + width="16" + id="rect36341-2-0-1" + style="display:inline;overflow:visible;visibility:visible;opacity:0;fill:#b3b3b3;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.79999995;marker:none;enable-background:accumulate" /> + <g + id="g36343-7-5-5" + transform="translate(0,-12)"> + <g + transform="matrix(1.1658027,0,0,1.1657997,198.71028,-2.0560643)" + id="g36345-0-4-4"> + <path + transform="matrix(0.6969448,0,0,0.6969467,36.918512,140.83126)" + sodipodi:type="arc" + style="fill:#ff6600;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path36349-4-2-6" + sodipodi:cx="132" + sodipodi:cy="118" + sodipodi:rx="8" + sodipodi:ry="8" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:start="4.712389" + sodipodi:end="5.7595865" + inkscape:transform-center-x="-2.8145849" + inkscape:transform-center-y="-3.2499984" /> + <path + inkscape:transform-center-y="1.6729808e-005" + inkscape:transform-center-x="-3.2630798" + sodipodi:end="5.7595865" + sodipodi:start="4.712389" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + sodipodi:ry="8" + sodipodi:rx="8" + sodipodi:cy="118" + sodipodi:cx="132" + id="path36351-3-6-5" + style="fill:#ad2f94;fill-opacity:1;fill-rule:nonzero;stroke:none" + sodipodi:type="arc" + transform="matrix(0.3484724,0.6035735,-0.603572,0.3484734,154.13836,102.27942)" /> + <path + transform="matrix(-0.3484724,0.6035735,-0.603572,-0.3484733,246.13507,184.51913)" + sodipodi:type="arc" + style="fill:#0060f0;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path36353-9-8-2" + sodipodi:cx="132" + sodipodi:cy="118" + sodipodi:rx="8" + sodipodi:ry="8" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:start="4.712389" + sodipodi:end="5.7595865" + inkscape:transform-center-x="-2.8145756" + inkscape:transform-center-y="3.2500173" /> + <path + inkscape:transform-center-y="3.249994" + inkscape:transform-center-x="2.8145978" + sodipodi:end="5.7595865" + sodipodi:start="4.712389" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + sodipodi:ry="8" + sodipodi:rx="8" + sodipodi:cy="118" + sodipodi:cx="132" + id="path36355-6-4-4" + style="fill:#00d4aa;fill-opacity:1;fill-rule:nonzero;stroke:none" + sodipodi:type="arc" + transform="matrix(-0.6969448,2.2484149e-8,-4.6257528e-8,-0.6969467,220.91956,305.31067)" /> + <path + transform="matrix(-0.3484724,-0.6035734,0.603572,-0.3484734,103.69972,343.86251)" + sodipodi:type="arc" + style="fill:#ccff00;fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path36357-5-2-5" + sodipodi:cx="132" + sodipodi:cy="118" + sodipodi:rx="8" + sodipodi:ry="8" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:start="4.712389" + sodipodi:end="5.7595865" + inkscape:transform-center-x="3.2630773" /> + <path + inkscape:transform-center-x="2.8145777" + sodipodi:end="5.7595865" + sodipodi:start="4.712389" + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + d="m 132,110 a 8,8 0 0 1 6.9282,4 L 132,118 Z" + sodipodi:ry="8" + sodipodi:rx="8" + sodipodi:cy="118" + sodipodi:cx="132" + id="path36359-0-5-9" + style="fill:#ffbf0e;fill-opacity:1;fill-rule:nonzero;stroke:none" + sodipodi:type="arc" + transform="matrix(0.3484724,-0.6035734,0.603572,0.3484733,11.703006,261.6228)" + inkscape:transform-center-y="-3.2500006" /> + </g> + <circle + inkscape:export-ydpi="90" + inkscape:export-xdpi="90" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + id="path36361-8-8-0" + style="fill:none;stroke:#000000;stroke-width:0.98948926;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + transform="matrix(0.8124999,0,0,0.8045157,241.75,163.13011)" + cx="132" + cy="118" + r="8" /> + <circle + style="display:inline;opacity:0.3;fill:url(#radialGradient37501-3-6-2);fill-opacity:1;fill-rule:nonzero;stroke:none" + id="path36363-2-9-7" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + transform="matrix(-0.7451143,-0.08386971,0.08492794,-0.7396793,437.33358,356.39712)" + cx="132" + cy="118" + r="8" /> + <circle + transform="matrix(0.6860851,0,0,0.6874876,258.44808,176.87656)" + style="fill:none;stroke:url(#linearGradient31452);stroke-width:1.45605874;stroke-linecap:square;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path36365-2-9-7" + inkscape:export-filename="C:\Documents and Settings\Tata\Pulpit\Kopia blender\.blender\icons\blender's iconset.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + cx="132" + cy="118" + r="8" /> + </g> + </g> + <g + inkscape:transform-center-y="0.19622957" + inkscape:transform-center-x="-1.373607" + id="ICON_RESTRICT_SELECT_OFF-9-8" + style="display:inline;enable-background:new" + transform="matrix(0.45975513,-0.19653299,0.19653299,0.45975513,138.04837,311.70175)"> + <path + style="display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient31454);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.80000001;marker:none;enable-background:accumulate" + d="m 367.75,440.75 1.75,-1.5 2.5,5.25 1.75,-1 -2.25,-5 2.5,0 -6.25,-6.25 z" + id="path45378-1-5-6-6-9" + sodipodi:nodetypes="cccccccc" + inkscape:connector-curvature="0" /> + <rect + style="display:inline;overflow:visible;visibility:visible;opacity:0;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;enable-background:accumulate" + id="rect45374-0-5-6-1-0" + width="16" + height="16" + x="362" + y="430" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.89999998;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 367.5,431.5 7,7.25 -3,0 2.5,4.75 -1.75,1 -2.5,-5 -2.25,2.25 z" + id="path17835-7-5-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccc" /> + <path + style="fill:none;stroke:#ffffff;stroke-width:0.80000001;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 368.34375,433.75 0,5.75" + id="path17845-9-6-9" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + </g> + </g> </g> </g> <g diff --git a/release/datafiles/blender_icons16/icon16_restrict_color_off.dat b/release/datafiles/blender_icons16/icon16_restrict_color_off.dat Binary files differnew file mode 100644 index 00000000000..d313539e3c5 --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_restrict_color_off.dat diff --git a/release/datafiles/blender_icons16/icon16_restrict_color_on.dat b/release/datafiles/blender_icons16/icon16_restrict_color_on.dat Binary files differnew file mode 100644 index 00000000000..bb7782bb42a --- /dev/null +++ b/release/datafiles/blender_icons16/icon16_restrict_color_on.dat diff --git a/release/datafiles/blender_icons32/icon32_restrict_color_off.dat b/release/datafiles/blender_icons32/icon32_restrict_color_off.dat Binary files differnew file mode 100644 index 00000000000..bbe5f61935d --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_restrict_color_off.dat diff --git a/release/datafiles/blender_icons32/icon32_restrict_color_on.dat b/release/datafiles/blender_icons32/icon32_restrict_color_on.dat Binary files differnew file mode 100644 index 00000000000..46ba9e31407 --- /dev/null +++ b/release/datafiles/blender_icons32/icon32_restrict_color_on.dat diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index baa70ed08f5..b3d6107ccdb 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -136,7 +136,7 @@ class GreasePencilStrokeEditPanel: def draw(self, context): layout = self.layout - is_3d_view = context.space_data.type == 'VIEW_3D' + is_3d_view = context.space_data.type == 'VIEW_3D' if not is_3d_view: layout.label(text="Select:") @@ -151,18 +151,19 @@ class GreasePencilStrokeEditPanel: col.operator("gpencil.select_linked") col.operator("gpencil.select_more") col.operator("gpencil.select_less") - - layout.separator() + col.operator("gpencil.palettecolor_select") layout.label(text="Edit:") row = layout.row(align=True) row.operator("gpencil.copy", text="Copy") - row.operator("gpencil.paste", text="Paste") + row.operator("gpencil.paste", text="Paste").type = 'COPY' + row.operator("gpencil.paste", text="Paste & Merge").type = 'MERGE' col = layout.column(align=True) - col.operator("gpencil.delete", text="Delete") + col.operator("gpencil.delete") col.operator("gpencil.duplicate_move", text="Duplicate") - col.operator("transform.mirror", text="Mirror") + if is_3d_view: + col.operator("gpencil.stroke_cyclical_set", text="Toggle Cyclic").type = 'TOGGLE' layout.separator() @@ -176,9 +177,92 @@ class GreasePencilStrokeEditPanel: col = layout.column(align=True) col.operator("transform.bend", text="Bend") + col.operator("transform.mirror", text="Mirror") col.operator("transform.shear", text="Shear") col.operator("transform.tosphere", text="To Sphere") + layout.separator() + col = layout.column(align=True) + col.operator_menu_enum("gpencil.stroke_arrange", text="Arrange Strokes...", property="direction") + col.operator("gpencil.stroke_change_color", text="Move to Color") + + layout.separator() + col = layout.column(align=True) + col.operator("gpencil.stroke_join", text="Join").type = 'JOIN' + col.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' + col.operator("gpencil.stroke_flip", text="Flip direction") + + gpd = context.gpencil_data + if gpd: + col.prop(gpd, "show_stroke_direction", text="Show drawing direction") + + +class GreasePencilBrushPanel: + # subclass must set + # bl_space_type = 'IMAGE_EDITOR' + bl_label = "Drawing Brushes" + bl_category = "Grease Pencil" + bl_region_type = 'TOOLS' + + @staticmethod + def draw(self, context): + layout = self.layout + + row = layout.row() + col = row.column() + ts = context.scene.tool_settings + if len(ts.gpencil_brushes) >= 2: + brows = 3 + else: + brows = 2 + col.template_list("GPENCIL_UL_brush", "", ts, "gpencil_brushes", ts.gpencil_brushes, "active_index", rows=brows) + + col = row.column() + + sub = col.column(align=True) + sub.operator("gpencil.brush_add", icon='ZOOMIN', text="") + sub.operator("gpencil.brush_remove", icon='ZOOMOUT', text="") + sub.menu("GPENCIL_MT_brush_specials", icon='DOWNARROW_HLT', text="") + brush = context.active_gpencil_brush + if brush: + if len(ts.gpencil_brushes) > 1: + col.separator() + sub = col.column(align=True) + sub.operator("gpencil.brush_move", icon='TRIA_UP', text="").type = 'UP' + sub.operator("gpencil.brush_move", icon='TRIA_DOWN', text="").type = 'DOWN' + + # Brush details + if brush is not None: + row = layout.row() + row.prop(brush, "line_width") + row = layout.row(align=True) + row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE') + row.prop(brush, "pen_sensitivity_factor", slider=True) + row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE') + row = layout.row(align=True) + row.prop(brush, "use_random_strength", text='', icon='RNDCURVE') + row.prop(brush, "strength", slider=True) + row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE') + row = layout.row(align=True) + row.prop(brush, "random_press", slider=True) + + row = layout.row(align=True) + row.prop(brush, "jitter", slider=True) + row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE') + row = layout.row() + row.prop(brush, "angle", slider=True) + row.prop(brush, "angle_factor", text="Factor", slider=True) + + box = layout.box() + col = box.column(align=True) + col.label(text="Stroke Quality:") + col.prop(brush, "pen_smooth_factor") + col.prop(brush, "pen_smooth_steps") + col.separator() + row = col.row(align=False) + row.prop(brush, "pen_subdivision_steps") + row.prop(brush, "random_subdiv", text='Randomness', slider=True) + class GreasePencilStrokeSculptPanel: # subclass must set @@ -203,7 +287,7 @@ class GreasePencilStrokeSculptPanel: tool = settings.tool brush = settings.brush - layout.column().prop(settings, "tool", expand=True) + layout.column().prop(settings, "tool") col = layout.column() col.prop(brush, "size", slider=True) @@ -211,6 +295,11 @@ class GreasePencilStrokeSculptPanel: row.prop(brush, "strength", slider=True) row.prop(brush, "use_pressure_strength", text="") col.prop(brush, "use_falloff") + if tool in {'SMOOTH', 'RANDOMIZE'}: + row = layout.row(align=True) + row.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True) + row.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True) + row.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True) layout.separator() @@ -220,18 +309,54 @@ class GreasePencilStrokeSculptPanel: row = layout.row(align=True) row.prop_enum(brush, "direction", 'ADD', text="Pinch") row.prop_enum(brush, "direction", 'SUBTRACT', text="Inflate") - elif tool == 'TWIST': + elif settings.tool == 'TWIST': row = layout.row(align=True) row.prop_enum(brush, "direction", 'SUBTRACT', text="CW") row.prop_enum(brush, "direction", 'ADD', text="CCW") - layout.separator() - layout.prop(settings, "use_select_mask") + row = layout.row(align=True) + row.prop(settings, "use_select_mask") + row = layout.row(align=True) + row.prop(settings, "selection_alpha", slider=True) if tool == 'SMOOTH': layout.prop(brush, "affect_pressure") +class GreasePencilBrushCurvesPanel: + # subclass must set + # bl_space_type = 'IMAGE_EDITOR' + bl_label = "Grease Pencil Curves" + bl_category = "Grease Pencil" + bl_region_type = 'TOOLS' + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + if context.active_gpencil_brush is None: + return False + + brush = context.active_gpencil_brush + return bool(brush) + + @staticmethod + def draw(self, context): + layout = self.layout + brush = context.active_gpencil_brush + # Brush + layout.label("Sensitivity") + box = layout.box() + box.template_curve_mapping(brush, "curve_sensitivity", brush=True) + + layout.label("Strength") + box = layout.box() + box.template_curve_mapping(brush, "curve_strength", brush=True) + + layout.label("Jitter") + box = layout.box() + box.template_curve_mapping(brush, "curve_jitter", brush=True) + + ############################### class GPENCIL_PIE_tool_palette(Menu): @@ -282,6 +407,7 @@ class GPENCIL_PIE_tool_palette(Menu): col.operator("gpencil.select_all", text="Select All", icon='PARTICLE_POINT') col.operator("gpencil.select_all", text="Select Inverse", icon='BLANK1') col.operator("gpencil.select_linked", text="Select Linked", icon='LINKED') + col.operator("gpencil.palettecolor_select", text="Select Color", icon='COLOR') # NE - Select (Modal) col = pie.column() @@ -315,24 +441,47 @@ class GPENCIL_PIE_settings_palette(Menu): pie = layout.menu_pie() # gpd = context.gpencil_data gpl = context.active_gpencil_layer + palcolor = context.active_gpencil_palettecolor + brush = context.active_gpencil_brush # W - Stroke draw settings col = pie.column(align=True) - col.label(text="Stroke") - col.prop(gpl, "color", text="") - col.prop(gpl, "alpha", text="", slider=True) + if palcolor is not None: + col.label(text="Stroke") + col.prop(palcolor, "color", text="") + col.prop(palcolor, "alpha", text="", slider=True) # E - Fill draw settings col = pie.column(align=True) - col.label(text="Fill") - col.prop(gpl, "fill_color", text="") - col.prop(gpl, "fill_alpha", text="", slider=True) + if palcolor is not None: + col.label(text="Fill") + col.prop(palcolor, "fill_color", text="") + col.prop(palcolor, "fill_alpha", text="", slider=True) - # S - Layer settings + # S Brush settings col = pie.column() - col.prop(gpl, "line_width", slider=True) - # col.prop(gpl, "use_volumetric_strokes") - col.prop(gpl, "use_onion_skinning") + col.label("Active Brush: ") + + row = col.row() + row.operator_context = 'EXEC_REGION_WIN' + row.operator_menu_enum("gpencil.brush_change", "brush", text="", icon='BRUSH_DATA') + row.prop(brush, "name", text="") + + col.prop(brush, "line_width", slider=True) + row = col.row(align=True) + row.prop(brush, "use_random_pressure", text='', icon='RNDCURVE') + row.prop(brush, "pen_sensitivity_factor", slider=True) + row.prop(brush, "use_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row(align=True) + row.prop(brush, "use_random_strength", text='', icon='RNDCURVE') + row.prop(brush, "strength", slider=True) + row.prop(brush, "use_strength_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row(align=True) + row.prop(brush, "jitter", slider=True) + row.prop(brush, "use_jitter_pressure", text='', icon='STYLUS_PRESSURE') + row = col.row() + row.prop(brush, "angle", slider=True) + row.prop(brush, "angle_factor", text="Factor", slider=True) # N - Active Layer col = pie.column() @@ -347,6 +496,35 @@ class GPENCIL_PIE_settings_palette(Menu): row = col.row() row.prop(gpl, "lock") row.prop(gpl, "hide") + col.prop(gpl, "use_onion_skinning") + + # NW - Move stroke Down + col = pie.column(align=True) + col.label("Arrange Strokes") + col.operator("gpencil.stroke_arrange", text="Send to Back").direction = 'BOTTOM' + col.operator("gpencil.stroke_arrange", text="Send Backward").direction = 'DOWN' + + # NE - Move stroke Up + col = pie.column(align=True) + col.label("Arrange Strokes") + col.operator("gpencil.stroke_arrange", text="Bring to Front").direction = 'TOP' + col.operator("gpencil.stroke_arrange", text="Bring Forward").direction = 'UP' + + # SW - Move stroke to color + col = pie.column(align=True) + col.operator("gpencil.stroke_change_color", text="Move to Color") + + # SE - Join strokes + col = pie.column(align=True) + col.label("Join Strokes") + row = col.row() + row.operator("gpencil.stroke_join", text="Join").type = 'JOIN' + row.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' + col.operator("gpencil.stroke_flip", text="Flip direction") + + gpd = context.gpencil_data + if gpd: + col.prop(gpd, "show_stroke_direction", text="Show drawing direction") class GPENCIL_PIE_tools_more(Menu): @@ -411,6 +589,11 @@ class GPENCIL_PIE_sculpt(Menu): row.prop(brush, "strength", slider=True) # row.prop(brush, "use_pressure_strength", text="", icon_only=True) col.prop(brush, "use_falloff") + if settings.tool in {'SMOOTH', 'RANDOMIZE'}: + row = col.row(align=True) + row.prop(settings, "affect_position", text="Position", icon='MESH_DATA', toggle=True) + row.prop(settings, "affect_strength", text="Strength", icon='COLOR', toggle=True) + row.prop(settings, "affect_thickness", text="Thickness", icon='LINE_DATA', toggle=True) # S - Change Brush Type Shortcuts row = pie.row() @@ -422,6 +605,7 @@ class GPENCIL_PIE_sculpt(Menu): row = pie.row() row.prop_enum(settings, "tool", value='SMOOTH') row.prop_enum(settings, "tool", value='THICKNESS') + row.prop_enum(settings, "tool", value='STRENGTH') row.prop_enum(settings, "tool", value='RANDOMIZE') @@ -448,6 +632,48 @@ class GPENCIL_MT_snap(Menu): ############################### +class GPENCIL_UL_brush(UIList): + def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + # assert(isinstance(item, bpy.types.GPencilBrush) + brush = item + + if self.layout_type in {'DEFAULT', 'COMPACT'}: + row = layout.row(align=True) + row.prop(brush, "name", text="", emboss=False, icon='BRUSH_DATA') + elif self.layout_type == 'GRID': + layout.alignment = 'CENTER' + layout.label(text="", icon_value=icon) + + +class GPENCIL_UL_palettecolor(UIList): + def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): + # assert(isinstance(item, bpy.types.PaletteColor) + palcolor = item + + if self.layout_type in {'DEFAULT', 'COMPACT'}: + if palcolor.lock: + layout.active = False + + split = layout.split(percentage=0.25) + row = split.row(align=True) + row.prop(palcolor, "color", text="", emboss=palcolor.is_stroke_visible) + row.prop(palcolor, "fill_color", text="", emboss=palcolor.is_fill_visible) + split.prop(palcolor, "info", text="", emboss=False) + + row = layout.row(align=True) + row.prop(palcolor, "lock", text="", emboss=False) + row.prop(palcolor, "hide", text="", emboss=False) + if palcolor.ghost is True: + icon = 'GHOST_DISABLED' + else: + icon = 'GHOST_ENABLED' + row.prop(palcolor, "ghost", text="", icon=icon, emboss=False) + + elif self.layout_type == 'GRID': + layout.alignment = 'CENTER' + layout.label(text="", icon_value=icon) + + class GPENCIL_UL_layer(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): # assert(isinstance(item, bpy.types.GPencilLayer) @@ -457,15 +683,19 @@ class GPENCIL_UL_layer(UIList): if gpl.lock: layout.active = False - split = layout.split(percentage=0.25) - row = split.row(align=True) - row.prop(gpl, "color", text="", emboss=gpl.is_stroke_visible) - row.prop(gpl, "fill_color", text="", emboss=gpl.is_fill_visible) - split.prop(gpl, "info", text="", emboss=False) + row = layout.row(align=True) + if gpl.is_parented: + icon = 'BONE_DATA' + else: + icon = 'BLANK1' + + row.label(text="", icon=icon) + row.prop(gpl, "info", text="", emboss=False) row = layout.row(align=True) row.prop(gpl, "lock", text="", emboss=False) row.prop(gpl, "hide", text="", emboss=False) + row.prop(gpl, "unlock_color", text="", emboss=False) elif self.layout_type == 'GRID': layout.alignment = 'CENTER' layout.label(text="", icon_value=icon) @@ -489,11 +719,40 @@ class GPENCIL_MT_layer_specials(Menu): layout.operator("gpencil.lock_all", icon='LOCKED', text="Lock All") layout.operator("gpencil.unlock_all", icon='UNLOCKED', text="UnLock All") + layout.separator() + + layout.operator("gpencil.layer_merge", icon='NLA', text="Merge Down") + + +class GPENCIL_MT_brush_specials(Menu): + bl_label = "Layer" + + def draw(self, context): + layout = self.layout + layout.operator("gpencil.brush_copy", icon='PASTEDOWN', text="Copy current drawing brush") + layout.operator("gpencil.brush_presets_create", icon='HELP', text="Create a set of predefined brushes") + + +class GPENCIL_MT_palettecolor_specials(Menu): + bl_label = "Layer" + + def draw(self, context): + layout = self.layout + + layout.operator("gpencil.palettecolor_reveal", icon='RESTRICT_VIEW_OFF', text="Show All") + layout.operator("gpencil.palettecolor_hide", icon='RESTRICT_VIEW_ON', text="Hide Others").unselected = True + + layout.separator() + + layout.operator("gpencil.palettecolor_lock_all", icon='LOCKED', text="Lock All") + layout.operator("gpencil.palettecolor_unlock_all", icon='UNLOCKED', text="UnLock All") + layout.operator("gpencil.palettecolor_copy", icon='PASTEDOWN', text="Copy Color") + class GreasePencilDataPanel: # subclass must set # bl_space_type = 'IMAGE_EDITOR' - bl_label = "Grease Pencil" + bl_label = "Grease Pencil Layers" bl_region_type = 'UI' @staticmethod @@ -553,46 +812,56 @@ class GreasePencilDataPanel: col.separator() sub = col.column(align=True) - sub.operator("gpencil.layer_isolate", icon='SOLO_OFF', text="").affect_visibility = False + sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True if gpl: - self.draw_layer(layout, gpl) + self.draw_layer(context, layout, gpl) - def draw_layer(self, layout, gpl): + def draw_layer(self, context, layout, gpl): + row = layout.row(align=True) + row.prop(gpl, "opacity", text="Opacity", slider=True) # layer settings split = layout.split(percentage=0.5) split.active = not gpl.lock - - # Column 1 - Stroke - col = split.column(align=True) - col.label(text="Stroke:") - col.prop(gpl, "color", text="") - col.prop(gpl, "alpha", slider=True) - - # Column 2 - Fill - col = split.column(align=True) - col.label(text="Fill:") - col.prop(gpl, "fill_color", text="") - col.prop(gpl, "fill_alpha", text="Opacity", slider=True) - # Options - col = layout.column(align=True) + split = layout.split(percentage=0.5) + col = split.column(align=True) col.active = not gpl.lock - col.prop(gpl, "line_width", slider=True) + col.prop(gpl, "show_x_ray") - split = layout.split(percentage=0.5) - split.active = not gpl.lock + col.label("Tint") + col.prop(gpl, "tint_color", text="") + col.prop(gpl, "tint_factor", text="Factor", slider=True) col = split.column(align=True) - col.prop(gpl, "use_volumetric_strokes") + col.active = not gpl.lock col.prop(gpl, "show_points", text="Points") + # Full-Row - Parent + ''' + row = layout.row() + if context.area.type == 'VIEW_3D' and not gpl.lock: + row.enabled = True + else: + row.enabled = False + ''' - col = split.column(align=True) - col.prop(gpl, "use_hq_fill") - col.prop(gpl, "show_x_ray") + # col = row.column() + if context.space_data.type == 'VIEW_3D': + col.label(text="Parent:") + col.prop(gpl, "parent", text="") - layout.separator() + sub = col.column() + sub.prop(gpl, "parent_type", text="") + parent = gpl.parent + if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE': + sub.prop_search(gpl, "parent_bone", parent.data, "bones", text="") + + # Full-Row - Thickness + row = layout.row(align=True) + row.active = not gpl.lock + row.prop(gpl, "line_change", text="Thickness change", slider=True) + row.operator("gpencil.stroke_apply_thickness", icon='STYLUS_PRESSURE', text="") # Full-Row - Frame Locking (and Delete Frame) row = layout.row(align=True) @@ -606,8 +875,6 @@ class GreasePencilDataPanel: row.prop(gpl, "lock_frame", text=lock_label, icon='UNLOCKED') row.operator("gpencil.active_frame_delete", text="", icon='X') - layout.separator() - # Onion skinning col = layout.column(align=True) col.active = not gpl.lock @@ -633,14 +900,103 @@ class GreasePencilDataPanel: row.prop(gpl, "after_color", text="") sub.prop(gpl, "ghost_after_range", text="After") - # Smooth and subdivide new strokes - layout.separator() - col = layout.column(align=True) - col.label(text="New Stroke Quality:") - col.prop(gpl, "pen_smooth_factor") - col.prop(gpl, "pen_smooth_steps") - col.separator() - col.prop(gpl, "pen_subdivision_steps") + +class GreasePencilPaletteColorPanel: + # subclass must set + bl_label = "Grease Pencil Colors" + bl_region_type = 'UI' + + @classmethod + def poll(cls, context): + if context.gpencil_data is None: + return False + + gpd = context.gpencil_data + return bool(gpd.layers.active) + + @staticmethod + def draw(self, context): + layout = self.layout + palette = context.active_gpencil_palette + + if palette: + row = layout.row(align=True) + row.operator_context = 'EXEC_REGION_WIN' + row.operator_menu_enum("gpencil.palette_change", "palette", text="", icon='COLOR') + row.prop(palette, "name", text="") + row.operator("gpencil.palette_add", icon='ZOOMIN', text="") + row.operator("gpencil.palette_remove", icon='ZOOMOUT', text="") + + # Palette colors + row = layout.row() + col = row.column() + if len(palette.colors) >= 2: + color_rows = 5 + else: + color_rows = 2 + col.template_list("GPENCIL_UL_palettecolor", "", palette, "colors", palette.colors, "active_index", + rows=color_rows) + + col = row.column() + + sub = col.column(align=True) + sub.operator("gpencil.palettecolor_add", icon='ZOOMIN', text="") + sub.operator("gpencil.palettecolor_remove", icon='ZOOMOUT', text="") + + palcol = context.active_gpencil_palettecolor + if palcol: + sub.menu("GPENCIL_MT_palettecolor_specials", icon='DOWNARROW_HLT', text="") + + if len(palette.colors) > 1: + col.separator() + + sub = col.column(align=True) + sub.operator("gpencil.palettecolor_move", icon='TRIA_UP', text="").direction = 'UP' + sub.operator("gpencil.palettecolor_move", icon='TRIA_DOWN', text="").direction = 'DOWN' + + col.separator() + sub = col.column(align=True) + sub.operator("gpencil.palettecolor_isolate", icon='LOCKED', text="").affect_visibility = False + sub.operator("gpencil.palettecolor_isolate", icon='RESTRICT_VIEW_OFF', text="").affect_visibility = True + sub.operator("gpencil.stroke_lock_color", icon='BORDER_RECT', text="") + sub.operator("gpencil.palette_lock_layer", icon='COLOR', text="") + + pcolor = palette.colors.active + if pcolor: + self.draw_palettecolors(layout, pcolor) + + # ---------------------------------------------- + # Draw palette colors + # ---------------------------------------------- + def draw_palettecolors(self, layout, pcolor): + # color settings + split = layout.split(percentage=0.5) + split.active = not pcolor.lock + + # Column 1 - Stroke + col = split.column(align=True) + col.active = not pcolor.lock + col.label(text="Stroke:") + col.prop(pcolor, "color", text="") + col.prop(pcolor, "alpha", slider=True) + + # Column 2 - Fill + col = split.column(align=True) + col.active = not pcolor.lock + col.label(text="Fill:") + col.prop(pcolor, "fill_color", text="") + col.prop(pcolor, "fill_alpha", text="Opacity", slider=True) + + # Options + split = layout.split(percentage=0.5) + split.active = not pcolor.lock + + col = split.column(align=True) + col.active = not pcolor.lock + col.prop(pcolor, "use_volumetric_strokes") + col = split.column(align=True) + col.active = not pcolor.lock + col.prop(pcolor, "use_hq_fill") class GreasePencilToolsPanel: diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 58bb956f653..799f1e20dc6 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -25,8 +25,10 @@ from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, GreasePencilStrokeSculptPanel, - GreasePencilDataPanel - ) + GreasePencilBrushPanel, + GreasePencilBrushCurvesPanel, + GreasePencilDataPanel, + GreasePencilPaletteColorPanel) class CLIP_UL_tracking_objects(UIList): @@ -1126,6 +1128,16 @@ class CLIP_PT_grease_pencil(GreasePencilDataPanel, CLIP_PT_clip_view_panel, Pane # But, this should only be visible in "clip" view +# Grease Pencil palette colors +class CLIP_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, CLIP_PT_clip_view_panel, Panel): + bl_space_type = 'CLIP_EDITOR' + bl_region_type = 'UI' + bl_options = {'DEFAULT_CLOSED'} + + # NOTE: this is just a wrapper around the generic GP Panel + # But, this should only be visible in "clip" view + + # Grease Pencil drawing tools class CLIP_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): bl_space_type = 'CLIP_EDITOR' @@ -1141,6 +1153,15 @@ class CLIP_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel): bl_space_type = 'CLIP_EDITOR' +# Grease Pencil drawing brushes +class CLIP_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): + bl_space_type = 'CLIP_EDITOR' + + +# Grease Pencil drawing curves +class CLIP_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): + bl_space_type = 'CLIP_EDITOR' + class CLIP_MT_view(Menu): bl_label = "View" diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 9f719bc793e..bf6df05c2b2 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -29,7 +29,10 @@ from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, GreasePencilStrokeSculptPanel, + GreasePencilBrushPanel, + GreasePencilBrushCurvesPanel, GreasePencilDataPanel, + GreasePencilPaletteColorPanel ) from bpy.app.translations import pgettext_iface as iface_ @@ -1187,6 +1190,14 @@ class IMAGE_PT_grease_pencil(GreasePencilDataPanel, Panel): # NOTE: this is just a wrapper around the generic GP Panel +# Grease Pencil palette colors +class IMAGE_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, Panel): + bl_space_type = 'IMAGE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + + # Grease Pencil drawing tools class IMAGE_PT_tools_grease_pencil_draw(GreasePencilDrawingToolsPanel, Panel): bl_space_type = 'IMAGE_EDITOR' @@ -1202,5 +1213,15 @@ class IMAGE_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel): bl_space_type = 'IMAGE_EDITOR' +# Grease Pencil drawing brushes +class IMAGE_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): + bl_space_type = 'IMAGE_EDITOR' + + +# Grease Pencil drawing curves +class IMAGE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): + bl_space_type = 'IMAGE_EDITOR' + + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index ee342265f3d..8821fa0ca58 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -25,8 +25,11 @@ from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, GreasePencilStrokeSculptPanel, + GreasePencilBrushPanel, + GreasePencilBrushCurvesPanel, GreasePencilDataPanel, - GreasePencilToolsPanel, + GreasePencilPaletteColorPanel, + GreasePencilToolsPanel ) @@ -464,6 +467,19 @@ class NODE_PT_grease_pencil(GreasePencilDataPanel, Panel): return snode is not None and snode.node_tree is not None +# Grease Pencil palette colors +class NODE_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + + @classmethod + def poll(cls, context): + snode = context.space_data + return snode is not None and snode.node_tree is not None + + class NODE_PT_grease_pencil_tools(GreasePencilToolsPanel, Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' @@ -494,6 +510,16 @@ class NODE_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'TOOLS' +# Grease Pencil drawing brushes +class NODE_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'TOOLS' + +# Grease Pencil drawing curves +class NODE_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): + bl_space_type = 'NODE_EDITOR' + bl_region_type = 'TOOLS' + # ----------------------------- diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index 4d1b9104344..26136a8e024 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -20,7 +20,11 @@ import bpy from bpy.types import Header, Menu, Panel from rna_prop_ui import PropertyPanel -from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel, GreasePencilToolsPanel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDataPanel, + GreasePencilPaletteColorPanel, + GreasePencilToolsPanel, + ) from bpy.app.translations import pgettext_iface as iface_ @@ -1186,6 +1190,14 @@ class SEQUENCER_PT_grease_pencil(GreasePencilDataPanel, SequencerButtonsPanel_Ou # But, it should only show up when there are images in the preview region +class SEQUENCER_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, SequencerButtonsPanel_Output, Panel): + bl_space_type = 'SEQUENCE_EDITOR' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + # But, it should only show up when there are images in the preview region + + class SEQUENCER_PT_grease_pencil_tools(GreasePencilToolsPanel, SequencerButtonsPanel_Output, Panel): bl_space_type = 'SEQUENCE_EDITOR' bl_region_type = 'UI' diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 681fa8e39aa..5f16957b435 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -19,7 +19,10 @@ # <pep8 compliant> import bpy from bpy.types import Header, Menu, Panel -from bl_ui.properties_grease_pencil_common import GreasePencilDataPanel +from bl_ui.properties_grease_pencil_common import ( + GreasePencilDataPanel, + GreasePencilPaletteColorPanel, + ) from bl_ui.properties_paint_common import UnifiedPaintPanel from bpy.app.translations import contexts as i18n_contexts @@ -139,7 +142,9 @@ class VIEW3D_HT_header(Header): # XXX: icon layout.prop(context.gpencil_data, "use_onion_skinning", text="Onion Skins", icon='PARTICLE_PATH') - layout.prop(context.tool_settings.gpencil_sculpt, "use_select_mask") + row = layout.row(align=True) + row.prop(context.tool_settings.gpencil_sculpt, "use_select_mask") + row.prop(context.tool_settings.gpencil_sculpt, "selection_alpha", slider=True) class VIEW3D_MT_editor_menus(Menu): @@ -3079,6 +3084,13 @@ class VIEW3D_PT_grease_pencil(GreasePencilDataPanel, Panel): # NOTE: this is just a wrapper around the generic GP Panel +class VIEW3D_PT_grease_pencil_palettecolor(GreasePencilPaletteColorPanel, Panel): + bl_space_type = 'VIEW_3D' + bl_region_type = 'UI' + + # NOTE: this is just a wrapper around the generic GP Panel + + class VIEW3D_PT_view3d_properties(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'UI' diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index e9f4a45c2c3..8019c8d2f34 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -22,7 +22,9 @@ from bpy.types import Menu, Panel, UIList from bl_ui.properties_grease_pencil_common import ( GreasePencilDrawingToolsPanel, GreasePencilStrokeEditPanel, - GreasePencilStrokeSculptPanel + GreasePencilStrokeSculptPanel, + GreasePencilBrushPanel, + GreasePencilBrushCurvesPanel ) from bl_ui.properties_paint_common import ( UnifiedPaintPanel, @@ -1965,6 +1967,15 @@ class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, Panel) bl_space_type = 'VIEW_3D' +# Grease Pencil drawing brushes +class VIEW3D_PT_tools_grease_pencil_brush(GreasePencilBrushPanel, Panel): + bl_space_type = 'VIEW_3D' + +# Grease Pencil drawingcurves +class VIEW3D_PT_tools_grease_pencil_brushcurves(GreasePencilBrushCurvesPanel, Panel): + bl_space_type = 'VIEW_3D' + + # Note: moved here so that it's always in last position in 'Tools' panels! class VIEW3D_PT_tools_history(View3DPanel, Panel): bl_category = "Tools" |